PageSourceSearch

https://cottonbureau.com/build/assets/dist-CGmBzCbC.js

js cottonbureau.com collected 2026-09-24 08:39:03 UTC 126,526 bytes, 90 lines download raw bytes

vendor: 8,533 bytes, line 1
1import{$ as e,B as t,L as n,M as r,U as i,V as a,a as o,ct as s,ft as c,g as l,k as u,mt as d,o as f,t as p,ut as m,y as h,z as g}from"./vue.esm-bundler-C1msq071.js";var _=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof window==`object`&&window||(function(){return this})();function v(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function y(){}function b(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function x(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function S(e){if(b(e))return e;if(Array.isArray(e)||x(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function C(e){return _.Buffer!==void 0&&_.Buffer.isBuffer(e)}function w(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function T(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var E=`[object RegExp]`,D=`[object String]`,ee=`[object Number]`,te=`[object Boolean]`,ne=`[object Arguments]`,re=`[object Symbol]`,ie=`[object Date]`,ae=`[object Map]`,oe=`[object Set]`,se=`[object Array]`,ce=`[object Function]`,le=`[object ArrayBuffer]`,ue=`[object Object]`,de=`[object Error]`,fe=`[object DataView]`,pe=`[object Uint8Array]`,me=`[object Uint8ClampedArray]`,he=`[object Uint16Array]`,ge=`[object Uint32Array]`,_e=`[object BigUint64Array]`,ve=`[object Int8Array]`,ye=`[object Int16Array]`,be=`[object Int32Array]`,xe=`[object BigInt64Array]`,Se=`[object Float32Array]`,Ce=`[object Float64Array]`;function we(e,t){return Te(e,void 0,e,new Map,t)}function Te(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(b(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Te(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Te(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Te(a,void 0,n,r,i));return t}if(C(e))return e.subarray();if(x(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Te(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),O(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),O(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),O(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,O(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),O(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),O(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),O(t,e,n,r,i),t}if(typeof e==`object`&&Ee(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),O(t,e,n,r,i),t}return e}function O(e,t,n=e,r,i){let a=[...Object.keys(t),...w(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Te(t[s],s,n,r,i))}}function Ee(e){switch(T(e)){case ne:case se:case le:case fe:case te:case ie:case Se:case Ce:case ve:case ye:case be:case ae:case ee:case ue:case E:case oe:case D:case re:case pe:case me:case he:case ge:return!0;default:return!1}}function k(e){return Te(e,void 0,e,new Map,void 0)}function De(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:Object.prototype.toString.call(e)===`[object Object]`}function Oe(e){return e===`__proto__`}function ke(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function je(e,t,n){return Me(e,t,void 0,void 0,void 0,void 0,n)}function Me(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return Ne(e,t,a,o)}return Ne(e,t,a,o)}function Ne(e,t,n,r){if(Object.is(e,t))return!0;let i=T(e),a=T(t);if(i===`[object Arguments]`&&(i=ue),a===`[object Arguments]`&&(a=ue),i!==a)return!1;switch(i){case D:return e.toString()===t.toString();case ee:return Ae(e.valueOf(),t.valueOf());case te:case ie:case re:return Object.is(e.valueOf(),t.valueOf());case E:return e.source===t.source&&e.flags===t.flags;case ce:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case ae:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Me(a,t.get(i),i,e,t,n,r))return!1;return!0;case oe:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>Me(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case se:case pe:case me:case he:case ge:case _e:case ve:case ye:case be:case xe:case Se:case Ce:if(C(e)!==C(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Me(e[i],t[i],i,e,t,n,r))return!1;return!0;case le:return e.byteLength===t.byteLength&&Ne(new Uint8Array(e),new Uint8Array(t),n,r);case fe:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Ne(new Uint8Array(e),new Uint8Array(t),n,r);case de:return e.name===t.name&&e.message===t.message;case ue:{if(!(Ne(e.constructor,t.constructor,n,r)||De(e)&&De(t)))return!1;let i=[...Object.keys(e),...w(e)],a=[...Object.keys(t),...w(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!Me(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function A(e,t){return je(e,t,y)}function Pe(e){return Number.isSafeInteger(e)&&e>=0}var Fe={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Ie(e){return e.replace(/[&<>"']/g,e=>Fe[e])}function Le(e){return e!=null&&typeof e!=`function`&&Pe(e.length)}function Re(e){return e==null?``:ze(e)}function ze(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(ze).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Be(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ve(e){if(Array.isArray(e))return e.map(Be);if(typeof e==`symbol`)return[e];e=Re(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;
1for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}var He=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function Ue(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:He.test(e);default:return!1}}function j(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Oe(t))return n;let r=e[t];return r===void 0?Ue(t)&&!Object.hasOwn(e,t)?j(e,Ve(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Be(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return We(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Oe(t))return n;let r=e[t];return r===void 0?n:r}}}function We(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Oe(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function Ge(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Ke(e,t){return we(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(T(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),O(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case ee:case D:case te:{let t=new e.constructor(e?.valueOf());return O(t,e),t}case ne:{let t={};return O(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function qe(e){return Ke(e)}function Je(e){return typeof e==`object`&&!!e&&T(e)===`[object Arguments]`}var Ye=/^(?:0|[1-9]\d*)$/;function Xe(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return Ye.test(e)}}function Ze(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Ue(t)&&!(t in Object(e))?Ve(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||Je(r))&&Xe(t)&&t<r.length))return!1;r=r[t]}return!0}function Qe(e){return typeof e==`object`&&!!e}function $e(e){return Qe(e)&&Le(e)}function et(e){return typeof e==`symbol`||e instanceof Symbol}var tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/;function rt(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||et(e)?!0:typeof e==`string`&&(nt.test(e)||!tt.test(e))||t!=null&&Object.hasOwn(t,e)}function it(e){return x(e)}var at=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&Ae(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function ot(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function st(e,t,n,r){if(e==null&&!Ge(e))return e;let i;i=rt(t,e)?[t]:Array.isArray(t)?t:Ve(t);let a=n(j(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=Be(i[t]);if(ot(n))return e;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?Ge(a)?a:Xe(i[t+1])?[]:{}:c}at(o,n,s),o=o[n]}return e}function M(e,t,n){return st(e,t,()=>n,()=>void 0)}function ct(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=v(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function lt(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=ut(i,t,r,new Map)}return i}function ut(e,t,n,r){if(b(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return S(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...w(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Oe(o))continue;let s=t[o],c=e[o];if(Je(s)&&(s={...s}),Je(c)&&(c={...c}),C(s)&&(s=qe(s)),Array.isArray(s)){if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if($e(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[]}let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||Qe(c)&&Qe(s)&&(ke(c)||ke(s)||it(c)||it(s))?e[o]=ut(c,s,n,r):c==null&&ke(s)?e[o]=ut({},s,n,r):c==null&&it(s)?e[o]=qe(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function dt(e,...t){return lt(e,...t,y)}function ft(e){return Ie(Re(e))}var pt=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0,mt=e=>e instanceof FormData||pt(e)||typeof e==`object`&&!!e&&Object.values(e).some(e=>
1mt(e)),ht=class extends Error{response;constructor(e){super(`HTTP error ${e.status}`),this.name=`HttpResponseError`,this.response=e}},gt=class extends Error{constructor(e=`Request was cancelled`){super(e),this.name=`HttpCancelledError`}},_t=class extends Error{constructor(e=`Network error`){super(e),this.name=`HttpNetworkError`}};function vt(e){let t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(n=>t.append(`${e}[]`,String(n))):typeof n==`object`?t.append(e,JSON.stringify(n)):t.append(e,String(n)))}),t.toString()}function yt(e,t,n){if(t&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=t.replace(/\/$/,``)+`/`+e.replace(/^\//,``)),n&&Object.keys(n).length>0){let t=vt(n);t&&(e+=(e.includes(`?`)?`&`:`?`)+t)}return e}function bt(){return typeof window>`u`?null:window.axios?.defaults?.headers?.common?.[`X-Requested-With`]??null}function xt(e,t=new FormData,n=null){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&St(t,n?`${n}[${r}]`:r,e[r]);return t}function St(e,t,n){if(Array.isArray(n))return n.forEach((n,r)=>St(e,`${t}[${r}]`,n));if(n instanceof Date)return e.append(t,n.toISOString());if(typeof File<`u`&&n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);xt(n,e,t)}function Ct(e,t){if(e!=null)return e instanceof FormData?e:typeof e==`object`&&mt(e)?xt(e):typeof e==`object`||t[`C
1ontent-Type`]?.includes(`application/json`)?JSON.stringify(e):String(e)}function wt(e){let t={};return e.forEach((e,n)=>{t[n.toLowerCase()]=e}),t}function Tt(e={}){let t=e.xsrfCookieName??`XSRF-TOKEN`,n=e.xsrfHeaderName??`X-XSRF-TOKEN`;function r(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(^|;\\s*)`+t+`=([^;]*)`));return e?decodeURIComponent(e[2]):null}return{setXsrfCookieName(e){t=e},setXsrfHeaderName(e){n=e},async request(e){let t=yt(e.url,e.baseURL,e.params),i=e.method.toUpperCase(),a={},o=bt();o&&(a[`X-Requested-With`]=o),e.data!==void 0&&![`GET`,`DELETE`].includes(i)&&!(e.data instanceof FormData)&&!mt(e.data)&&(a[`Content-Type`]=`application/json`),e.headers&&Object.entries(e.headers).forEach(([e,t])=>{t!==void 0&&(a[e]=String(t))});let s=r();s&&![`GET`,`HEAD`,`OPTIONS`].includes(i)&&(a[n]=s);let c=e.signal,l,u=e.timeout??3e4;if(u>0&&!c){let e=new AbortController;c=e.signal,l=setTimeout(()=>e.abort(),u)}let d=[`GET`,`DELETE`].includes(i)?void 0:Ct(e.data,a);d instanceof FormData&&delete a[`Content-Type`];try{let n=await fetch(t,{method:i,headers:a,body:d,signal:c,credentials:e.credentials??`same-origin`});l&&clearTimeout(l);let r;r=n.headers.get(`content-type`)?.includes(`application/json`)?await n.json():await n.text();let o={status:n.status,data:r,headers:wt(n.headers)};if(!n.ok)throw new ht(o);return o}catch(e){throw l&&clearTimeout(l),e instanceof ht?e:e instanceof DOMException&&e.name===`AbortError`?new gt:e instanceof TypeError?new _t(e.message):e}}}}var Et=Tt(),Dt=Et,Ot=void 0,kt=void 0,At=`same-origin`,jt=e=>`${e.method}:${e.baseURL??Ot??``}${e.url}`,Mt=e=>e.status===204&&e.headers[`precognition-success`]===`true`,Nt={},N={get:(e,t={},n={})=>Ft(Pt(`get`,e,t,n)),post:(e,t={},n={})=>Ft(Pt(`post`,e,t,n)),patch:(e,t={},n={})=>Ft(Pt(`patch`,e,t,n)),put:(e,t={},n={})=>Ft(Pt(`put`,e,t,n)),delete:(e,t={},n={})=>Ft(Pt(`delete`,e,t,n)),useHttpClient(e){return Dt=e,N},withBaseURL(e){return Ot=e,N},withTimeout(e){return kt=e,N},withCredentials(e){return At=typeof e==`string`?e:e?`include`:`omit`,N},fingerprintRequestsUsing(e){return jt=e===null?()=>null:e,N},determineSuccessUsing(e){return Mt=e,N},withXsrfCookieName(e){return Et.setXsrfCookieName(e),N},withXsrfHeaderName(e){return Et.setXsrfHeaderName(e),N}},Pt=(e,t,n,r)=>({url:t,method:e,...r,...[`get`,`delete`].includes(e)?{params:dt({},n,r?.params)}:{data:dt({},n,r?.data)}}),Ft=(e={})=>{let t=[It,Rt,zt].reduce((e,t)=>t(e),e);return(t.onBefore??(()=>!0))()===!1?Promise.resolve(null):((t.onStart??(()=>null))(),Dt.request({method:t.method,url:t.url,baseURL:t.baseURL??Ot,data:t.data,params:t.params,headers:t.headers,signal:t.signal,timeout:t.timeout,credentials:At}).then(async e=>{t.precognitive&&Bt(e);let n=e.status,r=e;return t.precognitive&&t.onPrecognitionSuccess&&Mt(e)&&(r=await Promise.resolve(t.onPrecognitionSuccess(e)??r)),t.onSuccess&&Lt(n)&&(r=await Promise.resolve(t.onSuccess(r)??r)),(Ht(t,n)??(e=>e))(r)??r},e=>{if(Vt(e))return Promise.reject(e);let n=e;return t.precognitive&&Bt(n.response),(Ht(t,n.response.status)??((e,t)=>Promise.reject(t)))(n.response,n)}).finally(t.onFinish??(()=>null)))},It=e=>{let t=e.only??e.validate;return{...e,timeout:e.timeout??kt,precognitive:e.precognitive!==!1,fingerprint:e.fingerprint===void 0?jt(e,Dt):e.fingerprint,headers:{...e.headers,Accept:`application/json`,"Content-Type":Ut(e),...e.precognitive===!1?{}:{Precognition:!0},...t?{"Precognition-Validate-Only":Array.from(t).join()}:{}}}},Lt=e=>e>=200&&e<300,Rt=e=>typeof e.fingerprint==`string`?(Nt[e.fingerprint]?.abort(),delete Nt[e.fingerprint],e):e,zt=e=>typeof e.fingerprint!=`string`||e.signal||!e.precognitive?e:(Nt[e.fingerprint]=new AbortController,{...e,signal:Nt[e.fingerprint].signal}),Bt=e=>{if(e.headers?.precognition!==`true`)throw Error(`Did not receive a Precognition response. Ensure you have the Precognition middleware in place for the route.`)},Vt=e=>!(e instanceof ht)||typeof e.response?.status!=`number`,Ht=(e,t)=>
1({401:e.onUnauthorized,403:e.onForbidden,404:e.onNotFound,409:e.onConflict,422:e.onValidationError,423:e.onLocked})[t],Ut=e=>e.headers?.[`Content-Type`]??e.headers?.[`Content-type`]??e.headers?.[`content-type`]??(mt(e.data)?`multipart/form-data`:`application/json`),Wt=(e,t)=>{if(!e.includes(`*`))return[e];let n=e.split(`.`),r=[``];for(let e of n)if(e===`*`){let e=[];for(let n of r){let r=n?j(t,n):t;if(Array.isArray(r))for(let t=0;t<r.length;t++)e.push(n?`${n}.${t}`:String(t));else if(typeof r==`object`&&r)for(let t of Object.keys(r))e.push(n?`${n}.${t}`:t)}r=e}else r=r.map(t=>t?`${t}.${e}`:e);return r},Gt=(e,t)=>t.includes(`*`)?RegExp(`^`+t.replace(/\./g,`\\.`).replace(/\*/g,`[^.]+`)+`$`).test(e):e===t,Kt=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.some(t=>Gt(e,t)))),qt=(e,t={})=>{let n={errorsChanged:[],touchedChanged:[],validatingChanged:[],validatedChanged:[]},r=!1,i=!1,a=e=>e===i?[]:(i=e,n.validatingChanged),o=[],s=e=>{let t=[...new Set(e)];return o.length!==t.length||!t.every(e=>o.includes(e))?(o=t,n.validatedChanged):[]},c=()=>o.filter(e=>d[e]===void 0),l=[],u=e=>{let t=[...new Set(e)];return l.length!==t.length||!t.every(e=>l.includes(e))?(l=t,n.touchedChanged):[]},d={},f=e=>{let t=Yt(e);return A(d,t)?[]:(d=t,n.errorsChanged)},p=e=>{let t={...d};return delete t[Xt(e)],f(t)},m=()=>Object.keys(d).length>0,h=1500,g=e=>{h=e,S.cancel(),S=x()},_=t,v=null,y=[],b=null,x=()=>ct(t=>{e({get:(e,n={},r={})=>N.get(e,T(n),C(r,t,n)),post:(e,n={},r={})=>N.post(e,T(n),C(r,t,n)),patch:(e,n={},r={})=>N.patch(e,T(n),C(r,t,n)),put:(e,n={},r={})=>N.put(e,T(n),C(r,t,n)),delete:(e,n={},r={})=>N.delete(e,T(n),C(r,t,n))}).catch(e=>e instanceof gt||e instanceof ht&&e.response?.status===422?null:Promise.reject(e))},h,{leading:!0,trailing:!0}),S=x(),C=(e,t,n={})=>{let r={...e,...t},i=Array.from(r.only??r.validate??l);return{...t,...dt({},e,t),only:i,timeout:r.timeout??5e3,onValidationError:(e,t)=>([...s([...o,...i]),...f(dt(Kt({...d},i),e.data.errors))].forEach(e=>e()),r.onValidationError?r.onValidationError(e,t):Promise.reject(t)),onSuccess:e=>(s([...o,...i]).forEach(e=>e()),r.onSuccess?r.onSuccess(e):e),onPrecognitionSuccess:e=>([...s([...o,...i]),...f(Kt({...d},i))].forEach(e=>e()),r.onPrecognitionSuccess?r.onPrecognitionSuccess(e):e),onBefore:()=>{let e=l.some(e=>e.includes(`*`)),t=e?[...new Set(l.flatMap(e=>Wt(e,n)))]:l;return r.onBeforeValidation&&r.onBeforeValidation({data:n,touched:t},{data:_,touched:y})===!1||(r.onBefore||(()=>!0))()===!1?!1:(e&&u(t).forEach(e=>e()),b=l,v=n,!0)},onStart:()=>{a(!0).forEach(e=>e()),(r.onStart??(()=>null))()},onFinish:()=>{a(!1).forEach(e=>e()),y=b,_=v,b=v=null,(r.onFinish??(()=>null))()}}},w=(e,t,n)=>{if(e===void 0){let e=Array.from(n?.only??n?.validate??[]);u([...l,...e]).forEach(e=>e()),S(n??{});return}if(pt(t)&&!r){console.warn(`Precognition file validation is not active. Call the "validateFiles" function on your form to enable it.`);return}e=Xt(e),(e.includes(`*`)||j(_,e)!==t)&&(u([e,...l]).forEach(e=>e()),S(n??{}))},T=e=>r===!1?Zt(e):e,E={touched:()=>l,validate(e,t,n){return typeof e==`object`&&!(`target`in e)&&(n=e,e=t=void 0),w(e,t,n),E},touch(e){let t=Array.isArray(e)?e:[Xt(e)];return u([...l,...t]).forEach(e=>e()),E},validating:()=>i,valid:c,errors:()=>d,hasErrors:m,setErrors(e){return f(e).forEach(e=>e()),E},forgetError(e){return p(e).forEach(e=>e()),E},defaults(e){return t=e,_=e,E}
1,reset(...e){if(e.length===0)u([]).forEach(e=>e());else{let n=[...l];e.forEach(e=>{n.includes(e)&&n.splice(n.indexOf(e),1),M(_,e,j(t,e))}),u(n).forEach(e=>e())}return E},setTimeout(e){return g(e),E},on(e,t){return n[e].push(t),E},validateFiles(){return r=!0,E},withoutFileValidation(){return r=!1,E}};return E},Jt=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:Array.isArray(e[n])?e[n][0]:e[n]}),{}),Yt=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:typeof e[n]==`string`?[e[n]]:e[n]}),{}),Xt=e=>typeof e==`string`?e:e.target.name,Zt=e=>{let t={...e};return Object.keys(t).forEach(e=>{let n=t[e];if(n!==null){if(pt(n)){delete t[e];return}if(Array.isArray(n)){t[e]=Object.values(Zt({...n}));return}if(typeof n==`object`){t[e]=Zt(t[e]);return}}}),t},Qt=new class{config={};defaults;constructor(e){this.defaults=e}extend(e){return e&&(this.defaults={...this.defaults,...e}),this}replace(e){this.config=e}get(e){return Ze(this.config,e)?j(this.config,e):j(this.defaults,e)}set(e,t){typeof e==`string`?M(this.config,e,t):Object.entries(e).forEach(([e,t])=>{M(this.config,e,t)})}}({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0,withAllErrors:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function $t(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function P(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var en=e=>P(`before`,{cancelable:!0,detail:{visit:e}}),tn=(e,{page:t,visitId:n}={})=>P(`error`,{detail:{errors:e,page:t,visitId:n}}),nn=e=>P(`networkError`,{cancelable:!0,detail:{error:e}}),rn=e=>P(`finish`,{detail:{visit:e}}),an=e=>P(`httpException`,{cancelable:!0,detail:{response:e}}),on=e=>P(`beforeUpdate`,{detail:{page:e}}),sn=(e,{cached:t=!1,visitId:n}={})=>P(`navigate`,{detail:{page:e,cached:t,visitId:n}}),cn=(e,{replace:t,visitId:n})=>P(`clientVisit`,{detail:{page:e,replace:t,visitId:n}}),ln=e=>P(`progress`,{detail:{progress:e}}),un=e=>P(`start`,{detail:{visit:e}}),dn=(e,{visitId:t}={})=>P(`success`,{detail:{page:e,visitId:t}}),fn=(e,t)=>P(`prefetched`,{detail:{fetchedAt:Date.now(),response:e,visit:t}}),pn=e=>P(`prefetching`,{detail:{visit:e}}),mn=e=>P(`flash`,{detail:{flash:e}}),hn=(e,t)=>P(`location`,{cancelable:!0,detail:{url:e,versionChange:t}}),F=class{static locationVisitKey=`inertiaLocationVisit`;static set(e,t){typeof window<`u`&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<`u`)return JSON.parse(window.sessionStorage.getItem(e)||`null`)}static merge(e,t){let n=this.get(e);n===null?this.set(e,t):this.set(e,{...n,...t})}static remove(e){typeof window<`u`&&window.sessionStorage.removeItem(e)}static removeNested(e,t){let n=this.get(e);n!==null&&(delete n[t],this.set(e,n))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<`u`&&window.sessionStorage.clear()}},gn=async e=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);let t=xn(),n=await wn(await Tn());if(!n)throw Error(`Unable to encrypt history`);return await yn(t,n,e)},_n={key:`historyKey`,iv:`historyIv`},vn=async e=>{let t=xn(),n=await Tn();if(!n)throw Error(`Unable to decrypt history`);return await bn(t,n,e)},yn=async(e,t,n)=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=new TextEncoder,i=JSON.stringify(n),a=new Uint8Array(i.length*3),o=r.encodeInto(i,a);return window.crypto.subtle.encrypt({name:`AES-GCM`,iv:e},t,a.subarray(0,o.written))},bn=async(e,t,n)=>{if(window.crypto.subtle===void 0)return console.warn(`Decryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=await window.crypto.subtle.decrypt({name:`AES-GCM`,iv:e},t,n);return JSON.parse(new TextDecoder().decode(r))},xn=()=>{let e=F.get(_n.iv);if(e)return new Uint8Array(e);let t=window.crypto.getRandomValues(new Uint8Array(12));return F.set(_n.iv,Array.from(t)),t},Sn=async()=>window.crypto.subtle===void 0?(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`]),Cn=async e=>{if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve();let t=await window.crypto.subtle.exportKey(`raw`,e);F.set(_n.key,Array.from(new Uint8Array(t)))},wn=async e=>{if(e)return e;let t=await Sn();return t?(await Cn(t),t):null},Tn=async()=>{let e=F.get(_n.key);return e?await window.crypto.subtle.importKey(`raw`,new Uint8Array(e),{name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]):null},En=e=>{let t={};for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t},Dn=(e,t,n)=>{if(e===t)return!0;for(let r in e)if(!n.includes(r)&&e[r]!==t[r]&&!On(e[r],t[r]))return!1;for(let r in t)if(!n.includes(r)&&!(r in e))return!1;return!0},On=(e,t)=>{switch(typeof e){case`object`:return Dn(e,t,[]);case`function`:return e.toString()===t.toString();default:return e===t}},kn={ms:1,s:1e3,m:6e4,h:36e5,d:864e5},An=e=>{if(typeof e==`number`)return e;for(let[t,n]of Object.entries(kn))if(e.endsWith(t))return parseFloat(e)*n;return parseInt(e)},I=new class{cached=[];inFlightRequests=[];removalTimers=[];currentUseId=null;add(e,t,{cacheFor:n,cacheTags:r}
1){if(this.findInFlight(e))return Promise.resolve();let i=this.findCached(e);if(!e.fresh&&i&&i.staleTimestamp>Date.now())return Promise.resolve();let[a,o]=this.extractStaleValues(n),s=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){I.removeFromInFlight(e),r(t)}})}).then(t=>{this.remove(e);let n=t.getPageResponse();B.mergeOncePropsIntoResponse(n),this.cached.push({params:{...e},staleTimestamp:Date.now()+a,expiresAt:Date.now()+o,response:s,singleUse:o===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(r)?r:[r]});let i=this.getShortestOncePropTtl(n);return this.scheduleForRemoval(e,i?Math.min(o,i):o),this.removeFromInFlight(e),t.handlePrefetch(),t});return this.inFlightRequests.push({params:{...e},response:s,staleTimestamp:null,inFlight:!0}),s}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){let[t,n]=this.cacheForToStaleAndExpires(e);return[An(t),An(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){let 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(!(typeof window>`u`)&&(this.clearTimer(e),t>0)){let 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){let n=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;this.currentUseId=n;let r={...t,cached:!0};return e.response.then(e=>{if(this.currentUseId===n)return e.mergeParams({...r,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){let t=k(e);return t.headers.Purpose===`prefetch`&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return Dn(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),[`id`,`showProgress`,`replace`,`prefetch`,`preserveScroll`,`preserveState`,`onBefore`,`onBeforeUpdate`,`onStart`,`onProgress`,`onFinish`,`onCancel`,`onSuccess`,`onError`,`onFlash`,`onPrefetched`,`onCancelToken`,`onPrefetching`,`async`,`viewTransition`,`optimistic`,`component`,`pageProps`,`cached`])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(e=>{e.response.then(t=>{let n=t.getPageResponse();B.mergeOncePropsIntoResponse(n,{force:!0});for(let[e,t]of Object.entries(n.deferredProps??{})){let r=t.filter(e=>j(n.props,e)===void 0);r.length>0?n.deferredProps[e]=r:delete n.deferredProps[e]}let r=this.getShortestOncePropTtl(n);if(r===null)return;let i=e.expiresAt-Date.now(),a=Math.min(i,r);a>0?this.scheduleForRemoval(e.params,a):this.remove(e.params)})})}getShortestOncePropTtl(e){let t=Object.values(e.onceProps??{}).map(e=>e.expiresAt).filter(e=>!!e);return t.length===0?null:Math.min(...t)-Date.now()}},jn=e=>{if(e.offsetParent===null)return!1;let t=e.getBoundingClientRect(),n=t.top<window.innerHeight&&t.bottom>=0,r=t.left<window.innerWidth&&t.right>=0;return n&&r},Mn=e=>{let t=e=>{let t=window.getComputedStyle(e);return t.overflowY===`scroll`?!0:t.overflowY===`auto`?[`visible`,`clip`].includes(t.overflowX)?!0:r(t.maxHeight,e.style.height)||i(e,`height`):!1},n=e=>{let t=window.getComputedStyle(e);return t.overflowX===`scroll`?!0:t.overflowX===`auto`?[`visible`,`clip`].includes(t.overflowY)?!0:r(t.maxWidth,e.style.width)||i(e,`width`):!1},r=(e,t)=>!!(e&&e!==`none`&&e!==`0px`||t&&t!==`auto`&&t!==`0`),i=(e,t)=>{let n=e.parentElement;if(!n)return!1;let r=window.getComputedStyle(n);if([`flex`,`inline-flex`].includes(r.display)){let e=[`column`,`column-reverse`].includes(r.flexDirection);return t===`height`?e:!e}return[`grid`,`inline-grid`].includes(r.display)},a=e?.parentElement;for(;a;){let e=t(a)||n(a);if(window.getComputedStyle(a).display!==`contents`&&e)return a;a=a.parentElement}return null},Nn=(e,t)=>{if(!t)return e.filter(e=>jn(e));let n=e.indexOf(t),r=[],i=[];for(let t=n;t>=0;t--){let n=e[t];if(jn(n))r.push(n);else break}for(let t=n+1;t<e.length;t++){let n=e[t];if(jn(n))i.push(n);else break}return[...r.reverse(),...i]},Pn=(e,t=1)=>{window.requestAnimationFrame(()=>{t>1?Pn(e,t-1):e()})},Fn=e=>{if(typeof window>`u`)return null;let t=document.querySelector(`script[data-page="${e}"][type="application/json"]`);return t?.textContent?JSON.parse(t.textContent):null},In=typeof window>`u`,Ln=!In&&/Firefox/i.test(window.navigator.userAgent),L=class{static save(){V.saveScrollPositions(this.getScrollRegions())}static getScrollRegions(){return Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))}static regions(){return document.querySelectorAll(`[scroll-region]`)}static scrollToTop(){if(Ln&&getComputedStyle(document.documentElement).scrollBehavior===`smooth`)return Pn(()=>window.scrollTo(0,0),2);window.scrollTo(0,0)}static reset(){!In&&window.location.hash||this.scrollToTop(),this.regions().forEac
1h(e=>{typeof e.scrollTo==`function`?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),this.scrollToAnchor()}static scrollToAnchor(){let e=In?null:window.location.hash;e&&setTimeout(()=>{let t=document.getElementById(e.slice(1));t?t.scrollIntoView():this.scrollToTop()})}static restore(e){In||window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){In||this.regions().forEach((t,n)=>{let r=e[n];r&&(typeof t.scrollTo==`function`?t.scrollTo(r.left,r.top):(t.scrollTop=r.top,t.scrollLeft=r.left))})}static restoreDocument(){let e=V.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){let t=e.target;typeof t.hasAttribute==`function`&&t.hasAttribute(`scroll-region`)&&this.save()}static onWindowScroll(){V.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}},Rn=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0;function zn(e){return Rn(e)||e instanceof FormData&&Array.from(e.values()).some(e=>zn(e))||typeof e==`object`&&!!e&&Object.values(e).some(e=>zn(e))}var Bn=e=>e instanceof FormData;function Vn(e,t=new FormData,n=null,r=`brackets`){e||={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&Un(t,Hn(n,i,`indices`),e[i],r);return t}function Hn(e,t,n){return e?n===`brackets`?`${e}[]`:`${e}[${t}]`:t}function Un(e,t,n,r){if(Array.isArray(n))return Array.from(n.keys()).forEach(i=>Un(e,Hn(t,i.toString(),r),n[i],r));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);Vn(n,e,t,r)}function Wn(e){return/\[\d+\]/.test(decodeURIComponent(e.search))}function Gn(e){if(!e||e===`?`)return{};let t={};return e.replace(/^\?/,``).split(`&`).filter(Boolean).forEach(e=>{let[n,r]=qn(e);Yn(t,Jn(n),Jn(r))}),t}function Kn(e,t){let n=[];return Zn(e,``,n,t),n.length?`?`+n.join(`&`):``}function qn(e){let t=e.indexOf(`=`);return t===-1?[e,``]:[e.substring(0,t),e.substring(t+1)]}function Jn(e){return decodeURIComponent(e.replace(/\+/g,` `))}function Yn(e,t,n){let r=Xn(t);if(r.some(e=>e===`__proto__`))return;let i=e;for(;r.length>1;){let e=r.shift(),t=r[0]===``;(typeof i[e]!=`object`||i[e]===null)&&(i[e]=t?[]:{}),i=i[e]}let a=r.shift();a===``&&Array.isArray(i)?i.push(n):i[a]=n}function Xn(e){let t=[],n=e.split(`[`)[0];n&&t.push(n);let r,i=/\[([^\]]*)\]/g;for(;(r=i.exec(e))!==null;)t.push(r[1]);return t}function Zn(e,t,n,r){if(e!==void 0){if(e===null){n.push(`${t}=`);return}if(Array.isArray(e)){e.forEach((e,i)=>{Zn(e,r===`indices`?`${t}[${i}]`:`${t}[]`,n,r)});return}if(typeof e==`object`){Object.keys(e).forEach(i=>{Zn(e[i],t?`${t}[${i}]`:i,n,r)});return}n.push(`${t}=${encodeURIComponent(String(e))}`)}}function R(e){return new URL(e.toString(),typeof window>`u`?void 0:window.location.toString())}var Qn=(e,t,n,r,i)=>{let a=typeof e==`string`?R(e):e;if((zn(t)||r)&&!Bn(t)&&(Qt.get(`form.forceIndicesArrayFormatInFormData`)&&(i=`indices`),t=Vn(t,new FormData,null,i)),Bn(t))return[a,t];let[o,s]=$n(n,a,t,i);return[R(o),s]};function $n(e,t,n,r=`brackets`){let i=e===`get`&&!Bn(n)&&Object.keys(n).length>0,a=ar(t.toString()),o=a||t.toString().startsWith(`/`)||t.toString()===``,s=!o&&!t.toString().startsWith(`#`)&&!t.toString().startsWith(`?`),c=/^[.]{1,2}([/]|$)/.test(t.toString()),l=t.toString().includes(`?`)||i,u=t.toString().includes(`#`),d=new URL(t.toString(),typeof window>`u`?`http://localhost`:window.location.toString());if(i){let e=Wn(d)?`indices`:r;d.search=Kn({...Gn(d.search),...n},e)}return[[a?`${d.protocol}//${d.host}`:``,o?d.pathname:``,s?d.pathname.substring(+!c):``,l?d.search:``,u?d.hash:``].join(``),i?{}:n]}function er(e){return e=new URL(e.href),e.hash=``,e}var tr=(e,t)=>{e.hash&&!t.hash&&er(e).href===t.href&&(t.hash=e.hash)},nr=(e,t)=>er(e).href===er(t).href,rr=(e,t)=>e.origin===t.origin&&e.pathname===t.pathname;function z(e){return typeof e==`object`&&!!e&&e!==void 0&&`url`in e&&`method`in e}function ir(e){return e.component?typeof e.component==`string`?e.component:(console.error(`The "component" property on the URL method pair received multiple components (${Object.keys(e.component).join(`, `)}), but only a single component string is supported for instant visits. Use the withComponent() method to specify which component to use.`),null):null}function ar(e){return/^([a-z][a-z0-9+.-]*:)?\/\/[^/]/i.test(e)}function or(e,t){let n=typeof e==`string`?R(e):e;return t?`${n.protocol}//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`}var B=new class{page;swapComponent;resolveComponent;onFlashCallback;componentId={};listeners=[];isFirstPageLoad=!0;cleared=!1;pendingDeferredProps=null;historyQuotaExceeded=!1;optimisticBaseline={};pendingOptimistics=[];optimisticCounter=0;
1init({initialPage:e,swapComponent:t,resolveComponent:n,onFlash:r}){return this.page={...e,flash:e.flash??{},rescuedProps:e.rescuedProps??[]},this.swapComponent=t,this.resolveComponent=n,this.onFlashCallback=r,H.on(`historyQuotaExceeded`,()=>{this.historyQuotaExceeded=!0}),this}set(e,{replace:t=!1,preserveScroll:n=!1,preserveState:r=!1,viewTransition:i=!1,cached:a=!1,visitId:o}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url},e.initialDeferredProps===void 0&&(e.initialDeferredProps=e.deferredProps)),this.componentId={};let s=this.componentId;return e.clearHistory&&V.clear(),this.resolve(e.component,e).then(c=>{if(s!==this.componentId)return;e.rememberedState??={};let l=typeof window>`u`,u=l?new URL(e.url):window.location,d=!l&&n?L.getScrollRegions():[];t||=nr(R(e.url),u);let f={...e,flash:{}};return new Promise(e=>t?V.replaceState(f,e):V.pushState(f,e)).then(()=>{let s=!this.isTheSame(e);if(!s&&Object.keys(e.props.errors||{}).length>0&&(i=!1),this.page=e,this.cleared=!1,this.hasOnceProps()&&I.updateCachedOncePropsFromCurrentPage(),s&&this.fireEventsFor(`newComponent`),this.isFirstPageLoad&&this.fireEventsFor(`firstLoad`),this.isFirstPageLoad=!1,this.historyQuotaExceeded){this.historyQuotaExceeded=!1;return}return this.swap({component:c,page:e,preserveState:r,viewTransition:i}).then(()=>{n?window.requestAnimationFrame(()=>L.restoreScrollRegions(d)):L.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&H.fireInternalEvent(`loadDeferredProps`,this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||sn(e,{cached:a,visitId:o})})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component,e).then(n=>(this.page=e,this.cleared=!1,V.setCurrent(e),this.swap({component:n,page:e,preserveState:t,viewTransition:!1})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}getWithoutFlashData(){return{...this.page,flash:{}}}hasOnceProps(){return Object.keys(this.page.onceProps??{}).length>0}merge(e){this.page={...this.page,...e}}setPropsQuietly(e){return this.page={...this.page,props:e},this.resolve(this.page.component,this.page).then(e=>this.swap({component:e,page:this.page,preserveState:!0,viewTransition:!1}))}setFlash(e){this.page={...this.page,flash:e},this.onFlashCallback?.(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,viewTransition:r}){let i=()=>this.swapComponent({component:e,page:t,preserveState:n});if(!r||!document?.startViewTransition||document.visibilityState===`hidden`)return i();let a=typeof r==`boolean`?()=>null:r;return new Promise(e=>{let t=document.startViewTransition(()=>i().then(e));t.ready.catch(()=>{}),a(t)})}resolve(e,t){return Promise.resolve(this.resolveComponent(e,t))}nextOptimisticId(){return++this.optimisticCounter}setBaseline(e,t){e in this.optimisticBaseline||(this.optimisticBaseline[e]=t)}updateBaseline(e,t){e in this.optimisticBaseline&&(this.optimisticBaseline[e]=t)}hasBaseline(e){return e in this.optimisticBaseline}registerOptimistic(e,t){this.pendingOptimistics.push({id:e,callback:t})}unregisterOptimistic(e){this.pendingOptimistics=this.pendingOptimistics.filter(t=>t.id!==e)}replayOptimistics(){let e=Object.keys(this.optimisticBaseline);if(e.length===0)return{};let t=k(this.page.props);for(let n of e)t[n]=k(this.optimisticBaseline[n]);for(let{callback:e}of this.pendingOptimistics){let n=e(k(t));n&&Object.assign(t,n)}let n={};for(let r of e)n[r]=t[r];return n}pendingOptimisticCount(){return this.pendingOptimistics.length}clearOptimisticState(){this.optimisticBaseline={},this.pendingOptimistics=[]}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())}mergeOncePropsIntoResponse(e,{force:t=!1}={}){Object.entries(e.onceProps??{}
1).forEach(([n,r])=>{let i=this.page.onceProps?.[n];i!==void 0&&(t||j(e.props,r.prop)===void 0)&&(M(e.props,r.prop,j(this.page.props,i.prop)),e.onceProps[n].expiresAt=i.expiresAt)})}},sr=class{items=[];processingPromise=null;add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??=this.processNext().finally(()=>{this.processingPromise=null}),this.processingPromise}processNext(){let e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},cr=typeof window>`u`,lr=new sr,ur=!cr&&/CriOS/.test(window.navigator.userAgent),dr=class{rememberedState=`rememberedState`;scrollRegions=`scrollRegions`;preserveUrl=!1;current={};initialState=null;remember(e,t){this.replaceState({...B.getWithoutFlashData(),rememberedState:{...B.get()?.rememberedState??{},[t]:e}})}restore(e){if(!cr)return this.current[this.rememberedState]?.[e]===void 0?this.initialState?.[this.rememberedState]?.[e]:this.current[this.rememberedState]?.[e]}pushState(e,t=null){if(!cr){if(this.preserveUrl){t&&t();return}this.current=e,lr.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doPushState({page:n},e.url).then(()=>t?.());return ur?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}clonePageProps(e){try{return structuredClone(e.props),e}catch{return{...e,props:k(e.props)}}}getPageData(e){let t=this.clonePageProps(e);return new Promise(n=>e.encryptHistory?gn(t).then(n):n(t))}processQueue(){return lr.process()}decrypt(e=null){if(cr)return Promise.resolve(e??B.get());let t=e??window.history.state?.page;return this.decryptPageData(t).then(e=>{if(!e)throw Error(`Unable to decrypt history`);return this.initialState===null?this.initialState=e??void 0:this.current=e??{},e})}decryptPageData(e){return e instanceof ArrayBuffer?vn(e):Promise.resolve(e)}saveScrollPositions(e){lr.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!A(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){lr.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!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){if(A(this.current,e)){t&&t();return}let{flash:n,...r}=e;if(B.merge(r),!cr){if(this.preserveUrl){t&&t();return}this.current=e,lr.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doReplaceState({page:n},e.url).then(()=>t?.());return ur?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}isHistoryThrottleError(e){return e instanceof Error&&e.name===`SecurityError`&&(e.message.includes(`history.pushState`)||e.message.includes(`history.replaceState`))}isQuotaExceededError(e){return e instanceof Error&&e.name===`QuotaExceededError`}withThrottleProtection(e){return Promise.resolve().then(()=>{try{return e()}catch(e){if(!this.isHistoryThrottleError(e))throw e;console.error(e.message)}})}doReplaceState(e,t){return this.withThrottleProtection(()=>{window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},``,t)})}doPushState(e,t){return this.withThrottleProtection(()=>{try{window.history.pushState(e,``,t)}catch(e){if(!this.isQuotaExceededError(e))throw e;H.fireInternalEvent(`historyQuotaExceeded`,t)}})}getState(e,t){return this.current?.[e]??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&this.initialState[e]!==void 0&&delete this.initialState[e]}browserHasHistoryEntry(){return!cr&&!!window.history.state?.page}clear(){F.remove(_n.key),F.remove(_n.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<`u`&&window.history.scrollRestoration&&(window.history.scrollRestoration=`manual`);var V=new dr,H=new class{internalListeners=[];init(){typeof window<`u`&&(window.addEventListener(`popstate`,this.handlePopstateEvent.bind(this)),window.addEventListener(`pageshow`,this.handlePageshowEvent.bind(this)),window.addEventListener(`scroll`,$t(L.onWindowScroll.bind(L),100),!0)),typeof document<`u`&&document.addEventListener(`scroll`,$t(L.onScroll.bind(L),100),!0)}onGlobalEvent(e,t){return this.registerListener(`inertia:${e}`,(e=>{let n=t(e);e.cancelable&&!e.defaultPrevented&&n===!1&&e.preventDefault()}))}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(e=>e.listener!==t)}}onMissingHistoryItem(){B.clear(),this.fireInternalEvent(`missingHistoryItem`)}fireInternalEvent(e,...t){this.internalListeners.filter(t=>
1t.event===e).forEach(e=>e.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePageshowEvent(e){e.persisted&&V.decrypt().catch(()=>this.onMissingHistoryItem())}handlePopstateEvent(e){let t=e.state||null;if(t===null){let e=R(B.get().url);e.hash=window.location.hash,V.replaceState({...B.getWithoutFlashData(),url:e.href}),L.reset();return}if(!V.isValidState(t))return this.onMissingHistoryItem();V.decrypt(t.page).then(e=>{if(B.get().version!==e.version){this.onMissingHistoryItem();return}X.cancelAll({prefetch:!1}),B.setQuietly(e,{preserveState:!1}).then(()=>{L.restore(V.getScrollRegions()),sn(B.get());let t={},n=B.get().props;for(let[r,i]of Object.entries(e.initialDeferredProps??e.deferredProps??{})){let e=i.filter(e=>j(n,e)===void 0);e.length>0&&(t[r]=e)}Object.keys(t).length>0&&this.fireInternalEvent(`loadDeferredProps`,t)})}).catch(()=>{this.onMissingHistoryItem()})}},fr=new class{type;constructor(){this.type=this.resolveType()}resolveType(){return typeof window>`u`?`navigate`:window.performance?.getEntriesByType(`navigation`)[0]?.type??`navigate`}get(){return this.type}isBackForward(){return this.type===`back_forward`}isReload(){return this.type===`reload`}};function pr(){let e=typeof window<`u`?window.crypto:void 0;if(e?.randomUUID)return e.randomUUID();let t=()=>e?.getRandomValues?e.getRandomValues(new Uint8Array(1))[0]:Math.floor(Math.random()*256);return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^t()&15>>e/4).toString(16))}var mr=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(e=>e.bind(this)())}static clearRememberedStateOnReload(){fr.isReload()&&(V.deleteState(V.rememberedState),V.clearInitialState(V.rememberedState))}static handleBackForward(){if(!fr.isBackForward()||!V.browserHasHistoryEntry())return!1;let e=V.getScrollRegions();return V.decrypt().then(t=>{let n=pr();B.set(t,{preserveScroll:!0,preserveState:!0,visitId:n}).then(()=>{L.restore(e),sn(B.get(),{visitId:n})})}).catch(()=>{H.onMissingHistoryItem()}),!0}static handleLocation(){if(!F.exists(F.locationVisitKey))return!1;let e=F.get(F.locationVisitKey)||{};return F.remove(F.locationVisitKey),typeof window<`u`&&B.setUrlHash(window.location.hash),V.decrypt(B.get()).then(()=>{let t=pr(),n=V.getState(V.rememberedState,{}),r=V.getScrollRegions();B.remember(n),B.set(B.get(),{preserveScroll:e.preserveScroll,preserveState:!0,visitId:t}).then(()=>{e.preserveScroll&&L.restore(r),this.fireInitialEvents(t)})}).catch(()=>{H.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<`u`&&B.setUrlHash(window.location.hash);let e=pr();B.set(B.get(),{preserveScroll:!0,preserveState:!0,visitId:e}).then(()=>{fr.isReload()?L.restore(V.getScrollRegions()):L.scrollToAnchor(),this.fireInitialEvents(e)})}static fireInitialEvents(e){let t=B.get();sn(t,{visitId:e}),Object.keys(t.flash).length>0&&queueMicrotask(()=>mn(t.flash))}},hr=class{intervalId=null;timeoutId=null;throttle=!1;keepAlive=!1;cb;interval;cbCount=0;mode;inFlight=!1;currentCancel=null;stopped=!0;instanceId=0;constructor(e,t,n){this.keepAlive=n.keepAlive??!1,this.mode=n.mode??`overlap`,this.cb=t,this.interval=e,(n.autoStart??!0)&&this.start()}stop(){this.stopped=!0,this.instanceId++,this.inFlight=!1,this.currentCancel=null,this.intervalId&&=(clearInterval(this.intervalId),null),this.timeoutId&&=(clearTimeout(this.timeoutId),null)}start(){if(!(typeof window>`u`)){if(this.stop(),this.stopped=!1,this.mode===`rest`){this.scheduleNext();return}this.intervalId=window.setInterval(()=>this.tick(),this.interval)}}isInBackground(e){this.throttle=!this.keepAlive&&e,this.throttle&&(this.cbCount=0)}scheduleNext(){this.stopped||(this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.tick()},this.interval))}tick(){!this.throttle||this.cbCount%10==0?this.fire():this.mode===`rest`&&this.scheduleNext(),this.throttle&&this.cbCount++}fire(){this.inFlight&&this.mode===`cancel`&&this.currentCancel?.();let e=this.instanceId;this.cb({onStart:t=>{e===this.instanceId&&(this.inFlight=!0,this.currentCancel=t)},onFinish:()=>{e===this.instanceId&&(this.inFlight=!1,this.currentCancel=null,this.mode===`rest`&&this.scheduleNext())}})}},gr=new class{polls=[];constructor(){this.setupVisibilityListener()}get count(){return this.polls.length}add(e,t,n){let r=new hr(e,t,n);return this.polls.push(r),{stop:()=>r.stop(),start:()=>r.start(),destroy:()=>{r.stop(),this.polls=this.polls.filter(e=>e!==r)}}}
1clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>`u`||document.addEventListener(`visibilitychange`,()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},U=new class{requestHandlers=[];responseHandlers=[];errorHandlers=[];onRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}onError(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async processRequest(e){let t=e;for(let e of this.requestHandlers)t=await e(t);return t}async processResponse(e){let t=e;for(let e of this.responseHandlers)t=await e(t);return t}async processError(e){for(let t of this.errorHandlers)await t(e)}},_r=class extends Error{code;url;constructor(e,t,n){super(n?`${e} (${n})`:e),this.name=`HttpError`,this.code=t,this.url=n}},vr=class extends _r{response;constructor(e,t,n){super(e,`ERR_HTTP_RESPONSE`,n),this.name=`HttpResponseError`,this.response=t}},yr=class extends _r{constructor(e=`Request was cancelled`,t){super(e,`ERR_CANCELLED`,t),this.name=`HttpCancelledError`}},br=class extends _r{cause;constructor(e,t,n){super(e,`ERR_NETWORK`,t),this.name=`HttpNetworkError`,this.cause=n}};function xr(e){let t=document.cookie.match(RegExp(`(^|;\\s*)(`+e+`)=([^;]*)`));return t?decodeURIComponent(t[3]):null}function Sr(e){let t={};return e.getAllResponseHeaders().split(`\r
2`).forEach(e=>{let n=e.indexOf(`:`);n>0&&(t[e.slice(0,n).toLowerCase().trim()]=e.slice(n+1).trim())}),t}function Cr(e){return typeof FormData<`u`&&e instanceof FormData}function wr(e){return typeof e==`string`||Cr(e)||typeof Blob<`u`&&e instanceof Blob||typeof ArrayBuffer<`u`&&e instanceof ArrayBuffer||typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)||typeof URLSearchParams<`u`&&e instanceof URLSearchParams}function Tr(e,t){if(!t.headers)return;let n=Cr(t.data);Object.entries(t.headers).forEach(([t,r])=>{(t.toLowerCase()!==`content-type`||!n)&&e.setRequestHeader(t,String(r))})}function Er(e,t){if(!t||Object.keys(t).length===0)return e;let[n]=$n(`get`,e,t);return n}var Dr=class{xsrfCookieName;xsrfHeaderName;constructor(e={}){this.xsrfCookieName=e.xsrfCookieName??`XSRF-TOKEN`,this.xsrfHeaderName=e.xsrfHeaderName??`X-XSRF-TOKEN`}async request(e){let t=await U.processRequest(e);try{let e=await this.doRequest(t);return await U.processResponse(e)}catch(e){throw(e instanceof vr||e instanceof br||e instanceof yr)&&await U.processError(e),e}}doRequest(e){return new Promise((t,n)=>{let r=new XMLHttpRequest,i=Er(e.url,e.params);r.open(e.method.toUpperCase(),i,!0);let a=xr(this.xsrfCookieName);a&&r.setRequestHeader(this.xsrfHeaderName,a),Object.keys(e.headers??{}).some(e=>e.toLowerCase()===`x-requested-with`)||r.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`);let o=null;e.data!==null&&e.data!==void 0&&(wr(e.data)?o=e.data:typeof e.data==`object`?(o=JSON.stringify(e.data),!e.headers?.[`Content-Type`]&&!e.headers?.[`content-type`]&&r.setRequestHeader(`Content-Type`,`application/json`)):o=String(e.data)),Tr(r,e),e.onUploadProgress&&(r.upload.onprogress=t=>{let n=t.lengthComputable?t.loaded/t.total:void 0;e.onUploadProgress({progress:n,percentage:n?Math.round(n*100):0,loaded:t.loaded,total:t.lengthComputable?t.total:void 0})}),e.signal&&e.signal.addEventListener(`abort`,()=>r.abort()),r.onabort=()=>n(new yr(`Request was cancelled`,e.url)),r.onerror=()=>n(new br(`Network error`,e.url)),r.onload=()=>{let i={status:r.status,data:r.responseText,headers:Sr(r)};r.status>=400?n(new vr(`Request failed with status ${r.status}`,i,e.url)):t(i)},r.send(o)})}},Or=new Dr;function kr(e){return!(`request`in e)}var Ar={getClient(){return Or},setClient(e){if(!kr(e)){Or=e;return}Or=new Dr(e),e.xsrfCookieName&&N.withXsrfCookieName(e.xsrfCookieName),e.xsrfHeaderName&&N.withXsrfHeaderName(e.xsrfHeaderName)},onRequest:U.onRequest.bind(U),onResponse:U.onResponse.bind(U),onError:U.onError.bind(U),processRequest:U.processRequest.bind(U),processResponse:U.processResponse.bind(U),processError:U.processError.bind(U)},jr=new class{requestHandlers=[];responseHandlers=[];onVisitRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onVisitResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}async processRequest(e,t){let n=t;for(let t of this.requestHandlers)n=await t(e,n);return n}async processResponse(e,t){let n=t;for(let t of this.responseHandlers)n=await t(e,n);return n}};function Mr(){typeof window>`u`||(window.__inertia_interceptors__=jr)}var Nr=class e{callbacks=[];params;constructor(e){if(!e.prefetch)this.params=e;else{let 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`),onHttpException:this.wrapCallback(e,`onHttpException`),onNetworkError:this.wrapCallback(e,`onNetworkError`),onFlash:this.wrapCallback(e,`onFlash`),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||(()=>{})}}}static create(t){return new e(t)}data(){return this.params.method===`get`?null:this.params.data}queryParams(){return this.params.method===`get`?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}isPrefetch(){return this.params.prefetch===!0}isDeferredPropsRequest(){return this.params.deferredProps===!0}isPollRequest(){return this.params.poll===!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)}
2all(){return this.params}headers(){let e={...this.params.headers};this.isPartial()&&(e[`X-Inertia-Partial-Component`]=B.get().component);let 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(t){this.params.preserveScroll=e.resolvePreserveOption(this.params.preserveScroll,t),this.params.preserveState=e.resolvePreserveOption(this.params.preserveState,t)}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})}static resolvePreserveOption(e,t){return typeof e==`function`?e(t):e===`errors`?Object.keys(t.props.errors||{}).length>0:e}},Pr={createIframeAndPage(e){typeof e==`object`&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.<hr>${JSON.stringify(e)}`);let t=document.createElement(`html`);t.innerHTML=e,t.querySelectorAll(`a`).forEach(e=>e.setAttribute(`target`,`_top`));let n=document.createElement(`iframe`);return n.style.backgroundColor=`white`,n.style.borderRadius=`5px`,n.style.width=`100%`,n.style.height=`100%`,n.setAttribute(`sandbox`,`allow-scripts`),{iframe:n,page:t}},show(e){let{iframe:t,page:n}=this.createIframeAndPage(e);t.style.boxSizing=`border-box`,t.style.display=`block`;let r=document.createElement(`dialog`);r.id=`inertia-error-dialog`,Object.assign(r.style,{width:`calc(100vw - 100px)`,height:`calc(100vh - 100px)`,padding:`0`,margin:`auto`,border:`none`,backgroundColor:`transparent`});let i=document.createElement(`style`);i.textContent=`
3      dialog#inertia-error-dialog::backdrop {
4        background-color: rgba(0, 0, 0, 0.6);
5      }
6
7      dialog#inertia-error-dialog:focus {
8        outline: none;
9      }
10    `;let a=Qt.get(`nonce`);a&&(i.nonce=a),document.head.appendChild(i),r.addEventListener(`click`,e=>{e.target===r&&r.close()}),r.addEventListener(`close`,()=>{i.remove(),r.remove()}),r.appendChild(t),document.body.prepend(r),r.showModal(),r.focus(),t.srcdoc=n.outerHTML}},Fr=(e,t)=>e===t||e.startsWith(`${t}.`),Ir=(e,t)=>{let{only:n,except:r}=e;return!(n.length===0&&r.length===0||n.length>0&&!n.some(e=>Fr(t,e))||r.length>0&&r.some(e=>Fr(t,e)))},Lr=(e,t)=>t.some(t=>Ir(e,t)),Rr=new sr,zr=class e{constructor(e,t,n){this.requestParams=e,this.response=t,this.originatingPage=n}requestParams;response;originatingPage;wasPrefetched=!1;processed=!1;static create(t,n,r){return new e(t,n,r)}isProcessed(){return this.processed}async handlePrefetch(){nr(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return Rr.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()),fn(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),this.processed=!0,!this.isInertiaResponse())return this.handleNonInertiaResponse();if(this.isHttpException()){let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)===!1||!an(e))return}await V.processQueue(),V.preserveUrl=this.requestParams.all().preserveUrl,await this.setPage();let{flash:e}=B.get();Object.keys(e).length>0&&!this.requestParams.isDeferredPropsRequest()&&(mn(e),this.requestParams.all().onFlash(e));let t=B.get().props.errors||{};if(Object.keys(t).length>0){let e=this.getScopedErrors(t);return tn(e,{page:B.get(),visitId:this.requestParams.all().id}),this.requestParams.all().onError(e)}X.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||X.flush(B.get().url),dn(B.get(),{visitId:this.requestParam
10s.all().id}),await this.requestParams.all().onSuccess(B.get()),V.preserveUrl=!1}mergeParams(e){this.requestParams.merge(e)}getPageResponse(){let e=this.getDataFromResponse(this.response.data);return typeof e==`object`?this.response.data={...e,flash:e.flash??{},rescuedProps:e.rescuedProps??[]}:this.response.data=e}async handleNonInertiaResponse(){if(this.isInertiaRedirect()){X.visit(this.getHeader(`x-inertia-redirect`),{...this.requestParams.all(),method:`get`,data:{}});return}if(this.isLocationVisit()){let e=R(this.getHeader(`x-inertia-location`));return tr(this.requestParams.all().url,e),this.locationVisit(e)}let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)!==!1&&an(e))return Pr.show(e.data)}isInertiaResponse(){return this.hasHeader(`x-inertia`)}isHttpException(){return this.response.status>=400}hasStatus(e){return this.response.status===e}getHeader(e){return this.response.headers[e]}hasHeader(e){return this.getHeader(e)!==void 0}isInertiaRedirect(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-redirect`)}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-location`)}locationVisit(e){try{if(typeof window>`u`)return;let t=this.getHeader(`x-inertia-version`),n=!!t&&t!==B.get().version;if(!hn(e,n)||n&&this.requestParams.all().async)return;F.set(F.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),nr(window.location,e)?window.location.reload():window.location.href=e.href}catch{return!1}}async setPage(){let e=this.getPageResponse();return this.shouldSetPage(e)?(this.response=await jr.processResponse(this.requestParams.all(),this.response),this.mergeProps(e),B.mergeOncePropsIntoResponse(e),this.preserveOptimisticProps(e),this.preserveEqualProps(e),await this.setRememberedState(e),this.requestParams.setPreserveOptions(e),e.url=V.preserveUrl?B.get().url:this.pageUrl(e),this.requestParams.all().onBeforeUpdate(e),on(e),B.set(e,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState,viewTransition:this.requestParams.all().viewTransition,cached:this.requestParams.all().cached,visitId:this.requestParams.all().id})):Promise.resolve()}getDataFromResponse(e){if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}}shouldSetPage(e){if(!this.requestParams.all().async||this.originatingPage.component!==e.component)return!0;if(this.originatingPage.component!==B.get().component)return!1;let t=R(this.originatingPage.url),n=R(B.get().url);return t.origin===n.origin&&t.pathname===n.pathname}pageUrl(e){let t=R(e.url);return e.preserveFragment?t.hash=this.requestParams.all().url.hash:tr(this.requestParams.all().url,t),t.pathname+t.search+t.hash}preserveOptimisticProps(e){if(X.hasPendingOptimistic())for(let t of Object.keys(e.props))B.hasBaseline(t)&&(B.updateBaseline(t,e.props[t]),e.props[t]=B.get().props[t])}preserveEqualProps(e){if(e.component!==B.get().component)return;let t=B.get().props;Object.entries(e.props).forEach(([n,r])=>{A(r,t[n])&&(e.props[n]=t[n])})}mergeProps(e){if(!this.requestParams.isPartial()||e.component!==B.get().component)return;let t=e.mergeProps||[],n=e.prependProps||[],r=e.deepMergeProps||[],i=e.matchPropsOn||[],a=(t,n)=>{let r=j(B.get().props,t),a=j(e.props,t);if(Array.isArray(a)){let o=this.mergeOrMatchItems(r||[],a,t,i,n);M(e.props,t,o)}else if(typeof a==`object`&&a){let n={...r||{},...a};M(e.props,t,n)}};t.forEach(e=>a(e,!0)),n.forEach(e=>a(e,!1)),r.forEach(t=>{let n=j(B.get().props,t),r=j(e.props,t),a=(e,t,n)=>Array.isArray(t)?this.mergeOrMatchItems(e,t,n,i):typeof t==`object`&&t?Object.keys(t).reduce((r,i)=>(r[i]=a(e?e[i]:void 0,t[i],`${n}.${i}`),r),{...e}):t;M(e.props,t,a(n,r,t))});let o=new Set([...this.requestParams.all().only,...this.requestParams.all().except].filter(e=>e.includes(`.`)).map(e=>e.split(`.`)[0]));for(let t of o){let n=B.get().props[t];this.isObject(n)&&this.isObject(e.props[t])&&(e.props[t]=this.deepMergeObjects(n,e.props[t]))}e.props={...B.get().props,...e.props},this.shouldPreserveErrors(e)&&(e.props.errors=B.get().props.errors),B.get().scrollProps&&(e.scrollProps={...B.get().scrollProps||{},...e.scrollProps||{}}),B.hasOnceProps()&&(e.onceProps={...B.get().onceProps||{},...e.onceProps||{}}
10),this.requestParams.isDeferredPropsRequest()&&(e.flash={...B.get().flash});let s=B.get().initialDeferredProps;s&&Object.keys(s).length>0&&(e.initialDeferredProps=s),e.rescuedProps=this.mergeRescuedProps(e)}mergeRescuedProps(e){let t=B.get().rescuedProps??[],n=e.rescuedProps??[],r=new Set(t.filter(e=>!Ir(this.requestParams.all(),e)));return n.forEach(e=>r.add(e)),Array.from(r)}shouldPreserveErrors(e){if(!this.requestParams.all().preserveErrors)return!1;let t=B.get().props.errors;if(!t||Object.keys(t).length===0)return!1;let n=e.props.errors;return!(n&&Object.keys(n).length>0)}isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}deepMergeObjects(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];n[r]=this.isObject(i)&&this.isObject(a)?this.deepMergeObjects(i,a):a}return n}mergeOrMatchItems(e,t,n,r,i=!0){let a=Array.isArray(e)?e:[],o=r.find(e=>e.split(`.`).slice(0,-1).join(`.`)===n);if(!o)return i?[...a,...t]:[...t,...a];let s=o.split(`.`).pop()||``,c=new Map;return t.forEach(e=>{this.hasUniqueProperty(e,s)&&c.set(e[s],e)}),i?this.appendWithMatching(a,t,c,s):this.prependWithMatching(a,t,c,s)}appendWithMatching(e,t,n,r){let i=e.map(e=>this.hasUniqueProperty(e,r)&&n.has(e[r])?n.get(e[r]):e),a=t.filter(t=>!this.hasUniqueProperty(t,r)||!e.some(e=>this.hasUniqueProperty(e,r)&&e[r]===t[r]));return[...i,...a]}prependWithMatching(e,t,n,r){let i=e.filter(e=>!this.hasUniqueProperty(e,r)||!n.has(e[r]));return[...t,...i]}hasUniqueProperty(e,t){return e&&typeof e==`object`&&t in e}async setRememberedState(e){let t=await V.getState(V.rememberedState,{});this.requestParams.all().preserveState&&t&&e.component===B.get().component&&(e.rememberedState=t)}getScopedErrors(e){return this.requestParams.all().errorBag?e[this.requestParams.all().errorBag||``]||{}:e}},Br=class e{constructor(e,t,{optimistic:n=!1}={}){this.page=t,this.requestParams=Nr.create(e),this.cancelToken=new AbortController,this.optimistic=n}page;response;cancelToken;requestParams;requestHasFinished=!1;optimistic;static create(t,n,r){return new e(t,n,r)}isPrefetch(){return this.requestParams.isPrefetch()}isOptimistic(){return this.optimistic}isPendingOptimistic(){return this.isOptimistic()&&(!this.response||!this.response.isProcessed())}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),un(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),pn(this.requestParams.all()));let e=this.requestParams.all().prefetch,t={method:this.requestParams.all().method,url:er(this.requestParams.all().url).href,data:this.requestParams.data(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this)},n=await jr.processRequest(this.requestParams.all(),t);return Ar.getClient().request(n).then(e=>(this.response=zr.create(this.requestParams,e,this.page),this.response.handle())).catch(e=>e instanceof vr?(this.response=zr.create(this.requestParams,e.response,this.page),this.response.handle()):Promise.reject(e)).catch(t=>{if(!(t instanceof yr)&&this.requestParams.all().onNetworkError(t)!==!1&&nn(t))return e&&this.requestParams.onPrefetchError(t),Promise.reject(t)}).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,rn(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&&(ln(e),this.requestParams.all().onProgress(e))}getHeaders(){let e={...this.requestParams.headers(),Accept:`text/html, application/xhtml+xml`,"X-Requested-With":`XMLHttpRequest`,"X-Inertia":!0},t=B.get();t.version&&(e[`X-Inertia-Version`]=t.version);let n=Object.entries(t.onceProps||{}).filter(([,e])=>j(t.props,e.prop)===void 0?!1:!e.expiresAt||e.expiresAt>Date.now()).map(([e])=>e);return n.length>0&&(e[`X-Inertia-Except-Once-Props`]=n.join(`,`)),e}},Vr=class{requests=[];maxConcurrent;interruptible;constructor({maxConcurrent:e,interruptible:t}){this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().finally(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight({prefetch:e=!0,optimistic:t=!0}={}){this.requests.filter(t=>e||!t.isPrefetch()).filter(e=>
10t||!e.isOptimistic()).forEach(e=>e.cancel({cancelled:!0}))}cancel({cancelled:e=!1,interrupted:t=!1}={},n=!1){!n&&!this.shouldCancel()||this.requests.shift()?.cancel({cancelled:e,interrupted:t})}shouldCancel(){return this.interruptible&&this.requests.length>=this.maxConcurrent}hasPendingOptimistic(){return this.requests.some(e=>e.isPendingOptimistic())}},W=()=>{},Hr=class{syncRequestStream=new Vr({maxConcurrent:1,interruptible:!0});asyncRequestStream=new Vr({maxConcurrent:1/0,interruptible:!1});clientVisitQueue=new sr;pendingOptimisticCallback=void 0;init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}){B.init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}),mr.handle(),H.init(),H.on(`missingHistoryItem`,()=>{typeof window<`u`&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),H.on(`loadDeferredProps`,e=>{this.loadDeferredProps(e)}),H.on(`historyQuotaExceeded`,e=>{window.location.href=e})}optimistic(e){return this.pendingOptimisticCallback=e,this}get(e,t={},n={}){return this.visit(e,{...n,method:`get`,data:t})}post(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`post`,data:t})}put(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`put`,data:t})}patch(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`patch`,data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:`delete`})}reload(e={}){return this.doReload(e)}doReload(e={}){if(!(typeof window>`u`))return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0,async:!0,headers:{...e.headers||{},"Cache-Control":`no-cache`}})}remember(e,t=`default`){V.remember(e,t)}restore(e=`default`){return V.restore(e)}on(e,t){return typeof window>`u`?()=>{}:H.onGlobalEvent(e,t)}once(e,t){if(typeof window>`u`)return()=>{};let n=this.on(e,e=>(n(),t(e)));return n}hasPendingOptimistic(){return this.asyncRequestStream.hasPendingOptimistic()}get activePolls(){return gr.count}cancelAll({async:e=!0,prefetch:t=!0,sync:n=!0}={}){e&&this.asyncRequestStream.cancelInFlight({prefetch:t}),n&&this.syncRequestStream.cancelInFlight()}poll(e,t={},n={}){return gr.add(e,({onStart:e,onFinish:n})=>{let r=typeof t==`function`?t():t;this.doReload({poll:!0,preserveErrors:!0,...r,onCancelToken:t=>{e(t.cancel),r.onCancelToken?.(t)},onFinish:e=>{n(),r.onFinish?.(e)}})},{autoStart:n.autoStart??!0,keepAlive:n.keepAlive??!1,mode:n.mode})}visit(e,t={}){t.optimistic=t.optimistic??this.pendingOptimisticCallback,this.pendingOptimisticCallback=void 0,t.optimistic&&(t.async=t.async??!0);let n=this.getPendingVisit(e,{...t,showProgress:t.showProgress??(!t.async||!!t.optimistic)}),r=this.getVisitEvents(t);if(r.onBefore(n)===!1||!en(n))return;let i=R(B.get().url);(n.only.length>0||n.except.length>0||n.reset.length>0?rr(n.url,i):nr(n.url,i))||this.asyncRequestStream.cancelInFlight({prefetch:!1,optimistic:!1}),n.async||this.syncRequestStream.interruptInFlight(),t.optimistic&&this.applyOptimisticUpdate(t.optimistic,r),!B.isCleared()&&!n.preserveUrl&&L.save();let a={...n,...r},o=()=>{let e=I.get(a);e?(Y.reveal(e.inFlight),I.use(e,a)):(Y.reveal(!0),(n.async?this.asyncRequestStream:this.syncRequestStream).send(Br.create(a,B.get(),{optimistic:!!t.optimistic})))};Array.isArray(n.component)&&(console.error(`The "component" prop received an array of components (${n.component.join(`, `)}), but only a single component string is supported for instant visits. Pass an explicit component name instead.`),n.component=null),n.component?V.processQueue().then(()=>{this.performInstantSwap(n).then(()=>{a.preserveScroll=!0,a.preserveState=!0,a.replace=!0,a.viewTransition=!1,o()})}):o()}getCached(e,t={}){return I.findCached(this.getPrefetchParams(e,t))}flush(e,t={}){I.remove(this.getPrefetchParams(e,t))}flushAll(){I.removeAll()}flushByCacheTags(e){I.removeByTags(Array.isArray(e)?e:[e])}getPrefetching(e,t={}){return I.findInFlight(this.getPrefetchParams(e,t))}prefetch(e,t={},n={}){if((t.method??(z(e)?e.method:`get`))!==`get`)throw Error(`Prefetch requests must use the GET method`);let r=this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1});if(r.url.origin+r.url.pathname+r.url.search===window.location.origin+window.location.pathname+window.location.search)return;let i=this.getVisitEvents(t);if(i.onBefore(r)===!1||!en(r))return;Y.hide(),this.asyncRequestStream.interruptInFlight();let a={...r,...i};new Promise(e=>{let t=()=>{B.get()?e():setTimeout(t,50)};t()}).then(()=>{I.add(a,e=>{this.asyncRequestStream.send(Br.create(e,B.get()))},{cacheFor:Qt.get(`prefetch.cacheFor`),cacheTags:[],...n})})}clearHistory(){V.clear()}decryptHistory(){return V.decrypt()}resolveComponent(e,t){return B.resolve(e,t)}replace(e){this.clientVisit(e,{replace:!0})}replaceProp(e,t,n){this.replace({preserveScroll:!0,preserveState:!0,props(n){let r=typeof t==`function`?t(j(n,e),n):t;return M(k(n),e,r)},...n||{}})}appendToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[...e,r]},n)}prependToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[r,...e]},n)}push(e){this.clientVisit(e)}flash(e,t){let n=B.get().flash,r;if(typeof e==`function`)r=e(n);else if(typeof e==`string`)r={...n,[e]:t};else if(e&&Object.keys(e).length)r={...n,...e};else return;B.setFlash(r),Object.keys(r).length&&mn(r)}clientVisit(e,{replace:t=!1}={}){this.clientVisitQueue.add(()=>this.performClientVisit(e,{replace:t}))}performClientVisit(e,{replace:t=!1}={}){let n=B.get(),r=typeof e.props==`function`?Object.fromEntries(Object.values(n.onceProps??{}).map(e=>[e.prop,j(n.props,e.prop)])):{},i=typeof e.props==`function`?e.props(n.props,r):e.props??n.props,a=typeof e.flash==`function`?e.flash(n.flash):e.flash,{viewTransition:o,onError:s,onFinish:c,onFlash:l,onSuccess:u,...d}=e,f={...n,...d,flash:a??{},props:i},p=Nr.resolvePreserveOption(e.preserveScroll??!1,f),m=Nr.resolvePreserveOption(e.preserveState??!1,f),h=this.createVisitId();return B.set(f,{replace:t,preserveScroll:p,preserveState:m,viewTransition:o,visitId:h}).then(()=>{cn(B.get(),{replace:t,visitId:h});let n=B.get().flash;Object.keys(n).length>0&&(mn(n),l?.(n));let r=B.get().props.errors||{};if(Object.keys(r).length===0){u?.(B.get());return}let i=e.errorBag?r[e.errorBag||``]||{}:r;s?.(i)}).finally(()=>c?.(e))}performInstantSwap(e){let t=B.get(),n=Object.fromEntries((t.sharedProps??[]).filter(e=>e in t.props).map(e=>[e,t.props[e]])),r=typeof e.pageProps==`function`?e.pageProps(k(t.props),k(n)):e.pageProps,i=r===null?{...n}:{...r},a={component:e.component,url:e.url.pathname+e.url.search+e.url.hash,version:t.version,props:{...i,errors:{}},flash:{},rescuedProps:[],clearHistory:!1,encryptHistory:t.encryptHistory,sharedProps:t.sharedProps,rememberedState:{}};return B.set(a,{replace:e.replace,preserveScroll:Nr.resolvePreserveOption(e.preserveScroll,a),preserveState:!1,viewTransition:e.viewTransition,visitId:e.id})}getPrefetchParams(e,t){return{...this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),...this.getVisitEvents(t)}}createVisitId(){return pr()}getPendingVisit(e,t){if(z(e)){let n=e;e=n.url,t.method=t.method??n.method}let n=Qt.get(`visitOptions`),r=n&&n(e.toString(),k(t))||{},i={method:`get`,data:{},replace:!1,preserveScroll:!1,preserveState:!1,only:[],except:[],headers:{},errorBag:``,forceFormData:!1,queryStringArrayFormat:`brackets`,async:!1,showProgress:!0,fresh:!1,reset:[],preserveUrl:!1,preserveErrors:!1,prefetch:!1,invalidateCacheTags:[],viewTransition:!1,component:null,pageProps:null,cached:!1,...En(t),...En(r)},[a,o]=Qn(e,i.data,i.method,i.forceFormData,i.queryStringArrayFormat),s={id:this.createVisitId(),cancelled:!1,completed:!1,interrupted:!1,...i,url:a,data:o};return s.prefetch&&(s.headers.Purpose=`prefetch`),s}getVisitEvents(e){return{onCancelToken:e.onCancelToken||W,onBefore:e.onBefore||W,onBeforeUpdate:e.onBeforeUpdate||W,onStart:e.onStart||W,onProgress:e.onProgress||W,onFinish:e.onFinish||W,onCancel:e.onCancel||W,onSuccess:e.onSuccess||W,onError:e.onError||W,onHttpException:e.onHttpException||W,onNetworkError:e.onNetworkError||W,onFlash:e.onFlash||W,onPrefetched:e.onPrefetched||W,onPrefetching:e.onPrefetching||W}}applyOptimisticUpdate(e,t){let n=B.get().props,r=e(k(n));if(!r)return;let i=[];for(let e of Object.keys(r))A(n[e],r[e])||i.push(e);if(i.length===0)return;let a=B.nextOptimisticId(),o=B.get().component;for(let e of i)B.setBaseline(e,k(n[e]));B.registerOptimistic(a,e),B.setPropsQuietly({...n,...r});let s=!0,c=t.onSuccess;t.onSuccess=e=>(s=!1,c(e));let l=t.onFinish;t.onFinish=e=>{if(B.unregisterOptimistic(a),s&&B.get().component===o){let e=B.replayOptimistics();Object.keys(e).length>0&&B.setPropsQuietly({...B.get().props,...e})}return B.pendingOptimisticCount()===0&&B.clearOptimisticState(),l(e)}}
10loadDeferredProps(e){e&&Object.values(e).forEach(e=>{this.doReload({only:e,deferredProps:!0,preserveErrors:!0})})}},Ur=class{static createWayfinderCallback(...e){return()=>e.length===1?z(e[0])?e[0]:e[0]():{method:typeof e[0]==`function`?e[0]():e[0],url:typeof e[1]==`function`?e[1]():e[1]}}static parseUseFormArguments(...e){return e.length===0?{rememberKey:null,data:{},precognitionEndpoint:null}:e.length===1?{rememberKey:null,data:e[0],precognitionEndpoint:null}:e.length===2?typeof e[0]==`string`?{rememberKey:e[0],data:e[1],precognitionEndpoint:null}:{rememberKey:null,data:e[1],precognitionEndpoint:this.createWayfinderCallback(e[0])}:{rememberKey:null,data:e[2],precognitionEndpoint:this.createWayfinderCallback(e[0],e[1])}}static parseSubmitArguments(e,t){return e.length===3||e.length===2&&typeof e[0]==`string`?{method:e[0],url:e[1],options:e[2]??{}}:z(e[0])?{...e[0],options:e[1]??{}}:{...t(),options:e[0]??{}}}static mergeHeadersForValidation(e,t,n){let r=e=>(e.headers={...n??{},...e.headers??{}},e);return e&&typeof e==`object`&&!(`target`in e)?e=r(e):t&&typeof t==`object`?t=r(t):typeof e==`string`?t=r(t??{}):e=r(e??{}),[e,t]}};function Wr(e){return e.includes(`.`)?e.replace(/\\\./g,`__ESCAPED_DOT__`).split(/(\[[^\]]*\])/).filter(Boolean).map(e=>e.startsWith(`[`)&&e.endsWith(`]`)?e:e.split(`.`).reduce((e,t,n)=>n===0?t:`${e}[${t}]`)).join(``).replace(/__ESCAPED_DOT__/g,`.`):e}function Gr(e){let t=[],n=/([^\[\]]+)|\[(\d*)\]/g,r;for(;(r=n.exec(e))!==null;)r[1]===void 0?r[2]!==void 0&&t.push(r[2]===``?``:Number(r[2])):t.push(r[1]);return t}function Kr(e,t,n){let r=e;for(let e=0;e<t.length-1;e++)t[e]in r||(r[t[e]]={}),r=r[t[e]];r[t[t.length-1]]=n}function qr(e){let t=Object.keys(e),n=t.filter(e=>/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);return t.length===n.length&&n.length>0&&n[0]===0&&n.every((e,t)=>e===t)}function Jr(e){if(Array.isArray(e))return e.map(Jr);if(typeof e!=`object`||!e||Rn(e))return e;if(qr(e)){let t=[];for(let n=0;n<Object.keys(e).length;n++)t[n]=Jr(e[n]);return t}let t={};for(let n in e)t[n]=Jr(e[n]);return t}function Yr(e){let t={};for(let[n,r]of e.entries()){if(r instanceof File&&r.size===0&&r.name===``)continue;let e=Gr(Wr(n));if(e[e.length-1]===``){let n=e.slice(0,-1),i=j(t,n);if(Array.isArray(i))i.push(r);else if(i&&typeof i==`object`&&!Rn(i)){let e=Object.keys(i).filter(e=>/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);M(t,n,e.length>0?[...e.map(e=>i[e]),r]:[r])}else M(t,n,[r]);continue}Kr(t,e.map(String),r)}return Jr(t)}var Xr=`server`;function Zr(e,t){return e.match(/\sdata-inertia(=|\s|>)/)?e:e.replace(/^<([a-zA-Z][^\s/>]*)/,`<$1 data-inertia="server-head-${t}"`)}function Qr(e,t){if(!t)return[];let n=typeof t==`function`?t(e):e.props[t===!0?`head`:t];return Array.isArray(n)?n.map(e=>typeof e==`string`?e.trim():e).filter(e=>typeof e==`string`&&e.length>0).map(Zr):[]}var $r={buildDOMElement(e){let t=document.createElement(`template`);t.innerHTML=e;let n=t.content.firstChild;if(!e.startsWith(`<script `))return n;let r=document.createElement(`script`);return r.innerHTML=n.innerHTML,n.getAttributeNames().forEach(e=>{r.setAttribute(e,n.getAttribute(e)||``)}),r},isInertiaManagedElement(e){return e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`data-inertia`)!==null},findMatchingElementIndex(e,t){let n=e.getAttribute(`data-inertia`);return n===null?-1:t.findIndex(e=>e.getAttribute(`data-inertia`)===n)},update:$t(function(e){let t=e.map(e=>this.buildDOMElement(e)),n=Array.from(document.head.childNodes).filter(e=>this.isInertiaManagedElement(e));t.some(e=>e instanceof HTMLTitleElement)&&document.head.querySelectorAll(`title:not([data-inertia])`).forEach(e=>e.remove()),n.forEach(e=>{let n=this.findMatchingElementIndex(e,t);if(n===-1){e.remove();return}let r=t.splice(n,1)[0];r&&!e.isEqualNode(r)&&e.replaceWith(r)}),t.forEach(e=>{document.head.appendChild(e)})},1)};function ei(e,t,n,r=[]){let i=r.length?{[Xr]:r}:{},a=0;function o(){let e=a+=1;return i[e]=[],e.toString()}function s(e){e!==null&&Object.keys(i).indexOf(e)!==-1&&(delete i[e],f())}function c(e){Object.keys(i).indexOf(e)===-1&&(i[e]=[])}function l(e,t=[]){e!==null&&Object.keys(i).indexOf(e)>-1&&(i[e]=t),f()}
10function u(e=[]){e.length?i[Xr]=e:delete i[Xr],f()}function d(){let e=t(``),n=i[Xr]||[],r=Object.keys(i).filter(e=>e!==Xr).flatMap(e=>i[e]),a={...e?{title:`<title data-inertia="">${e}</title>`}:{}},o=n.concat(r).reduce((e,n)=>{if(n.indexOf(`<`)===-1)return e;if(n.indexOf(`<title `)===0){let r=n.match(/(<title [^>]+>)(.*?)(<\/title>)/s);return e.title=r?`${r[1]}${t(r[2])}${r[3]}`:n,e}let r=n.match(/ data-inertia=(["'])[^"']+\1/);return r?e[r[0]]=n:e[Object.keys(e).length]=n,e},a);return Object.values(o)}function f(){e?n(d()):$r.update(d())}return f(),{forceUpdate:f,updateServerHead:u,createProvider:function(){let e=o();return{reconnect:()=>c(e),update:t=>l(e,t),disconnect:()=>s(e)}}}}var ti=`X-Inertia-Infinite-Scroll-Merge-Intent`,ni=e=>{let t=()=>{let t=B.get().scrollProps?.[e.getPropName()];if(t)return t;throw Error(`The page object does not contain a scroll prop named "${e.getPropName()}".`)},n={component:null,loading:!1,previousPage:null,nextPage:null,lastLoadedPage:null,requestCount:0},r=()=>{let e=t();n.component=B.get().component,n.loading=!1,n.previousPage=e.previousPage,n.nextPage=e.nextPage,n.lastLoadedPage=e.currentPage,n.requestCount=0},i=()=>`inertia:infinite-scroll-data:${e.getPropName()}`;if(typeof window<`u`){r();let e=X.restore(i());e&&typeof e==`object`&&e.lastLoadedPage===t().currentPage&&(n.previousPage=e.previousPage,n.nextPage=e.nextPage,n.lastLoadedPage=e.lastLoadedPage,n.requestCount=e.requestCount||0)}let a=X.on(`success`,i=>{n.component===i.detail.page.component&&t().reset&&(r(),e.onReset?.())}),o=e=>e===`next`?`nextPage`:`previousPage`,s=e=>{let t=o(e);return n[t]},c=e=>{let r=t(),a=o(e);n.lastLoadedPage=r.currentPage,n[a]=r[a],n.requestCount+=1,X.remember({previousPage:n.previousPage,nextPage:n.nextPage,lastLoadedPage:n.lastLoadedPage,requestCount:n.requestCount},i())},l=()=>t().pageName,u=()=>n.requestCount,d=(t,r={})=>{let i=s(t);n.loading||i===null||(n.loading=!0,X.reload({preserveErrors:!0,...r,data:{...r.data||{},[l()]:i},only:[...r.only||[],e.getPropName()],preserveUrl:!0,headers:{[ti]:t===`previous`?`prepend`:`append`,...r.headers},onBefore:n=>{t===`next`?e.onBeforeNextRequest():e.onBeforePreviousRequest(),r.onBefore?.(n)},onBeforeUpdate:t=>{e.onBeforeUpdate(),r.onBeforeUpdate?.(t)},onSuccess:e=>{c(t),r.onSuccess?.(e)},onFinish:i=>{n.loading=!1;let a=i.completed,o=a?n.lastLoadedPage:null;t===`next`?e.onCompleteNextRequest(o,{page:o,completed:a}):e.onCompletePreviousRequest(o,{page:o,completed:a}),r.onFinish?.(i)}}))};return{getLastLoadedPage:()=>n.lastLoadedPage,getPageName:l,getRequestCount:u,hasPrevious:()=>!!n.previousPage,hasNext:()=>!!n.nextPage,fetchNext:e=>d(`next`,e),fetchPrevious:e=>d(`previous`,e),removeEventListener:a}},ri=()=>{let e=[];return{new:(t,n={})=>{let r=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting&&t(n)},n);return e.push(r),r},flushAll:()=>{e.forEach(e=>e.disconnect()),e.length=0}}},ii=`infiniteScrollPage`,ai=`infiniteScrollIgnore`,oi=e=>e.dataset[ii],si=e=>{let t=ri(),n,r,i,a,o=!1,s=()=>{a=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&f.add(e)})}),b()}),a.observe(e.getItemsElement(),{childList:!0}),n=t.new(t=>e.onItemIntersected(t.target));let o={root:e.getScrollableParent(),rootMargin:`${Math.max(1,e.getTriggerMargin())}px`};r=t.new(e.onPreviousTriggered,o),i=t.new(e.onNextTriggered,o)},c=()=>{o&&l();let t=e.getStartElement(),n=e.getEndElement();t&&e.shouldFetchPrevious()&&r.observe(t),n&&e.shouldFetchNext()&&i.observe(n),o=!0},l=()=>{o&&=(r.disconnect(),i.disconnect(),!1)},u=()=>{o&&c()},d=()=>{l(),t.flushAll(),a?.disconnect()},f=new Set,p=e=>!(ii in e.dataset)&&!(ai in e.dataset),m=()=>{Array.from(f).forEach(e=>{p(e)&&(e.dataset[ai]=`true`),n.observe(e)}),f.clear()},h=e=>Array.from(e.querySelectorAll(`:scope > *:not([data-infinite-scroll-page]):not([data-infinite-scroll-ignore])`)),g=!1,_=t=>{!g&&(g=!0,x())||(h(e.getItemsElement()).forEach(e=>{p(e)&&(e.dataset[ii]=t?.toString()||`1`),n.observe(e)}),y())},v=()=>`inertia:infinite-scroll-elements:${e.getPropName()}`,y=()=>{let t={},n=e.getItemsElement().childNodes;for(let e=0;e<n.length;e++){let r=n[e];if(r.nodeType!==Node.ELEMENT_NODE)continue;let i=oi(r);i!==void 0&&(i in t?t[i].to=e:t[i]={from:e,to:e})}X.remember(t,v())},b=$t(y,250),x=()=>{let t=X.restore(v());if(!t||typeof t!=`object`)return!1;let r=e.getItemsElement().childNodes;for(let e=0;e<r.length;e++){let i=r[e];if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=i,o;for(let[n,r]of Object.entries(t))if(e>=r.from&&e<=r.to){o=n;break}if(o)a.dataset[ii]=o;else if(p(a))a.dataset[ai]=`true`;else continue;n.observe(a)}return!0};return{setupObservers:s,enableTriggers:c,disableTriggers:l,refreshTriggers:u,flushAll:d,processManuallyAddedElements:m,processServerLoadedElements:_}},ci=new sr,li,ui,di=null,fi=e=>{let t=!0,n=n=>{ci.add(()=>new Promise(r=>{if(!t)return li=ui=null,r();if(!li||!ui){let e=B.get().url;li=R(e),ui=R(e),di=ar(e)}let i=e.getPageName(),a=ui.searchParams;n===`1`?a.delete(i):a.set(i,n),setTimeout(()=>r())})).finally(()=>{t&&li&&ui&&li.href!==ui.href&&di!==null&&X.replace({url:or(ui,di),preserveScroll:!0,preserveState:!0}),li=ui=di=null})};return{onItemIntersected:$t(r=>{let i=e.getItemsElement();if(!t||e.shouldPreserveUrl()||!r||!i)return;let a=new Map;
10Nn([...i.children],r).forEach(e=>{let t=oi(e)??`1`;a.has(t)?a.set(t,a.get(t)+1):a.set(t,1)});let o=Array.from(a.entries()).sort((e,t)=>t[1]-e[1])[0]?.[0];o!==void 0&&n(o)},250),cancel:()=>t=!1}},pi=e=>({createCallbacks:()=>{let t,n=null,r=0;return{captureScrollPosition:()=>{let i=e.getScrollableParent(),a=e.getItemsElement();t=i?.scrollTop||window.scrollY;let o=Nn([...a.children]);if(o.length>0){n=o[0];let e=i?.getBoundingClientRect()||{top:0},t=i?e.top:0;r=n.getBoundingClientRect().top-t}},restoreScrollPosition:()=>{if(!n)return;let i=0,a=!1,o=()=>{if(i++,a||i>10)return!1;let s=e.getScrollableParent(),c=s?.getBoundingClientRect()||{top:0},l=s?c.top:0,u=n.getBoundingClientRect().top-l-r;if(u===0){window.requestAnimationFrame(o);return}s?s.scrollTo({top:t+u}):window.scrollTo(0,window.scrollY+u),a=!0};window.requestAnimationFrame(o)}}}});function mi(e){let t=fi({...e,getPageName:()=>i.getPageName()}),n=pi(e),r=si({...e,onItemIntersected:t.onItemIntersected,onPreviousTriggered:()=>i.fetchPrevious(),onNextTriggered:()=>i.fetchNext()}),i=ni({...e,onBeforeUpdate:r.processManuallyAddedElements,onCompletePreviousRequest:(t,n)=>{e.onCompletePreviousRequest(n),n.completed&&Pn(()=>r.processServerLoadedElements(n.page),2)},onCompleteNextRequest:(t,n)=>{e.onCompleteNextRequest(n),n.completed&&Pn(()=>r.processServerLoadedElements(n.page),2)},onReset:e.onDataReset}),a=e=>{let{captureScrollPosition:t,restoreScrollPosition:r}=n.createCallbacks(),i=e.onBeforeUpdate||(()=>{}),a=e.onSuccess||(()=>{});return e.onBeforeUpdate=e=>{i(e),t()},e.onSuccess=e=>{a(e),r()},e},o=i.fetchNext;i.fetchNext=(t={})=>{t={...e.getReloadOptions?.(),...t},e.inReverseMode()&&(t=a(t)),o(t)};let s=i.fetchPrevious;i.fetchPrevious=(t={})=>{t={...e.getReloadOptions?.(),...t},e.inReverseMode()||(t=a(t)),s(t)};let c=X.on(`success`,()=>Pn(r.refreshTriggers,2));return{dataManager:i,elementManager:r,flush:()=>{c(),i.removeEventListener(),r.flushAll(),t.cancel()}}}function hi(){let e={},t={},n={shared:e,named:t},r=new Set,i=!1,a=()=>{n={shared:e,named:t}},o=()=>{i||(i=!0,queueMicrotask(()=>{i=!1,r.forEach(e=>e())}))};return{set(t){let n={...e,...t};A(e,n)||(e=n,a(),o())},setFor(e,n){let r=t[e]||{},i={...r,...n};A(r,i)||(t={...t,[e]:i},a(),o())},reset(){e={},t={},a(),o()},subscribe(e){return r.add(e),()=>r.delete(e)},get:()=>n}}function gi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function _i(e){return gi(e)&&`component`in e}function vi(e,t){return`component`in e&&t(e.component)}function yi(e,t){return!gi(e)||t(e)||vi(e,t)?!1:Object.values(e).every(e=>t(e)||Array.isArray(e)&&t(e[0])||_i(e)&&t(e.component))}function bi(e,t){return gi(e)&&!t(e)&&!vi(e,t)&&!yi(e,t)}function xi(e,t){if(bi(e,t))return!0;if(!gi(e)||t(e)||vi(e,t))return!1;let n=Object.values(e);return n.length>0&&n.every(e=>typeof e==`function`)}function Si(e,t){return Array.isArray(e)&&e.length===2&&t(e[0])&&gi(e[1])&&!t(e[1])}function Ci(e,t){if(Array.isArray(e)&&t(e[0]))return{component:e[0],props:e[1]??{}};if(_i(e)&&t(e.component))return{component:e.component,props:e.props??{}};if(t(e))return{component:e,props:{}};throw Error(`Invalid layout definition: received ${typeof e}`)}function wi(e,t,n){return!e||n&&n(e)?[]:yi(e,t)?Object.entries(e).map(([e,n])=>({...Ci(n,t),name:e})):Si(e,t)?[{component:e[0],props:e[1]??{}}]:Array.isArray(e)?e.map(e=>Ci(e,t)):_i(e)&&t(e.component)?[{component:e.component,props:e.props??{}}]:t(e)?[{component:e,props:{}}]:[]}function Ti(e){return e.target instanceof HTMLElement&&e.target.isContentEditable||e.defaultPrevented}function Ei(e){let t=e.currentTarget.tagName.toLowerCase()===`a`,n=t?e.currentTarget.target:``;return!(Ti(e)||t&&e.altKey||t&&e.ctrlKey||t&&e.metaKey||t&&e.shiftKey||t&&n!==``&&n!==`_self`||t&&`button`in e&&e.button!==0)}function Di(e){let t=e.currentTarget.tagName.toLowerCase()===`button`;return!Ti(e)&&(e.key===`Enter`||t&&e.key===` `)}var G=`nprogress`,Oi,K,q={minimum:.08,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:`.bar, [role="bar"]`,spinnerSelector:`.spinner, [role="spinner"]`,parent:`body`,color:`#29d`,includeCSS:!0,popover:null,template:[`<div class="bar">`,`<div class="peg"></div>`,`</div>`,`<div class="spinner">`,`<div class="spinner-icon"></div>`,`</div>`].join(``)},ki=null,Ai=!1,ji=e=>{Object.assign(q,e),Oi=q.popover??`popover`in HTMLElement.prototype,q.includeCSS&&Wi(q.color),K=document.createElement(`div`),K.id=G,K.setAttribute(`aria-hidden`,`true`),K.innerHTML=q.template,Oi&&(K.popover=`manual`)},Mi=e=>{let t=Ni();e=Vi(e,q.minimum,1),ki=e===1?null:e;let n=Li(!t),r=n.querySelector(q.barSelector),i=q.speed,a=q.easing;n.offsetWidth,Ui(t=>{let o={transition:`all ${i}ms ${a}`,transform:`translate3d(${Hi(e)}%,0,0)`};for(let e in o)r.style[e]=o[e];if(e!==1)return setTimeout(t,i);n.style.transition=`none`,n.style.opacity=`1`,n.offsetWidth,setTimeout(()=>{n.style.transition=`all ${i}ms linear`,n.style.opacity=`0`,setTimeout(()=>{zi(),n.style.transition=``,n.style.opacity=``,t()},i)},i)})},Ni=()=>typeof ki==`number`,Pi=()=>{ki||Mi(0);let e=function(){setTimeout(function(){ki&&(Ii(),e())},q.trickleSpeed)};q.trickle&&e()}
10,Fi=e=>{!e&&!ki||(Ii(.3+.5*Math.random()),Mi(1))},Ii=e=>{let t=ki;if(t===null)return Pi();if(!(t>1))return e=typeof e==`number`?e:(()=>{let e={.1:[0,.2],.04:[.2,.5],.02:[.5,.8],.005:[.8,.99]};for(let n in e)if(t>=e[n][0]&&t<e[n][1])return parseFloat(n);return 0})(),Mi(Vi(t+e,0,.994))},Li=e=>{if(Bi())return document.getElementById(G);document.documentElement.classList.add(`${G}-busy`);let t=K.querySelector(q.barSelector),n=e?`-100`:Hi(ki||0);if(t.style.transition=`all 0 linear`,t.style.transform=`translate3d(${n}%,0,0)`,q.showSpinner||K.querySelector(q.spinnerSelector)?.remove(),Oi)document.body.appendChild(K),Ai||K.showPopover();else{let e=Ri();e!==document.body&&e.classList.add(`${G}-custom-parent`),e.appendChild(K),Ai&&(K.style.display=`none`)}return K},Ri=()=>document.querySelector(q.parent),zi=()=>{if(document.documentElement.classList.remove(`${G}-busy`),Oi&&K?.isConnected)try{K.hidePopover()}catch{}Oi||Ri().classList.remove(`${G}-custom-parent`),K?.remove()},Bi=()=>document.getElementById(G)!==null;function Vi(e,t,n){return e<t?t:e>n?n:e}var Hi=e=>(-1+e)*100,Ui=(()=>{let e=[],t=()=>{let n=e.shift();n&&n(t)};return n=>{e.push(n),e.length===1&&t()}})(),Wi=e=>{let t=document.createElement(`style`),n=Qt.get(`nonce`);n&&(t.nonce=n),t.textContent=`
11    #${G} {
12      pointer-events: none;
13      background: none;
14      border: none;
15      margin: 0;
16      padding: 0;
17      overflow: visible;
18      inset: unset;
19      width: 100%;
20      height: 0;
21      position: fixed;
22      top: 0;
23      left: 0;
24    }
25
26    #${G}::backdrop {
27      display: none;
28    }
29
30    #${G} .bar {
31      background: ${e};
32
33      position: fixed;
34      z-index: 1031;
35      top: 0;
36      left: 0;
37
38      width: 100%;
39      height: 2px;
40    }
41
42    #${G} .peg {
43      display: block;
44      position: absolute;
45      right: 0px;
46      width: 100px;
47      height: 100%;
48      box-shadow: 0 0 10px ${e}, 0 0 5px ${e};
49      opacity: 1.0;
50
51      transform: rotate(3deg) translate(0px, -4px);
52    }
53
54    #${G} .spinner {
55      display: block;
56      position: fixed;
57      z-index: 1031;
58      top: 15px;
59      right: 15px;
60    }
61
62    #${G} .spinner-icon {
63      width: 18px;
64      height: 18px;
65      box-sizing: border-box;
66
67      border: solid 2px transparent;
68      border-top-color: ${e};
69      border-left-color: ${e};
70      border-radius: 50%;
71
72      animation: ${G}-spinner 400ms linear infinite;
73    }
74
75    .${G}-custom-parent {
76      overflow: hidden;
77      position: relative;
78    }
79
80    .${G}-custom-parent #${G} .spinner,
81    .${G}-custom-parent #${G} .bar {
82      position: absolute;
83    }
84
85    @keyframes ${G}-spinner {
86      0%   { transform: rotate(0deg); }
87      100% { transform: rotate(360deg); }
88    }
89  `,document.head.appendChild(t)},J={configure:ji,isStarted:Ni,done:Fi,set:Mi,remove:zi,start:Pi,status:ki,show:()=>{if(Ai=!1,K?.isConnected){if(Oi)try{K.showPopover()}catch{}else K.style.display=``}},hide:()=>{if(Ai=!0,K?.isConnected){if(Oi)try{K.hidePopover()}catch{}else K.style.display=`none`}}},Y=new class{hideCount=0;start(){J.start()}reveal(e=!1){this.hideCount=Math.max(0,this.hideCount-1),(e||this.hideCount===0)&&J.show()}hide(){this.hideCount++,J.hide()}set(e){J.set(Math.max(0,Math.min(1,e)))}finish(){J.done()}reset(){J.set(0)}remove(){J.done(),J.remove()}isStarted(){return J.isStarted()}getStatus(){return J.status}};function Gi(e){document.addEventListener(`inertia:start`,t=>Ki(t,e)),document.addEventListener(`inertia:progress`,qi)}function Ki(e,t){e.detail.visit.showProgress||Y.hide();let n=setTimeout(()=>Y.start(),t);document.addEventListener(`inertia:finish`,e=>Ji(e,n),{once:!0})}function qi(e){Y.isStarted()&&e.detail.progress?.percentage&&Y.set(Math.max(Y.getStatus(),e.detail.progress.percentage/100*.9))}function Ji(e,t){clearTimeout(t),Y.isStarted()&&(e.detail.visit.completed?Y.finish():e.detail.visit.interrupted?Y.reset():e.detail.visit.cancelled&&Y.remove())}function Yi({delay:e=250,color:t=`#29d`,includeCSS:n=!0,showSpinner:r=!1,popover:i=null}={}){Gi(e),J.configure({showSpinner:r,includeCSS:n,color:t,popover:i})}var Xi=Symbol(`FormComponentReset`);function Zi(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function Qi(e,t){let n=e.value,r=e.checked;switch(e.type.toLowerCase()){case`checkbox`:e.checked=t.includes(e.value);break;case`radio`:e.checked=t[0]===e.value;break;case`file`:e.value=``;break;case`button`:case`submit`:case`reset`:case`image`:break;default:e.value=t[0]!==null&&t[0]!==void 0?String(t[0]):``}return e.value!==n||e.checked!==r}function $i(e,t){let n=e.value,r=Array.from(e.selectedOptions).map(e=>e.value);if(e.multiple){let n=t.map(e=>String(e));
89Array.from(e.options).forEach(e=>{e.selected=n.includes(e.value)})}else e.value=t[0]===void 0?``:String(t[0]);let i=Array.from(e.selectedOptions).map(e=>e.value);return e.multiple?JSON.stringify(r.sort())!==JSON.stringify(i.sort()):e.value!==n}function ea(e,t){if(e.disabled){if(e instanceof HTMLInputElement){let t=e.value,n=e.checked;switch(e.type.toLowerCase()){case`checkbox`:case`radio`:return e.checked=e.defaultChecked,e.checked!==n;case`file`:return e.value=``,t!==``;case`button`:case`submit`:case`reset`:case`image`:return!1;default:return e.value=e.defaultValue,e.value!==t}}else if(e instanceof HTMLSelectElement){let t=Array.from(e.selectedOptions).map(e=>e.value);Array.from(e.options).forEach(e=>{e.selected=e.defaultSelected});let n=Array.from(e.selectedOptions).map(e=>e.value);return JSON.stringify(t.sort())!==JSON.stringify(n.sort())}else if(e instanceof HTMLTextAreaElement){let t=e.value;return e.value=e.defaultValue,e.value!==t}return!1}if(e instanceof HTMLInputElement)return Qi(e,t);if(e instanceof HTMLSelectElement)return $i(e,t);if(e instanceof HTMLTextAreaElement){let n=e.value;return e.value=t[0]===void 0?``:String(t[0]),e.value!==n}return!1}function ta(e,t){let n=!1;return e instanceof RadioNodeList||e instanceof HTMLCollection?Array.from(e).forEach((e,r)=>{e instanceof Element&&Zi(e)&&(e instanceof HTMLInputElement&&[`checkbox`,`radio`].includes(e.type.toLowerCase())?ea(e,t)&&(n=!0):ea(e,t[r]===void 0?[t[0]??null].filter(Boolean):[t[r]])&&(n=!0))}):Zi(e)&&(n=ea(e,t)),n}function na(e,t,n){if(!e)return;let r=!n||n.length===0;if(r){let r=new FormData(e),i=Array.from(e.elements).map(e=>Zi(e)?e.name:``).filter(Boolean);n=[...new Set([...t.keys(),...r.keys(),...i])]}let i=!1;n.forEach(n=>{let r=e.elements.namedItem(n);r&&ta(r,t.getAll(n))&&(i=!0)}),i&&r&&e.dispatchEvent(new CustomEvent(`reset`,{bubbles:!0,cancelable:!0,detail:{[Xi]:!0}}))}function ra(e,t,n){return`<script data-page="${e}" type="application/json">${JSON.stringify(t).replace(/\//g,`\\/`)}<\/script><div data-server-rendered="true" id="${e}">${n}</div>`}var X=new Hr;p();var ia=hi(),aa=c(ia.get());ia.subscribe(()=>{aa.value=ia.get()});function oa(){ia.reset(),aa.value=ia.get()}var sa={created(){if(!this.$options.remember)return;Array.isArray(this.$options.remember)&&(this.$options.remember={data:this.$options.remember}),typeof this.$options.remember==`string`&&(this.$options.remember={data:[this.$options.remember]}),typeof this.$options.remember.data==`string`&&(this.$options.remember={data:[this.$options.remember.data]});let e=this.$options.remember.key instanceof Function?this.$options.remember.key.call(this):this.$options.remember.key,t=X.restore(e),n=this.$options.remember.data.filter(e=>this[e]===null||typeof this[e]!=`object`||this[e].__rememberable!==!1),r=e=>this[e]!==null&&typeof this[e]==`object`&&typeof this[e].__remember==`function`&&typeof this[e].__restore==`function`;n.forEach(i=>{this[i]!==void 0&&t!==void 0&&t[i]!==void 0&&(r(i)?this[i].__restore(t[i]):this[i]=t[i]),this.$watch(i,()=>{X.remember(n.reduce((e,t)=>({...e,[t]:k(r(t)?this[t].__remember():this[t])}),{}),e)},{immediate:!0,deep:!0})})}};function ca(t){let{data:n,rememberKey:r}=t,{precognitionEndpoint:i}=t,a=typeof n==`function`,o=()=>a?n():n,s=r?X.restore(r):null,c=k(s?.data??k(o())),l=e=>e,u=null,d=null,f=()=>d??Ba.get(`form.withAllErrors`),p,h=!1,g=[],_=m({...k(c),isDirty:!1,errors:{},hasErrors:!1,processing:!1,progress:null,wasSuccessful:!1,recentlySuccessful:!1,withPrecognition(...e){i=Ur.createWayfinderCallback(...e);let t=this,n=qt(e=>{let{method:t,url:n}=i(),r=k(l(this.data()));return e[t](n,r)},k(c));u=n,n.on(`validatingChanged`,()=>{t.validating=n.validating()}).on(`validatedChanged`,()=>{t.__valid=n.valid()}).on(`touchedChanged`,()=>{t.__touched=n.touched()}).on(`errorsChanged`,()=>{let e=f()?n.errors():Jt(n.errors());this.errors={},this.setError(e),t.__valid=n.valid()});let r=(e,t)=>(t(e),e);return Object.assign(t,{__touched:[],__valid:[],validating:!1,validator:()=>n,withAllErrors:()=>r(t,()=>d=!0),valid:e=>t.__valid.includes(e),invalid:e=>e in this.errors,setValidationTimeout:e=>r(t,()=>n.setTimeout(e)),validateFiles:()=>r(t,()=>n.validateFiles()),withoutFileValidation:()=>r(t,()=>n.withoutFileValidation()),touch:(e,...r)=>(Array.isArray(e)?n.touch(e):typeof e==`string`?n.touch([e,...r]):n.touch(e),t),touched:e=>typeof e==`string`?t.__touched.includes(e):t.__touched.length>0,validate:(e,r)=>{if(typeof e==`object`&&!(`target`in e)&&(r=e,e=void 0),e===void 0)n.validate(r);else{let t=Xt(e),i=l(this.data());n.validate(t,j(i,t),r)}return t},setErrors:e=>r(t,()=>this.setError(e)),forgetError:e=>r(t,()=>this.clearErrors(Xt(e)))}),t},data(){return Object.keys(c).reduce((e,t)=>
89M(e,t,j(this,t)),{})},transform(e){return l=e,this},defaults(e,t){if(a)throw Error("You cannot call `defaults()` when using a function to define your form data.");return h=!0,e===void 0?(c=k(this.data()),this.isDirty=!1):c=typeof e==`string`?M(k(c),e,t):Object.assign({},k(c),e),u?.defaults(c),this},reset(...e){let t=k(a?k(o()):c);return e.length===0?(a&&(c=t),Object.assign(this,t)):e.filter(e=>Ze(t,e)).forEach(e=>{a&&M(c,e,j(t,e)),M(this,e,j(t,e))}),u?.reset(...e),this},setError(e,t){let n=typeof e==`string`?{[e]:t}:e;return Object.assign(this.errors,n),this.hasErrors=Object.keys(this.errors).length>0,u?.setErrors(n),this},clearErrors(...e){return this.errors=Object.keys(this.errors).reduce((t,n)=>({...t,...e.length>0&&!e.includes(n)?{[n]:this.errors[n]}:{}}),{}),this.hasErrors=Object.keys(this.errors).length>0,u&&(e.length===0?u.setErrors({}):e.forEach(u.forgetError)),this},resetAndClearErrors(...e){return this.reset(...e),this.clearErrors(...e),this},__rememberable:r===null,__remember(){let e=this.data();if(g.length>0){let t={...e};return g.forEach(e=>delete t[e]),{data:t,errors:this.errors}}return{data:e,errors:this.errors}},__restore(e){Object.assign(this,e.data),this.setError(e.errors)}});return s?.errors&&_.setError(s.errors),e(_,()=>{_.isDirty=!A(_.data(),c)},{immediate:!0,deep:!0}),e(_,e=>{if(!r)return;let t=X.restore(r),n=k(e.__remember());A(t,n)||X.remember(n,r)},{immediate:!0,deep:!0}),i&&_.withPrecognition(i),{form:_,setDefaults:e=>{c=e},getTransform:()=>l,getPrecognitionEndpoint:()=>i??null,markAsSuccessful:()=>{_.clearErrors(),_.wasSuccessful=!0,_.recentlySuccessful=!0,p=setTimeout(()=>_.recentlySuccessful=!1,Ba.get(`form.recentlySuccessfulDuration`))},wasDefaultsCalledInOnSuccess:()=>h,resetDefaultsCalledInOnSuccess:()=>{h=!1},setRememberExcludeKeys:e=>{g=e},resetBeforeSubmit:()=>{_.wasSuccessful=!1,_.recentlySuccessful=!1,clearTimeout(p)},finishProcessing:()=>{_.processing=!1,_.progress=null},withAllErrors:{enabled:f,enable:()=>{d=!0}}}}var la=null,ua=!1;function da(e){if(ua)return;la===null&&(ua=!0,la=new Set(Object.keys(fa({}))),ua=!1);let t=Object.keys(e).filter(e=>la.has(e));t.length>0&&console.error(`[Inertia] useForm() data contains field(s) that conflict with form properties: ${t.map(e=>`"${e}"`).join(`, `)}. These fields will be overwritten by form methods/properties. Please rename these fields.`)}function fa(...e){let{rememberKey:t,data:n,precognitionEndpoint:r}=Ur.parseUseFormArguments(...e);da(k(typeof n==`function`?n():n));let i=null,a=null,{form:o,setDefaults:s,getTransform:c,getPrecognitionEndpoint:l,markAsSuccessful:u,wasDefaultsCalledInOnSuccess:d,resetDefaultsCalledInOnSuccess:f,setRememberExcludeKeys:p,resetBeforeSubmit:m,finishProcessing:h}=ca({data:n,rememberKey:t,precognitionEndpoint:r}),g=o,_=e=>(t,n={})=>{g.submit(e,t,n)};return Object.assign(g,{submit(...e){let{method:t,url:n,options:r}=Ur.parseSubmitArguments(e,l());f();let o={...r,onCancelToken:e=>(i=e,r.onCancelToken?.(e)),onBefore:e=>(m(),r.onBefore?.(e)),onStart:e=>(g.processing=!0,r.onStart?.(e)),onProgress:e=>(g.progress=e??null,r.onProgress?.(e)),onSuccess:async e=>{u();let t=r.onSuccess?await r.onSuccess(e):null;return d()||(s(k(g.data())),g.isDirty=!1),t},onError:e=>(g.clearErrors().setError(e),r.onError?.(e)),onCancel:()=>r.onCancel?.(),onFinish:e=>(h(),i=null,r.onFinish?.(e))};o.optimistic=o.optimistic??a??void 0,a=null;let p=c()(g.data());t===`delete`?X.delete(n,{...o,data:p}):X[t](n,p,o)},get:_(`get`),post:_(`post`),put:_(`put`),patch:_(`patch`),delete:_(`delete`),cancel(){i&&i.cancel()},dontRemember(...e){return p(e),g},optimistic(e){return a=e,g}}),l(),g}function pa(e){if(!e)return!1;if(typeof e==`function`)return!0;if(typeof e==`object`){let t=e;return typeof t.render==`function`||typeof t.setup==`function`||typeof t.template==`string`||`__file`in t||`__name`in t}return!1}function ma(e){if(typeof e!=`function`)return!1;let t=e;return t.length===2&&t.prototype===void 0}var Z=c(void 0),Q=c(),ha=null,ga=d(null),_a=c(void 0),va,ya=u({name:`Inertia`,props:{initialPage:{type:Object,required:!0},initialComponent:{type:Object,required:!1},resolveComponent:{type:Function,required:!1},titleCallback:{type:Function,required:!1,default:e=>e},onHeadUpdate:{type:Function,required:!1,default:()=>()=>{}},defaultLayout:{type:Function,required:!1},serverHead:{type:[Boolean,String,Function],required:!1}}
89,setup({initialPage:e,initialComponent:t,resolveComponent:n,titleCallback:i,onHeadUpdate:a,defaultLayout:o,serverHead:c}){Z.value=t?s(t):void 0,Q.value={...e,flash:e.flash??{}},_a.value=void 0;let l=typeof window>`u`;if(va=ei(l,e=>i?i(e,Q.value):e,a||(()=>{}),Qr(e,c)),!l){X.init({initialPage:e,resolveComponent:n,swapComponent:async e=>{e.preserveState||oa(),Z.value=s(e.component),Q.value=e.page,_a.value=e.preserveState?_a.value:Date.now()},onFlash:e=>{Q.value={...Q.value,flash:e}}});let t=e=>{va.updateServerHead(Qr(e.detail.page,c))};X.on(`navigate`,t),X.on(`clientVisit`,t)}return()=>{if(Z.value){Z.value.inheritAttrs=!!Z.value.inheritAttrs;let e=r(Z.value,{...Q.value.props,key:_a.value});if(ga.value&&=(Z.value.layout=ga.value,null),Z.value.layout&&ma(Z.value.layout))return Z.value.layout(r,e);let t,n=null,i=Z.value.layout;if(typeof i==`function`&&i.length<=1&&i.prototype===void 0){let e=i(Q.value.props);xi(e,pa)?(t=o?.(Q.value.component,Q.value),n=e):t=e}else bi(i,pa)?(t=o?.(Q.value.component,Q.value),n=i):t=i??o?.(Q.value.component,Q.value);if(t){let i=wi(t,pa,Z.value.layout&&!n?ma:void 0);if(n&&(i=i.map(e=>({...e,props:{...e.props,...n}}))),i.length>0){let t=l?{shared:{},named:{}}:aa.value;return i.reduceRight((e,n)=>{let i=n.component;return i.inheritAttrs=!!i.inheritAttrs,r(i,{...Q.value.props,...n.props,...t.shared,...n.name&&t.named[n.name]||{}},()=>e)},e)}}return e}}}}),ba={install(e){X.form=fa,Object.defineProperty(e.config.globalProperties,"$inertia",{get:()=>X}),Object.defineProperty(e.config.globalProperties,"$page",{get:()=>Q.value}),Object.defineProperty(e.config.globalProperties,"$headManager",{get:()=>va}),e.mixin(sa)}};function xa(){return ha||=m({props:h(()=>Q.value?.props),url:h(()=>Q.value?.url),component:h(()=>Q.value?.component),version:h(()=>Q.value?.version),clearHistory:h(()=>Q.value?.clearHistory),deferredProps:h(()=>Q.value?.deferredProps),rescuedProps:h(()=>Q.value?.rescuedProps),mergeProps:h(()=>Q.value?.mergeProps),prependProps:h(()=>Q.value?.prependProps),deepMergeProps:h(()=>Q.value?.deepMergeProps),matchPropsOn:h(()=>Q.value?.matchPropsOn),rememberedState:h(()=>Q.value?.rememberedState),encryptHistory:h(()=>Q.value?.encryptHistory),scrollProps:h(()=>Q.value?.scrollProps),flash:h(()=>Q.value?.flash)}),ha}async function Sa({id:e=`app`,resolve:t,setup:n,title:i,progress:a={},page:s,render:c,defaults:l={},nonce:u,http:d,layout:p,serverHead:m,withApp:h,dev:g=!1}={}){Ba.replace(l),u&&Ba.set(`nonce`,u),d&&Ar.setClient(d),g&&Mr();let _=typeof window>`u`,v=(e,n)=>Promise.resolve(t(e,n)).then(e=>e.default||e);if(_&&!s&&!c)return async(t,a)=>{let o=[],s={initialPage:t,initialComponent:await v(t.component,t),resolveComponent:v,titleCallback:i,onHeadUpdate:e=>o=e,defaultLayout:p,serverHead:m},c;n?c=n({el:null,App:ya,props:s,plugin:ba}):(c=f({render:()=>r(ya,s)}),c.use(ba),h&&h(c,{ssr:!0,page:t}));let l=ra(e,t,await a(c));return{head:o,body:l}};let y=s||Fn(e),b=[],x=await Promise.all([v(y.component,y),X.decryptHistory().catch(()=>{})]).then(([t])=>{let a={initialPage:y,initialComponent:t,resolveComponent:v,titleCallback:i,onHeadUpdate:_?e=>b=e:void 0,defaultLayout:p,serverHead:m};if(_)return n({el:null,App:ya,props:a,plugin:ba});let s=document.getElementById(e);if(n)return n({el:s,App:ya,props:a,plugin:ba});if(s.hasAttribute(`data-server-rendered`)){let e=f({render:()=>r(ya,a)});e.use(ba),h&&h(e,{ssr:!1,page:y}),e.mount(s)}else{let e=o({render:()=>r(ya,a)});e.use(ba),h&&h(e,{ssr:!1,page:y}),e.mount(s)}});if(!_&&a&&Yi(a),_&&c&&x){let t=ra(e,y,await c(x));return{head:b,body:t}}}u({name:`Deferred`,props:{data:{type:[String,Array],required:!0}},slots:Object,setup(e,{slots:n}){let i=c(!1),o=new Set,s=xa(),u=h(()=>Array.isArray(e.data)?e.data:[e.data]),d=h(()=>new Set(s.rescuedProps)),f=null,p=null;return t(()=>{f=X.on(`start`,e=>{let t=e.detail.visit;t.preserveState===!0&&rr(t.url,window.location)&&Lr(t,u.value)&&(o.add(t),i.value=!0)}),p=X.on(`finish`,e=>{let t=e.detail.visit;o.has(t)&&(o.delete(t),i.value=o.size>0)})}),a(()=>{f?.(),p?.(),o.clear()}),()=>{if(!n.fallback)throw Error("`<Deferred>` requires a `<template #fallback>` slot");let e=u.value.every(e=>j(s.props,e)!==void 0),t=u.value.some(e=>d.value.has(e)),a={reloading:i.value};return e&&!t?r(l,{key:`default`}
89,n.default?.(a)??[]):t&&n.rescue?r(l,{key:`rescue`},n.rescue(a)):r(l,{key:`fallback`},n.fallback({}))}}});var Ca=()=>void 0,wa=Symbol(`InertiaFormContext`);u({name:`Form`,slots:Object,props:{action:{type:[String,Object],default:``},method:{type:String,default:`get`},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:`brackets`},errorBag:{type:[String,null],default:null},showProgress:{type:Boolean,default:!0},transform:{type:Function,default:e=>e},options:{type:Object,default:()=>({})},resetOnError:{type:[Boolean,Array],default:!1},resetOnSuccess:{type:[Boolean,Array],default:!1},setDefaultsOnSuccess:{type:Boolean,default:!1},onCancelToken:{type:Function,default:Ca},onBefore:{type:Function,default:Ca},onStart:{type:Function,default:Ca},onProgress:{type:Function,default:Ca},onFinish:{type:Function,default:Ca},onCancel:{type:Function,default:Ca},onSuccess:{type:Function,default:Ca},onError:{type:Function,default:Ca},onSubmitComplete:{type:Function,default:Ca},disableWhileProcessing:{type:Boolean,default:!1},invalidateCacheTags:{type:[String,Array],default:()=>[]},validateFiles:{type:Boolean,default:!1},validationTimeout:{type:Number,default:1500},optimistic:{type:Function,default:void 0},withAllErrors:{type:Boolean,default:null},component:{type:String,default:null},instant:{type:Boolean,default:!1}},setup(n,{slots:a,attrs:o,expose:s}){let l=()=>{let[e,t]=S();return n.transform(t)},u=fa({}).withPrecognition(()=>f.value,()=>S()[0]).transform(l).setValidationTimeout(n.validationTimeout);n.validateFiles&&u.validateFiles(),(n.withAllErrors??Qt.get(`form.withAllErrors`))&&u.withAllErrors();let d=c(),f=h(()=>z(n.action)?n.action.method:n.method.toLowerCase()),p=h(()=>n.component?n.component:n.instant&&z(n.action)?ir(n.action):null),m=c(!1),_=c(new FormData),v=e=>{e.type===`reset`&&e.detail?.[Xi]&&e.preventDefault(),m.value=e.type!==`reset`&&!A(x(),Yr(_.value))},y=[`input`,`change`,`reset`];t(()=>{_.value=b(),u.defaults(x()),y.forEach(e=>d.value.addEventListener(e,v))}),e(()=>n.validateFiles,e=>e?u.validateFiles():u.withoutFileValidation()),e(()=>n.validationTimeout,e=>u.setValidationTimeout(e)),g(()=>y.forEach(e=>d.value?.removeEventListener(e,v)));let b=e=>new FormData(d.value,e),x=e=>Yr(b(e)),S=e=>$n(f.value,z(n.action)?n.action.url:n.action,x(e),n.queryStringArrayFormat),C=e=>{let[t,r]=S(e);if(e?.getAttribute(`formtarget`)===`_blank`&&f.value===`get`){window.open(t,`_blank`);return}let i=e=>{e&&(e===!0?w():e.length>0&&w(...e))},a={headers:n.headers,queryStringArrayFormat:n.queryStringArrayFormat,errorBag:n.errorBag,showProgress:n.showProgress,invalidateCacheTags:n.invalidateCacheTags,component:p.value,optimistic:n.optimistic?e=>n.optimistic(e,r):void 0,onCancelToken:n.onCancelToken,onBefore:n.onBefore,onStart:n.onStart,onProgress:n.onProgress,onFinish:n.onFinish,onCancel:n.onCancel,onSuccess:async(...e)=>{let t=await n.onSuccess?.(...e);return n.onSubmitComplete?.(ee),i(n.resetOnSuccess),n.setDefaultsOnSuccess===!0&&D(),t},onError:(...e)=>{n.onError?.(...e),i(n.resetOnError)},...n.options};u.transform(()=>n.transform(r)).submit(f.value,t,a),u.transform(l)},w=(...e)=>{na(d.value,_.value,e),u.reset(...e)},T=(...e)=>{u.clearErrors(...e)},E=(...e)=>{T(...e),w(...e)},D=()=>{_.value=b(),m.value=!1},ee={get errors(){return u.errors},get hasErrors(){return u.hasErrors},get processing(){return u.processing},get progress(){return u.progress},get wasSuccessful(){return u.wasSuccessful},get recentlySuccessful(){return u.recentlySuccessful},get validating(){return u.validating},clearErrors:T,resetAndClearErrors:E,setError:(e,t)=>u.setError(typeof e==`string`?{[e]:t}:e),get isDirty(){return m.value},reset:w,submit:C,defaults:D,getData:x,getFormData:b,touch:u.touch,valid:u.valid,invalid:u.invalid,touched:u.touched,validate:(e,t)=>u.validate(...Ur.mergeHeadersForValidation(e,t,n.headers)),validator:()=>u.validator()};return s(ee),i(wa,ee),()=>r(`form`,{...o,ref:d,action:z(n.action)?n.action.url:n.action,method:f.value,onSubmit:e=>{e.preventDefault(),C(e.submitter)},inert:n.disableWhileProcessing&&u.processing},a.default?a.default(ee):[])}});function Ta(e){return typeof e.type==`string`&&[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`].indexOf(e.type)>-1}function Ea(e){e.props=e.props||{},e.props[`data-inertia`]=e.props[`head-key`]===void 0?``:e.props[`head-key`];let t=Object.keys(e.props).reduce((t,n)=>{let r=String(e.props[n]);return[`key`,`head-key`].includes(n)?t:r===``?t+` ${n}`:t+` ${n}="${ft(r)}"`},``);return`<${String(e.type)}${t}>`}function Da(e){let{children:t}=e;return typeof t==`string`?t:Array.isArray(t)?t.reduce((e,t)=>
89e+Na(t),``):``}function Oa(e){return typeof e.type==`function`}function ka(e){return typeof e.type==`object`}function Aa(e){return/(comment|cmt)/i.test(e.type.toString())}function ja(e){return/(fragment|fgt|symbol\(\))/i.test(e.type.toString())}function Ma(e){return/(text|txt)/i.test(e.type.toString())}function Na(e){if(Ma(e))return String(e.children);if(ja(e)||Aa(e))return``;let t=Ea(e);return e.children&&(t+=Da(e)),Ta(e)||(t+=`</${String(e.type)}>`),t}function Pa(e,t){return t&&!e.find(e=>e.startsWith(`<title`))&&e.push(`<title data-inertia="">${ft(t)}</title>`),e}function Fa(e,t){return Pa(e.flatMap(e=>Ia(e)).map(e=>Na(e)).filter(e=>e),t)}function Ia(e){return Oa(e)?Ia(e.type()):ka(e)?(console.warn(`Using components in the <Head> component is not supported.`),[]):Ma(e)&&e.children?e:ja(e)&&e.children?e.children.flatMap(e=>Ia(e)):Aa(e)?[]:e}var La=u({props:{title:{type:String,required:!1}},setup(e,{slots:t}){let n=va.createProvider();return g(()=>{n.disconnect()}),()=>{n.update(Fa(t.default?t.default():[],e.title))}}}),Ra=(e,t)=>e?typeof e==`string`?document.querySelector(e):typeof e==`function`?e()||null:t:t;u({name:`InfiniteScroll`,slots:Object,props:{data:{type:String,required:!0},buffer:{type:Number,default:0},onlyNext:{type:Boolean,default:!1},onlyPrevious:{type:Boolean,default:!1},as:{type:String,default:`div`},manual:{type:Boolean,default:!1},manualAfter:{type:Number,default:0},preserveUrl:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},autoScroll:{type:Boolean,default:void 0},itemsElement:{type:[String,Function,Object],default:null},startElement:{type:[String,Function,Object],default:null},endElement:{type:[String,Function,Object],default:null},params:{type:Object,default:()=>({})}},inheritAttrs:!1,setup(n,{slots:i,attrs:o,expose:s}){let u=c(null),d=c(null),f=c(null),p=h(()=>Ra(n.itemsElement,u.value)),m=h(()=>Mn(p.value)),g=h(()=>Ra(n.startElement,d.value)),_=h(()=>Ra(n.endElement,f.value)),v=c(!1),y=c(!1),b=c(0),x=c(!1),S=c(!1),C=()=>{b.value=w.getRequestCount(),x.value=w.hasPrevious(),S.value=w.hasNext()},{dataManager:w,elementManager:T,flush:E}=mi({getPropName:()=>n.data,inReverseMode:()=>n.reverse,shouldFetchNext:()=>!n.onlyPrevious,shouldFetchPrevious:()=>!n.onlyNext,shouldPreserveUrl:()=>n.preserveUrl,getReloadOptions:()=>n.params,getTriggerMargin:()=>n.buffer,getStartElement:()=>g.value,getEndElement:()=>_.value,getItemsElement:()=>p.value,getScrollableParent:()=>m.value,onBeforePreviousRequest:()=>v.value=!0,onBeforeNextRequest:()=>y.value=!0,onCompletePreviousRequest:({completed:e})=>{v.value=!1,e&&C()},onCompleteNextRequest:({completed:e})=>{y.value=!1,e&&C()},onDataReset:C});if(C(),typeof window>`u`){let e=xa().scrollProps?.[n.data];e&&(x.value=!!e.previousPage,S.value=!!e.nextPage)}let D=h(()=>!ee.value),ee=h(()=>n.manual||n.manualAfter>0&&b.value>=n.manualAfter),te=()=>{m.value?m.value.scrollTo({top:m.value.scrollHeight,behavior:`instant`}):window.scrollTo({top:document.body.scrollHeight,behavior:`instant`})};return t(()=>{T.setupObservers(),T.processServerLoadedElements(w.getLastLoadedPage()),(n.autoScroll===void 0?n.reverse:n.autoScroll)&&te(),D.value&&T.enableTriggers()}),a(E),e(()=>[D.value,n.onlyNext,n.onlyPrevious],([e])=>{e?T.enableTriggers():T.disableTriggers()}),s({fetchNext:w.fetchNext,fetchPrevious:w.fetchPrevious,hasPrevious:w.hasPrevious,hasNext:w.hasNext}),()=>{let e=[],t={loadingPrevious:v.value,loadingNext:y.value,hasPrevious:x.value,hasNext:S.value};if(!n.startElement){let a=D.value&&!n.onlyNext,o={loading:v.value,fetch:w.fetchPrevious,autoMode:a,manualMode:!a,hasMore:x.value,...t};e.push(r(`div`,{ref:d},i.previous?i.previous(o):v.value?i.loading?.(o):void 0))}if(e.push(r(n.as,{...o,ref:u},i.default?.({loading:v.value||y.value,loadingPrevious:v.value,loadingNext:y.value}))),!n.endElement){let a=D.value&&!n.onlyPrevious,o={loading:y.value,fetch:w.fetchNext,autoMode:a,manualMode:!a,hasMore:S.value,...t};e.push(r(`div`,{ref:f},i.next?i.next(o):y.value?i.loading?.(o):void 0))}return r(l,{},n.reverse?[...e].reverse():e)}}});var $=()=>{},za=u({name:`Link`,props:{as:{type:[String,Object],default:`a`},data:{type:Object,default:()=>({})},href:{type:[String,Object],default:``},method:{type:String,default:`get`},replace:{type:Boolean,default:!1},preserveScroll:{type:[Boolean,String,Function],default:!1},preserveState:{type:[Boolean,String,Function],default:null},preserveUrl:{type:Boolean,default:!1},only:{type:Array,default:()=>[]},except:{type:Array,default:()=>[]},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:`brackets`},async:{type:Boolean,default:!1},prefetch:{type:[Boolean,String,Array],default:!1},cacheFor:{type:[Number,String,Array],default:0},onStart:{type:Function,default:$},onProgress:{type:Function,default:$},onFinish:{type:Function,default:$},onBefore:{type:Function,default:$},onCancel:{type:Function,default:$},onSuccess:{type:Function,default:$},onError:{type:Function,default:$},onCancelToken:{type:Function,default:$},onPrefetching:{type:Function,default:$},onPrefetched:{type:Function,default:$},cacheTags:{type:[String,Array],default:()=>[]},viewTransition:{type:[Boolean,Object],default:!1},component:{type:String,default:null},instant:{type:Boolean,default:!1},pageProps:{type:[Object,Function],default:null}},setup(e,{slots:n,attrs:i}){let o=c(0),s=c(),l=h(()=>e.prefetch===!0?[`hover`]:e.prefetch===!1?[]:Array.isArray(e.prefetch)?e.prefetch:[e.prefetch]),u=h(()=>e.cacheFor===0?l.value.length===1&&l.value[0]===`click`?0:Ba.get(`prefetch.cacheFor`):e.cacheFor);t(()=>{l.value.includes(`mount`)&&x()}),a(()=>{clearTimeout(s.value)});let d=h(()=>z(e.href)?e.href.method:(e.method??`get`).toLowerCase()),f=h(()=>typeof e.as!=`string`||e.as.toLowerCase()!==`a`?e.as:d.value===`get`?e.as.toLowerCase():`button`),p=h(()=>$n(d.value,z(e.href)?e.href.url:e.href,e.data||{},e.queryStringArrayFormat)),m=h(()=>p.value[0]),g=h(()=>p.value[1]),_=h(()=>e.component?e.component:e.instant&&z(e.href)?ir(e.href):null),v=h(()=>f.value===`button`?{type:`button`}:f.value===`a`||typeof f.value!=`string`?{href:m.value}:{}),y=h(()=>({data:g.value,method:d.value,replace:e.replace,preserveScroll:e.preserveScroll,preserveState:e.preserveState??d.value!==`get`,preserveUrl:e.preserveUrl,only:e.only,except:e.except,headers:e.headers,async:e.async,component:_.value,pageProps:e.pageProps})),b=h(()=>({...y.value,viewTransition:e.viewTransition,onCancelToken:e.onCancelToken,onBefore:e.onBefore,onStart:t=>{o.value++,e.onStart?.(t)},onProgress:e.onProgress,onFinish:t=>{o.value--,e.onFinish?.(t)},onCancel:e.onCancel,onSuccess:e.onSuccess,onError:e.onError})),x=()=>{X.prefetch(m.value,{...y.value,onPrefetching:e.onPrefetching,onPrefetched:e.onPrefetched},{cacheFor:u.value,cacheTags:e.cacheTags})},S={onClick:e=>{Ei(e)&&(e.preventDefault(),X.visit(m.value,b.value))}},C={onMouseenter:()=>{s.value=setTimeout(()=>{x()},Ba.get(`prefetch.hoverDelay`))},onMouseleave:()=>{clearTimeout(s.value)},onClick:S.onClick},w={onMousedown:e=>{Ei(e)&&(e.preventDefault(),x())},onKeydown:e=>{Di(e)&&(e.preventDefault(),x())},onMouseup:e=>{Ei(e)&&(e.preventDefault(),X.visit(m.value,b.value))},onKeyup:e=>{Di(e)&&(e.preventDefault(),X.visit(m.value,b.value))},onClick:e=>{Ei(e)&&e.preventDefault()}};return()=>r(f.value,{...i,...v.value,"data-loading":o.value>0?``:void 0,...l.value.includes(`hover`)?C:l.value.includes(`click`)?w:S},n)}});u({name:`WhenVisible`,slots:Object,props:{data:{type:[String,Array]},params:{type:Object},buffer:{type:Number,default:0},as:{type:String,default:`div`},always:{type:Boolean,default:!1}},setup(t,{slots:i}){let o=c(!1),s=c(!1),l=c(null),u=c(null),d=xa(),f=h(()=>t.data?Array.isArray(t.data)?t.data:[t.data]:[]);function p(){let e={preserveErrors:!0,...t.params};return t.data&&(e.only=Array.isArray(t.data)?t.data:[t.data]),e}function m(){typeof window>`u`||(l.value?.disconnect(),l.value=new IntersectionObserver(e=>{if(!e[0].isIntersecting||s.value||!t.always&&o.value)return;s.value=!0;let n=p();X.reload({...n,onStart:e=>{s.value=!0,n.onStart?.(e)},onFinish:e=>{o.value=!0,s.value=!1,n.onFinish?.(e),t.always||l.value?.disconnect()}})},{rootMargin:`${t.buffer}px`}),u.value&&l.value.observe(u.value))}return e(()=>f.value.map(e=>j(d.props,e)),()=>{let e=f.value.length>0&&f.value.every(e=>j(d.props,e)!==void 0);o.value=e,!(e&&!t.always)&&(!l.value||!e)&&n(m)},{immediate:!0}),a(()=>{l.value?.disconnect()}),()=>{let e=[];return(t.always||!o.value)&&e.push(r(t.as,{ref:u})),o.value?i.default&&e.push(i.default({fetching:s.value})):e.push(i.fallback?i.fallback({}):null),e}}});var Ba=Qt.extend({});export{X as a,xa as i,La as n,za as r,Sa as t};
90//# sourceMappingURL=dist-CGmBzCbC.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.