From b0b277ac6c54b533193b2816dd7e2b85e5695f22 Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:23:27 +0100 Subject: [PATCH] Protect API routes with nova:api middleware --- dist/js/field.js | 2 +- resources/js/components/FormField.vue | 4 ++-- resources/js/components/IndexField.vue | 2 +- routes/api.php | 6 +++--- src/FieldServiceProvider.php | 3 ++- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dist/js/field.js b/dist/js/field.js index 07c90c4..9ac8e2a 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,2 @@ /*! For license information please see field.js.LICENSE.txt */ -(()=>{var t,e={6706:(t,e,r)=>{"use strict";var n={};r.r(n),r.d(n,{hasBrowserEnv:()=>Ee,hasStandardBrowserEnv:()=>Se,hasStandardBrowserWebWorkerEnv:()=>je});const o=Vue;var i=(0,o.createElementVNode)("div",{class:"absolute",style:{top:"50%",right:"100%",transform:"translateY(-50%)","border-top":"10px solid transparent","border-right":"20px solid white","border-bottom":"10px solid transparent"}},null,-1),a={class:"relative z-2"},s={class:"text-base"},u={class:"font-bold"},c=(0,o.createElementVNode)("br",null,null,-1),l={class:"text-xs tracking-wide"},f=[(0,o.createElementVNode)("path",{class:"text-red-500",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)],p={key:2,class:"w-6 h-6",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h=[(0,o.createElementVNode)("path",{d:"M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z","stroke-linecap":"round","stroke-linejoin":"round",style:{color:"#b5b5b5"}},null,-1)];function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),s=new N(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function O(){}var E={};c(E,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(C([])));x&&x!==r&&n.call(x,a)&&(E=x);var j=O.prototype=b.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,a,s){var u=f(t[o],t,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==d(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=R(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=f(e,r,n);if("normal"===c.type){if(o=n.done?m:h,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function v(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}const m={props:["resourceName","resource","field"],data:function(){return{fieldValue:null,fieldData:null,lastUpdate:null}},methods:{fetchData:function(){var t,e=this;return(t=y().mark((function t(){var r,n;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("/api/busy-is-busy",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":document.querySelector('meta[name="csrf-token"]').getAttribute("content")},body:JSON.stringify({"model-id":e.resource.id.value,"model-name":e.$page.props.resourceName})});case 3:return r=t.sent,t.next=6,r.json();case 6:(n=t.sent).success?(e.fieldValue="Busy",e.fieldData=n.data,e.lastUpdate=n.lastUpdate,e.setTableRowBgColor(e.fieldData.pivot.busiable_id)):e.fieldValue="Free",t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),console.error(t.t0),e.fieldValue="Error";case 14:case"end":return t.stop()}}),t,null,[[0,10]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){v(i,n,o,a,s,"next",t)}function s(t){v(i,n,o,a,s,"throw",t)}a(void 0)}))})()},showDetails:function(){document.querySelector(".details-box-"+this.fieldData.pivot.busiable_id).classList.toggle("hidden")},setTableRowBgColor:function(t){var e=document.querySelector('[dusk="'.concat(t,'-row"]'));e.style.backgroundColor="rgba(255, 0, 0, 0.03)",e.classList.remove("group")}},mounted:function(){this.fetchData()}};var g=r(3744);const b=(0,g.Z)(m,[["render",function(t,e,r,n,d,y){return(0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[d.fieldData?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["details-box-"+d.fieldData.pivot.busiable_id,"absolute bg-white p-4 rounded-lg shadow-lg hidden"]),style:{transform:"translate(40px, -25px)","z-index":"5"}},[i,(0,o.createElementVNode)("p",a,[(0,o.createElementVNode)("span",s,[(0,o.createTextVNode)("Occupied by "),(0,o.createElementVNode)("span",u,(0,o.toDisplayString)(d.fieldData.name),1)]),c,(0,o.createElementVNode)("span",l,"Last activity: "+(0,o.toDisplayString)(d.lastUpdate),1)])],2)):(0,o.createCommentVNode)("",!0),"Busy"===d.fieldValue?((0,o.openBlock)(),(0,o.createElementBlock)("svg",{key:1,class:"w-6 h-6",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",onMouseout:e[0]||(e[0]=function(){return y.showDetails&&y.showDetails.apply(y,arguments)}),onMouseover:e[1]||(e[1]=function(){return y.showDetails&&y.showDetails.apply(y,arguments)})},f,32)):((0,o.openBlock)(),(0,o.createElementBlock)("svg",p,h))],64)}]]);var w=r(3906),O=r.n(w),E={nested:{type:Boolean,default:!1},preventInitialLoading:{type:Boolean,default:!1},showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},relatedResourceId:{type:[Number,String]},relatedResourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},relationshipType:{type:String,default:""},shouldOverrideMeta:{type:Boolean,default:!1},disablePagination:{type:Boolean,default:!1},clickAction:{type:String,default:"view",validator:function(t){return["edit","select","ignore","detail"].includes(t)}},mode:{type:String,default:"form",validator:function(t){return["form","modal","action-modal","action-fullscreen"].includes(t)}}};function S(t){return O()(E,t)}function x(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:void 0!==r.g?r.g:{}}const j="function"==typeof Proxy,_="devtools-plugin:setup";let A,P;function R(){return void 0!==A||("undefined"!=typeof window&&window.performance?(A=!0,P=window.performance):void 0!==r.g&&(null===(t=r.g.perf_hooks)||void 0===t?void 0:t.performance)?(A=!0,P=r.g.perf_hooks.performance):A=!1),A?P.now():Date.now();var t}class T{constructor(t,e){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=e;const r={};if(t.settings)for(const e in t.settings){const n=t.settings[e];r[e]=n.defaultValue}const n=`__vue-devtools-plugin-settings__${t.id}`;let o=Object.assign({},r);try{const t=localStorage.getItem(n),e=JSON.parse(t);Object.assign(o,e)}catch(t){}this.fallbacks={getSettings:()=>o,setSettings(t){try{localStorage.setItem(n,JSON.stringify(t))}catch(t){}o=t},now:()=>R()},e&&e.on("plugin:settings:set",((t,e)=>{t===this.plugin.id&&this.fallbacks.setSettings(e)})),this.proxiedOn=new Proxy({},{get:(t,e)=>this.target?this.target.on[e]:(...t)=>{this.onQueue.push({method:e,args:t})}}),this.proxiedTarget=new Proxy({},{get:(t,e)=>this.target?this.target[e]:"on"===e?this.proxiedOn:Object.keys(this.fallbacks).includes(e)?(...t)=>(this.targetQueue.push({method:e,args:t,resolve:()=>{}}),this.fallbacks[e](...t)):(...t)=>new Promise((r=>{this.targetQueue.push({method:e,args:t,resolve:r})}))})}async setRealTarget(t){this.target=t;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function k(t,e){const r=t,n=x(),o=x().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=j&&r.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const t=i?new T(r,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r,setupFn:e,proxy:t}),t&&e(t.proxiedTarget)}else o.emit(_,t,e)}var N="store";function C(t,e){Object.keys(t).forEach((function(r){return e(t[r],r)}))}function L(t){return null!==t&&"object"==typeof t}function U(t,e,r){return e.indexOf(t)<0&&(r&&r.prepend?e.unshift(t):e.push(t)),function(){var r=e.indexOf(t);r>-1&&e.splice(r,1)}}function B(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var r=t.state;F(t,r,[],t._modules.root,!0),D(t,r,e)}function D(t,e,r){var n=t._state,i=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var a=t._wrappedGetters,s={},u={},c=(0,o.effectScope)(!0);c.run((function(){C(a,(function(e,r){s[r]=function(t,e){return function(){return t(e)}}(e,t),u[r]=(0,o.computed)((function(){return s[r]()})),Object.defineProperty(t.getters,r,{get:function(){return u[r].value},enumerable:!0})}))})),t._state=(0,o.reactive)({data:e}),t._scope=c,t.strict&&function(t){(0,o.watch)((function(){return t._state.data}),(function(){0}),{deep:!0,flush:"sync"})}(t),n&&r&&t._withCommit((function(){n.data=null})),i&&i.stop()}function F(t,e,r,n,o){var i=!r.length,a=t._modules.getNamespace(r);if(n.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=n),!i&&!o){var s=M(e,r.slice(0,-1)),u=r[r.length-1];t._withCommit((function(){s[u]=n.state}))}var c=n.context=function(t,e,r){var n=""===e,o={dispatch:n?t.dispatch:function(r,n,o){var i=V(r,n,o),a=i.payload,s=i.options,u=i.type;return s&&s.root||(u=e+u),t.dispatch(u,a)},commit:n?t.commit:function(r,n,o){var i=V(r,n,o),a=i.payload,s=i.options,u=i.type;s&&s.root||(u=e+u),t.commit(u,a,s)}};return Object.defineProperties(o,{getters:{get:n?function(){return t.getters}:function(){return I(t,e)}},state:{get:function(){return M(t.state,r)}}}),o}(t,a,r);n.forEachMutation((function(e,r){!function(t,e,r,n){var o=t._mutations[e]||(t._mutations[e]=[]);o.push((function(e){r.call(t,n.state,e)}))}(t,a+r,e,c)})),n.forEachAction((function(e,r){var n=e.root?r:a+r,o=e.handler||e;!function(t,e,r,n){var o=t._actions[e]||(t._actions[e]=[]);o.push((function(e){var o,i=r.call(t,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:t.getters,rootState:t.state},e);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,n,o,c)})),n.forEachGetter((function(e,r){!function(t,e,r,n){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return r(n.state,n.getters,t.state,t.getters)}}(t,a+r,e,c)})),n.forEachChild((function(n,i){F(t,e,r.concat(i),n,o)}))}function I(t,e){if(!t._makeLocalGettersCache[e]){var r={},n=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,n)===e){var i=o.slice(n);Object.defineProperty(r,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=r}return t._makeLocalGettersCache[e]}function M(t,e){return e.reduce((function(t,e){return t[e]}),t)}function V(t,e,r){return L(t)&&t.type&&(r=e,e=t,t=t.type),{type:t,payload:e,options:r}}var q="vuex:mutations",z="vuex:actions",W="vuex",$=0;function H(t,e){k({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(r){r.addTimelineLayer({id:q,label:"Vuex Mutations",color:G}),r.addTimelineLayer({id:z,label:"Vuex Actions",color:G}),r.addInspector({id:W,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree((function(r){if(r.app===t&&r.inspectorId===W)if(r.filter){var n=[];X(n,e._modules.root,r.filter,""),r.rootNodes=n}else r.rootNodes=[K(e._modules.root,"")]})),r.on.getInspectorState((function(r){if(r.app===t&&r.inspectorId===W){var n=r.nodeId;I(e,n),r.state=function(t,e,r){e="root"===r?e:e[r];var n=Object.keys(e),o={state:Object.keys(t.state).map((function(e){return{key:e,editable:!0,value:t.state[e]}}))};if(n.length){var i=function(t){var e={};return Object.keys(t).forEach((function(r){var n=r.split("/");if(n.length>1){var o=e,i=n.pop();n.forEach((function(t){o[t]||(o[t]={_custom:{value:{},display:t,tooltip:"Module",abstract:!0}}),o=o[t]._custom.value})),o[i]=Q((function(){return t[r]}))}else e[r]=Q((function(){return t[r]}))})),e}(e);o.getters=Object.keys(i).map((function(t){return{key:t.endsWith("/")?Y(t):t,editable:!1,value:Q((function(){return i[t]}))}}))}return o}((o=e._modules,(a=(i=n).split("/").filter((function(t){return t}))).reduce((function(t,e,r){var n=t[e];if(!n)throw new Error('Missing module "'+e+'" for path "'+i+'".');return r===a.length-1?n:n._children}),"root"===i?o:o.root._children)),"root"===n?e.getters:e._makeLocalGettersCache,n)}var o,i,a})),r.on.editInspectorState((function(r){if(r.app===t&&r.inspectorId===W){var n=r.nodeId,o=r.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),e._withCommit((function(){r.set(e._state.data,o,r.state.value)}))}})),e.subscribe((function(t,e){var n={};t.payload&&(n.payload=t.payload),n.state=e,r.notifyComponentUpdate(),r.sendInspectorTree(W),r.sendInspectorState(W),r.addTimelineEvent({layerId:q,event:{time:Date.now(),title:t.type,data:n}})})),e.subscribeAction({before:function(t,e){var n={};t.payload&&(n.payload=t.payload),t._id=$++,t._time=Date.now(),n.state=e,r.addTimelineEvent({layerId:z,event:{time:t._time,title:t.type,groupId:t._id,subtitle:"start",data:n}})},after:function(t,e){var n={},o=Date.now()-t._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},t.payload&&(n.payload=t.payload),n.state=e,r.addTimelineEvent({layerId:z,event:{time:Date.now(),title:t.type,groupId:t._id,subtitle:"end",data:n}})}})}))}var G=8702998,J={label:"namespaced",textColor:16777215,backgroundColor:6710886};function Y(t){return t&&"root"!==t?t.split("/").slice(-2,-1)[0]:"Root"}function K(t,e){return{id:e||"root",label:Y(e),tags:t.namespaced?[J]:[],children:Object.keys(t._children).map((function(r){return K(t._children[r],e+r+"/")}))}}function X(t,e,r,n){n.includes(r)&&t.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:e.namespaced?[J]:[]}),Object.keys(e._children).forEach((function(o){X(t,e._children[o],r,n+o+"/")}))}function Q(t){try{return t()}catch(t){return t}}var Z=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=("function"==typeof r?r():r)||{}},tt={namespaced:{configurable:!0}};tt.namespaced.get=function(){return!!this._rawModule.namespaced},Z.prototype.addChild=function(t,e){this._children[t]=e},Z.prototype.removeChild=function(t){delete this._children[t]},Z.prototype.getChild=function(t){return this._children[t]},Z.prototype.hasChild=function(t){return t in this._children},Z.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},Z.prototype.forEachChild=function(t){C(this._children,t)},Z.prototype.forEachGetter=function(t){this._rawModule.getters&&C(this._rawModule.getters,t)},Z.prototype.forEachAction=function(t){this._rawModule.actions&&C(this._rawModule.actions,t)},Z.prototype.forEachMutation=function(t){this._rawModule.mutations&&C(this._rawModule.mutations,t)},Object.defineProperties(Z.prototype,tt);var et=function(t){this.register([],t,!1)};function rt(t,e,r){if(e.update(r),r.modules)for(var n in r.modules){if(!e.getChild(n))return void 0;rt(t.concat(n),e.getChild(n),r.modules[n])}}et.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},et.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,r){return t+((e=e.getChild(r)).namespaced?r+"/":"")}),"")},et.prototype.update=function(t){rt([],this.root,t)},et.prototype.register=function(t,e,r){var n=this;void 0===r&&(r=!0);var o=new Z(e,r);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&C(e.modules,(function(e,o){n.register(t.concat(o),e,r)}))},et.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),r=t[t.length-1],n=e.getChild(r);n&&n.runtime&&e.removeChild(r)},et.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),r=t[t.length-1];return!!e&&e.hasChild(r)};var nt=function(t){var e=this;void 0===t&&(t={});var r=t.plugins;void 0===r&&(r=[]);var n=t.strict;void 0===n&&(n=!1);var o=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new et(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(t,e){return a.call(i,t,e)},this.commit=function(t,e,r){return s.call(i,t,e,r)},this.strict=n;var u=this._modules.root.state;F(this,u,[],this._modules.root),D(this,u),r.forEach((function(t){return t(e)}))},ot={state:{configurable:!0}};nt.prototype.install=function(t,e){t.provide(e||N,this),t.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&H(t,this)},ot.state.get=function(){return this._state.data},ot.state.set=function(t){0},nt.prototype.commit=function(t,e,r){var n=this,o=V(t,e,r),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),u=this._mutations[i];u&&(this._withCommit((function(){u.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,n.state)})))},nt.prototype.dispatch=function(t,e){var r=this,n=V(t,e),o=n.type,i=n.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,r.state)}))}catch(t){0}var u=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){u.then((function(e){try{r._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,r.state)}))}catch(t){0}t(e)}),(function(t){try{r._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,r.state,t)}))}catch(t){0}e(t)}))}))}},nt.prototype.subscribe=function(t,e){return U(t,this._subscribers,e)},nt.prototype.subscribeAction=function(t,e){return U("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},nt.prototype.watch=function(t,e,r){var n=this;return(0,o.watch)((function(){return t(n.state,n.getters)}),e,Object.assign({},r))},nt.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._state.data=t}))},nt.prototype.registerModule=function(t,e,r){void 0===r&&(r={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),F(this,this.state,t,this._modules.get(t),r.preserveState),D(this,this.state)},nt.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){delete M(e.state,t.slice(0,-1))[t[t.length-1]]})),B(this)},nt.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},nt.prototype.hotUpdate=function(t){this._modules.update(t),B(this,!0)},nt.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(nt.prototype,ot);ut((function(t,e){var r={};return st(e).forEach((function(e){var n=e.key,o=e.val;r[n]=function(){var e=this.$store.state,r=this.$store.getters;if(t){var n=ct(this.$store,"mapState",t);if(!n)return;e=n.context.state,r=n.context.getters}return"function"==typeof o?o.call(this,e,r):e[o]},r[n].vuex=!0})),r}));var it=ut((function(t,e){var r={};return st(e).forEach((function(e){var n=e.key,o=e.val;r[n]=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.$store.commit;if(t){var i=ct(this.$store,"mapMutations",t);if(!i)return;n=i.context.commit}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}})),r})),at=ut((function(t,e){var r={};return st(e).forEach((function(e){var n=e.key,o=e.val;o=t+o,r[n]=function(){if(!t||ct(this.$store,"mapGetters",t))return this.$store.getters[o]},r[n].vuex=!0})),r}));ut((function(t,e){var r={};return st(e).forEach((function(e){var n=e.key,o=e.val;r[n]=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.$store.dispatch;if(t){var i=ct(this.$store,"mapActions",t);if(!i)return;n=i.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}})),r}));function st(t){return function(t){return Array.isArray(t)||L(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function ut(t){return function(e,r){return"string"!=typeof e?(r=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,r)}}function ct(t,e,r){return t._modulesNamespaceMap[r]}var lt=r(6649),ft=r(5543),pt=r.n(ft);function ht(t){return Boolean(!pt()(t)&&""!==t)}function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vt(t){for(var e=1;e1?window.history.back():!this.navigateBackUsingHistory&&ht(t)?Nova.visit(t,{replace:!0}):Nova.visit("/")}}),vt({},at(["canLeaveForm","canLeaveFormToPreviousPage"]));function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e{const e=St.call(t);return _t[e]||(_t[e]=e.slice(8,-1).toLowerCase())});var _t;const At=t=>(t=t.toLowerCase(),e=>jt(e)===t),Pt=t=>e=>typeof e===t,{isArray:Rt}=Array,Tt=Pt("undefined");const kt=At("ArrayBuffer");const Nt=Pt("string"),Ct=Pt("function"),Lt=Pt("number"),Ut=t=>null!==t&&"object"==typeof t,Bt=t=>{if("object"!==jt(t))return!1;const e=xt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Dt=At("Date"),Ft=At("File"),It=At("Blob"),Mt=At("FileList"),Vt=At("URLSearchParams");function qt(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),Rt(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const Wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,$t=t=>!Tt(t)&&t!==Wt;const Ht=(Gt="undefined"!=typeof Uint8Array&&xt(Uint8Array),t=>Gt&&t instanceof Gt);var Gt;const Jt=At("HTMLFormElement"),Yt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Kt=At("RegExp"),Xt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};qt(r,((r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)})),Object.defineProperties(t,n)},Qt="abcdefghijklmnopqrstuvwxyz",Zt="0123456789",te={DIGIT:Zt,ALPHA:Qt,ALPHA_DIGIT:Qt+Qt.toUpperCase()+Zt};const ee=At("AsyncFunction"),re={isArray:Rt,isArrayBuffer:kt,isBuffer:function(t){return null!==t&&!Tt(t)&&null!==t.constructor&&!Tt(t.constructor)&&Ct(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Ct(t.append)&&("formdata"===(e=jt(t))||"object"===e&&Ct(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&kt(t.buffer),e},isString:Nt,isNumber:Lt,isBoolean:t=>!0===t||!1===t,isObject:Ut,isPlainObject:Bt,isUndefined:Tt,isDate:Dt,isFile:Ft,isBlob:It,isRegExp:Kt,isFunction:Ct,isStream:t=>Ut(t)&&Ct(t.pipe),isURLSearchParams:Vt,isTypedArray:Ht,isFileList:Mt,forEach:qt,merge:function t(){const{caseless:e}=$t(this)&&this||{},r={},n=(n,o)=>{const i=e&&zt(r,o)||o;Bt(r[i])&&Bt(n)?r[i]=t(r[i],n):Bt(n)?r[i]=t({},n):Rt(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(qt(e,((e,n)=>{r&&Ct(e)?t[n]=Et(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&xt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:jt,kindOfTest:At,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(Rt(t))return t;let e=t.length;if(!Lt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Jt,hasOwnProperty:Yt,hasOwnProp:Yt,reduceDescriptors:Xt,freezeMethods:t=>{Xt(t,((e,r)=>{if(Ct(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];Ct(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return Rt(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:zt,global:Wt,isContextDefined:$t,ALPHABET:te,generateString:(t=16,e=te.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&Ct(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(Ut(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=Rt(t)?[]:{};return qt(t,((t,e)=>{const i=r(t,n+1);!Tt(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:ee,isThenable:t=>t&&(Ut(t)||Ct(t))&&Ct(t.then)&&Ct(t.catch)};function ne(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}re.inherits(ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const oe=ne.prototype,ie={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ie[t]={value:t}})),Object.defineProperties(ne,ie),Object.defineProperty(oe,"isAxiosError",{value:!0}),ne.from=(t,e,r,n,o,i)=>{const a=Object.create(oe);return re.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ne.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const ae=ne;var se=r(2983).lW;function ue(t){return re.isPlainObject(t)||re.isArray(t)}function ce(t){return re.endsWith(t,"[]")?t.slice(0,-2):t}function le(t,e,r){return t?t.concat(e).map((function(t,e){return t=ce(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const fe=re.toFlatObject(re,{},null,(function(t){return/^is[A-Z]/.test(t)}));const pe=function(t,e,r){if(!re.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=re.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!re.isUndefined(e[t])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&re.isSpecCompliantForm(e);if(!re.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(re.isDate(t))return t.toISOString();if(!s&&re.isBlob(t))throw new ae("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(t)||re.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):se.from(t):t}function c(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if(re.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(re.isArray(t)&&function(t){return re.isArray(t)&&!t.some(ue)}(t)||(re.isFileList(t)||re.endsWith(r,"[]"))&&(s=re.toArray(t)))return r=ce(r),s.forEach((function(t,n){!re.isUndefined(t)&&null!==t&&e.append(!0===a?le([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!ue(t)||(e.append(le(o,r,i),u(t)),!1)}const l=[],f=Object.assign(fe,{defaultVisitor:c,convertValue:u,isVisitable:ue});if(!re.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!re.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),re.forEach(r,(function(r,i){!0===(!(re.isUndefined(r)||null===r)&&o.call(e,r,re.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function he(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function de(t,e){this._pairs=[],t&&pe(t,this,e)}const ye=de.prototype;ye.append=function(t,e){this._pairs.push([t,e])},ye.toString=function(t){const e=t?function(e){return t.call(this,e,he)}:he;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ve=de;function me(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ge(t,e,r){if(!e)return t;const n=r&&r.encode||me,o=r&&r.serialize;let i;if(i=o?o(e,r):re.isURLSearchParams(e)?e.toString():new ve(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const be=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){re.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},we={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ve,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ee="undefined"!=typeof window&&"undefined"!=typeof document,Se=(xe="undefined"!=typeof navigator&&navigator.product,Ee&&["ReactNative","NativeScript","NS"].indexOf(xe)<0);var xe;const je="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_e={...n,...Oe};const Ae=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;if(i=!i&&re.isArray(n)?n.length:i,s)return re.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&re.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&re.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return re.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null};const Pe={transitional:we,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=re.isObject(t);o&&re.isHTMLForm(t)&&(t=new FormData(t));if(re.isFormData(t))return n&&n?JSON.stringify(Ae(t)):t;if(re.isArrayBuffer(t)||re.isBuffer(t)||re.isStream(t)||re.isFile(t)||re.isBlob(t))return t;if(re.isArrayBufferView(t))return t.buffer;if(re.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return pe(t,new _e.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return _e.isNode&&re.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return pe(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(re.isString(t))try{return(e||JSON.parse)(t),re.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Pe.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&re.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw ae.from(t,ae.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],(t=>{Pe.headers[t]={}}));const Re=Pe,Te=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ke=Symbol("internals");function Ne(t){return t&&String(t).trim().toLowerCase()}function Ce(t){return!1===t||null==t?t:re.isArray(t)?t.map(Ce):String(t)}function Le(t,e,r,n,o){return re.isFunction(n)?n.call(this,e,r):(o&&(e=r),re.isString(e)?re.isString(n)?-1!==e.indexOf(n):re.isRegExp(n)?n.test(e):void 0:void 0)}class Ue{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=Ne(e);if(!o)throw new Error("header name must be a non-empty string");const i=re.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=Ce(t))}const i=(t,e)=>re.forEach(t,((t,r)=>o(t,r,e)));return re.isPlainObject(t)||t instanceof this.constructor?i(t,e):re.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&Te[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=Ne(t)){const r=re.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(re.isFunction(e))return e.call(this,t,r);if(re.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ne(t)){const r=re.findKey(this,t);return!(!r||void 0===this[r]||e&&!Le(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=Ne(t)){const o=re.findKey(r,t);!o||e&&!Le(0,r[o],o,e)||(delete r[o],n=!0)}}return re.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!Le(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return re.forEach(this,((n,o)=>{const i=re.findKey(r,o);if(i)return e[i]=Ce(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=Ce(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return re.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&re.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[ke]=this[ke]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=Ne(t);e[n]||(!function(t,e){const r=re.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return re.isArray(t)?t.forEach(n):n(t),this}}Ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Ue.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),re.freezeMethods(Ue);const Be=Ue;function De(t,e){const r=this||Re,n=e||r,o=Be.from(n.headers);let i=n.data;return re.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Fe(t){return!(!t||!t.__CANCEL__)}function Ie(t,e,r){ae.call(this,null==t?"canceled":t,ae.ERR_CANCELED,e,r),this.name="CanceledError"}re.inherits(Ie,ae,{__CANCEL__:!0});const Me=Ie;const Ve=_e.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const a=[t+"="+encodeURIComponent(e)];re.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),re.isString(n)&&a.push("path="+n),re.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qe(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const ze=_e.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=re.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const We=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=n[a];o||(o=u),r[i]=s,n[i]=u;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const He={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Be.from(t.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(re.isFormData(n))if(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const f=qe(t.baseURL,t.url);function p(){if(!l)return;const n=Be.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new ae("Request failed with status code "+r.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),c()}),(function(t){r(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),ge(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=p:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(p)},l.onabort=function(){l&&(r(new ae("Request aborted",ae.ECONNABORTED,t,l)),l=null)},l.onerror=function(){r(new ae("Network Error",ae.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||we;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new ae(e,n.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,t,l)),l=null},_e.hasStandardBrowserEnv&&(u&&re.isFunction(u)&&(u=u(t)),u||!1!==u&&ze(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Ve.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&re.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),re.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",$e(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",$e(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(r(!e||e.type?new Me(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const h=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);h&&-1===_e.protocols.indexOf(h)?r(new ae("Unsupported protocol "+h+":",ae.ERR_BAD_REQUEST,t)):l.send(n||null)}))}};re.forEach(He,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Ge=t=>`- ${t}`,Je=t=>re.isFunction(t)||null===t||!1===t,Ye=t=>{t=re.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let r=e?t.length>1?"since :\n"+t.map(Ge).join("\n"):" "+Ge(t[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function Ke(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Me(null,t)}function Xe(t){Ke(t),t.headers=Be.from(t.headers),t.data=De.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Ye(t.adapter||Re.adapter)(t).then((function(e){return Ke(t),e.data=De.call(t,t.transformResponse,e),e.headers=Be.from(e.headers),e}),(function(e){return Fe(e)||(Ke(t),e&&e.response&&(e.response.data=De.call(t,t.transformResponse,e.response),e.response.headers=Be.from(e.response.headers))),Promise.reject(e)}))}const Qe=t=>t instanceof Be?t.toJSON():t;function Ze(t,e){e=e||{};const r={};function n(t,e,r){return re.isPlainObject(t)&&re.isPlainObject(e)?re.merge.call({caseless:r},t,e):re.isPlainObject(e)?re.merge({},e):re.isArray(e)?e.slice():e}function o(t,e,r){return re.isUndefined(e)?re.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!re.isUndefined(e))return n(void 0,e)}function a(t,e){return re.isUndefined(e)?re.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Qe(t),Qe(e),!0)};return re.forEach(Object.keys(Object.assign({},t,e)),(function(n){const i=u[n]||o,a=i(t[n],e[n],n);re.isUndefined(a)&&i!==s||(r[n]=a)})),r}const tr="1.6.2",er={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{er[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const rr={};er.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new ae(n(o," has been removed"+(e?" in "+e:"")),ae.ERR_DEPRECATED);return e&&!rr[o]&&(rr[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const nr={assertOptions:function(t,e,r){if("object"!=typeof t)throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new ae("option "+i+" must be "+r,ae.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new ae("Unknown option "+i,ae.ERR_BAD_OPTION)}},validators:er},or=nr.validators;class ir{constructor(t){this.defaults=t,this.interceptors={request:new be,response:new be}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ze(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;void 0!==r&&nr.assertOptions(r,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),null!=n&&(re.isFunction(n)?e.paramsSerializer={serialize:n}:nr.assertOptions(n,{encode:or.function,serialize:or.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&re.merge(o.common,o[e.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Be.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[Xe.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new Me(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new sr((function(e){t=e})),cancel:t}}}const ur=sr;const cr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cr).forEach((([t,e])=>{cr[e]=t}));const lr=cr;const fr=function t(e){const r=new ar(e),n=Et(ar.prototype.request,r);return re.extend(n,ar.prototype,r,{allOwnKeys:!0}),re.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Ze(e,r))},n}(Re);fr.Axios=ar,fr.CanceledError=Me,fr.CancelToken=ur,fr.isCancel=Fe,fr.VERSION=tr,fr.toFormData=pe,fr.AxiosError=ae,fr.Cancel=fr.CanceledError,fr.all=function(t){return Promise.all(t)},fr.spread=function(t){return function(e){return t.apply(null,e)}},fr.isAxiosError=function(t){return re.isObject(t)&&!0===t.isAxiosError},fr.mergeConfig=Ze,fr.AxiosHeaders=Be,fr.formToJSON=t=>Ae(re.isHTMLForm(t)?new FormData(t):t),fr.getAdapter=Ye,fr.HttpStatusCode=lr,fr.default=fr;const pr=fr,{Axios:hr,AxiosError:dr,CanceledError:yr,isCancel:vr,CancelToken:mr,VERSION:gr,all:br,Cancel:wr,isAxiosError:Or,spread:Er,toFormData:Sr,AxiosHeaders:xr,HttpStatusCode:jr,formToJSON:_r,getAdapter:Ar,mergeConfig:Pr}=pr;r(6034),r(4442);var Rr=r(851),Tr=r.n(Rr);r(2512),r(759),r(6534);function kr(t){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kr(t)}function Nr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Cr(t,e,r){var n;return n=function(t,e){if("object"!=kr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==kr(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Lr={extends:{props:{formUniqueId:{type:String}},methods:{emitFieldValue:function(t,e){Nova.$emit("".concat(t,"-value"),e),!0===this.hasFormUniqueId&&Nova.$emit("".concat(this.formUniqueId,"-").concat(t,"-value"),e)},emitFieldValueChange:function(t,e){Nova.$emit("".concat(t,"-change"),e),!0===this.hasFormUniqueId&&Nova.$emit("".concat(this.formUniqueId,"-").concat(t,"-change"),e)},getFieldAttributeValueEventName:function(t){return!0===this.hasFormUniqueId?"".concat(this.formUniqueId,"-").concat(t,"-value"):"".concat(t,"-value")},getFieldAttributeChangeEventName:function(t){return!0===this.hasFormUniqueId?"".concat(this.formUniqueId,"-").concat(t,"-change"):"".concat(t,"-change")}},computed:{fieldAttribute:function(){return this.field.attribute},hasFormUniqueId:function(){return!pt()(this.formUniqueId)&&""!==this.formUniqueId},fieldAttributeValueEventName:function(){return this.getFieldAttributeValueEventName(this.fieldAttribute)},fieldAttributeChangeEventName:function(){return this.getFieldAttributeChangeEventName(this.fieldAttribute)}}},props:function(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function zr(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Wr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){zr(i,n,o,a,s,"next",t)}function s(t){zr(i,n,o,a,s,"throw",t)}a(void 0)}))}}const $r={mixins:[Lr,Mr],props:["resourceName","resource","resourceId","field"],methods:{setInitialValue:function(){this.value=this.field.value||""},fill:function(t){t.append(this.fieldAttribute,this.value||"")},checkIfIsNotBusy:function(){var t=this;return Wr(qr().mark((function e(){var r,n;return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("/api/busy-is-busy",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":document.querySelector('meta[name="csrf-token"]').getAttribute("content")},body:JSON.stringify({"model-id":t.$page.props.resourceId,"model-name":t.$page.props.resourceName})});case 3:return r=e.sent,e.next=6,r.json();case 6:if(!(n=e.sent).success){e.next=11;break}if(n.data.pivot.user_id!==t.$page.props.currentUser.id){e.next=10;break}return e.abrupt("return",!0);case 10:return e.abrupt("return",confirm("This resource is busy, do you want to proceed?"));case 11:return e.abrupt("return",!0);case 14:e.prev=14,e.t0=e.catch(0),console.error(e.t0),t.fieldValue="Error";case 18:case"end":return e.stop()}}),e,null,[[0,14]])})))()},storeAccess:function(){var t=this;return Wr(qr().mark((function e(){return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/busy-store-busy",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":document.querySelector('meta[name="csrf-token"]').getAttribute("content")},body:JSON.stringify({"model-id":t.$page.props.resourceId,"model-name":t.$page.props.resourceName,"user-id":t.$page.props.currentUser.id})});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()},updateAccess:function(){var t=this;return Wr(qr().mark((function e(){var r;return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setInterval(Wr(qr().mark((function e(){return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.storeAccess();case 2:case"end":return e.stop()}}),e)}))),null!==(r=t.field.saveEvery)&&void 0!==r?r:2e3);case 1:case"end":return e.stop()}}),e)})))()}},mounted:function(){var t=this;this.checkIfIsNotBusy().then((function(e){e?(t.storeAccess(),t.updateAccess()):window.history.back()}))}},Hr=(0,g.Z)($r,[["render",function(t,e,r,n,o,i){return null}]]);Nova.booting((function(t,e){t.component("index-nova-busy-resource-field",b),t.component("form-nova-busy-resource-field",Hr)}))},6381:()=>{},3744:(t,e)=>{"use strict";e.Z=(t,e)=>{const r=t.__vccOpts||t;for(const[t,n]of e)r[t]=n;return r}},6649:(t,e,r)=>{function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=n(r(5284)),i=r(8009),a=n(r(6533));function s(){return(s=Object.assign?Object.assign.bind():function(t){for(var e=1;e0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},r.handleBackForwardVisit=function(t){var e=this;window.history.state.version=t.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then((function(){e.restoreScrollPositions(),b(t)}))},r.locationVisit=function(t,e){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:e})),window.location.href=t.href,v(window.location).href===v(t).href&&window.location.reload()}catch(t){return!1}},r.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(t){return!1}},r.handleLocationVisit=function(t){var e,r,n,o,i=this,a=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),t.url+=window.location.hash,t.rememberedState=null!=(e=null==(r=window.history.state)?void 0:r.rememberedState)?e:{},t.scrollRegions=null!=(n=null==(o=window.history.state)?void 0:o.scrollRegions)?n:[],this.setPage(t,{preserveScroll:a.preserveScroll,preserveState:!0}).then((function(){a.preserveScroll&&i.restoreScrollPositions(),b(t)}))},r.isLocationVisitResponse=function(t){return t&&409===t.status&&t.headers["x-inertia-location"]},r.isInertiaResponse=function(t){return null==t?void 0:t.headers["x-inertia"]},r.createVisitId=function(){return this.visitId={},this.visitId},r.cancelVisit=function(t,e){var r=e.cancelled,n=void 0!==r&&r,o=e.interrupted,i=void 0!==o&&o;!t||t.completed||t.cancelled||t.interrupted||(t.cancelToken.cancel(),t.onCancel(),t.completed=!1,t.cancelled=n,t.interrupted=i,g(t),t.onFinish(t))},r.finishVisit=function(t){t.cancelled||t.interrupted||(t.completed=!0,t.cancelled=!1,t.interrupted=!1,g(t),t.onFinish(t))},r.resolvePreserveOption=function(t,e){return"function"==typeof t?t(e):"errors"===t?Object.keys(e.props.errors||{}).length>0:t},r.visit=function(t,r){var n=this,i=void 0===r?{}:r,a=i.method,u=void 0===a?e.n$.GET:a,l=i.data,p=void 0===l?{}:l,h=i.replace,g=void 0!==h&&h,b=i.preserveScroll,w=void 0!==b&&b,O=i.preserveState,E=void 0!==O&&O,S=i.only,x=void 0===S?[]:S,j=i.headers,_=void 0===j?{}:j,A=i.errorBag,P=void 0===A?"":A,R=i.forceFormData,T=void 0!==R&&R,k=i.onCancelToken,N=void 0===k?function(){}:k,C=i.onBefore,L=void 0===C?function(){}:C,U=i.onStart,B=void 0===U?function(){}:U,D=i.onProgress,F=void 0===D?function(){}:D,I=i.onFinish,M=void 0===I?function(){}:I,V=i.onCancel,q=void 0===V?function(){}:V,z=i.onSuccess,W=void 0===z?function(){}:z,$=i.onError,H=void 0===$?function(){}:$,G=i.queryStringArrayFormat,J=void 0===G?"brackets":G,Y="string"==typeof t?d(t):t;if(!function t(e){return e instanceof File||e instanceof Blob||e instanceof FileList&&e.length>0||e instanceof FormData&&Array.from(e.values()).some((function(e){return t(e)}))||"object"==typeof e&&null!==e&&Object.values(e).some((function(e){return t(e)}))}(p)&&!T||p instanceof FormData||(p=f(p)),!(p instanceof FormData)){var K=y(u,Y,p,J),X=K[1];Y=d(K[0]),p=X}var Q={url:Y,method:u,data:p,replace:g,preserveScroll:w,preserveState:E,only:x,headers:_,errorBag:P,forceFormData:T,queryStringArrayFormat:J,cancelled:!1,completed:!1,interrupted:!1};if(!1!==L(Q)&&function(t){return m("before",{cancelable:!0,detail:{visit:t}})}(Q)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=s({},Q,{onCancelToken:N,onBefore:L,onStart:B,onProgress:F,onFinish:M,onCancel:q,onSuccess:W,onError:H,queryStringArrayFormat:J,cancelToken:o.CancelToken.source()}),N({cancel:function(){n.activeVisit&&n.cancelVisit(n.activeVisit,{cancelled:!0})}}),function(t){m("start",{detail:{visit:t}})}(Q),B(Q),o({method:u,url:v(Y).href,data:u===e.n$.GET?{}:p,params:u===e.n$.GET?p:{},cancelToken:this.activeVisit.cancelToken.token,headers:s({},_,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},x.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":x.join(",")}:{},P&&P.length?{"X-Inertia-Error-Bag":P}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(t){p instanceof FormData&&(t.percentage=Math.round(t.loaded/t.total*100),function(t){m("progress",{detail:{progress:t}})}(t),F(t))}}).then((function(t){var e;if(!n.isInertiaResponse(t))return Promise.reject({response:t});var r=t.data;x.length&&r.component===n.page.component&&(r.props=s({},n.page.props,r.props)),w=n.resolvePreserveOption(w,r),(E=n.resolvePreserveOption(E,r))&&null!=(e=window.history.state)&&e.rememberedState&&r.component===n.page.component&&(r.rememberedState=window.history.state.rememberedState);var o=Y,i=d(r.url);return o.hash&&!i.hash&&v(o).href===i.href&&(i.hash=o.hash,r.url=i.href),n.setPage(r,{visitId:Z,replace:g,preserveScroll:w,preserveState:E})})).then((function(){var t=n.page.props.errors||{};if(Object.keys(t).length>0){var e=P?t[P]?t[P]:{}:t;return function(t){m("error",{detail:{errors:t}})}(e),H(e)}return m("success",{detail:{page:n.page}}),W(n.page)})).catch((function(t){if(n.isInertiaResponse(t.response))return n.setPage(t.response.data,{visitId:Z});if(n.isLocationVisitResponse(t.response)){var e=d(t.response.headers["x-inertia-location"]),r=Y;r.hash&&!e.hash&&v(r).href===e.href&&(e.hash=r.hash),n.locationVisit(e,!0===w)}else{if(!t.response)return Promise.reject(t);m("invalid",{cancelable:!0,detail:{response:t.response}})&&c.show(t.response.data)}})).then((function(){n.activeVisit&&n.finishVisit(n.activeVisit)})).catch((function(t){if(!o.isCancel(t)){var e=m("exception",{cancelable:!0,detail:{exception:t}});if(n.activeVisit&&n.finishVisit(n.activeVisit),e)return Promise.reject(t)}}))}},r.setPage=function(t,e){var r=this,n=void 0===e?{}:e,o=n.visitId,i=void 0===o?this.createVisitId():o,a=n.replace,s=void 0!==a&&a,u=n.preserveScroll,c=void 0!==u&&u,l=n.preserveState,f=void 0!==l&&l;return Promise.resolve(this.resolveComponent(t.component)).then((function(e){i===r.visitId&&(t.scrollRegions=t.scrollRegions||[],t.rememberedState=t.rememberedState||{},(s=s||d(t.url).href===window.location.href)?r.replaceState(t):r.pushState(t),r.swapComponent({component:e,page:t,preserveState:f}).then((function(){c||r.resetScrollPositions(),s||b(t)})))}))},r.pushState=function(t){this.page=t,window.history.pushState(t,"",t.url)},r.replaceState=function(t){this.page=t,window.history.replaceState(t,"",t.url)},r.handlePopstateEvent=function(t){var e=this;if(null!==t.state){var r=t.state,n=this.createVisitId();Promise.resolve(this.resolveComponent(r.component)).then((function(t){n===e.visitId&&(e.page=r,e.swapComponent({component:t,page:r,preserveState:!1}).then((function(){e.restoreScrollPositions(),b(r)})))}))}else{var o=d(this.page.url);o.hash=window.location.hash,this.replaceState(s({},this.page,{url:o.href})),this.resetScrollPositions()}},r.get=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({},n,{method:e.n$.GET,data:r}))},r.reload=function(t){return void 0===t&&(t={}),this.visit(window.location.href,s({},t,{preserveScroll:!0,preserveState:!0}))},r.replace=function(t,e){var r;return void 0===e&&(e={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(r=e.method)?r:"get")+"() instead."),this.visit(t,s({preserveState:!0},e,{replace:!0}))},r.post=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({preserveState:!0},n,{method:e.n$.POST,data:r}))},r.put=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({preserveState:!0},n,{method:e.n$.PUT,data:r}))},r.patch=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({preserveState:!0},n,{method:e.n$.PATCH,data:r}))},r.delete=function(t,r){return void 0===r&&(r={}),this.visit(t,s({preserveState:!0},r,{method:e.n$.DELETE}))},r.remember=function(t,e){var r,n;void 0===e&&(e="default"),w||this.replaceState(s({},this.page,{rememberedState:s({},null==(r=this.page)?void 0:r.rememberedState,(n={},n[e]=t,n))}))},r.restore=function(t){var e,r;if(void 0===t&&(t="default"),!w)return null==(e=window.history.state)||null==(r=e.rememberedState)?void 0:r[t]},r.on=function(t,e){var r=function(t){var r=e(t);t.cancelable&&!t.defaultPrevented&&!1===r&&t.preventDefault()};return document.addEventListener("inertia:"+t,r),function(){return document.removeEventListener("inertia:"+t,r)}},t}(),E={buildDOMElement:function(t){var e=document.createElement("template");e.innerHTML=t;var r=e.content.firstChild;if(!t.startsWith("