/*! For license information please see vendor.js.LICENSE.txt */ (self.webpackChunklaravel_nova=self.webpackChunklaravel_nova||[]).push([[332],{241:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(41917).A.Symbol},251:(e,t)=>{t.read=function(e,t,n,r,o){var i,a,l=8*o-r-1,s=(1<>1,u=-7,d=n?o-1:0,h=n?-1:1,p=e[t+d];for(d+=h,i=p&(1<<-u)-1,p>>=-u,u+=l;u>0;i=256*i+e[t+d],d+=h,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,l,s,c=8*i-o-1,u=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+d>=1?h/s:h*Math.pow(2,1-d))*s>=2&&(a++,s/=2),a+d>=u?(l=0,a=u):a+d>=1?(l=(t*s-1)*Math.pow(2,o),a+=d):(l=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&l,p+=f,l/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}},399:function(e,t,n){var r,o,i;void 0===(i=this)&&void 0!==window&&(i=window),r=[n(72188)],void 0===(o=function(e){return i["Chartist.plugins.tooltip"]=(t=e,function(e,t,n){"use strict";var r={currency:void 0,currencyFormatCallback:void 0,tooltipOffset:{x:0,y:-20},anchorToPoint:!1,appendToBody:!0,class:void 0,pointClass:"ct-point"};function o(e,t){return(" "+e.getAttribute("class")+" ").indexOf(" "+t+" ")>-1}function i(e,t){do{e=e.nextSibling}while(e&&!o(e,t));return e}function a(e){return e.innerText||e.textContent}function l(n){var r;return l in n?((r=n.offsetParent)||(r=t.body.parentElement),r):(r=n.parentNode)?"static"!==e.getComputedStyle(r).position?r:"BODY"===r.tagName?r.parentElement:l(r):t.body.parentElement}n.plugins=n.plugins||{},n.plugins.tooltip=function(s){return s=n.extend({},r,s),function(r){var c=s.pointClass;r instanceof n.BarChart?c="ct-bar":r instanceof n.PieChart&&(c=r.options.donut?r.options.donutSolid?"ct-slice-donut-solid":"ct-slice-donut":"ct-slice-pie");var u,d=r.container,h=!1,p=l(d);(u=s.appendToBody?t.querySelector(".chartist-tooltip"):d.querySelector(".chartist-tooltip"))||((u=t.createElement("div")).className=s.class?"chartist-tooltip "+s.class:"chartist-tooltip",s.appendToBody?t.body.appendChild(u):d.appendChild(u));var f=u.offsetHeight,m=u.offsetWidth;function v(e,t,n){d.addEventListener(e,function(e){t&&!o(e.target,t)||n(e)})}function g(t){f=f||u.offsetHeight;var n=-(m=m||u.offsetWidth)/2+s.tooltipOffset.x,r=-f+s.tooltipOffset.y,o=!0===s.anchorToPoint&&t.target.x2&&t.target.y2;if(!0===s.appendToBody)if(o){var i=d.getBoundingClientRect(),a=t.target.x2.baseVal.value+i.left+e.pageXOffset,l=t.target.y2.baseVal.value+i.top+e.pageYOffset;u.style.left=a+n+"px",u.style.top=l+r+"px"}else u.style.left=t.pageX+n+"px",u.style.top=t.pageY+r+"px";else{var c=p.getBoundingClientRect(),h=-c.left-e.pageXOffset+n,v=-c.top-e.pageYOffset+r;o?(i=d.getBoundingClientRect(),a=t.target.x2.baseVal.value+i.left+e.pageXOffset,l=t.target.y2.baseVal.value+i.top+e.pageYOffset,u.style.left=a+h+"px",u.style.top=l+v+"px"):(u.style.left=t.pageX+h+"px",u.style.top=t.pageY+v+"px")}}function w(e){h=!0,o(e,"tooltip-show")||(e.className=e.className+" tooltip-show")}function y(e){h=!1;var t=new RegExp("tooltip-show\\s*","gi");e.className=e.className.replace(t,"").trim()}y(u),v("mouseover",c,function(e){var o=e.target,c="",h=(r instanceof n.PieChart?o:o.parentNode)?o.parentNode.getAttribute("ct:meta")||o.parentNode.getAttribute("ct:series-name"):"",v=o.getAttribute("ct:meta")||h||"",y=!!v,b=o.getAttribute("ct:value");if(s.transformTooltipTextFnc&&"function"==typeof s.transformTooltipTextFnc&&(b=s.transformTooltipTextFnc(b)),s.tooltipFnc&&"function"==typeof s.tooltipFnc)c=s.tooltipFnc(v,b);else{if(s.metaIsHTML){var x=t.createElement("textarea");x.innerHTML=v,v=x.value}if(v=''+v+"",y)c+=v+"
";else if(r instanceof n.PieChart){var k=i(o,"ct-label");k&&(c+=a(k)+"
")}b&&(s.currency&&(b=null!=s.currencyFormatCallback?s.currencyFormatCallback(b,s):s.currency+b.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),c+=b=''+b+"")}c&&(u.innerHTML=c,f=u.offsetHeight,m=u.offsetWidth,!0!==s.appendToBody&&(p=l(d)),"absolute"!==u.style.display&&(u.style.display="absolute"),g(e),w(u),f=u.offsetHeight,m=u.offsetWidth)}),v("mouseout",c,function(){y(u)}),v("mousemove",null,function(e){!1===s.anchorToPoint&&h&&g(e)})}}}(window,document,t),t.plugins.tooltip);var t}.apply(t,r))||(e.exports=o)},403:(e,t,n)=>{"use strict";n.d(t,{QB:()=>Je,S9:()=>_,TX:()=>Be,Ue:()=>ie,XD:()=>Ae,Xe:()=>T,_M:()=>Ce,af:()=>de,f9:()=>ce,hg:()=>Ge,nA:()=>Xe});var r=n(23815),o=n(24488),i=n(98395),a=n(6734),l=n(55373),s=n(94335);function c(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function u(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var d=e=>u("before",{cancelable:!0,detail:{visit:e}}),h=e=>u("navigate",{detail:{page:e}}),p=class{static set(e,t){"undefined"!=typeof window&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if("undefined"!=typeof window)return JSON.parse(window.sessionStorage.getItem(e)||"null")}static merge(e,t){const n=this.get(e);null===n?this.set(e,t):this.set(e,{...n,...t})}static remove(e){"undefined"!=typeof window&&window.sessionStorage.removeItem(e)}static removeNested(e,t){const n=this.get(e);null!==n&&(delete n[t],this.set(e,n))}static exists(e){try{return null!==this.get(e)}catch(e){return!1}}static clear(){"undefined"!=typeof window&&window.sessionStorage.clear()}};p.locationVisitKey="inertiaLocationVisit";var f="historyKey",m="historyIv",v=async(e,t,n)=>{if("undefined"==typeof window)throw new Error("Unable to encrypt history");if(void 0===window.crypto.subtle)return console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve(n);const r=new TextEncoder,o=JSON.stringify(n),i=new Uint8Array(3*o.length),a=r.encodeInto(o,i);return window.crypto.subtle.encrypt({name:"AES-GCM",iv:e},t,i.subarray(0,a.written))},g=async(e,t,n)=>{if(void 0===window.crypto.subtle)return console.warn("Decryption is not supported in this environment. SSL is required."),Promise.resolve(n);const r=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,n);return JSON.parse((new TextDecoder).decode(r))},w=()=>{const e=p.get(m);if(e)return new Uint8Array(e);const t=window.crypto.getRandomValues(new Uint8Array(12));return p.set(m,Array.from(t)),t},y=async e=>{if(e)return e;const t=await(async()=>void 0===window.crypto.subtle?(console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve(null)):window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))();return t?(await(async e=>{if(void 0===window.crypto.subtle)return console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve();const t=await window.crypto.subtle.exportKey("raw",e);p.set(f,Array.from(new Uint8Array(t)))})(t),t):null},b=async()=>{const e=p.get(f);if(!e)return null;return await window.crypto.subtle.importKey("raw",new Uint8Array(e),{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])},x=class{static save(){j.saveScrollPositions(Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft})))}static regions(){return document.querySelectorAll("[scroll-region]")}static reset(){const e="undefined"!=typeof window?window.location.hash:null;e||window.scrollTo(0,0),this.regions().forEach(e=>{"function"==typeof e.scrollTo?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),e&&setTimeout(()=>{const t=document.getElementById(e.slice(1));t?t.scrollIntoView():window.scrollTo(0,0)})}static restore(e){"undefined"!=typeof window&&window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){"undefined"!=typeof window&&this.regions().forEach((t,n)=>{const r=e[n];r&&("function"==typeof t.scrollTo?t.scrollTo(r.left,r.top):(t.scrollTop=r.top,t.scrollLeft=r.left))})}static restoreDocument(){const e=j.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){const t=e.target;"function"==typeof t.hasAttribute&&t.hasAttribute("scroll-region")&&this.save()}static onWindowScroll(){j.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}};function k(e){return e instanceof File||e instanceof Blob||e instanceof FileList&&e.length>0||e instanceof FormData&&Array.from(e.values()).some(e=>k(e))||"object"==typeof e&&null!==e&&Object.values(e).some(e=>k(e))}var E=e=>e instanceof FormData;function A(e,t=new FormData,n=null){e=e||{};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&B(t,C(n,r),e[r]);return t}function C(e,t){return e?e+"["+t+"]":t}function B(e,t,n){return Array.isArray(n)?Array.from(n.keys()).forEach(r=>B(e,C(t,r.toString()),n[r])):n instanceof Date?e.append(t,n.toISOString()):n instanceof File?e.append(t,n,n.name):n instanceof Blob?e.append(t,n):"boolean"==typeof n?e.append(t,n?"1":"0"):"string"==typeof n?e.append(t,n):"number"==typeof n?e.append(t,`${n}`):null==n?e.append(t,""):void A(n,e,t)}function M(e){return new URL(e.toString(),"undefined"==typeof window?void 0:window.location.toString())}var S=(e,t,n,r,o)=>{let i="string"==typeof e?M(e):e;if(!k(t)&&!r||E(t)||(t=A(t)),E(t))return[i,t];const[a,l]=_(n,i,t,o);return[M(a),l]};function _(e,t,n,r="brackets"){const o="get"===e&&!E(n)&&Object.keys(n).length>0,i=I(t.toString()),a=i||t.toString().startsWith("/")||""===t.toString(),s=!a&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),c=/^[.]{1,2}([/]|$)/.test(t.toString()),u=t.toString().includes("?")||o,d=t.toString().includes("#"),h=new URL(t.toString(),"undefined"==typeof window?"http://localhost":window.location.toString());if(o){const e={ignoreQueryPrefix:!0,parseArrays:!1};h.search=l.stringify({...l.parse(h.search,e),...n},{encodeValuesOnly:!0,arrayFormat:r})}return[[i?`${h.protocol}//${h.host}`:"",a?h.pathname:"",s?h.pathname.substring(c?0:1):"",u?h.search:"",d?h.hash:""].join(""),o?{}:n]}function N(e){return(e=new URL(e.href)).hash="",e}var V=(e,t)=>{e.hash&&!t.hash&&N(e).href===t.href&&(t.hash=e.hash)},L=(e,t)=>N(e).href===N(t).href;function T(e){return null!==e&&"object"==typeof e&&void 0!==e&&"url"in e&&"method"in e}function I(e){return/^[a-z][a-z0-9+.-]*:\/\//i.test(e)}function Z(e,t){const n="string"==typeof e?M(e):e;return t?`${n.protocol}//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`}var O=new class{constructor(){this.componentId={},this.listeners=[],this.isFirstPageLoad=!0,this.cleared=!1,this.pendingDeferredProps=null}init({initialPage:e,swapComponent:t,resolveComponent:n}){return this.page=e,this.swapComponent=t,this.resolveComponent=n,this}set(e,{replace:t=!1,preserveScroll:n=!1,preserveState:r=!1}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url}),this.componentId={};const o=this.componentId;return e.clearHistory&&j.clear(),this.resolve(e.component).then(i=>{if(o!==this.componentId)return;e.rememberedState??(e.rememberedState={});const a="undefined"==typeof window,l=a?new URL(e.url):window.location,s=!a&&n?j.getScrollRegions():[];return t=t||L(M(e.url),l),new Promise(n=>{t?j.replaceState(e,()=>n(null)):j.pushState(e,()=>n(null))}).then(()=>{const o=!this.isTheSame(e);return this.page=e,this.cleared=!1,o&&this.fireEventsFor("newComponent"),this.isFirstPageLoad&&this.fireEventsFor("firstLoad"),this.isFirstPageLoad=!1,this.swap({component:i,page:e,preserveState:r}).then(()=>{n?window.requestAnimationFrame(()=>x.restoreScrollRegions(s)):x.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&F.fireInternalEvent("loadDeferredProps",this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||h(e)})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component).then(n=>(this.page=e,this.cleared=!1,j.setCurrent(e),this.swap({component:n,page:e,preserveState:t})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}merge(e){this.page={...this.page,...e}}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:n}){return this.swapComponent({component:e,page:t,preserveState:n})}resolve(e){return Promise.resolve(this.resolveComponent(e))}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(n=>n.event!==e&&n.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(e=>e.callback())}},R=class{constructor(){this.items=[],this.processingPromise=null}add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??(this.processingPromise=this.processNext().finally(()=>{this.processingPromise=null})),this.processingPromise}processNext(){const e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},D="undefined"==typeof window,P=new R,H=!D&&/CriOS/.test(window.navigator.userAgent);"undefined"!=typeof window&&window.history.scrollRestoration&&(window.history.scrollRestoration="manual");var j=new class{constructor(){this.rememberedState="rememberedState",this.scrollRegions="scrollRegions",this.preserveUrl=!1,this.current={},this.initialState=null}remember(e,t){this.replaceState({...O.get(),rememberedState:{...O.get()?.rememberedState??{},[t]:e}})}restore(e){if(!D)return this.current[this.rememberedState]?this.current[this.rememberedState]?.[e]:this.initialState?.[this.rememberedState]?.[e]}pushState(e,t=null){D||(this.preserveUrl?t&&t():(this.current=e,P.add(()=>this.getPageData(e).then(n=>{const r=()=>this.doPushState({page:n},e.url).then(()=>t?.());return H?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))))}getPageData(e){return new Promise(t=>e.encryptHistory?(async e=>{if("undefined"==typeof window)throw new Error("Unable to encrypt history");const t=w(),n=await b(),r=await y(n);if(!r)throw new Error("Unable to encrypt history");return await v(t,r,e)})(e).then(t):t(e))}processQueue(){return P.process()}decrypt(e=null){if(D)return Promise.resolve(e??O.get());const t=e??window.history.state?.page;return this.decryptPageData(t).then(e=>{if(!e)throw new Error("Unable to decrypt history");return null===this.initialState?this.initialState=e??void 0:this.current=e??{},e})}decryptPageData(e){return e instanceof ArrayBuffer?(async e=>{const t=w(),n=await b();if(!n)throw new Error("Unable to decrypt history");return await g(t,n,e)})(e):Promise.resolve(e)}saveScrollPositions(e){P.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!(0,a.A)(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){P.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!(0,a.A)(this.getDocumentScrollPosition(),e))return this.doReplaceState({page:window.history.state.page,documentScrollPosition:e})}))}getScrollRegions(){return window.history.state?.scrollRegions||[]}getDocumentScrollPosition(){return window.history.state?.documentScrollPosition||{top:0,left:0}}replaceState(e,t=null){O.merge(e),D||(this.preserveUrl?t&&t():(this.current=e,P.add(()=>this.getPageData(e).then(n=>{const r=()=>this.doReplaceState({page:n},e.url).then(()=>t?.());return H?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))))}doReplaceState(e,t){return Promise.resolve().then(()=>window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},"",t))}doPushState(e,t){return Promise.resolve().then(()=>window.history.pushState(e,"",t))}getState(e,t){return this.current?.[e]??t}deleteState(e){void 0!==this.current[e]&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&void 0!==this.initialState[e]&&delete this.initialState[e]}hasAnyState(){return!!this.getAllState()}clear(){p.remove(f),p.remove(m)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}},F=new class{constructor(){this.internalListeners=[]}init(){"undefined"!=typeof window&&(window.addEventListener("popstate",this.handlePopstateEvent.bind(this)),window.addEventListener("scroll",c(x.onWindowScroll.bind(x),100),!0)),"undefined"!=typeof document&&document.addEventListener("scroll",c(x.onScroll.bind(x),100),!0)}onGlobalEvent(e,t){return this.registerListener(`inertia:${e}`,e=>{const n=t(e);e.cancelable&&!e.defaultPrevented&&!1===n&&e.preventDefault()})}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(e=>e.listener!==t)}}onMissingHistoryItem(){O.clear(),this.fireInternalEvent("missingHistoryItem")}fireInternalEvent(e,...t){this.internalListeners.filter(t=>t.event===e).forEach(e=>e.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePopstateEvent(e){const t=e.state||null;if(null===t){const e=M(O.get().url);return e.hash=window.location.hash,j.replaceState({...O.get(),url:e.href}),void x.reset()}if(!j.isValidState(t))return this.onMissingHistoryItem();j.decrypt(t.page).then(e=>{O.get().version===e.version?(Je.cancelAll(),O.setQuietly(e,{preserveState:!1}).then(()=>{x.restore(j.getScrollRegions()),h(O.get())})):this.onMissingHistoryItem()}).catch(()=>{this.onMissingHistoryItem()})}},z=new class{constructor(){this.type=this.resolveType()}resolveType(){return"undefined"==typeof window?"navigate":window.performance&&window.performance.getEntriesByType&&window.performance.getEntriesByType("navigation").length>0?window.performance.getEntriesByType("navigation")[0].type:"navigate"}get(){return this.type}isBackForward(){return"back_forward"===this.type}isReload(){return"reload"===this.type}},U=class{static handle(){this.clearRememberedStateOnReload();[this.handleBackForward,this.handleLocation,this.handleDefault].find(e=>e.bind(this)())}static clearRememberedStateOnReload(){z.isReload()&&(j.deleteState(j.rememberedState),j.clearInitialState(j.rememberedState))}static handleBackForward(){if(!z.isBackForward()||!j.hasAnyState())return!1;const e=j.getScrollRegions();return j.decrypt().then(t=>{O.set(t,{preserveScroll:!0,preserveState:!0}).then(()=>{x.restore(e),h(O.get())})}).catch(()=>{F.onMissingHistoryItem()}),!0}static handleLocation(){if(!p.exists(p.locationVisitKey))return!1;const e=p.get(p.locationVisitKey)||{};return p.remove(p.locationVisitKey),"undefined"!=typeof window&&O.setUrlHash(window.location.hash),j.decrypt(O.get()).then(()=>{const t=j.getState(j.rememberedState,{}),n=j.getScrollRegions();O.remember(t),O.set(O.get(),{preserveScroll:e.preserveScroll,preserveState:!0}).then(()=>{e.preserveScroll&&x.restore(n),h(O.get())})}).catch(()=>{F.onMissingHistoryItem()}),!0}static handleDefault(){"undefined"!=typeof window&&O.setUrlHash(window.location.hash),O.set(O.get(),{preserveScroll:!0,preserveState:!0}).then(()=>{z.isReload()&&x.restore(j.getScrollRegions()),h(O.get())})}},q=class{constructor(e,t,n){this.id=null,this.throttle=!1,this.keepAlive=!1,this.cbCount=0,this.keepAlive=n.keepAlive??!1,this.cb=t,this.interval=e,(n.autoStart??1)&&this.start()}stop(){this.id&&clearInterval(this.id)}start(){"undefined"!=typeof window&&(this.stop(),this.id=window.setInterval(()=>{this.throttle&&this.cbCount%10!=0||this.cb(),this.throttle&&this.cbCount++},this.interval))}isInBackground(e){this.throttle=!this.keepAlive&&e,this.throttle&&(this.cbCount=0)}},$=new class{constructor(){this.polls=[],this.setupVisibilityListener()}add(e,t,n){const r=new q(e,t,n);return this.polls.push(r),{stop:()=>r.stop(),start:()=>r.start()}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){"undefined"!=typeof document&&document.addEventListener("visibilitychange",()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},W=(e,t,n)=>{if(e===t)return!0;for(const r in e)if(!n.includes(r)&&e[r]!==t[r]&&!G(e[r],t[r]))return!1;return!0},G=(e,t)=>{switch(typeof e){case"object":return W(e,t,[]);case"function":return e.toString()===t.toString();default:return e===t}},K={ms:1,s:1e3,m:6e4,h:36e5,d:864e5},Y=e=>{if("number"==typeof e)return e;for(const[t,n]of Object.entries(K))if(e.endsWith(t))return parseFloat(e)*n;return parseInt(e)},X=new class{constructor(){this.cached=[],this.inFlightRequests=[],this.removalTimers=[],this.currentUseId=null}add(e,t,{cacheFor:n,cacheTags:r}){if(this.findInFlight(e))return Promise.resolve();const o=this.findCached(e);if(!e.fresh&&o&&o.staleTimestamp>Date.now())return Promise.resolve();const[i,a]=this.extractStaleValues(n),l=new Promise((n,r)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),r()},onError:t=>{this.remove(e),e.onError(t),r()},onPrefetching(t){e.onPrefetching(t)},onPrefetched(t,n){e.onPrefetched(t,n)},onPrefetchResponse(e){n(e)},onPrefetchError(t){X.removeFromInFlight(e),r(t)}})}).then(t=>(this.remove(e),this.cached.push({params:{...e},staleTimestamp:Date.now()+i,response:l,singleUse:0===a,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(r)?r:[r]}),this.scheduleForRemoval(e,a),this.removeFromInFlight(e),t.handlePrefetch(),t));return this.inFlightRequests.push({params:{...e},response:l,staleTimestamp:null,inFlight:!0}),l}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}removeByTags(e){this.cached=this.cached.filter(t=>!t.tags.some(t=>e.includes(t)))}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}removeFromInFlight(e){this.inFlightRequests=this.inFlightRequests.filter(t=>!this.paramsAreEqual(t.params,e))}extractStaleValues(e){const[t,n]=this.cacheForToStaleAndExpires(e);return[Y(t),Y(n)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){const t=this.removalTimers.find(t=>this.paramsAreEqual(t.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(e=>e!==t))}scheduleForRemoval(e,t){if("undefined"!=typeof window&&(this.clearTimer(e),t>0)){const n=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:n})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){const n=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=n,e.response.then(e=>{if(this.currentUseId===n)return e.mergeParams({...t,onPrefetched:()=>{}}),this.removeSingleUseItems(t),e.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)||!t.singleUse)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}withoutPurposePrefetchHeader(e){const t=(0,r.A)(e);return"prefetch"===t.headers.Purpose&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return W(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),["showProgress","replace","prefetch","onBefore","onBeforeUpdate","onStart","onProgress","onFinish","onCancel","onSuccess","onError","onPrefetched","onCancelToken","onPrefetching","async"])}},J=class e{constructor(e){if(this.callbacks=[],e.prefetch){const t={onBefore:this.wrapCallback(e,"onBefore"),onBeforeUpdate:this.wrapCallback(e,"onBeforeUpdate"),onStart:this.wrapCallback(e,"onStart"),onProgress:this.wrapCallback(e,"onProgress"),onFinish:this.wrapCallback(e,"onFinish"),onCancel:this.wrapCallback(e,"onCancel"),onSuccess:this.wrapCallback(e,"onSuccess"),onError:this.wrapCallback(e,"onError"),onCancelToken:this.wrapCallback(e,"onCancelToken"),onPrefetched:this.wrapCallback(e,"onPrefetched"),onPrefetching:this.wrapCallback(e,"onPrefetching")};this.params={...e,...t,onPrefetchResponse:e.onPrefetchResponse||(()=>{}),onPrefetchError:e.onPrefetchError||(()=>{})}}else this.params=e}static create(t){return new e(t)}data(){return"get"===this.params.method?null:this.params.data}queryParams(){return"get"===this.params.method?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}onCancelToken(e){this.params.onCancelToken({cancel:e})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:e=!0,interrupted:t=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=e,this.params.interrupted=t}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(e){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(e)}onPrefetchError(e){this.params.onPrefetchError&&this.params.onPrefetchError(e)}all(){return this.params}headers(){const e={...this.params.headers};this.isPartial()&&(e["X-Inertia-Partial-Component"]=O.get().component);const t=this.params.only.concat(this.params.reset);return t.length>0&&(e["X-Inertia-Partial-Data"]=t.join(",")),this.params.except.length>0&&(e["X-Inertia-Partial-Except"]=this.params.except.join(",")),this.params.reset.length>0&&(e["X-Inertia-Reset"]=this.params.reset.join(",")),this.params.errorBag&&this.params.errorBag.length>0&&(e["X-Inertia-Error-Bag"]=this.params.errorBag),e}setPreserveOptions(e){this.params.preserveScroll=this.resolvePreserveOption(this.params.preserveScroll,e),this.params.preserveState=this.resolvePreserveOption(this.params.preserveState,e)}runCallbacks(){this.callbacks.forEach(({name:e,args:t})=>{this.params[e](...t)})}merge(e){this.params={...this.params,...e}}wrapCallback(e,t){return(...n)=>{this.recordCallback(t,n),e[t](...n)}}recordCallback(e,t){this.callbacks.push({name:e,args:t})}resolvePreserveOption(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e}},Q={modal:null,listener:null,show(e){"object"==typeof e&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(e)}`);const t=document.createElement("html");t.innerHTML=e,t.querySelectorAll("a").forEach(e=>e.setAttribute("target","_top")),this.modal=document.createElement("div"),this.modal.style.position="fixed",this.modal.style.width="100vw",this.modal.style.height="100vh",this.modal.style.padding="50px",this.modal.style.boxSizing="border-box",this.modal.style.backgroundColor="rgba(0, 0, 0, .6)",this.modal.style.zIndex=2e5,this.modal.addEventListener("click",()=>this.hide());const n=document.createElement("iframe");if(n.style.backgroundColor="white",n.style.borderRadius="5px",n.style.width="100%",n.style.height="100%",this.modal.appendChild(n),document.body.prepend(this.modal),document.body.style.overflow="hidden",!n.contentWindow)throw new Error("iframe not yet ready.");n.contentWindow.document.open(),n.contentWindow.document.write(t.outerHTML),n.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener("keydown",this.listener)},hide(){this.modal.outerHTML="",this.modal=null,document.body.style.overflow="visible",document.removeEventListener("keydown",this.listener)},hideOnEscape(e){27===e.keyCode&&this.hide()}},ee=new R,te=class e{constructor(e,t,n){this.requestParams=e,this.response=t,this.originatingPage=n,this.wasPrefetched=!1}static create(t,n,r){return new e(t,n,r)}async handlePrefetch(){L(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return ee.add(()=>this.process())}async process(){if(this.requestParams.all().prefetch)return this.wasPrefetched=!0,this.requestParams.all().prefetch=!1,this.requestParams.all().onPrefetched(this.response,this.requestParams.all()),e=this.response,t=this.requestParams.all(),u("prefetched",{detail:{fetchedAt:Date.now(),response:e.data,visit:t}}),Promise.resolve();var e,t;if(this.requestParams.runCallbacks(),!this.isInertiaResponse())return this.handleNonInertiaResponse();await j.processQueue(),j.preserveUrl=this.requestParams.all().preserveUrl,await this.setPage();const n=O.get().props.errors||{};if(Object.keys(n).length>0){const e=this.getScopedErrors(n);return(e=>{u("error",{detail:{errors:e}})})(e),this.requestParams.all().onError(e)}Je.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||Je.flush(O.get().url),u("success",{detail:{page:O.get()}}),await this.requestParams.all().onSuccess(O.get()),j.preserveUrl=!1}mergeParams(e){this.requestParams.merge(e)}async handleNonInertiaResponse(){if(this.isLocationVisit()){const e=M(this.getHeader("x-inertia-location"));return V(this.requestParams.all().url,e),this.locationVisit(e)}const e={...this.response,data:this.getDataFromResponse(this.response.data)};if((e=>u("invalid",{cancelable:!0,detail:{response:e}}))(e))return Q.show(e.data)}isInertiaResponse(){return this.hasHeader("x-inertia")}hasStatus(e){return this.response.status===e}getHeader(e){return this.response.headers[e]}hasHeader(e){return void 0!==this.getHeader(e)}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader("x-inertia-location")}locationVisit(e){try{if(p.set(p.locationVisitKey,{preserveScroll:!0===this.requestParams.all().preserveScroll}),"undefined"==typeof window)return;L(window.location,e)?window.location.reload():window.location.href=e.href}catch(e){return!1}}async setPage(){const e=this.getDataFromResponse(this.response.data);return this.shouldSetPage(e)?(this.mergeProps(e),await this.setRememberedState(e),this.requestParams.setPreserveOptions(e),e.url=j.preserveUrl?O.get().url:this.pageUrl(e),this.requestParams.all().onBeforeUpdate(e),u("beforeUpdate",{detail:{page:e}}),O.set(e,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState})):Promise.resolve()}getDataFromResponse(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}}shouldSetPage(e){if(!this.requestParams.all().async)return!0;if(this.originatingPage.component!==e.component)return!0;if(this.originatingPage.component!==O.get().component)return!1;const t=M(this.originatingPage.url),n=M(O.get().url);return t.origin===n.origin&&t.pathname===n.pathname}pageUrl(e){const t=M(e.url);return V(this.requestParams.all().url,t),t.pathname+t.search+t.hash}mergeProps(e){if(!this.requestParams.isPartial()||e.component!==O.get().component)return;const t=e.mergeProps||[],n=e.prependProps||[],r=e.deepMergeProps||[],a=e.matchPropsOn||[],l=(t,n)=>{const r=(0,o.A)(O.get().props,t),l=(0,o.A)(e.props,t);if(Array.isArray(l)){const o=this.mergeOrMatchItems(r||[],l,t,a,n);(0,i.A)(e.props,t,o)}else if("object"==typeof l&&null!==l){const n={...r||{},...l};(0,i.A)(e.props,t,n)}};t.forEach(e=>l(e,!0)),n.forEach(e=>l(e,!1)),r.forEach(t=>{const n=O.get().props[t],r=e.props[t],o=(e,t,n)=>Array.isArray(t)?this.mergeOrMatchItems(e,t,n,a):"object"==typeof t&&null!==t?Object.keys(t).reduce((r,i)=>(r[i]=o(e?e[i]:void 0,t[i],`${n}.${i}`),r),{...e}):t;e.props[t]=o(n,r,t)}),e.props={...O.get().props,...e.props},O.get().scrollProps&&(e.scrollProps={...O.get().scrollProps||{},...e.scrollProps||{}})}mergeOrMatchItems(e,t,n,r,o=!0){const i=Array.isArray(e)?e:[],a=r.find(e=>e.split(".").slice(0,-1).join(".")===n);if(!a)return o?[...i,...t]:[...t,...i];const l=a.split(".").pop()||"",s=new Map;return t.forEach(e=>{this.hasUniqueProperty(e,l)&&s.set(e[l],e)}),o?this.appendWithMatching(i,t,s,l):this.prependWithMatching(i,t,s,l)}appendWithMatching(e,t,n,r){return[...e.map(e=>this.hasUniqueProperty(e,r)&&n.has(e[r])?n.get(e[r]):e),...t.filter(t=>!this.hasUniqueProperty(t,r)||!e.some(e=>this.hasUniqueProperty(e,r)&&e[r]===t[r]))]}prependWithMatching(e,t,n,r){return[...t,...e.filter(e=>!this.hasUniqueProperty(e,r)||!n.has(e[r]))]}hasUniqueProperty(e,t){return e&&"object"==typeof e&&t in e}async setRememberedState(e){const t=await j.getState(j.rememberedState,{});this.requestParams.all().preserveState&&t&&e.component===O.get().component&&(e.rememberedState=t)}getScopedErrors(e){return this.requestParams.all().errorBag?e[this.requestParams.all().errorBag||""]||{}:e}},ne=class e{constructor(e,t){this.page=t,this.requestHasFinished=!1,this.requestParams=J.create(e),this.cancelToken=new AbortController}static create(t,n){return new e(t,n)}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),u("start",{detail:{visit:this.requestParams.all()}}),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),(e=>{u("prefetching",{detail:{visit:e}})})(this.requestParams.all()));const e=this.requestParams.all().prefetch;return(0,s.A)({method:this.requestParams.all().method,url:N(this.requestParams.all().url).href,data:this.requestParams.data(),params:this.requestParams.queryParams(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this),responseType:"text"}).then(e=>(this.response=te.create(this.requestParams,e,this.page),this.response.handle())).catch(e=>e?.response?(this.response=te.create(this.requestParams,e.response,this.page),this.response.handle()):Promise.reject(e)).catch(t=>{if(!s.A.isCancel(t))return u("exception",{cancelable:!0,detail:{exception:t}})?(e&&this.requestParams.onPrefetchError(t),Promise.reject(t)):void 0}).finally(()=>{this.finish(),e&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,u("finish",{detail:{visit:this.requestParams.all()}}),this.requestParams.onFinish())}cancel({cancelled:e=!1,interrupted:t=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:e,interrupted:t}),this.fireFinishEvents())}onProgress(e){this.requestParams.data()instanceof FormData&&(e.percentage=e.progress?Math.round(100*e.progress):0,(e=>{u("progress",{detail:{progress:e}})})(e),this.requestParams.all().onProgress(e))}getHeaders(){const e={...this.requestParams.headers(),Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0};return O.get().version&&(e["X-Inertia-Version"]=O.get().version),e}},re=class{constructor({maxConcurrent:e,interruptible:t}){this.requests=[],this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().then(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight(){this.cancel({cancelled:!0},!0)}cancel({cancelled:e=!1,interrupted:t=!1}={},n){if(!this.shouldCancel(n))return;const r=this.requests.shift();r?.cancel({interrupted:t,cancelled:e})}shouldCancel(e){return!!e||this.interruptible&&this.requests.length>=this.maxConcurrent}},oe=e=>{const t=e.getBoundingClientRect(),n=t.top=0,r=t.left=0;return n&&r},ie=e=>{const t=e=>{const t=window.getComputedStyle(e);return!!["scroll","overlay"].includes(t.overflowY)||"auto"===t.overflowY&&(!!["visible","clip"].includes(t.overflowX)||r(t.maxHeight,e.style.height))},n=e=>{const t=window.getComputedStyle(e);return!!["scroll","overlay"].includes(t.overflowX)||"auto"===t.overflowX&&(!!["visible","clip"].includes(t.overflowY)||r(t.maxWidth,e.style.width))},r=(e,t)=>!(!e||"none"===e||"0px"===e)||!(!t||"auto"===t||"0"===t);let o=e?.parentElement;for(;o;){const e=t(o)||n(o);if("contents"!==window.getComputedStyle(o).display&&e)return o;o=o.parentElement}return null},ae=(e,t)=>{const n=t.indexOf(e),r=[],o=[];for(let e=n;e>=0;e--){const n=t[e];if(!oe(n))break;r.push(n)}for(let e=n+1;ee.startsWith("[")&&e.endsWith("]")?e:e.split(".").reduce((e,t,n)=>0===n?t:`${e}[${t}]`)).join("").replace(/__ESCAPED_DOT__/g,".")}function se(e){const t=[],n=/([^\[\]]+)|\[(\d*)\]/g;let r;for(;null!==(r=n.exec(e));)void 0!==r[1]?t.push(r[1]):void 0!==r[2]&&t.push(""===r[2]?"":Number(r[2]));return t}function ce(e){const t={};for(const[n,r]of e.entries()){if(r instanceof File&&0===r.size&&""===r.name)continue;const e=se(le(n));if(""===e[e.length-1]){const n=e.slice(0,-1),a=(0,o.A)(t,n);Array.isArray(a)?a.push(r):(0,i.A)(t,n,[r]);continue}(0,i.A)(t,e,r)}return t}var ue={buildDOMElement(e){const t=document.createElement("template");t.innerHTML=e;const n=t.content.firstChild;if(!e.startsWith("