@inertiaui/modal-react 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inertiaui-modal.js +701 -697
- package/dist/inertiaui-modal.umd.cjs +17 -17
- package/package.json +2 -2
- package/src/HeadlessModal.jsx +13 -13
- package/src/Modal.jsx +7 -7
- package/src/ModalContent.jsx +17 -17
- package/src/ModalRenderer.jsx +1 -1
- package/src/ModalRoot.jsx +16 -19
- package/src/SlideoverContent.jsx +18 -18
- package/src/inertiauiModal.js +2 -1
- package/src/useModal.js +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(L,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("axios"),require("@inertiajs/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","axios","@inertiajs/react","react-dom"],f):(L=typeof globalThis<"u"?globalThis:L||self,f(L.InertiaUIModal={},L.React,L.Axios,L.react,L.ReactDOM))})(this,function(L,f,ve,rr,Jo){"use strict";var nc=Object.defineProperty;var oc=(L,f,ve)=>f in L?nc(L,f,{enumerable:!0,configurable:!0,writable:!0,value:ve}):L[f]=ve;var ce=(L,f,ve)=>oc(L,typeof f!="symbol"?f+"":f,ve);function Qo(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const tr=Qo(f),Sr={type:"modal",navigate:!1,modal:{closeButton:!0,closeExplicitly:!1,maxWidth:"2xl",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white rounded",position:"center"},slideover:{closeButton:!0,closeExplicitly:!1,maxWidth:"md",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white min-h-screen",position:"right"}};class Zo{constructor(){this.config={},this.reset()}reset(){this.config=JSON.parse(JSON.stringify(Sr))}put(e,t){if(typeof e=="object"){this.config={type:e.type??Sr.type,modal:{...Sr.modal,...e.modal??{}},slideover:{...Sr.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let a=0;a<n.length-1;a++)o=o[n[a]]=o[n[a]]||{};o[n[n.length-1]]=t}get(e){if(typeof e>"u")return this.config;const t=e.split(".");let n=this.config;for(const o of t){if(n[o]===void 0)return null;n=n[o]}return n}}const xr=new Zo,ea=()=>xr.reset(),ra=(r,e)=>xr.put(r,e),Or=r=>xr.get(r),Ue=(r,e)=>xr.get(r?`slideover.${e}`:`modal.${e}`);var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function na(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}),t}var Qr={exports:{}},nr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Jt;function oa(){if(Jt)return nr;Jt=1;var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,i,p){var s,b={},v=null,E=null;p!==void 0&&(v=""+p),i.key!==void 0&&(v=""+i.key),i.ref!==void 0&&(E=i.ref);for(s in i)n.call(i,s)&&!a.hasOwnProperty(s)&&(b[s]=i[s]);if(u&&u.defaultProps)for(s in i=u.defaultProps,i)b[s]===void 0&&(b[s]=i[s]);return{$$typeof:e,type:u,key:v,ref:E,props:b,_owner:o.current}}return nr.Fragment=t,nr.jsx=l,nr.jsxs=l,nr}var or={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+Le+c}}var we=!1,
|
|
19
|
-
`),
|
|
20
|
-
`),G=M.length-1,Y=
|
|
21
|
-
`+M[G].replace(" at new "," at ");return c.displayName&&
|
|
17
|
+
*/var Qt;function aa(){return Qt||(Qt=1,process.env.NODE_ENV!=="production"&&function(){var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),d=Symbol.iterator,m="@@iterator";function y(c){if(c===null||typeof c!="object")return null;var S=d&&c[d]||c[m];return typeof S=="function"?S:null}var h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(c){{for(var S=arguments.length,O=new Array(S>1?S-1:0),A=1;A<S;A++)O[A-1]=arguments[A];w("error",c,O)}}function w(c,S,O){{var A=h.ReactDebugCurrentFrame,N=A.getStackAddendum();N!==""&&(S+="%s",O=O.concat([N]));var W=O.map(function(I){return String(I)});W.unshift("Warning: "+S),Function.prototype.apply.call(console[c],console,W)}}var x=!1,P=!1,D=!1,_=!1,U=!1,H;H=Symbol.for("react.module.reference");function j(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===a||U||c===o||c===p||c===s||_||c===E||x||P||D||typeof c=="object"&&c!==null&&(c.$$typeof===v||c.$$typeof===b||c.$$typeof===l||c.$$typeof===u||c.$$typeof===i||c.$$typeof===H||c.getModuleId!==void 0))}function z(c,S,O){var A=c.displayName;if(A)return A;var N=S.displayName||S.name||"";return N!==""?O+"("+N+")":O}function V(c){return c.displayName||"Context"}function C(c){if(c==null)return null;if(typeof c.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case s:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case u:var S=c;return V(S)+".Consumer";case l:var O=c;return V(O._context)+".Provider";case i:return z(c,c.render,"ForwardRef");case b:var A=c.displayName||null;return A!==null?A:C(c.type)||"Memo";case v:{var N=c,W=N._payload,I=N._init;try{return C(I(W))}catch{return null}}}return null}var T=Object.assign,k=0,oe,ue,me,Z,se,q,Ne;function J(){}J.__reactDisabledLog=!0;function Vt(){{if(k===0){oe=console.log,ue=console.info,me=console.warn,Z=console.error,se=console.group,q=console.groupCollapsed,Ne=console.groupEnd;var c={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}k++}}function je(){{if(k--,k===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},c,{value:oe}),info:T({},c,{value:ue}),warn:T({},c,{value:me}),error:T({},c,{value:Z}),group:T({},c,{value:se}),groupCollapsed:T({},c,{value:q}),groupEnd:T({},c,{value:Ne})})}k<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var br=h.ReactCurrentDispatcher,Le;function be(c,S,O){{if(Le===void 0)try{throw Error()}catch(N){var A=N.stack.trim().match(/\n( *(at )?)/);Le=A&&A[1]||""}return`
|
|
18
|
+
`+Le+c}}var we=!1,Yr;{var Is=typeof WeakMap=="function"?WeakMap:Map;Yr=new Is}function jo(c,S){if(!c||we)return"";{var O=Yr.get(c);if(O!==void 0)return O}var A;we=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W;W=br.current,br.current=null,Vt();try{if(S){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(ne){A=ne}Reflect.construct(c,[],I)}else{try{I.call()}catch(ne){A=ne}c.call(I.prototype)}}else{try{throw Error()}catch(ne){A=ne}c()}}catch(ne){if(ne&&A&&typeof ne.stack=="string"){for(var M=ne.stack.split(`
|
|
19
|
+
`),re=A.stack.split(`
|
|
20
|
+
`),G=M.length-1,Y=re.length-1;G>=1&&Y>=0&&M[G]!==re[Y];)Y--;for(;G>=1&&Y>=0;G--,Y--)if(M[G]!==re[Y]){if(G!==1||Y!==1)do if(G--,Y--,Y<0||M[G]!==re[Y]){var ie=`
|
|
21
|
+
`+M[G].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&Yr.set(c,ie),ie}while(G>=1&&Y>=0);break}}}finally{we=!1,br.current=W,je(),Error.prepareStackTrace=N}var er=c?c.displayName||c.name:"",We=er?be(er):"";return typeof c=="function"&&Yr.set(c,We),We}function _s(c,S,O){return jo(c,!1)}function Ds(c){var S=c.prototype;return!!(S&&S.isReactComponent)}function Kr(c,S,O){if(c==null)return"";if(typeof c=="function")return jo(c,Ds(c));if(typeof c=="string")return be(c);switch(c){case p:return be("Suspense");case s:return be("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return _s(c.render);case b:return Kr(c.type,S,O);case v:{var A=c,N=A._payload,W=A._init;try{return Kr(W(N),S,O)}catch{}}}return""}var wr=Object.prototype.hasOwnProperty,Lo={},Wo=h.ReactDebugCurrentFrame;function Xr(c){if(c){var S=c._owner,O=Kr(c.type,c._source,S?S.type:null);Wo.setExtraStackFrame(O)}else Wo.setExtraStackFrame(null)}function ks(c,S,O,A,N){{var W=Function.call.bind(wr);for(var I in c)if(W(c,I)){var M=void 0;try{if(typeof c[I]!="function"){var re=Error((A||"React class")+": "+O+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}M=c[I](S,I,A,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){M=G}M&&!(M instanceof Error)&&(Xr(N),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",A||"React class",O,I,typeof M),Xr(null)),M instanceof Error&&!(M.message in Lo)&&(Lo[M.message]=!0,Xr(N),g("Failed %s type: %s",O,M.message),Xr(null))}}}var Ns=Array.isArray;function qt(c){return Ns(c)}function js(c){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&c[Symbol.toStringTag]||c.constructor.name||"Object";return O}}function Ls(c){try{return Uo(c),!1}catch{return!0}}function Uo(c){return""+c}function Bo(c){if(Ls(c))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",js(c)),Uo(c)}var Er=h.ReactCurrentOwner,Ws={key:!0,ref:!0,__self:!0,__source:!0},Ro,Ho,Gt;Gt={};function Us(c){if(wr.call(c,"ref")){var S=Object.getOwnPropertyDescriptor(c,"ref").get;if(S&&S.isReactWarning)return!1}return c.ref!==void 0}function Bs(c){if(wr.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function Rs(c,S){if(typeof c.ref=="string"&&Er.current&&S&&Er.current.stateNode!==S){var O=C(Er.current.type);Gt[O]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(Er.current.type),c.ref),Gt[O]=!0)}}function Hs(c,S){{var O=function(){Ro||(Ro=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"key",{get:O,configurable:!0})}}function Vs(c,S){{var O=function(){Ho||(Ho=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"ref",{get:O,configurable:!0})}}var qs=function(c,S,O,A,N,W,I){var M={$$typeof:e,type:c,key:S,ref:O,props:I,_owner:W};return M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M,"_self",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.defineProperty(M,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M};function Gs(c,S,O,A,N){{var W,I={},M=null,re=null;O!==void 0&&(Bo(O),M=""+O),Bs(S)&&(Bo(S.key),M=""+S.key),Us(S)&&(re=S.ref,Rs(S,N));for(W in S)wr.call(S,W)&&!Ws.hasOwnProperty(W)&&(I[W]=S[W]);if(c&&c.defaultProps){var G=c.defaultProps;for(W in G)I[W]===void 0&&(I[W]=G[W])}if(M||re){var Y=typeof c=="function"?c.displayName||c.name||"Unknown":c;M&&Hs(I,Y),re&&Vs(I,Y)}return qs(c,M,re,N,A,Er.current,I)}}var zt=h.ReactCurrentOwner,Vo=h.ReactDebugCurrentFrame;function Ze(c){if(c){var S=c._owner,O=Kr(c.type,c._source,S?S.type:null);Vo.setExtraStackFrame(O)}else Vo.setExtraStackFrame(null)}var Yt;Yt=!1;function Kt(c){return typeof c=="object"&&c!==null&&c.$$typeof===e}function qo(){{if(zt.current){var c=C(zt.current.type);if(c)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+c+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+c+"`."}return""}}function zs(c){return""}var Go={};function Ys(c){{var S=qo();if(!S){var O=typeof c=="string"?c:c.displayName||c.name;O&&(S=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=
|
|
25
|
+
Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=Ys(S);if(Go[O])return;Go[O]=!0;var A="";c&&c._owner&&c._owner!==zt.current&&(A=" It was passed a child from "+C(c._owner.type)+"."),Ze(c),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,A),Ze(null)}}function Yo(c,S){{if(typeof c!="object")return;if(qt(c))for(var O=0;O<c.length;O++){var A=c[O];Kt(A)&&zo(A,S)}else if(Kt(c))c._store&&(c._store.validated=!0);else if(c){var N=y(c);if(typeof N=="function"&&N!==c.entries)for(var W=N.call(c),I;!(I=W.next()).done;)Kt(I.value)&&zo(I.value,S)}}}function Ks(c){{var S=c.type;if(S==null||typeof S=="string")return;var O;if(typeof S=="function")O=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===i||S.$$typeof===b))O=S.propTypes;else return;if(O){var A=C(S);ks(O,c.props,"prop",A,c)}else if(S.PropTypes!==void 0&&!Yt){Yt=!0;var N=C(S);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",N||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xs(c){{for(var S=Object.keys(c.props),O=0;O<S.length;O++){var A=S[O];if(A!=="children"&&A!=="key"){Ze(c),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",A),Ze(null);break}}c.ref!==null&&(Ze(c),g("Invalid attribute `ref` supplied to `React.Fragment`."),Ze(null))}}var Ko={};function Xo(c,S,O,A,N,W){{var I=j(c);if(!I){var M="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var re=zs();re?M+=re:M+=qo();var G;c===null?G="null":qt(c)?G="array":c!==void 0&&c.$$typeof===e?(G="<"+(C(c.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):G=typeof c,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,M)}var Y=Gs(c,S,O,N,W);if(Y==null)return Y;if(I){var ie=S.children;if(ie!==void 0)if(A)if(qt(ie)){for(var er=0;er<ie.length;er++)Yo(ie[er],c);Object.freeze&&Object.freeze(ie)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Yo(ie,c)}if(wr.call(S,"key")){var We=C(c),ne=Object.keys(S).filter(function(tc){return tc!=="key"}),Xt=ne.length>0?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}";if(!Ko[We+Xt]){var rc=ne.length>0?"{"+ne.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Xr,We,ec,We),Ko[We+Xr]=!0}}return c===n?Ks(Y):Ys(Y),Y}}function Xs(c,S,O){return Xo(c,S,O,!0)}function Js(c,S,O){return Xo(c,S,O,!1)}var Qs=Js,Zs=Xs;ot.Fragment=n,ot.jsx=Qs,ot.jsxs=Zs}()),ot}process.env.NODE_ENV==="production"?Qt.exports=oi():Qt.exports=ii();var $=Qt.exports;function ai(t,e){return Array.isArray(t)?t.filter(r=>!e.includes(r)):Object.keys(t).reduce((r,n)=>(e.includes(n)||(r[n]=t[n]),r),{})}function Zr(t,e){return Array.isArray(t)?t.filter(r=>e.includes(r)):e.reduce((r,n)=>(n in t&&(r[n]=t[n]),r),{})}function li(t){return Array.isArray(t)?t.filter(e=>e!==null):Object.keys(t).reduce((e,r)=>(r in t&&t[r]!==null&&(e[r]=t[r]),e),{})}function ui(t,e=3,r=10){return new Promise((n,o)=>{const i=t();if(i){n(i);return}let l=e*1e3/r;const u=setInterval(()=>{const a=t();a&&(clearInterval(u),n(a)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},r)})}var si=function(e){return ci(e)&&!fi(e)};function ci(t){return!!t&&typeof t=="object"}function fi(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||yi(t)}var di=typeof Symbol=="function"&&Symbol.for,pi=di?Symbol.for("react.element"):60103;function yi(t){return t.$$typeof===pi}function vi(t){return Array.isArray(t)?[]:{}}function it(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Be(vi(t),t,e):t}function mi(t,e,r){return t.concat(e).map(function(n){return it(n,r)})}function hi(t,e){if(!e.customMerge)return Be;var r=e.customMerge(t);return typeof r=="function"?r:Be}function gi(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function en(t){return Object.keys(t).concat(gi(t))}function tn(t,e){try{return e in t}catch{return!1}}function bi(t,e){return tn(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function wi(t,e,r){var n={};return r.isMergeableObject(t)&&en(t).forEach(function(o){n[o]=it(t[o],r)}),en(e).forEach(function(o){bi(t,o)||(tn(t,o)&&r.isMergeableObject(e[o])?n[o]=hi(o,r)(t[o],e[o],r):n[o]=it(e[o],r))}),n}function Be(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||mi,r.isMergeableObject=r.isMergeableObject||si,r.cloneUnlessOtherwiseSpecified=it;var n=Array.isArray(e),o=Array.isArray(t),i=n===o;return i?n?r.arrayMerge(t,e,r):wi(t,e,r):it(e,r)}Be.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return Be(n,o,r)},{})};var Ei=Be,Si=Ei;const xi=ri(Si);var Oi=Error,Pi=EvalError,Ai=RangeError,Ti=ReferenceError,rn=SyntaxError,at=TypeError,$i=URIError,Ci=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0},nn=typeof Symbol<"u"&&Symbol,Fi=Ci,Mi=function(){return typeof nn!="function"||typeof Symbol!="function"||typeof nn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fi()},Zt={__proto__:null,foo:{}},Ii=Object,_i=function(){return{__proto__:Zt}.foo===Zt.foo&&!(Zt instanceof Ii)},Di="Function.prototype.bind called on incompatible ",ki=Object.prototype.toString,Ni=Math.max,ji="[object Function]",on=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},Li=function(e,r){for(var n=[],o=r,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},Wi=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},Ui=function(e){var r=this;if(typeof r!="function"||ki.apply(r)!==ji)throw new TypeError(Di+r);for(var n=Li(arguments,1),o,i=function(){if(this instanceof o){var s=r.apply(this,on(n,arguments));return Object(s)===s?s:this}return r.apply(e,on(n,arguments))},l=Ni(0,r.length-n.length),u=[],a=0;a<l;a++)u[a]="$"+a;if(o=Function("binder","return function ("+Wi(u,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var p=function(){};p.prototype=r.prototype,o.prototype=new p,p.prototype=null}return o},Bi=Ui,er=Function.prototype.bind||Bi,Ri=Function.prototype.call,Hi=Object.prototype.hasOwnProperty,Vi=er,qi=Vi.call(Ri,Hi),F,Gi=Oi,zi=Pi,Yi=Ai,Ki=Ti,Re=rn,He=at,Xi=$i,an=Function,tr=function(t){try{return an('"use strict"; return ('+t+").constructor;")()}catch{}},$e=Object.getOwnPropertyDescriptor;if($e)try{$e({},"")}catch{$e=null}var rr=function(){throw new He},Ji=$e?function(){try{return arguments.callee,rr}catch{try{return $e(arguments,"callee").get}catch{return rr}}}():rr,Ve=Mi(),Qi=_i(),X=Object.getPrototypeOf||(Qi?function(t){return t.__proto__}:null),qe={},Zi=typeof Uint8Array>"u"||!X?F:X(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":Ve&&X?X([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Gi,"%eval%":eval,"%EvalError%":zi,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":an,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ve&&X?X(X([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ve||!X?F:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":Yi,"%ReferenceError%":Ki,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ve||!X?F:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ve&&X?X(""[Symbol.iterator]()):F,"%Symbol%":Ve?Symbol:F,"%SyntaxError%":Re,"%ThrowTypeError%":Ji,"%TypedArray%":Zi,"%TypeError%":He,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":Xi,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(X)try{null.error}catch(t){var ea=X(X(t));Ce["%Error.prototype%"]=ea}var ta=function t(e){var r;if(e==="%AsyncFunction%")r=tr("async function () {}");else if(e==="%GeneratorFunction%")r=tr("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=tr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&X&&(r=X(o.prototype))}return Ce[e]=r,r},ln={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},lt=er,Ot=qi,ra=lt.call(Function.call,Array.prototype.concat),na=lt.call(Function.apply,Array.prototype.splice),un=lt.call(Function.call,String.prototype.replace),Pt=lt.call(Function.call,String.prototype.slice),oa=lt.call(Function.call,RegExp.prototype.exec),ia=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,aa=/\\(\\)?/g,la=function(e){var r=Pt(e,0,1),n=Pt(e,-1);if(r==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var o=[];return un(e,ia,function(i,l,u,a){o[o.length]=u?un(a,aa,"$1"):l||i}),o},ua=function(e,r){var n=e,o;if(Ot(ln,n)&&(o=ln[n],n="%"+o[0]+"%"),Ot(Ce,n)){var i=Ce[n];if(i===qe&&(i=ta(n)),typeof i>"u"&&!r)throw new He("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Re("intrinsic "+e+" does not exist!")},Ge=function(e,r){if(typeof e!="string"||e.length===0)throw new He("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new He('"allowMissing" argument must be a boolean');if(oa(/^%?[^%]*%?$/,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=la(e),o=n.length>0?n[0]:"",i=ua("%"+o+"%",r),l=i.name,u=i.value,a=!1,p=i.alias;p&&(o=p[0],na(n,ra([0,1],p)));for(var s=1,g=!0;s<n.length;s+=1){var m=n[s],E=Pt(m,0,1),d=Pt(m,-1);if((E==='"'||E==="'"||E==="`"||d==='"'||d==="'"||d==="`")&&E!==d)throw new Re("property names with quotes must have matching quotes");if((m==="constructor"||!g)&&(a=!0),o+="."+m,l="%"+o+"%",Ot(Ce,l))u=Ce[l];else if(u!=null){if(!(m in u)){if(!r)throw new He("base intrinsic for "+e+" exists, but the property is not available.");return}if($e&&s+1>=n.length){var v=$e(u,m);g=!!v,g&&"get"in v&&!("originalValue"in v.get)?u=v.get:u=u[m]}else g=Ot(u,m),u=u[m];g&&!a&&(Ce[l]=u)}}return u},sn={exports:{}},nr,cn;function or(){if(cn)return nr;cn=1;var t=Ge,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return nr=e,nr}var sa=Ge,At=sa("%Object.getOwnPropertyDescriptor%",!0);if(At)try{At([],"length")}catch{At=null}var fn=At,dn=or(),ca=rn,ze=at,pn=fn,fa=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new ze("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new ze("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ze("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ze("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ze("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ze("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,a=!!pn&&pn(e,r);if(dn)dn(e,r,{configurable:l===null&&a?a.configurable:!l,enumerable:o===null&&a?a.enumerable:!o,value:n,writable:i===null&&a?a.writable:!i});else if(u||!o&&!i&&!l)e[r]=n;else throw new ca("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ir=or(),yn=function(){return!!ir};yn.hasArrayLengthDefineBug=function(){if(!ir)return null;try{return ir([],"length",{value:1}).length!==1}catch{return!0}};var da=yn,pa=Ge,vn=fa,ya=da(),mn=fn,hn=at,va=pa("%Math.floor%"),ma=function(e,r){if(typeof e!="function")throw new hn("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||va(r)!==r)throw new hn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&mn){var l=mn(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(i=!1)}return(o||i||!n)&&(ya?vn(e,"length",r,!0,!0):vn(e,"length",r)),e};(function(t){var e=er,r=Ge,n=ma,o=at,i=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||e.call(l,i),a=or(),p=r("%Math.max%");t.exports=function(m){if(typeof m!="function")throw new o("a function is required");var E=u(e,l,arguments);return n(E,1+p(0,m.length-(arguments.length-1)),!0)};var s=function(){return u(e,i,arguments)};a?a(t.exports,"apply",{value:s}):t.exports.apply=s})(sn);var ha=sn.exports,gn=Ge,bn=ha,ga=bn(gn("String.prototype.indexOf")),ba=function(e,r){var n=gn(e,!!r);return typeof n=="function"&&ga(e,".prototype.")>-1?bn(n):n};const wa=ni(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ar=typeof Map=="function"&&Map.prototype,lr=Object.getOwnPropertyDescriptor&&ar?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Tt=ar&&lr&&typeof lr.get=="function"?lr.get:null,wn=ar&&Map.prototype.forEach,ur=typeof Set=="function"&&Set.prototype,sr=Object.getOwnPropertyDescriptor&&ur?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$t=ur&&sr&&typeof sr.get=="function"?sr.get:null,En=ur&&Set.prototype.forEach,Ea=typeof WeakMap=="function"&&WeakMap.prototype,ut=Ea?WeakMap.prototype.has:null,Sa=typeof WeakSet=="function"&&WeakSet.prototype,st=Sa?WeakSet.prototype.has:null,xa=typeof WeakRef=="function"&&WeakRef.prototype,Sn=xa?WeakRef.prototype.deref:null,Oa=Boolean.prototype.valueOf,Pa=Object.prototype.toString,Aa=Function.prototype.toString,Ta=String.prototype.match,cr=String.prototype.slice,Ee=String.prototype.replace,$a=String.prototype.toUpperCase,xn=String.prototype.toLowerCase,On=RegExp.prototype.test,Pn=Array.prototype.concat,fe=Array.prototype.join,Ca=Array.prototype.slice,An=Math.floor,fr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dr=Object.getOwnPropertySymbols,pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ye||!0)?Symbol.toStringTag:null,Tn=Object.prototype.propertyIsEnumerable,$n=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Cn(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||On.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-An(-t):An(t);if(n!==t){var o=String(n),i=cr.call(e,o.length+1);return Ee.call(o,r,"$&_")+"."+Ee.call(Ee.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,r,"$&_")}var yr=wa,Fn=yr.custom,Mn=Dn(Fn)?Fn:null,Fa=function t(e,r,n,o){var i=r||{};if(Se(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Se(i,"customInspect")?i.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Nn(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var a=String(e);return u?Cn(e,a):a}if(typeof e=="bigint"){var p=String(e)+"n";return u?Cn(e,p):p}var s=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return vr(e)?"[Array]":"[Object]";var g=Ya(i,n);if(typeof o>"u")o=[];else if(kn(o,e)>=0)return"[Circular]";function m(C,T,k){if(T&&(o=Ca.call(o),o.push(T)),k){var oe={depth:i.depth};return Se(i,"quoteStyle")&&(oe.quoteStyle=i.quoteStyle),t(C,oe,n+1,o)}return t(C,i,n+1,o)}if(typeof e=="function"&&!_n(e)){var E=Wa(e),d=Ct(e,m);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(d.length>0?" { "+fe.call(d,", ")+" }":"")}if(Dn(e)){var v=Ye?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pr.call(e);return typeof e=="object"&&!Ye?ct(v):v}if(qa(e)){for(var y="<"+xn.call(String(e.nodeName)),h=e.attributes||[],b=0;b<h.length;b++)y+=" "+h[b].name+"="+In(Ma(h[b].value),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+xn.call(String(e.nodeName))+">",y}if(vr(e)){if(e.length===0)return"[]";var w=Ct(e,m);return g&&!za(w)?"["+hr(w,g)+"]":"[ "+fe.call(w,", ")+" ]"}if(_a(e)){var x=Ct(e,m);return!("cause"in Error.prototype)&&"cause"in e&&!Tn.call(e,"cause")?"{ ["+String(e)+"] "+fe.call(Pn.call("[cause]: "+m(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(x,", ")+" }"}if(typeof e=="object"&&l){if(Mn&&typeof e[Mn]=="function"&&yr)return yr(e,{depth:s-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ua(e)){var P=[];return wn&&wn.call(e,function(C,T){P.push(m(T,e,!0)+" => "+m(C,e))}),jn("Map",Tt.call(e),P,g)}if(Ha(e)){var D=[];return En&&En.call(e,function(C){D.push(m(C,e))}),jn("Set",$t.call(e),D,g)}if(Ba(e))return mr("WeakMap");if(Va(e))return mr("WeakSet");if(Ra(e))return mr("WeakRef");if(ka(e))return ct(m(Number(e)));if(ja(e))return ct(m(fr.call(e)));if(Na(e))return ct(Oa.call(e));if(Da(e))return ct(m(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Jt<"u"&&e===Jt)return"{ [object globalThis] }";if(!Ia(e)&&!_n(e)){var _=Ct(e,m),U=$n?$n(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",j=!U&&Q&&Object(e)===e&&Q in e?cr.call(xe(e),8,-1):H?"Object":"",z=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=z+(j||H?"["+fe.call(Pn.call([],j||[],H||[]),": ")+"] ":"");return _.length===0?V+"{}":g?V+"{"+hr(_,g)+"}":V+"{ "+fe.call(_,", ")+" }"}return String(e)};function In(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Ma(t){return Ee.call(String(t),/"/g,""")}function vr(t){return xe(t)==="[object Array]"&&(!Q||!(typeof t=="object"&&Q in t))}function Ia(t){return xe(t)==="[object Date]"&&(!Q||!(typeof t=="object"&&Q in t))}function _n(t){return xe(t)==="[object RegExp]"&&(!Q||!(typeof t=="object"&&Q in t))}function _a(t){return xe(t)==="[object Error]"&&(!Q||!(typeof t=="object"&&Q in t))}function Da(t){return xe(t)==="[object String]"&&(!Q||!(typeof t=="object"&&Q in t))}function ka(t){return xe(t)==="[object Number]"&&(!Q||!(typeof t=="object"&&Q in t))}function Na(t){return xe(t)==="[object Boolean]"&&(!Q||!(typeof t=="object"&&Q in t))}function Dn(t){if(Ye)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!pr)return!1;try{return pr.call(t),!0}catch{}return!1}function ja(t){if(!t||typeof t!="object"||!fr)return!1;try{return fr.call(t),!0}catch{}return!1}var La=Object.prototype.hasOwnProperty||function(t){return t in this};function Se(t,e){return La.call(t,e)}function xe(t){return Pa.call(t)}function Wa(t){if(t.name)return t.name;var e=Ta.call(Aa.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function kn(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Ua(t){if(!Tt||!t||typeof t!="object")return!1;try{Tt.call(t);try{$t.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function Ba(t){if(!ut||!t||typeof t!="object")return!1;try{ut.call(t,ut);try{st.call(t,st)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function Ra(t){if(!Sn||!t||typeof t!="object")return!1;try{return Sn.call(t),!0}catch{}return!1}function Ha(t){if(!$t||!t||typeof t!="object")return!1;try{$t.call(t);try{Tt.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function Va(t){if(!st||!t||typeof t!="object")return!1;try{st.call(t,st);try{ut.call(t,ut)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function qa(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Nn(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Nn(cr.call(t,0,e.maxStringLength),e)+n}var o=Ee.call(Ee.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ga);return In(o,"single",e)}function Ga(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$a.call(e.toString(16))}function ct(t){return"Object("+t+")"}function mr(t){return t+" { ? }"}function jn(t,e,r,n){var o=n?hr(r,n):fe.call(r,", ");return t+" ("+e+") {"+o+"}"}function za(t){for(var e=0;e<t.length;e++)if(kn(t[e],`
|
|
31
|
-
`)>=0)return!1;return!0}function
|
|
32
|
-
`+e.prev+e.base;return
|
|
33
|
-
`+e.prev}function Ct(t,e){var r=vr(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Se(t,o)?e(t[o],t):""}var i=typeof dr=="function"?dr(t):[],l;if(Ye){l={};for(var u=0;u<i.length;u++)l["$"+i[u]]=i[u]}for(var a in t)Se(t,a)&&(r&&String(Number(a))===a&&a<t.length||Ye&&l["$"+a]instanceof Symbol||(On.call(/[^\w$]/,a)?n.push(e(a,t)+": "+e(t[a],t)):n.push(a+": "+e(t[a],t))));if(typeof dr=="function")for(var p=0;p<i.length;p++)Tn.call(t,i[p])&&n.push("["+e(i[p])+"]: "+e(t[i[p]],t));return n}var Ln=Ge,Ke=ba,Ka=Fa,Xa=at,Ft=Ln("%WeakMap%",!0),Mt=Ln("%Map%",!0),Ja=Ke("WeakMap.prototype.get",!0),Qa=Ke("WeakMap.prototype.set",!0),Za=Ke("WeakMap.prototype.has",!0),el=Ke("Map.prototype.get",!0),tl=Ke("Map.prototype.set",!0),rl=Ke("Map.prototype.has",!0),gr=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},nl=function(t,e){var r=gr(t,e);return r&&r.value},ol=function(t,e,r){var n=gr(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},il=function(t,e){return!!gr(t,e)},al=function(){var e,r,n,o={assert:function(i){if(!o.has(i))throw new Xa("Side channel does not contain "+Ka(i))},get:function(i){if(Ft&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Ja(e,i)}else if(Mt){if(r)return el(r,i)}else if(n)return nl(n,i)},has:function(i){if(Ft&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Za(e,i)}else if(Mt){if(r)return rl(r,i)}else if(n)return il(n,i);return!1},set:function(i,l){Ft&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Ft),Qa(e,i,l)):Mt?(r||(r=new Mt),tl(r,i,l)):(n||(n={key:{},next:null}),ol(n,i,l))}};return o},ll=String.prototype.replace,ul=/%20/g,br={RFC1738:"RFC1738",RFC3986:"RFC3986"},wr={default:br.RFC3986,formatters:{RFC1738:function(t){return ll.call(t,ul,"+")},RFC3986:function(t){return String(t)}},RFC1738:br.RFC1738,RFC3986:br.RFC3986},sl=wr,Er=Object.prototype.hasOwnProperty,Fe=Array.isArray,de=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),cl=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Fe(n)){for(var o=[],i=0;i<n.length;++i)typeof n[i]<"u"&&o.push(n[i]);r.obj[r.prop]=o}}},Wn=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},fl=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Fe(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Er.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var o=e;return Fe(e)&&!Fe(r)&&(o=Wn(e,n)),Fe(e)&&Fe(r)?(r.forEach(function(i,l){if(Er.call(e,l)){var u=e[l];u&&typeof u=="object"&&i&&typeof i=="object"?e[l]=t(u,i,n):e.push(i)}else e[l]=i}),e):Object.keys(r).reduce(function(i,l){var u=r[l];return Er.call(i,l)?i[l]=t(i[l],u,n):i[l]=u,i},o)},dl=function(e,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},e)},pl=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Sr=1024,yl=function(e,r,n,o,i){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(E){return"%26%23"+parseInt(E.slice(2),16)+"%3B"});for(var u="",a=0;a<l.length;a+=Sr){for(var p=l.length>=Sr?l.slice(a,a+Sr):l,s=[],g=0;g<p.length;++g){var m=p.charCodeAt(g);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===sl.RFC1738&&(m===40||m===41)){s[s.length]=p.charAt(g);continue}if(m<128){s[s.length]=de[m];continue}if(m<2048){s[s.length]=de[192|m>>6]+de[128|m&63];continue}if(m<55296||m>=57344){s[s.length]=de[224|m>>12]+de[128|m>>6&63]+de[128|m&63];continue}g+=1,m=65536+((m&1023)<<10|p.charCodeAt(g)&1023),s[s.length]=de[240|m>>18]+de[128|m>>12&63]+de[128|m>>6&63]+de[128|m&63]}u+=s.join("")}return u},vl=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o<r.length;++o)for(var i=r[o],l=i.obj[i.prop],u=Object.keys(l),a=0;a<u.length;++a){var p=u[a],s=l[p];typeof s=="object"&&s!==null&&n.indexOf(s)===-1&&(r.push({obj:l,prop:p}),n.push(s))}return cl(r),e},ml=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},hl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},gl=function(e,r){return[].concat(e,r)},bl=function(e,r){if(Fe(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(r(e[o]));return n}return r(e)},Un={arrayToObject:Wn,assign:dl,combine:gl,compact:vl,decode:pl,encode:yl,isBuffer:hl,isRegExp:ml,maybeMap:bl,merge:fl},Bn=al,It=Un,ft=wr,wl=Object.prototype.hasOwnProperty,Rn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},pe=Array.isArray,El=Array.prototype.push,Hn=function(t,e){El.apply(t,pe(e)?e:[e])},Sl=Date.prototype.toISOString,Vn=ft.default,K={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:It.encode,encodeValuesOnly:!1,format:Vn,formatter:ft.formatters[Vn],indices:!1,serializeDate:function(e){return Sl.call(e)},skipNulls:!1,strictNullHandling:!1},xl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},xr={},Ol=function t(e,r,n,o,i,l,u,a,p,s,g,m,E,d,v,y,h,b){for(var w=e,x=b,P=0,D=!1;(x=x.get(xr))!==void 0&&!D;){var _=x.get(e);if(P+=1,typeof _<"u"){if(_===P)throw new RangeError("Cyclic object value");D=!0}typeof x.get(xr)>"u"&&(P=0)}if(typeof s=="function"?w=s(r,w):w instanceof Date?w=E(w):n==="comma"&&pe(w)&&(w=It.maybeMap(w,function(se){return se instanceof Date?E(se):se})),w===null){if(l)return p&&!y?p(r,K.encoder,h,"key",d):r;w=""}if(xl(w)||It.isBuffer(w)){if(p){var U=y?r:p(r,K.encoder,h,"key",d);return[v(U)+"="+v(p(w,K.encoder,h,"value",d))]}return[v(r)+"="+v(String(w))]}var H=[];if(typeof w>"u")return H;var j;if(n==="comma"&&pe(w))y&&p&&(w=It.maybeMap(w,p)),j=[{value:w.length>0?w.join(",")||null:void 0}];else if(pe(s))j=s;else{var z=Object.keys(w);j=g?z.sort(g):z}var V=a?r.replace(/\./g,"%2E"):r,C=o&&pe(w)&&w.length===1?V+"[]":V;if(i&&pe(w)&&w.length===0)return C+"[]";for(var T=0;T<j.length;++T){var k=j[T],oe=typeof k=="object"&&typeof k.value<"u"?k.value:w[k];if(!(u&&oe===null)){var ue=m&&a?k.replace(/\./g,"%2E"):k,ve=pe(w)?typeof n=="function"?n(C,ue):C:C+(m?"."+ue:"["+ue+"]");b.set(e,P);var Z=Bn();Z.set(xr,b),Hn(H,t(oe,ve,n,o,i,l,u,a,n==="comma"&&y&&pe(w)?null:p,s,g,m,E,d,v,y,h,Z))}}return H},Pl=function(e){if(!e)return K;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||K.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ft.default;if(typeof e.format<"u"){if(!wl.call(ft.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=ft.formatters[n],i=K.filter;(typeof e.filter=="function"||pe(e.filter))&&(i=e.filter);var l;if(e.arrayFormat in Rn?l=e.arrayFormat:"indices"in e?l=e.indices?"indices":"repeat":l=K.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:K.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:K.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:K.allowEmptyArrays,arrayFormat:l,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:K.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?K.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:K.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:K.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:K.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:K.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:K.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:K.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:K.strictNullHandling}},Al=function(t,e){var r=t,n=Pl(e),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):pe(n.filter)&&(i=n.filter,o=i);var l=[];if(typeof r!="object"||r===null)return"";var u=Rn[n.arrayFormat],a=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var p=Bn(),s=0;s<o.length;++s){var g=o[s];n.skipNulls&&r[g]===null||Hn(l,Ol(r[g],g,u,a,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var m=l.join(n.delimiter),E=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),m.length>0?E+m:""},Xe=Un,Or=Object.prototype.hasOwnProperty,Tl=Array.isArray,R={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xe.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},$l=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},qn=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Cl="utf8=%26%2310003%3B",Fl="utf8=%E2%9C%93",Ml=function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=r.parameterLimit===1/0?void 0:r.parameterLimit,l=o.split(r.delimiter,i),u=-1,a,p=r.charset;if(r.charsetSentinel)for(a=0;a<l.length;++a)l[a].indexOf("utf8=")===0&&(l[a]===Fl?p="utf-8":l[a]===Cl&&(p="iso-8859-1"),u=a,a=l.length);for(a=0;a<l.length;++a)if(a!==u){var s=l[a],g=s.indexOf("]="),m=g===-1?s.indexOf("="):g+1,E,d;m===-1?(E=r.decoder(s,R.decoder,p,"key"),d=r.strictNullHandling?null:""):(E=r.decoder(s.slice(0,m),R.decoder,p,"key"),d=Xe.maybeMap(qn(s.slice(m+1),r),function(y){return r.decoder(y,R.decoder,p,"value")})),d&&r.interpretNumericEntities&&p==="iso-8859-1"&&(d=$l(d)),s.indexOf("[]=")>-1&&(d=Tl(d)?[d]:d);var v=Or.call(n,E);v&&r.duplicates==="combine"?n[E]=Xe.combine(n[E],d):(!v||r.duplicates==="last")&&(n[E]=d)}return n},Il=function(t,e,r,n){for(var o=n?e:qn(e,r),i=t.length-1;i>=0;--i){var l,u=t[i];if(u==="[]"&&r.parseArrays)l=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:[].concat(o);else{l=r.plainObjects?Object.create(null):{};var a=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,p=r.decodeDotInKeys?a.replace(/%2E/g,"."):a,s=parseInt(p,10);!r.parseArrays&&p===""?l={0:o}:!isNaN(s)&&u!==p&&String(s)===p&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(l=[],l[s]=o):p!=="__proto__"&&(l[p]=o)}o=l}return o},_l=function(e,r,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,a=n.depth>0&&l.exec(i),p=a?i.slice(0,a.index):i,s=[];if(p){if(!n.plainObjects&&Or.call(Object.prototype,p)&&!n.allowPrototypes)return;s.push(p)}for(var g=0;n.depth>0&&(a=u.exec(i))!==null&&g<n.depth;){if(g+=1,!n.plainObjects&&Or.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(a[1])}if(a){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+i.slice(a.index)+"]")}return Il(s,r,n,o)}},Dl=function(e){if(!e)return R;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?R.charset:e.charset,n=typeof e.duplicates>"u"?R.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:R.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:R.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:R.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:R.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:R.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:R.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:R.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:R.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:R.decoder,delimiter:typeof e.delimiter=="string"||Xe.isRegExp(e.delimiter)?e.delimiter:R.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:R.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:R.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:R.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:R.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:R.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:R.strictNullHandling}},kl=function(t,e){var r=Dl(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Ml(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),l=0;l<i.length;++l){var u=i[l],a=_l(u,n[u],r,typeof t=="string");o=Xe.merge(o,a,r)}return r.allowSparse===!0?o:Xe.compact(o)},Nl=Al,jl=kl,Ll=wr,Gn={formats:Ll,parse:jl,stringify:Nl},Wl={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
34
|
-
* @license MIT */(function(t,e){(function(r,n){t.exports=n()})(Jt,function(){var r={};r.version="0.2.0";var n=r.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};r.configure=function(d){var v,y;for(v in d)y=d[v],y!==void 0&&d.hasOwnProperty(v)&&(n[v]=y);return this},r.status=null,r.set=function(d){var v=r.isStarted();d=o(d,n.minimum,1),r.status=d===1?null:d;var y=r.render(!v),h=y.querySelector(n.barSelector),b=n.speed,w=n.easing;return y.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),a(h,l(d,b,w)),d===1?(a(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){a(y,{transition:"all "+b+"ms linear",opacity:0}),setTimeout(function(){r.remove(),x()},b)},b)):setTimeout(x,b)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var d=function(){setTimeout(function(){r.status&&(r.trickle(),d())},n.trickleSpeed)};return n.trickle&&d(),this},r.done=function(d){return!d&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(d){var v=r.status;return v?(typeof d!="number"&&(d=(1-v)*o(Math.random()*v,.1,.95)),v=o(v+d,0,.994),r.set(v)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var d=0,v=0;r.promise=function(y){return!y||y.state()==="resolved"?this:(v===0&&r.start(),d++,v++,y.always(function(){v--,v===0?(d=0,r.done()):r.set((d-v)/d)}),this)}}(),r.render=function(d){if(r.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var v=document.createElement("div");v.id="nprogress",v.innerHTML=n.template;var y=v.querySelector(n.barSelector),h=d?"-100":i(r.status||0),b=document.querySelector(n.parent),w;return a(y,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),n.showSpinner||(w=v.querySelector(n.spinnerSelector),w&&E(w)),b!=document.body&&s(b,"nprogress-custom-parent"),b.appendChild(v),v},r.remove=function(){g(document.documentElement,"nprogress-busy"),g(document.querySelector(n.parent),"nprogress-custom-parent");var d=document.getElementById("nprogress");d&&E(d)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var d=document.body.style,v="WebkitTransform"in d?"Webkit":"MozTransform"in d?"Moz":"msTransform"in d?"ms":"OTransform"in d?"O":"";return v+"Perspective"in d?"translate3d":v+"Transform"in d?"translate":"margin"};function o(d,v,y){return d<v?v:d>y?y:d}function i(d){return(-1+d)*100}function l(d,v,y){var h;return n.positionUsing==="translate3d"?h={transform:"translate3d("+i(d)+"%,0,0)"}:n.positionUsing==="translate"?h={transform:"translate("+i(d)+"%,0)"}:h={"margin-left":i(d)+"%"},h.transition="all "+v+"ms "+y,h}var u=function(){var d=[];function v(){var y=d.shift();y&&y(v)}return function(y){d.push(y),d.length==1&&v()}}(),a=function(){var d=["Webkit","O","Moz","ms"],v={};function y(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(P,D){return D.toUpperCase()})}function h(x){var P=document.body.style;if(x in P)return x;for(var D=d.length,_=x.charAt(0).toUpperCase()+x.slice(1),U;D--;)if(U=d[D]+_,U in P)return U;return x}function b(x){return x=y(x),v[x]||(v[x]=h(x))}function w(x,P,D){P=b(P),x.style[P]=D}return function(x,P){var D=arguments,_,U;if(D.length==2)for(_ in P)U=P[_],U!==void 0&&P.hasOwnProperty(_)&&w(x,_,U);else w(x,D[1],D[2])}}();function p(d,v){var y=typeof d=="string"?d:m(d);return y.indexOf(" "+v+" ")>=0}function s(d,v){var y=m(d),h=y+v;p(y,v)||(d.className=h.substring(1))}function g(d,v){var y=m(d),h;p(d,v)&&(h=y.replace(" "+v+" "," "),d.className=h.substring(1,h.length-1))}function m(d){return(" "+(d.className||"")+" ").replace(/\s+/gi," ")}function E(d){d&&d.parentNode&&d.parentNode.removeChild(d)}return r})})(Wl);function Ul(t,e,r,n="brackets"){let o=/^https?:\/\//.test(e.toString()),i=o||e.toString().startsWith("/"),l=!i&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||t==="get"&&Object.keys(r).length,a=e.toString().includes("#"),p=new URL(e.toString(),"http://localhost");return t==="get"&&Object.keys(r).length&&(p.search=Gn.stringify(xi(Gn.parse(p.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:n}),r={}),[[o?`${p.protocol}//${p.host}`:"",i?p.pathname:"",l?p.pathname.substring(1):"",u?p.search:"",a?p.hash:""].join(""),r]}const _t=f.createContext(null);_t.displayName="ModalStackContext";let zn=null,Yn=null,Pr=null,Ar=null,Tr=[];const Kn=({children:t})=>{const[e,r]=f.useState([]),[n,o]=f.useState({}),i=v=>{r(y=>{const h=v([...y]),b=w=>{var x;return h.length<2?!0:((x=h.map(P=>({id:P.id,shouldRender:P.shouldRender})).reverse().find(P=>P.shouldRender))==null?void 0:x.id)===w};return h.forEach((w,x)=>{h[x].onTopOfStack=b(w.id),h[x].getParentModal=()=>x<1?null:h.slice(0,x).reverse().find(P=>P.isOpen),h[x].getChildModal=()=>x===h.length-1?null:h.slice(x+1).find(P=>P.isOpen)}),h})};f.useEffect(()=>{Tr=e},[e]);class l{constructor(y,h,b,w,x){ce(this,"update",(y,h,b)=>{i(w=>w.map(x=>(x.id===this.id&&(x.modalProps=y,x.onCloseCallback=h,x.afterLeaveCallback=b),x)))});ce(this,"show",()=>{i(y=>y.map(h=>(h.id===this.id&&!h.isOpen&&(h.isOpen=!0,h.shouldRender=!0),h)))});ce(this,"setOpen",y=>{y?this.show():this.close()});ce(this,"close",()=>{console.log("Closing",this.id),i(y=>y.map(h=>{var b;return h.id===this.id&&h.isOpen&&(Object.keys(h.listeners).forEach(w=>{h.off(w)}),h.isOpen=!1,(b=h.onCloseCallback)==null||b.call(h)),h}))});ce(this,"afterLeave",()=>{console.log("After leave",this.id),!this.isOpen&&i(y=>{const h=y.map(b=>{var w;return b.id===this.id&&!b.isOpen&&(b.shouldRender=!1,(w=b.afterLeaveCallback)==null||w.call(b),b.afterLeaveCallback=null),b});return this.index===0?[]:h})});ce(this,"on",(y,h)=>{this.listeners[y]=this.listeners[y]??[],this.listeners[y].push(h)});ce(this,"off",(y,h)=>{var b;h?this.listeners[y]=((b=this.listeners[y])==null?void 0:b.filter(w=>w!==h))??[]:delete this.listeners[y]});ce(this,"emit",(y,...h)=>{var b;(b=this.listeners[y])==null||b.forEach(w=>w(...h))});ce(this,"registerEventListenersFromProps",y=>{const h=[];return Object.keys(y).filter(b=>b.startsWith("on")).forEach(b=>{const w=b.replace(/^on/,"").replace(/^./,x=>x.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,y[b]),h.push(()=>this.off(w,y[b]))}),()=>h.forEach(b=>b())});ce(this,"reload",(y={})=>{var b;let h=Object.keys(this.response.props);y.only&&(h=Zr(h,y.only)),y.except&&(h=ai(h,y.except)),(b=this.response)!=null&&b.url&&me.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":h.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(w=>{Object.assign(this.componentProps,w.data.props),i(x=>x)})});this.id=l.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=y,this.componentProps=h.props,this.response=h,this.modalProps=b,this.onCloseCallback=w,this.afterLeaveCallback=x,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const u=(v,y={},h=null,b=null)=>Yn(v.component).then(w=>a(w,v,y,h,b)),a=(v,y,h,b,w)=>{const x=new l(v,y,h,b,w);return x.index=e.length,i(P=>[...P,x]),x.show(),x};function p(v,y,h,b){if(!n[v])throw new Error(`The local modal "${v}" has not been registered.`);const w=a(null,{},y,h,b);return w.name=v,n[v].callback(w),w}const s=(v,y={})=>g(v,y.method??"get",y.data??{},y.headers??{},y.config??{},y.onClose,y.onAfterLeave,y.queryStringArrayFormat??"brackets",y.navigate??xt("navigate")),g=(v,y,h={},b={},w={},x=null,P=null,D="brackets",_=!1)=>new Promise((U,H)=>{if(v.startsWith("#")){U(p(v.substring(1),w,x,P));return}const[j,z]=Ul(y,v||"",h,D);let V=_&&e.length===0;if(e.length===0&&(Pr=typeof window<"u"?window.location.href:""),b={...b,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":zn,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":V?1:0},V)return tt.router.visit(j,{method:y,data:z,headers:b,preserveScroll:!0,preserveState:!0,onError:H,onFinish:()=>{ui(()=>Ar).then(C=>{const T=C.onCloseCallback,k=C.afterLeaveCallback;C.update(w,()=>{x==null||x(),T==null||T()},()=>{P==null||P(),k==null||k()}),U(C),Ar=null})}});me({url:j,method:y,data:z,headers:b}).then(C=>U(u(C.data,w,x,P))).catch(C=>{H(C)})}),d={stack:e,localModals:n,push:a,pushFromResponseData:u,closeAll:()=>{console.log("Closing all modals",{stack:e,localStackCopy:Tr}),Tr.reverse().forEach(v=>v.close())},reset:()=>i(()=>[]),visit:g,visitModal:s,registerLocalModal:(v,y)=>{o(h=>({...h,[v]:{name:v,callback:y}}))},removeLocalModal:v=>{o(y=>{const h={...y};return delete h[v],h})}};return $.jsx(_t.Provider,{value:d,children:t})},Dt=()=>{const t=f.useContext(_t);if(t===null)throw new Error("useModalStack must be used within a ModalStackProvider");return t},Xn=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Bl=(t,e)=>{e.initialPage&&(zn=e.initialPage.version),e.resolveComponent&&(Yn=e.resolveComponent);const r=({Component:n,props:o,key:i})=>{const l=()=>{const u=f.createElement(n,{key:i,...o});return typeof n.layout=="function"?n.layout(u):Array.isArray(n.layout)?n.layout.concat(u).reverse().reduce((p,s)=>f.createElement(s,o,p)):u};return $.jsxs($.Fragment,{children:[l(),$.jsx(Jn,{})]})};return $.jsx(Kn,{children:$.jsx(t,{...e,children:r})})},Jn=({children:t})=>{const e=f.useContext(_t);let r=!1,n=!1;f.useEffect(()=>tt.router.on("start",()=>r=!0),[]),f.useEffect(()=>tt.router.on("finish",()=>r=!1),[]),f.useEffect(()=>tt.router.on("navigate",function(i){const l=i.detail.page.props._inertiaui_modal;if(!l){n&&e.closeAll();return}n=l,Pr=l.baseUrl,e.pushFromResponseData(l,{},()=>{if(!l.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!r&&window.location.href!==l.baseUrl&&tt.router.visit(l.baseUrl,{preserveScroll:!0,preserveState:!0})}).then(u=>{Ar=u})}),[]);const o=i=>(i.headers["X-InertiaUI-Modal-Base-Url"]=Pr,i);return f.useEffect(()=>(me.interceptors.request.use(o),()=>me.interceptors.request.eject(o)),[]),$.jsxs($.Fragment,{children:[t,e.stack.length>0&&$.jsx(Zn,{index:0})]})},$r=f.createContext(null);$r.displayName="ModalIndexContext";const Qn=()=>{const t=f.useContext($r);if(t===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return t},Zn=({index:t})=>{const{stack:e}=Dt(),r=f.useMemo(()=>e[t],[e,t]);return(r==null?void 0:r.component)&&$.jsx($r.Provider,{value:t,children:$.jsx(r.component,{...r.componentProps,onModalEvent:(...n)=>r.emit(...n)})})},Cr=f.forwardRef(({name:t,children:e,...r},n)=>{const o=Qn(),{stack:i,registerLocalModal:l,removeLocalModal:u}=Dt(),[a,p]=f.useState(null),s=f.useMemo(()=>t?a:i[o],[t,a,o,i]),g=f.useMemo(()=>{var d;return(d=i.find(v=>v.shouldRender&&v.index>(s==null?void 0:s.index)))==null?void 0:d.index},[o,i]),m=f.useMemo(()=>(s==null?void 0:s.modalProps.slideover)??r.slideover??xt("type")==="slideover",[r.slideover]),E=f.useMemo(()=>({slideover:m,closeButton:r.closeButton??Ue(m,"closeButton"),closeExplicitly:r.closeExplicitly??Ue(m,"closeExplicitly"),maxWidth:r.maxWidth??Ue(m,"maxWidth"),paddingClasses:r.paddingClasses??Ue(m,"paddingClasses"),panelClasses:r.panelClasses??Ue(m,"panelClasses"),position:r.position??Ue(m,"position"),...s==null?void 0:s.modalProps}),[r,s==null?void 0:s.modalProps]);return f.useEffect(()=>{if(t){let d=null;return l(t,v=>{d=v.registerEventListenersFromProps(r),p(v)}),()=>{d==null||d(),d=null,u(t)}}return s.registerEventListenersFromProps(r)},[t]),f.useImperativeHandle(n,()=>({afterLeave:()=>s.afterLeave(),close:()=>s.close(),emit:(...d)=>s.emit(...d),getChildModal:()=>s.getChildModal(),getParentModal:()=>s.getParentModal(),id:s==null?void 0:s.id,index:s==null?void 0:s.index,isOpen:s==null?void 0:s.isOpen,modalContext:s,modalProps:E,onTopOfStack:s==null?void 0:s.onTopOfStack,reload:()=>s.reload(),setOpen:()=>s.setOpen(),shouldRender:s==null?void 0:s.shouldRender}),[s]),(s==null?void 0:s.shouldRender)&&$.jsxs($.Fragment,{children:[typeof e=="function"?e({afterLeave:s.afterLeave,close:s.close,emit:s.emit,getChildModal:s.getChildModal,getParentModal:s.getParentModal,id:s.id,index:s.index,isOpen:s.isOpen,modalContext:s,modalProps:E,onTopOfStack:s.onTopOfStack,reload:s.reload,setOpen:s.setOpen,shouldRender:s.shouldRender}):e,g&&$.jsx(Zn,{index:g})]})});Cr.displayName="HeadlessModal";function eo(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=eo(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function kt(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=eo(t))&&(n&&(n+=" "),n+=e);return n}var Rl=Object.defineProperty,Hl=(t,e,r)=>e in t?Rl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Fr=(t,e,r)=>(Hl(t,typeof e!="symbol"?e+"":e,r),r);let Vl=class{constructor(){Fr(this,"current",this.detect()),Fr(this,"handoffState","pending"),Fr(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Me=new Vl;function Nt(t){return Me.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function jt(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))}function Oe(){let t=[],e={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),e.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return e.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return jt(()=>{n.current&&r[0]()}),e.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Oe();return r(n),this.add(()=>n.dispose())},add(r){return t.includes(r)||t.push(r),()=>{let n=t.indexOf(r);if(n>=0)for(let o of t.splice(n,1))o()}},dispose(){for(let r of t.splice(0))r()}};return e}function Mr(){let[t]=f.useState(Oe);return f.useEffect(()=>()=>t.dispose(),[t]),t}let ee=(t,e)=>{Me.isServer?f.useEffect(t,e):f.useLayoutEffect(t,e)};function Ie(t){let e=f.useRef(t);return ee(()=>{e.current=t},[t]),e}let B=function(t){let e=Ie(t);return f.useCallback((...r)=>e.current(...r),[e])},ql=f.createContext(void 0);function Gl(){return f.useContext(ql)}function Ir(...t){return Array.from(new Set(t.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Pe(t,e,...r){if(t in e){let o=e[t];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pe),n}var Lt=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(Lt||{}),Ae=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(Ae||{});function ie(){let t=Yl();return f.useCallback(e=>zl({mergeRefs:t,...e}),[t])}function zl({ourProps:t,theirProps:e,slot:r,defaultTag:n,features:o,visible:i=!0,name:l,mergeRefs:u}){u=u??Kl;let a=to(e,t);if(i)return Wt(a,r,n,l,u);let p=o??0;if(p&2){let{static:s=!1,...g}=a;if(s)return Wt(g,r,n,l,u)}if(p&1){let{unmount:s=!0,...g}=a;return Pe(s?0:1,{0(){return null},1(){return Wt({...g,hidden:!0,style:{display:"none"}},r,n,l,u)}})}return Wt(a,r,n,l,u)}function Wt(t,e={},r,n,o){let{as:i=r,children:l,refName:u="ref",...a}=_r(t,["unmount","static"]),p=t.ref!==void 0?{[u]:t.ref}:{},s=typeof l=="function"?l(e):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(e)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let g={};if(e){let m=!1,E=[];for(let[d,v]of Object.entries(e))typeof v=="boolean"&&(m=!0),v===!0&&E.push(d.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(m){g["data-headlessui-state"]=E.join(" ");for(let d of E)g[`data-${d}`]=""}}if(i===f.Fragment&&(Object.keys(_e(a)).length>0||Object.keys(_e(g)).length>0))if(!f.isValidElement(s)||Array.isArray(s)&&s.length>1){if(Object.keys(_e(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_e(a)).concat(Object.keys(_e(g))).map(m=>` - ${m}`).join(`
|
|
35
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(
|
|
30
|
+
<%s key={someKey} {...props} />`,Xt,We,rc,We),Ko[We+Xt]=!0}}return c===n?Xs(Y):Ks(Y),Y}}function Js(c,S,O){return Xo(c,S,O,!0)}function Qs(c,S,O){return Xo(c,S,O,!1)}var Zs=Qs,ec=Js;or.Fragment=n,or.jsx=Zs,or.jsxs=ec}()),or}process.env.NODE_ENV==="production"?Qr.exports=oa():Qr.exports=aa();var $=Qr.exports;function ia(r,e){return Array.isArray(r)?r.filter(t=>!e.includes(t)):Object.keys(r).reduce((t,n)=>(e.includes(n)||(t[n]=r[n]),t),{})}function Zt(r,e){return Array.isArray(r)?r.filter(t=>e.includes(t)):e.reduce((t,n)=>(n in r&&(t[n]=r[n]),t),{})}function la(r){return Array.isArray(r)?r.filter(e=>e!==null):Object.keys(r).reduce((e,t)=>(t in r&&r[t]!==null&&(e[t]=r[t]),e),{})}function ua(r,e=3,t=10){return new Promise((n,o)=>{const a=r();if(a){n(a);return}let l=e*1e3/t;const u=setInterval(()=>{const i=r();i&&(clearInterval(u),n(i)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},t)})}var sa=function(e){return ca(e)&&!fa(e)};function ca(r){return!!r&&typeof r=="object"}function fa(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||ya(r)}var da=typeof Symbol=="function"&&Symbol.for,pa=da?Symbol.for("react.element"):60103;function ya(r){return r.$$typeof===pa}function ma(r){return Array.isArray(r)?[]:{}}function ar(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Be(ma(r),r,e):r}function va(r,e,t){return r.concat(e).map(function(n){return ar(n,t)})}function ha(r,e){if(!e.customMerge)return Be;var t=e.customMerge(r);return typeof t=="function"?t:Be}function ga(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function en(r){return Object.keys(r).concat(ga(r))}function rn(r,e){try{return e in r}catch{return!1}}function ba(r,e){return rn(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function wa(r,e,t){var n={};return t.isMergeableObject(r)&&en(r).forEach(function(o){n[o]=ar(r[o],t)}),en(e).forEach(function(o){ba(r,o)||(rn(r,o)&&t.isMergeableObject(e[o])?n[o]=ha(o,t)(r[o],e[o],t):n[o]=ar(e[o],t))}),n}function Be(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||va,t.isMergeableObject=t.isMergeableObject||sa,t.cloneUnlessOtherwiseSpecified=ar;var n=Array.isArray(e),o=Array.isArray(r),a=n===o;return a?n?t.arrayMerge(r,e,t):wa(r,e,t):ar(e,t)}Be.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return Be(n,o,t)},{})};var Ea=Be,Sa=Ea;const xa=ta(Sa);var Oa=Error,Pa=EvalError,Aa=RangeError,Ta=ReferenceError,tn=SyntaxError,ir=TypeError,$a=URIError,Ca=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0},nn=typeof Symbol<"u"&&Symbol,Fa=Ca,Ma=function(){return typeof nn!="function"||typeof Symbol!="function"||typeof nn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fa()},Zr={__proto__:null,foo:{}},Ia=Object,_a=function(){return{__proto__:Zr}.foo===Zr.foo&&!(Zr instanceof Ia)},Da="Function.prototype.bind called on incompatible ",ka=Object.prototype.toString,Na=Math.max,ja="[object Function]",on=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},La=function(e,t){for(var n=[],o=t,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},Wa=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},Ua=function(e){var t=this;if(typeof t!="function"||ka.apply(t)!==ja)throw new TypeError(Da+t);for(var n=La(arguments,1),o,a=function(){if(this instanceof o){var s=t.apply(this,on(n,arguments));return Object(s)===s?s:this}return t.apply(e,on(n,arguments))},l=Na(0,t.length-n.length),u=[],i=0;i<l;i++)u[i]="$"+i;if(o=Function("binder","return function ("+Wa(u,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var p=function(){};p.prototype=t.prototype,o.prototype=new p,p.prototype=null}return o},Ba=Ua,et=Function.prototype.bind||Ba,Ra=Function.prototype.call,Ha=Object.prototype.hasOwnProperty,Va=et,qa=Va.call(Ra,Ha),F,Ga=Oa,za=Pa,Ya=Aa,Ka=Ta,Re=tn,He=ir,Xa=$a,an=Function,rt=function(r){try{return an('"use strict"; return ('+r+").constructor;")()}catch{}},$e=Object.getOwnPropertyDescriptor;if($e)try{$e({},"")}catch{$e=null}var tt=function(){throw new He},Ja=$e?function(){try{return arguments.callee,tt}catch{try{return $e(arguments,"callee").get}catch{return tt}}}():tt,Ve=Ma(),Qa=_a(),X=Object.getPrototypeOf||(Qa?function(r){return r.__proto__}:null),qe={},Za=typeof Uint8Array>"u"||!X?F:X(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":Ve&&X?X([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ga,"%eval%":eval,"%EvalError%":za,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":an,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ve&&X?X(X([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ve||!X?F:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":Ya,"%ReferenceError%":Ka,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ve||!X?F:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ve&&X?X(""[Symbol.iterator]()):F,"%Symbol%":Ve?Symbol:F,"%SyntaxError%":Re,"%ThrowTypeError%":Ja,"%TypedArray%":Za,"%TypeError%":He,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":Xa,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(X)try{null.error}catch(r){var ei=X(X(r));Ce["%Error.prototype%"]=ei}var ri=function r(e){var t;if(e==="%AsyncFunction%")t=rt("async function () {}");else if(e==="%GeneratorFunction%")t=rt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=rt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&X&&(t=X(o.prototype))}return Ce[e]=t,t},ln={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},lr=et,Pr=qa,ti=lr.call(Function.call,Array.prototype.concat),ni=lr.call(Function.apply,Array.prototype.splice),un=lr.call(Function.call,String.prototype.replace),Ar=lr.call(Function.call,String.prototype.slice),oi=lr.call(Function.call,RegExp.prototype.exec),ai=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ii=/\\(\\)?/g,li=function(e){var t=Ar(e,0,1),n=Ar(e,-1);if(t==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var o=[];return un(e,ai,function(a,l,u,i){o[o.length]=u?un(i,ii,"$1"):l||a}),o},ui=function(e,t){var n=e,o;if(Pr(ln,n)&&(o=ln[n],n="%"+o[0]+"%"),Pr(Ce,n)){var a=Ce[n];if(a===qe&&(a=ri(n)),typeof a>"u"&&!t)throw new He("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Re("intrinsic "+e+" does not exist!")},Ge=function(e,t){if(typeof e!="string"||e.length===0)throw new He("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new He('"allowMissing" argument must be a boolean');if(oi(/^%?[^%]*%?$/,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=li(e),o=n.length>0?n[0]:"",a=ui("%"+o+"%",t),l=a.name,u=a.value,i=!1,p=a.alias;p&&(o=p[0],ni(n,ti([0,1],p)));for(var s=1,b=!0;s<n.length;s+=1){var v=n[s],E=Ar(v,0,1),d=Ar(v,-1);if((E==='"'||E==="'"||E==="`"||d==='"'||d==="'"||d==="`")&&E!==d)throw new Re("property names with quotes must have matching quotes");if((v==="constructor"||!b)&&(i=!0),o+="."+v,l="%"+o+"%",Pr(Ce,l))u=Ce[l];else if(u!=null){if(!(v in u)){if(!t)throw new He("base intrinsic for "+e+" exists, but the property is not available.");return}if($e&&s+1>=n.length){var m=$e(u,v);b=!!m,b&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[v]}else b=Pr(u,v),u=u[v];b&&!i&&(Ce[l]=u)}}return u},sn={exports:{}},nt,cn;function ot(){if(cn)return nt;cn=1;var r=Ge,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return nt=e,nt}var si=Ge,Tr=si("%Object.getOwnPropertyDescriptor%",!0);if(Tr)try{Tr([],"length")}catch{Tr=null}var fn=Tr,dn=ot(),ci=tn,ze=ir,pn=fn,fi=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new ze("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ze("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ze("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ze("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ze("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ze("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,i=!!pn&&pn(e,t);if(dn)dn(e,t,{configurable:l===null&&i?i.configurable:!l,enumerable:o===null&&i?i.enumerable:!o,value:n,writable:a===null&&i?i.writable:!a});else if(u||!o&&!a&&!l)e[t]=n;else throw new ci("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},at=ot(),yn=function(){return!!at};yn.hasArrayLengthDefineBug=function(){if(!at)return null;try{return at([],"length",{value:1}).length!==1}catch{return!0}};var di=yn,pi=Ge,mn=fi,yi=di(),vn=fn,hn=ir,mi=pi("%Math.floor%"),vi=function(e,t){if(typeof e!="function")throw new hn("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||mi(t)!==t)throw new hn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,a=!0;if("length"in e&&vn){var l=vn(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(a=!1)}return(o||a||!n)&&(yi?mn(e,"length",t,!0,!0):mn(e,"length",t)),e};(function(r){var e=et,t=Ge,n=vi,o=ir,a=t("%Function.prototype.apply%"),l=t("%Function.prototype.call%"),u=t("%Reflect.apply%",!0)||e.call(l,a),i=ot(),p=t("%Math.max%");r.exports=function(v){if(typeof v!="function")throw new o("a function is required");var E=u(e,l,arguments);return n(E,1+p(0,v.length-(arguments.length-1)),!0)};var s=function(){return u(e,a,arguments)};i?i(r.exports,"apply",{value:s}):r.exports.apply=s})(sn);var hi=sn.exports,gn=Ge,bn=hi,gi=bn(gn("String.prototype.indexOf")),bi=function(e,t){var n=gn(e,!!t);return typeof n=="function"&&gi(e,".prototype.")>-1?bn(n):n};const wi=na(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var it=typeof Map=="function"&&Map.prototype,lt=Object.getOwnPropertyDescriptor&&it?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$r=it&<&&typeof lt.get=="function"?lt.get:null,wn=it&&Map.prototype.forEach,ut=typeof Set=="function"&&Set.prototype,st=Object.getOwnPropertyDescriptor&&ut?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Cr=ut&&st&&typeof st.get=="function"?st.get:null,En=ut&&Set.prototype.forEach,Ei=typeof WeakMap=="function"&&WeakMap.prototype,ur=Ei?WeakMap.prototype.has:null,Si=typeof WeakSet=="function"&&WeakSet.prototype,sr=Si?WeakSet.prototype.has:null,xi=typeof WeakRef=="function"&&WeakRef.prototype,Sn=xi?WeakRef.prototype.deref:null,Oi=Boolean.prototype.valueOf,Pi=Object.prototype.toString,Ai=Function.prototype.toString,Ti=String.prototype.match,ct=String.prototype.slice,Ee=String.prototype.replace,$i=String.prototype.toUpperCase,xn=String.prototype.toLowerCase,On=RegExp.prototype.test,Pn=Array.prototype.concat,fe=Array.prototype.join,Ci=Array.prototype.slice,An=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dt=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ye||!0)?Symbol.toStringTag:null,Tn=Object.prototype.propertyIsEnumerable,$n=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Cn(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||On.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-An(-r):An(r);if(n!==r){var o=String(n),a=ct.call(e,o.length+1);return Ee.call(o,t,"$&_")+"."+Ee.call(Ee.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,t,"$&_")}var yt=wi,Fn=yt.custom,Mn=Dn(Fn)?Fn:null,Fi=function r(e,t,n,o){var a=t||{};if(Se(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Se(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Nn(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var i=String(e);return u?Cn(e,i):i}if(typeof e=="bigint"){var p=String(e)+"n";return u?Cn(e,p):p}var s=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return mt(e)?"[Array]":"[Object]";var b=Yi(a,n);if(typeof o>"u")o=[];else if(kn(o,e)>=0)return"[Circular]";function v(C,T,k){if(T&&(o=Ci.call(o),o.push(T)),k){var oe={depth:a.depth};return Se(a,"quoteStyle")&&(oe.quoteStyle=a.quoteStyle),r(C,oe,n+1,o)}return r(C,a,n+1,o)}if(typeof e=="function"&&!_n(e)){var E=Wi(e),d=Fr(e,v);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(d.length>0?" { "+fe.call(d,", ")+" }":"")}if(Dn(e)){var m=Ye?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(e);return typeof e=="object"&&!Ye?cr(m):m}if(qi(e)){for(var y="<"+xn.call(String(e.nodeName)),h=e.attributes||[],g=0;g<h.length;g++)y+=" "+h[g].name+"="+In(Mi(h[g].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+xn.call(String(e.nodeName))+">",y}if(mt(e)){if(e.length===0)return"[]";var w=Fr(e,v);return b&&!zi(w)?"["+ht(w,b)+"]":"[ "+fe.call(w,", ")+" ]"}if(_i(e)){var x=Fr(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!Tn.call(e,"cause")?"{ ["+String(e)+"] "+fe.call(Pn.call("[cause]: "+v(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(x,", ")+" }"}if(typeof e=="object"&&l){if(Mn&&typeof e[Mn]=="function"&&yt)return yt(e,{depth:s-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ui(e)){var P=[];return wn&&wn.call(e,function(C,T){P.push(v(T,e,!0)+" => "+v(C,e))}),jn("Map",$r.call(e),P,b)}if(Hi(e)){var D=[];return En&&En.call(e,function(C){D.push(v(C,e))}),jn("Set",Cr.call(e),D,b)}if(Bi(e))return vt("WeakMap");if(Vi(e))return vt("WeakSet");if(Ri(e))return vt("WeakRef");if(ki(e))return cr(v(Number(e)));if(ji(e))return cr(v(ft.call(e)));if(Ni(e))return cr(Oi.call(e));if(Di(e))return cr(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Jr<"u"&&e===Jr)return"{ [object globalThis] }";if(!Ii(e)&&!_n(e)){var _=Fr(e,v),U=$n?$n(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",j=!U&&Q&&Object(e)===e&&Q in e?ct.call(xe(e),8,-1):H?"Object":"",z=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=z+(j||H?"["+fe.call(Pn.call([],j||[],H||[]),": ")+"] ":"");return _.length===0?V+"{}":b?V+"{"+ht(_,b)+"}":V+"{ "+fe.call(_,", ")+" }"}return String(e)};function In(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Mi(r){return Ee.call(String(r),/"/g,""")}function mt(r){return xe(r)==="[object Array]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ii(r){return xe(r)==="[object Date]"&&(!Q||!(typeof r=="object"&&Q in r))}function _n(r){return xe(r)==="[object RegExp]"&&(!Q||!(typeof r=="object"&&Q in r))}function _i(r){return xe(r)==="[object Error]"&&(!Q||!(typeof r=="object"&&Q in r))}function Di(r){return xe(r)==="[object String]"&&(!Q||!(typeof r=="object"&&Q in r))}function ki(r){return xe(r)==="[object Number]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ni(r){return xe(r)==="[object Boolean]"&&(!Q||!(typeof r=="object"&&Q in r))}function Dn(r){if(Ye)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!pt)return!1;try{return pt.call(r),!0}catch{}return!1}function ji(r){if(!r||typeof r!="object"||!ft)return!1;try{return ft.call(r),!0}catch{}return!1}var Li=Object.prototype.hasOwnProperty||function(r){return r in this};function Se(r,e){return Li.call(r,e)}function xe(r){return Pi.call(r)}function Wi(r){if(r.name)return r.name;var e=Ti.call(Ai.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function kn(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Ui(r){if(!$r||!r||typeof r!="object")return!1;try{$r.call(r);try{Cr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Bi(r){if(!ur||!r||typeof r!="object")return!1;try{ur.call(r,ur);try{sr.call(r,sr)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Ri(r){if(!Sn||!r||typeof r!="object")return!1;try{return Sn.call(r),!0}catch{}return!1}function Hi(r){if(!Cr||!r||typeof r!="object")return!1;try{Cr.call(r);try{$r.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Vi(r){if(!sr||!r||typeof r!="object")return!1;try{sr.call(r,sr);try{ur.call(r,ur)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function qi(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Nn(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Nn(ct.call(r,0,e.maxStringLength),e)+n}var o=Ee.call(Ee.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gi);return In(o,"single",e)}function Gi(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$i.call(e.toString(16))}function cr(r){return"Object("+r+")"}function vt(r){return r+" { ? }"}function jn(r,e,t,n){var o=n?ht(t,n):fe.call(t,", ");return r+" ("+e+") {"+o+"}"}function zi(r){for(var e=0;e<r.length;e++)if(kn(r[e],`
|
|
31
|
+
`)>=0)return!1;return!0}function Yi(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=fe.call(Array(r.indent+1)," ");else return null;return{base:t,prev:fe.call(Array(e+1),t)}}function ht(r,e){if(r.length===0)return"";var t=`
|
|
32
|
+
`+e.prev+e.base;return t+fe.call(r,","+t)+`
|
|
33
|
+
`+e.prev}function Fr(r,e){var t=mt(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=Se(r,o)?e(r[o],r):""}var a=typeof dt=="function"?dt(r):[],l;if(Ye){l={};for(var u=0;u<a.length;u++)l["$"+a[u]]=a[u]}for(var i in r)Se(r,i)&&(t&&String(Number(i))===i&&i<r.length||Ye&&l["$"+i]instanceof Symbol||(On.call(/[^\w$]/,i)?n.push(e(i,r)+": "+e(r[i],r)):n.push(i+": "+e(r[i],r))));if(typeof dt=="function")for(var p=0;p<a.length;p++)Tn.call(r,a[p])&&n.push("["+e(a[p])+"]: "+e(r[a[p]],r));return n}var Ln=Ge,Ke=bi,Ki=Fi,Xi=ir,Mr=Ln("%WeakMap%",!0),Ir=Ln("%Map%",!0),Ji=Ke("WeakMap.prototype.get",!0),Qi=Ke("WeakMap.prototype.set",!0),Zi=Ke("WeakMap.prototype.has",!0),el=Ke("Map.prototype.get",!0),rl=Ke("Map.prototype.set",!0),tl=Ke("Map.prototype.has",!0),gt=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},nl=function(r,e){var t=gt(r,e);return t&&t.value},ol=function(r,e,t){var n=gt(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},al=function(r,e){return!!gt(r,e)},il=function(){var e,t,n,o={assert:function(a){if(!o.has(a))throw new Xi("Side channel does not contain "+Ki(a))},get:function(a){if(Mr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ji(e,a)}else if(Ir){if(t)return el(t,a)}else if(n)return nl(n,a)},has:function(a){if(Mr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Zi(e,a)}else if(Ir){if(t)return tl(t,a)}else if(n)return al(n,a);return!1},set:function(a,l){Mr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Mr),Qi(e,a,l)):Ir?(t||(t=new Ir),rl(t,a,l)):(n||(n={key:{},next:null}),ol(n,a,l))}};return o},ll=String.prototype.replace,ul=/%20/g,bt={RFC1738:"RFC1738",RFC3986:"RFC3986"},wt={default:bt.RFC3986,formatters:{RFC1738:function(r){return ll.call(r,ul,"+")},RFC3986:function(r){return String(r)}},RFC1738:bt.RFC1738,RFC3986:bt.RFC3986},sl=wt,Et=Object.prototype.hasOwnProperty,Fe=Array.isArray,de=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),cl=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Fe(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&o.push(n[a]);t.obj[t.prop]=o}}},Wn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},fl=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Fe(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Et.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var o=e;return Fe(e)&&!Fe(t)&&(o=Wn(e,n)),Fe(e)&&Fe(t)?(t.forEach(function(a,l){if(Et.call(e,l)){var u=e[l];u&&typeof u=="object"&&a&&typeof a=="object"?e[l]=r(u,a,n):e.push(a)}else e[l]=a}),e):Object.keys(t).reduce(function(a,l){var u=t[l];return Et.call(a,l)?a[l]=r(a[l],u,n):a[l]=u,a},o)},dl=function(e,t){return Object.keys(t).reduce(function(n,o){return n[o]=t[o],n},e)},pl=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},St=1024,yl=function(e,t,n,o,a){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(E){return"%26%23"+parseInt(E.slice(2),16)+"%3B"});for(var u="",i=0;i<l.length;i+=St){for(var p=l.length>=St?l.slice(i,i+St):l,s=[],b=0;b<p.length;++b){var v=p.charCodeAt(b);if(v===45||v===46||v===95||v===126||v>=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||a===sl.RFC1738&&(v===40||v===41)){s[s.length]=p.charAt(b);continue}if(v<128){s[s.length]=de[v];continue}if(v<2048){s[s.length]=de[192|v>>6]+de[128|v&63];continue}if(v<55296||v>=57344){s[s.length]=de[224|v>>12]+de[128|v>>6&63]+de[128|v&63];continue}b+=1,v=65536+((v&1023)<<10|p.charCodeAt(b)&1023),s[s.length]=de[240|v>>18]+de[128|v>>12&63]+de[128|v>>6&63]+de[128|v&63]}u+=s.join("")}return u},ml=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var a=t[o],l=a.obj[a.prop],u=Object.keys(l),i=0;i<u.length;++i){var p=u[i],s=l[p];typeof s=="object"&&s!==null&&n.indexOf(s)===-1&&(t.push({obj:l,prop:p}),n.push(s))}return cl(t),e},vl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},hl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},gl=function(e,t){return[].concat(e,t)},bl=function(e,t){if(Fe(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},Un={arrayToObject:Wn,assign:dl,combine:gl,compact:ml,decode:pl,encode:yl,isBuffer:hl,isRegExp:vl,maybeMap:bl,merge:fl},Bn=il,_r=Un,fr=wt,wl=Object.prototype.hasOwnProperty,Rn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},pe=Array.isArray,El=Array.prototype.push,Hn=function(r,e){El.apply(r,pe(e)?e:[e])},Sl=Date.prototype.toISOString,Vn=fr.default,K={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_r.encode,encodeValuesOnly:!1,format:Vn,formatter:fr.formatters[Vn],indices:!1,serializeDate:function(e){return Sl.call(e)},skipNulls:!1,strictNullHandling:!1},xl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},xt={},Ol=function r(e,t,n,o,a,l,u,i,p,s,b,v,E,d,m,y,h,g){for(var w=e,x=g,P=0,D=!1;(x=x.get(xt))!==void 0&&!D;){var _=x.get(e);if(P+=1,typeof _<"u"){if(_===P)throw new RangeError("Cyclic object value");D=!0}typeof x.get(xt)>"u"&&(P=0)}if(typeof s=="function"?w=s(t,w):w instanceof Date?w=E(w):n==="comma"&&pe(w)&&(w=_r.maybeMap(w,function(se){return se instanceof Date?E(se):se})),w===null){if(l)return p&&!y?p(t,K.encoder,h,"key",d):t;w=""}if(xl(w)||_r.isBuffer(w)){if(p){var U=y?t:p(t,K.encoder,h,"key",d);return[m(U)+"="+m(p(w,K.encoder,h,"value",d))]}return[m(t)+"="+m(String(w))]}var H=[];if(typeof w>"u")return H;var j;if(n==="comma"&&pe(w))y&&p&&(w=_r.maybeMap(w,p)),j=[{value:w.length>0?w.join(",")||null:void 0}];else if(pe(s))j=s;else{var z=Object.keys(w);j=b?z.sort(b):z}var V=i?t.replace(/\./g,"%2E"):t,C=o&&pe(w)&&w.length===1?V+"[]":V;if(a&&pe(w)&&w.length===0)return C+"[]";for(var T=0;T<j.length;++T){var k=j[T],oe=typeof k=="object"&&typeof k.value<"u"?k.value:w[k];if(!(u&&oe===null)){var ue=v&&i?k.replace(/\./g,"%2E"):k,me=pe(w)?typeof n=="function"?n(C,ue):C:C+(v?"."+ue:"["+ue+"]");g.set(e,P);var Z=Bn();Z.set(xt,g),Hn(H,r(oe,me,n,o,a,l,u,i,n==="comma"&&y&&pe(w)?null:p,s,b,v,E,d,m,y,h,Z))}}return H},Pl=function(e){if(!e)return K;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||K.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=fr.default;if(typeof e.format<"u"){if(!wl.call(fr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=fr.formatters[n],a=K.filter;(typeof e.filter=="function"||pe(e.filter))&&(a=e.filter);var l;if(e.arrayFormat in Rn?l=e.arrayFormat:"indices"in e?l=e.indices?"indices":"repeat":l=K.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:K.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:K.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:K.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:K.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?K.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:K.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:K.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:K.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:K.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:K.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:K.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:K.strictNullHandling}},Al=function(r,e){var t=r,n=Pl(e),o,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):pe(n.filter)&&(a=n.filter,o=a);var l=[];if(typeof t!="object"||t===null)return"";var u=Rn[n.arrayFormat],i=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(t)),n.sort&&o.sort(n.sort);for(var p=Bn(),s=0;s<o.length;++s){var b=o[s];n.skipNulls&&t[b]===null||Hn(l,Ol(t[b],b,u,i,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var v=l.join(n.delimiter),E=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),v.length>0?E+v:""},Xe=Un,Ot=Object.prototype.hasOwnProperty,Tl=Array.isArray,R={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xe.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},$l=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},qn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Cl="utf8=%26%2310003%3B",Fl="utf8=%E2%9C%93",Ml=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=o.split(t.delimiter,a),u=-1,i,p=t.charset;if(t.charsetSentinel)for(i=0;i<l.length;++i)l[i].indexOf("utf8=")===0&&(l[i]===Fl?p="utf-8":l[i]===Cl&&(p="iso-8859-1"),u=i,i=l.length);for(i=0;i<l.length;++i)if(i!==u){var s=l[i],b=s.indexOf("]="),v=b===-1?s.indexOf("="):b+1,E,d;v===-1?(E=t.decoder(s,R.decoder,p,"key"),d=t.strictNullHandling?null:""):(E=t.decoder(s.slice(0,v),R.decoder,p,"key"),d=Xe.maybeMap(qn(s.slice(v+1),t),function(y){return t.decoder(y,R.decoder,p,"value")})),d&&t.interpretNumericEntities&&p==="iso-8859-1"&&(d=$l(d)),s.indexOf("[]=")>-1&&(d=Tl(d)?[d]:d);var m=Ot.call(n,E);m&&t.duplicates==="combine"?n[E]=Xe.combine(n[E],d):(!m||t.duplicates==="last")&&(n[E]=d)}return n},Il=function(r,e,t,n){for(var o=n?e:qn(e,t),a=r.length-1;a>=0;--a){var l,u=r[a];if(u==="[]"&&t.parseArrays)l=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:[].concat(o);else{l=t.plainObjects?Object.create(null):{};var i=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,p=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,s=parseInt(p,10);!t.parseArrays&&p===""?l={0:o}:!isNaN(s)&&u!==p&&String(s)===p&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(l=[],l[s]=o):p!=="__proto__"&&(l[p]=o)}o=l}return o},_l=function(e,t,n,o){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,i=n.depth>0&&l.exec(a),p=i?a.slice(0,i.index):a,s=[];if(p){if(!n.plainObjects&&Ot.call(Object.prototype,p)&&!n.allowPrototypes)return;s.push(p)}for(var b=0;n.depth>0&&(i=u.exec(a))!==null&&b<n.depth;){if(b+=1,!n.plainObjects&&Ot.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(i[1])}if(i){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+a.slice(i.index)+"]")}return Il(s,t,n,o)}},Dl=function(e){if(!e)return R;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?R.charset:e.charset,n=typeof e.duplicates>"u"?R.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:R.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:R.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:R.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:R.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:R.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:R.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:R.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:R.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:R.decoder,delimiter:typeof e.delimiter=="string"||Xe.isRegExp(e.delimiter)?e.delimiter:R.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:R.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:R.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:R.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:R.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:R.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:R.strictNullHandling}},kl=function(r,e){var t=Dl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ml(r,t):r,o=t.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l<a.length;++l){var u=a[l],i=_l(u,n[u],t,typeof r=="string");o=Xe.merge(o,i,t)}return t.allowSparse===!0?o:Xe.compact(o)},Nl=Al,jl=kl,Ll=wt,Gn={formats:Ll,parse:jl,stringify:Nl},Wl={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
34
|
+
* @license MIT */(function(r,e){(function(t,n){r.exports=n()})(Jr,function(){var t={};t.version="0.2.0";var n=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};t.configure=function(d){var m,y;for(m in d)y=d[m],y!==void 0&&d.hasOwnProperty(m)&&(n[m]=y);return this},t.status=null,t.set=function(d){var m=t.isStarted();d=o(d,n.minimum,1),t.status=d===1?null:d;var y=t.render(!m),h=y.querySelector(n.barSelector),g=n.speed,w=n.easing;return y.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=t.getPositioningCSS()),i(h,l(d,g,w)),d===1?(i(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){i(y,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){t.remove(),x()},g)},g)):setTimeout(x,g)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var d=function(){setTimeout(function(){t.status&&(t.trickle(),d())},n.trickleSpeed)};return n.trickle&&d(),this},t.done=function(d){return!d&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(d){var m=t.status;return m?(typeof d!="number"&&(d=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+d,0,.994),t.set(m)):t.start()},t.trickle=function(){return t.inc(Math.random()*n.trickleRate)},function(){var d=0,m=0;t.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&t.start(),d++,m++,y.always(function(){m--,m===0?(d=0,t.done()):t.set((d-m)/d)}),this)}}(),t.render=function(d){if(t.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),h=d?"-100":a(t.status||0),g=document.querySelector(n.parent),w;return i(y,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),n.showSpinner||(w=m.querySelector(n.spinnerSelector),w&&E(w)),g!=document.body&&s(g,"nprogress-custom-parent"),g.appendChild(m),m},t.remove=function(){b(document.documentElement,"nprogress-busy"),b(document.querySelector(n.parent),"nprogress-custom-parent");var d=document.getElementById("nprogress");d&&E(d)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var d=document.body.style,m="WebkitTransform"in d?"Webkit":"MozTransform"in d?"Moz":"msTransform"in d?"ms":"OTransform"in d?"O":"";return m+"Perspective"in d?"translate3d":m+"Transform"in d?"translate":"margin"};function o(d,m,y){return d<m?m:d>y?y:d}function a(d){return(-1+d)*100}function l(d,m,y){var h;return n.positionUsing==="translate3d"?h={transform:"translate3d("+a(d)+"%,0,0)"}:n.positionUsing==="translate"?h={transform:"translate("+a(d)+"%,0)"}:h={"margin-left":a(d)+"%"},h.transition="all "+m+"ms "+y,h}var u=function(){var d=[];function m(){var y=d.shift();y&&y(m)}return function(y){d.push(y),d.length==1&&m()}}(),i=function(){var d=["Webkit","O","Moz","ms"],m={};function y(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(P,D){return D.toUpperCase()})}function h(x){var P=document.body.style;if(x in P)return x;for(var D=d.length,_=x.charAt(0).toUpperCase()+x.slice(1),U;D--;)if(U=d[D]+_,U in P)return U;return x}function g(x){return x=y(x),m[x]||(m[x]=h(x))}function w(x,P,D){P=g(P),x.style[P]=D}return function(x,P){var D=arguments,_,U;if(D.length==2)for(_ in P)U=P[_],U!==void 0&&P.hasOwnProperty(_)&&w(x,_,U);else w(x,D[1],D[2])}}();function p(d,m){var y=typeof d=="string"?d:v(d);return y.indexOf(" "+m+" ")>=0}function s(d,m){var y=v(d),h=y+m;p(y,m)||(d.className=h.substring(1))}function b(d,m){var y=v(d),h;p(d,m)&&(h=y.replace(" "+m+" "," "),d.className=h.substring(1,h.length-1))}function v(d){return(" "+(d.className||"")+" ").replace(/\s+/gi," ")}function E(d){d&&d.parentNode&&d.parentNode.removeChild(d)}return t})})(Wl);function Ul(r,e,t,n="brackets"){let o=/^https?:\/\//.test(e.toString()),a=o||e.toString().startsWith("/"),l=!a&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||r==="get"&&Object.keys(t).length,i=e.toString().includes("#"),p=new URL(e.toString(),"http://localhost");return r==="get"&&Object.keys(t).length&&(p.search=Gn.stringify(xa(Gn.parse(p.search,{ignoreQueryPrefix:!0}),t),{encodeValuesOnly:!0,arrayFormat:n}),t={}),[[o?`${p.protocol}//${p.host}`:"",a?p.pathname:"",l?p.pathname.substring(1):"",u?p.search:"",i?p.hash:""].join(""),t]}const Dr=f.createContext(null);Dr.displayName="ModalStackContext";let zn=null,Yn=null,Pt=null,At=null,Kn=[];const Xn=({children:r})=>{const[e,t]=f.useState([]),[n,o]=f.useState({}),a=m=>{t(y=>{const h=m([...y]),g=w=>{var x;return h.length<2?!0:((x=h.map(P=>({id:P.id,shouldRender:P.shouldRender})).reverse().find(P=>P.shouldRender))==null?void 0:x.id)===w};return h.forEach((w,x)=>{h[x].onTopOfStack=g(w.id),h[x].getParentModal=()=>x<1?null:h.slice(0,x).reverse().find(P=>P.isOpen),h[x].getChildModal=()=>x===h.length-1?null:h.slice(x+1).find(P=>P.isOpen)}),h})};f.useEffect(()=>{Kn=e},[e]);class l{constructor(y,h,g,w,x){ce(this,"update",(y,h,g)=>{a(w=>w.map(x=>(x.id===this.id&&(x.config=y,x.onCloseCallback=h,x.afterLeaveCallback=g),x)))});ce(this,"show",()=>{a(y=>y.map(h=>(h.id===this.id&&!h.isOpen&&(h.isOpen=!0,h.shouldRender=!0),h)))});ce(this,"setOpen",y=>{y?this.show():this.close()});ce(this,"close",()=>{a(y=>y.map(h=>{var g;return h.id===this.id&&h.isOpen&&(Object.keys(h.listeners).forEach(w=>{h.off(w)}),h.isOpen=!1,(g=h.onCloseCallback)==null||g.call(h)),h}))});ce(this,"afterLeave",()=>{this.isOpen||a(y=>{const h=y.map(g=>{var w;return g.id===this.id&&!g.isOpen&&(g.shouldRender=!1,(w=g.afterLeaveCallback)==null||w.call(g),g.afterLeaveCallback=null),g});return this.index===0?[]:h})});ce(this,"on",(y,h)=>{this.listeners[y]=this.listeners[y]??[],this.listeners[y].push(h)});ce(this,"off",(y,h)=>{var g;h?this.listeners[y]=((g=this.listeners[y])==null?void 0:g.filter(w=>w!==h))??[]:delete this.listeners[y]});ce(this,"emit",(y,...h)=>{var g;(g=this.listeners[y])==null||g.forEach(w=>w(...h))});ce(this,"registerEventListenersFromProps",y=>{const h=[];return Object.keys(y).filter(g=>g.startsWith("on")).forEach(g=>{const w=g.replace(/^on/,"").replace(/^./,x=>x.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,y[g]),h.push(()=>this.off(w,y[g]))}),()=>h.forEach(g=>g())});ce(this,"reload",(y={})=>{var g;let h=Object.keys(this.response.props);y.only&&(h=Zt(h,y.only)),y.except&&(h=ia(h,y.except)),(g=this.response)!=null&&g.url&&ve.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":h.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(w=>{Object.assign(this.props,w.data.props),a(x=>x)})});this.id=l.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=y,this.props=h.props,this.response=h,this.config=g,this.onCloseCallback=w,this.afterLeaveCallback=x,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const u=(m,y={},h=null,g=null)=>Yn(m.component).then(w=>i(w,m,y,h,g)),i=(m,y,h,g,w)=>{const x=new l(m,y,h,g,w);return x.index=e.length,a(P=>[...P,x]),x.show(),x};function p(m,y,h,g){if(!n[m])throw new Error(`The local modal "${m}" has not been registered.`);const w=i(null,{},y,h,g);return w.name=m,n[m].callback(w),w}const s=(m,y={})=>b(m,y.method??"get",y.data??{},y.headers??{},y.config??{},y.onClose,y.onAfterLeave,y.queryStringArrayFormat??"brackets",y.navigate??Or("navigate")),b=(m,y,h={},g={},w={},x=null,P=null,D="brackets",_=!1)=>new Promise((U,H)=>{if(m.startsWith("#")){U(p(m.substring(1),w,x,P));return}const[j,z]=Ul(y,m||"",h,D);let V=_&&e.length===0;if(e.length===0&&(Pt=typeof window<"u"?window.location.href:""),g={...g,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":zn,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":V?1:0},V)return rr.router.visit(j,{method:y,data:z,headers:g,preserveScroll:!0,preserveState:!0,onError:H,onFinish:()=>{ua(()=>At).then(C=>{const T=C.onCloseCallback,k=C.afterLeaveCallback;C.update(w,()=>{x==null||x(),T==null||T()},()=>{P==null||P(),k==null||k()}),U(C),At=null})}});ve({url:j,method:y,data:z,headers:g}).then(C=>U(u(C.data,w,x,P))).catch(C=>{H(C)})}),d={stack:e,localModals:n,push:i,pushFromResponseData:u,closeAll:()=>{Kn.reverse().forEach(m=>m.close())},reset:()=>a(()=>[]),visit:b,visitModal:s,registerLocalModal:(m,y)=>{o(h=>({...h,[m]:{name:m,callback:y}}))},removeLocalModal:m=>{o(y=>{const h={...y};return delete h[m],h})}};return $.jsx(Dr.Provider,{value:d,children:r})},dr=()=>{const r=f.useContext(Dr);if(r===null)throw new Error("useModalStack must be used within a ModalStackProvider");return r},Jn=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Bl=(r,e)=>{e.initialPage&&(zn=e.initialPage.version),e.resolveComponent&&(Yn=e.resolveComponent);const t=({Component:n,props:o,key:a})=>{const l=()=>{const u=f.createElement(n,{key:a,...o});return typeof n.layout=="function"?n.layout(u):Array.isArray(n.layout)?n.layout.concat(u).reverse().reduce((p,s)=>f.createElement(s,o,p)):u};return $.jsxs($.Fragment,{children:[l(),$.jsx(Qn,{})]})};return $.jsx(Xn,{children:$.jsx(r,{...e,children:t})})},Qn=({children:r})=>{const e=f.useContext(Dr);let t=!1,n=!1;f.useEffect(()=>rr.router.on("start",()=>t=!0),[]),f.useEffect(()=>rr.router.on("finish",()=>t=!1),[]),f.useEffect(()=>rr.router.on("navigate",function(a){const l=a.detail.page.props._inertiaui_modal;if(!l){n&&e.closeAll();return}n=l,Pt=l.baseUrl,e.pushFromResponseData(l,{},()=>{if(!l.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!t&&window.location.href!==l.baseUrl&&rr.router.visit(l.baseUrl,{preserveScroll:!0,preserveState:!0})}).then(u=>{At=u})}),[]);const o=a=>(a.headers["X-InertiaUI-Modal-Base-Url"]=Pt,a);return f.useEffect(()=>(ve.interceptors.request.use(o),()=>ve.interceptors.request.eject(o)),[]),$.jsxs($.Fragment,{children:[r,e.stack.length>0&&$.jsx(Zn,{index:0})]})},Tt=f.createContext(null);Tt.displayName="ModalIndexContext";const $t=()=>{const r=f.useContext(Tt);if(r===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return r},Zn=({index:r})=>{const{stack:e}=dr(),t=f.useMemo(()=>e[r],[e,r]);return(t==null?void 0:t.component)&&$.jsx(Tt.Provider,{value:r,children:$.jsx(t.component,{...t.props,onModalEvent:(...n)=>t.emit(...n)})})},Ct=f.forwardRef(({name:r,children:e,...t},n)=>{const o=$t(),{stack:a,registerLocalModal:l,removeLocalModal:u}=dr(),[i,p]=f.useState(null),s=f.useMemo(()=>r?i:a[o],[r,i,o,a]),b=f.useMemo(()=>{var d;return(d=a.find(m=>m.shouldRender&&m.index>(s==null?void 0:s.index)))==null?void 0:d.index},[o,a]),v=f.useMemo(()=>(s==null?void 0:s.config.slideover)??t.slideover??Or("type")==="slideover",[t.slideover]),E=f.useMemo(()=>({slideover:v,closeButton:t.closeButton??Ue(v,"closeButton"),closeExplicitly:t.closeExplicitly??Ue(v,"closeExplicitly"),maxWidth:t.maxWidth??Ue(v,"maxWidth"),paddingClasses:t.paddingClasses??Ue(v,"paddingClasses"),panelClasses:t.panelClasses??Ue(v,"panelClasses"),position:t.position??Ue(v,"position"),...s==null?void 0:s.config}),[t,s==null?void 0:s.config]);return f.useEffect(()=>{if(r){let d=null;return l(r,m=>{d=m.registerEventListenersFromProps(t),p(m)}),()=>{d==null||d(),d=null,u(r)}}return s.registerEventListenersFromProps(t)},[r]),f.useImperativeHandle(n,()=>({afterLeave:()=>s.afterLeave(),close:()=>s.close(),config:E,emit:(...d)=>s.emit(...d),getChildModal:()=>s.getChildModal(),getParentModal:()=>s.getParentModal(),id:s==null?void 0:s.id,index:s==null?void 0:s.index,isOpen:s==null?void 0:s.isOpen,modalContext:s,onTopOfStack:s==null?void 0:s.onTopOfStack,reload:()=>s.reload(),setOpen:()=>s.setOpen(),shouldRender:s==null?void 0:s.shouldRender}),[s]),(s==null?void 0:s.shouldRender)&&$.jsxs($.Fragment,{children:[typeof e=="function"?e({afterLeave:s.afterLeave,close:s.close,config:E,emit:s.emit,getChildModal:s.getChildModal,getParentModal:s.getParentModal,id:s.id,index:s.index,isOpen:s.isOpen,modalContext:s,onTopOfStack:s.onTopOfStack,reload:s.reload,setOpen:s.setOpen,shouldRender:s.shouldRender}):e,b&&$.jsx(Zn,{index:b})]})});Ct.displayName="HeadlessModal";function eo(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(e=0;e<o;e++)r[e]&&(t=eo(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function kr(){for(var r,e,t=0,n="",o=arguments.length;t<o;t++)(r=arguments[t])&&(e=eo(r))&&(n&&(n+=" "),n+=e);return n}var Rl=Object.defineProperty,Hl=(r,e,t)=>e in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ft=(r,e,t)=>(Hl(r,typeof e!="symbol"?e+"":e,t),t);let Vl=class{constructor(){Ft(this,"current",this.detect()),Ft(this,"handoffState","pending"),Ft(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Me=new Vl;function Nr(r){return Me.isServer?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}function jr(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(e=>setTimeout(()=>{throw e}))}function Oe(){let r=[],e={addEventListener(t,n,o,a){return t.addEventListener(n,o,a),e.add(()=>t.removeEventListener(n,o,a))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return jr(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,o){let a=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:a})})},group(t){let n=Oe();return t(n),this.add(()=>n.dispose())},add(t){return r.includes(t)||r.push(t),()=>{let n=r.indexOf(t);if(n>=0)for(let o of r.splice(n,1))o()}},dispose(){for(let t of r.splice(0))t()}};return e}function Mt(){let[r]=f.useState(Oe);return f.useEffect(()=>()=>r.dispose(),[r]),r}let ee=(r,e)=>{Me.isServer?f.useEffect(r,e):f.useLayoutEffect(r,e)};function Ie(r){let e=f.useRef(r);return ee(()=>{e.current=r},[r]),e}let B=function(r){let e=Ie(r);return f.useCallback((...t)=>e.current(...t),[e])},ql=f.createContext(void 0);function Gl(){return f.useContext(ql)}function It(...r){return Array.from(new Set(r.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Pe(r,e,...t){if(r in e){let o=e[r];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pe),n}var Lr=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Lr||{}),Ae=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Ae||{});function ae(){let r=Yl();return f.useCallback(e=>zl({mergeRefs:r,...e}),[r])}function zl({ourProps:r,theirProps:e,slot:t,defaultTag:n,features:o,visible:a=!0,name:l,mergeRefs:u}){u=u??Kl;let i=ro(e,r);if(a)return Wr(i,t,n,l,u);let p=o??0;if(p&2){let{static:s=!1,...b}=i;if(s)return Wr(b,t,n,l,u)}if(p&1){let{unmount:s=!0,...b}=i;return Pe(s?0:1,{0(){return null},1(){return Wr({...b,hidden:!0,style:{display:"none"}},t,n,l,u)}})}return Wr(i,t,n,l,u)}function Wr(r,e={},t,n,o){let{as:a=t,children:l,refName:u="ref",...i}=_t(r,["unmount","static"]),p=r.ref!==void 0?{[u]:r.ref}:{},s=typeof l=="function"?l(e):l;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(e)),i["aria-labelledby"]&&i["aria-labelledby"]===i.id&&(i["aria-labelledby"]=void 0);let b={};if(e){let v=!1,E=[];for(let[d,m]of Object.entries(e))typeof m=="boolean"&&(v=!0),m===!0&&E.push(d.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){b["data-headlessui-state"]=E.join(" ");for(let d of E)b[`data-${d}`]=""}}if(a===f.Fragment&&(Object.keys(_e(i)).length>0||Object.keys(_e(b)).length>0))if(!f.isValidElement(s)||Array.isArray(s)&&s.length>1){if(Object.keys(_e(i)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_e(i)).concat(Object.keys(_e(b))).map(v=>` - ${v}`).join(`
|
|
35
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(v=>` - ${v}`).join(`
|
|
36
36
|
`)].join(`
|
|
37
|
-
`))}else{let m=s.props,E=m==null?void 0:m.className,d=typeof E=="function"?(...h)=>Ir(E(...h),a.className):Ir(E,a.className),v=d?{className:d}:{},y=to(s.props,_e(_r(a,["ref"])));for(let h in g)h in y&&delete g[h];return f.cloneElement(s,Object.assign({},y,g,p,{ref:o(s.ref,p.ref)},v))}return f.createElement(i,Object.assign({},_r(a,["ref"]),i!==f.Fragment&&p,i!==f.Fragment&&g),s)}function Yl(){let t=f.useRef([]),e=f.useCallback(r=>{for(let n of t.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return t.current=r,e}}function Kl(...t){return t.every(e=>e==null)?void 0:e=>{for(let r of t)r!=null&&(typeof r=="function"?r(e):r.current=e)}}function to(...t){if(t.length===0)return{};if(t.length===1)return t[0];let e={},r={};for(let n of t)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):e[o]=n[o];if(e.disabled||e["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(e,{[n](o,...i){let l=r[n];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...i)}}});return e}function re(t){var e;return Object.assign(f.forwardRef(t),{displayName:(e=t.displayName)!=null?e:t.name})}function _e(t){let e=Object.assign({},t);for(let r in e)e[r]===void 0&&delete e[r];return e}function _r(t,e=[]){let r=Object.assign({},t);for(let n of e)n in r&&delete r[n];return r}let Xl="span";var Ut=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(Ut||{});function Jl(t,e){var r;let{features:n=1,...o}=t,i={ref:e,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ie()({ourProps:i,theirProps:o,slot:{},defaultTag:Xl,name:"Hidden"})}let Dr=re(Jl),ro=Symbol();function Ql(t,e=!0){return Object.assign(t,{[ro]:e})}function ye(...t){let e=f.useRef(t);f.useEffect(()=>{e.current=t},[t]);let r=B(n=>{for(let o of e.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return t.every(n=>n==null||(n==null?void 0:n[ro]))?void 0:r}let kr=f.createContext(null);kr.displayName="DescriptionContext";function no(){let t=f.useContext(kr);if(t===null){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,no),e}return t}function Zl(){let[t,e]=f.useState([]);return[t.length>0?t.join(" "):void 0,f.useMemo(()=>function(r){let n=B(i=>(e(l=>[...l,i]),()=>e(l=>{let u=l.slice(),a=u.indexOf(i);return a!==-1&&u.splice(a,1),u}))),o=f.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props,value:r.value}),[n,r.slot,r.name,r.props,r.value]);return f.createElement(kr.Provider,{value:o},r.children)},[e])]}let eu="p";function tu(t,e){let r=f.useId(),n=Gl(),{id:o=`headlessui-description-${r}`,...i}=t,l=no(),u=ye(e);ee(()=>l.register(o),[o,l.register]);let a=n||!1,p=f.useMemo(()=>({...l.slot,disabled:a}),[l.slot,a]),s={ref:u,...l.props,id:o};return ie()({ourProps:s,theirProps:i,slot:p,defaultTag:eu,name:l.name||"Description"})}let ru=re(tu),nu=Object.assign(ru,{});var oo=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(oo||{});let ou=f.createContext(()=>{});function iu({value:t,children:e}){return f.createElement(ou.Provider,{value:t},e)}let au=class extends Map{constructor(e){super(),this.factory=e}get(e){let r=super.get(e);return r===void 0&&(r=this.factory(e),this.set(e,r)),r}};function io(t,e){let r=t(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let l=e[o].call(r,...i);l&&(r=l,n.forEach(u=>u()))}}}function ao(t){return f.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)}let lu=new au(()=>io(()=>[],{ADD(t){return this.includes(t)?this:[...this,t]},REMOVE(t){let e=this.indexOf(t);if(e===-1)return this;let r=this.slice();return r.splice(e,1),r}}));function Je(t,e){let r=lu.get(e),n=f.useId(),o=ao(r);if(ee(()=>{if(t)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,t]),!t)return!1;let i=o.indexOf(n),l=o.length;return i===-1&&(i=l,l+=1),i===l-1}let Nr=new Map,dt=new Map;function lo(t){var e;let r=(e=dt.get(t))!=null?e:0;return dt.set(t,r+1),r!==0?()=>uo(t):(Nr.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0,()=>uo(t))}function uo(t){var e;let r=(e=dt.get(t))!=null?e:1;if(r===1?dt.delete(t):dt.set(t,r-1),r!==1)return;let n=Nr.get(t);n&&(n["aria-hidden"]===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",n["aria-hidden"]),t.inert=n.inert,Nr.delete(t))}function uu(t,{allowed:e,disallowed:r}={}){let n=Je(t,"inert-others");ee(()=>{var o,i;if(!n)return;let l=Oe();for(let a of(o=r==null?void 0:r())!=null?o:[])a&&l.add(lo(a));let u=(i=e==null?void 0:e())!=null?i:[];for(let a of u){if(!a)continue;let p=Nt(a);if(!p)continue;let s=a.parentElement;for(;s&&s!==p.body;){for(let g of s.children)u.some(m=>g.contains(m))||l.add(lo(g));s=s.parentElement}}return l.dispose},[n,e,r])}function su(t,e,r){let n=Ie(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});f.useEffect(()=>{if(!t)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let i=Oe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),i.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),i.add(()=>l.disconnect())}return()=>i.dispose()},[e,n,t])}let Bt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(","),cu=["[data-autofocus]"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var he=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t))(he||{}),jr=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(jr||{}),fu=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(fu||{});function du(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(Bt)).sort((e,r)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function pu(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(cu)).sort((e,r)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var so=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(so||{});function yu(t,e=0){var r;return t===((r=Nt(t))==null?void 0:r.body)?!1:Pe(e,{0(){return t.matches(Bt)},1(){let n=t;for(;n!==null;){if(n.matches(Bt))return!0;n=n.parentElement}return!1}})}var vu=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(vu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ge(t){t==null||t.focus({preventScroll:!0})}let mu=["textarea","input"].join(",");function hu(t){var e,r;return(r=(e=t==null?void 0:t.matches)==null?void 0:e.call(t,mu))!=null?r:!1}function gu(t,e=r=>r){return t.slice().sort((r,n)=>{let o=e(r),i=e(n);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function pt(t,e,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,l=Array.isArray(t)?r?gu(t):t:e&64?pu(t):du(t);o.length>0&&l.length>1&&(l=l.filter(E=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===E:d===E))),n=n??i.activeElement;let u=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,l.indexOf(n))-1;if(e&4)return Math.max(0,l.indexOf(n))+1;if(e&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=e&32?{preventScroll:!0}:{},s=0,g=l.length,m;do{if(s>=g||s+g<=0)return 0;let E=a+s;if(e&16)E=(E+g)%g;else{if(E<0)return 3;if(E>=g)return 1}m=l[E],m==null||m.focus(p),s+=u}while(m!==i.activeElement);return e&6&&hu(m)&&m.select(),2}function co(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function bu(){return/Android/gi.test(window.navigator.userAgent)}function wu(){return co()||bu()}function yt(t,e,r,n){let o=Ie(r);f.useEffect(()=>{if(!t)return;function i(l){o.current(l)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[t,e,n])}function fo(t,e,r,n){let o=Ie(r);f.useEffect(()=>{if(!t)return;function i(l){o.current(l)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[t,e,n])}const po=30;function Eu(t,e,r){let n=Je(t,"outside-click"),o=Ie(r),i=f.useCallback(function(a,p){if(a.defaultPrevented)return;let s=p(a);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let g=function m(E){return typeof E=="function"?m(E()):Array.isArray(E)||E instanceof Set?E:[E]}(e);for(let m of g)if(m!==null&&(m.contains(s)||a.composed&&a.composedPath().includes(m)))return;return!yu(s,so.Loose)&&s.tabIndex!==-1&&a.preventDefault(),o.current(a,s)},[o,e]),l=f.useRef(null);yt(n,"pointerdown",a=>{var p,s;l.current=((s=(p=a.composedPath)==null?void 0:p.call(a))==null?void 0:s[0])||a.target},!0),yt(n,"mousedown",a=>{var p,s;l.current=((s=(p=a.composedPath)==null?void 0:p.call(a))==null?void 0:s[0])||a.target},!0),yt(n,"click",a=>{wu()||l.current&&(i(a,()=>l.current),l.current=null)},!0);let u=f.useRef({x:0,y:0});yt(n,"touchstart",a=>{u.current.x=a.touches[0].clientX,u.current.y=a.touches[0].clientY},!0),yt(n,"touchend",a=>{let p={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(p.x-u.current.x)>=po||Math.abs(p.y-u.current.y)>=po))return i(a,()=>a.target instanceof HTMLElement?a.target:null)},!0),fo(n,"blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function vt(...t){return f.useMemo(()=>Nt(...t),[...t])}function yo(t,e,r,n){let o=Ie(r);f.useEffect(()=>{t=t??window;function i(l){o.current(l)}return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)},[t,e,n])}function Su(){let t;return{before({doc:e}){var r;let n=e.documentElement,o=(r=e.defaultView)!=null?r:window;t=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:e,d:r}){let n=e.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,t-o);r.style(n,"paddingRight",`${i}px`)}}}function xu(){return co()?{before({doc:t,d:e,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}e.microTask(()=>{var o;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let u=Oe();u.style(t.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>u.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;e.addEventListener(t,"click",u=>{if(u.target instanceof HTMLElement)try{let a=u.target.closest("a");if(!a)return;let{hash:p}=new URL(a.href),s=t.querySelector(p);s&&!n(s)&&(l=s)}catch{}},!0),e.addEventListener(t,"touchstart",u=>{if(u.target instanceof HTMLElement)if(n(u.target)){let a=u.target;for(;a.parentElement&&n(a.parentElement);)a=a.parentElement;e.style(a,"overscrollBehavior","contain")}else e.style(u.target,"touchAction","none")}),e.addEventListener(t,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(n(u.target)){let a=u.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),e.add(()=>{var u;let a=(u=window.scrollY)!=null?u:window.pageYOffset;i!==a&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Ou(){return{before({doc:t,d:e}){e.style(t.documentElement,"overflow","hidden")}}}function Pu(t){let e={};for(let r of t)Object.assign(e,r(e));return e}let De=io(()=>new Map,{PUSH(t,e){var r;let n=(r=this.get(t))!=null?r:{doc:t,count:0,d:Oe(),meta:new Set};return n.count++,n.meta.add(e),this.set(t,n),this},POP(t,e){let r=this.get(t);return r&&(r.count--,r.meta.delete(e)),this},SCROLL_PREVENT({doc:t,d:e,meta:r}){let n={doc:t,d:e,meta:Pu(r)},o=[xu(),Su(),Ou()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});De.subscribe(()=>{let t=De.getSnapshot(),e=new Map;for(let[r]of t)e.set(r,r.documentElement.style.overflow);for(let r of t.values()){let n=e.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&De.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&De.dispatch("TEARDOWN",r)}});function Au(t,e,r=()=>({containers:[]})){let n=ao(De),o=e?n.get(e):void 0,i=o?o.count>0:!1;return ee(()=>{if(!(!e||!t))return De.dispatch("PUSH",e,r),()=>De.dispatch("POP",e,r)},[t,e]),i}function Tu(t,e,r=()=>[document.body]){let n=Je(t,"scroll-lock");Au(n,e,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function $u(t=0){let[e,r]=f.useState(t),n=f.useCallback(a=>r(a),[e]),o=f.useCallback(a=>r(p=>p|a),[e]),i=f.useCallback(a=>(e&a)===a,[e]),l=f.useCallback(a=>r(p=>p&~a),[r]),u=f.useCallback(a=>r(p=>p^a),[r]);return{flags:e,setFlag:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:u}}var vo,mo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((vo=process==null?void 0:process.env)==null?void 0:vo.NODE_ENV)==="test"&&typeof((mo=Element==null?void 0:Element.prototype)==null?void 0:mo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
38
|
-
`)),[]});var Cu=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(Cu||{});function Fu(t){let e={};for(let r in t)t[r]===!0&&(e[`data-${r}`]="");return e}function Mu(t,e,r,n){let[o,i]=f.useState(r),{hasFlag:l,addFlag:u,removeFlag:a}=$u(t&&o?3:0),p=f.useRef(!1),s=f.useRef(!1),g=Mr();return ee(()=>{var m;if(t){if(r&&i(!0),!e){r&&u(3);return}return(m=n==null?void 0:n.start)==null||m.call(n,r),Iu(e,{inFlight:p,prepare(){s.current?s.current=!1:s.current=p.current,p.current=!0,!s.current&&(r?(u(3),a(4)):(u(4),a(2)))},run(){s.current?r?(a(3),u(4)):(a(4),u(3)):r?a(1):u(1)},done(){var E;s.current&&typeof e.getAnimations=="function"&&e.getAnimations().length>0||(p.current=!1,a(7),r||i(!1),(E=n==null?void 0:n.end)==null||E.call(n,r))}})}},[t,r,e,g]),t?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Iu(t,{prepare:e,run:r,done:n,inFlight:o}){let i=Oe();return Du(t,{prepare:e,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(_u(t,n))})}),i.dispose}function _u(t,e){var r,n;let o=Oe();if(!t)return o.dispose;let i=!1;o.add(()=>{i=!0});let l=(n=(r=t.getAnimations)==null?void 0:r.call(t).filter(u=>u instanceof CSSTransition))!=null?n:[];return l.length===0?(e(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{i||e()}),o.dispose)}function Du(t,{inFlight:e,prepare:r}){if(e!=null&&e.current){r();return}let n=t.style.transition;t.style.transition="none",r(),t.offsetHeight,t.style.transition=n}function Lr(t,e){let r=f.useRef([]),n=B(t);f.useEffect(()=>{let o=[...r.current];for(let[i,l]of e.entries())if(r.current[i]!==l){let u=n(e,o);return r.current=e,u}},[n,...e])}let Rt=f.createContext(null);Rt.displayName="OpenClosedContext";var le=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(le||{});function Ht(){return f.useContext(Rt)}function ku({value:t,children:e}){return f.createElement(Rt.Provider,{value:t},e)}function Nu({children:t}){return f.createElement(Rt.Provider,{value:null},t)}function ju(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Te=[];ju(()=>{function t(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Te[0]===e.target)return;let r=e.target;r=r.closest(Bt),Te.unshift(r??e.target),Te=Te.filter(n=>n!=null&&n.isConnected),Te.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function ho(t){let e=B(t),r=f.useRef(!1);f.useEffect(()=>(r.current=!1,()=>{r.current=!0,jt(()=>{r.current&&e()})}),[e])}function Lu(){let t=typeof document>"u";return"useSyncExternalStore"in rt?(e=>e.useSyncExternalStore)(rt)(()=>()=>{},()=>!1,()=>!t):!1}function mt(){let t=Lu(),[e,r]=rt.useState(Me.isHandoffComplete);return e&&Me.isHandoffComplete===!1&&r(!1),rt.useEffect(()=>{e!==!0&&r(!0)},[e]),rt.useEffect(()=>Me.handoff(),[]),t?!1:e}let go=f.createContext(!1);function Wu(){return f.useContext(go)}function bo(t){return f.createElement(go.Provider,{value:t.force},t.children)}function Uu(t){let e=Wu(),r=f.useContext(Eo),n=vt(t),[o,i]=f.useState(()=>{var l;if(!e&&r!==null)return(l=r.current)!=null?l:null;if(Me.isServer)return null;let u=n==null?void 0:n.getElementById("headlessui-portal-root");if(u)return u;if(n===null)return null;let a=n.createElement("div");return a.setAttribute("id","headlessui-portal-root"),n.body.appendChild(a)});return f.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),f.useEffect(()=>{e||r!==null&&i(r.current)},[r,i,e]),o}let wo=f.Fragment,Bu=re(function(t,e){let r=t,n=f.useRef(null),o=ye(Ql(g=>{n.current=g}),e),i=vt(n),l=Uu(n),[u]=f.useState(()=>{var g;return Me.isServer?null:(g=i==null?void 0:i.createElement("div"))!=null?g:null}),a=f.useContext(Wr),p=mt();ee(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ee(()=>{if(u&&a)return a.register(u)},[a,u]),ho(()=>{var g;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((g=l.parentElement)==null||g.removeChild(l)))});let s=ie();return p?!l||!u?null:Jo.createPortal(s({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:wo,name:"Portal"}),u):null});function Ru(t,e){let r=ye(e),{enabled:n=!0,...o}=t,i=ie();return n?f.createElement(Bu,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:wo,name:"Portal"})}let Hu=f.Fragment,Eo=f.createContext(null);function Vu(t,e){let{target:r,...n}=t,o={ref:ye(e)},i=ie();return f.createElement(Eo.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:Hu,name:"Popover.Group"}))}let Wr=f.createContext(null);function qu(){let t=f.useContext(Wr),e=f.useRef([]),r=B(i=>(e.current.push(i),t&&t.register(i),()=>n(i))),n=B(i=>{let l=e.current.indexOf(i);l!==-1&&e.current.splice(l,1),t&&t.unregister(i)}),o=f.useMemo(()=>({register:r,unregister:n,portals:e}),[r,n,e]);return[e,f.useMemo(()=>function({children:i}){return f.createElement(Wr.Provider,{value:o},i)},[o])]}let Gu=re(Ru),So=re(Vu),zu=Object.assign(Gu,{Group:So});function Yu(t,e=typeof document<"u"?document.defaultView:null,r){let n=Je(t,"escape");yo(e,"keydown",o=>{n&&(o.defaultPrevented||o.key===oo.Escape&&r(o))})}function Ku(){var t;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[r,n]=f.useState((t=e==null?void 0:e.matches)!=null?t:!1);return ee(()=>{if(!e)return;function o(i){n(i.matches)}return e.addEventListener("change",o),()=>e.removeEventListener("change",o)},[e]),r}function Xu({defaultContainers:t=[],portals:e,mainTreeNode:r}={}){let n=vt(r),o=B(()=>{var i,l;let u=[];for(let a of t)a!==null&&(a instanceof HTMLElement?u.push(a):"current"in a&&a.current instanceof HTMLElement&&u.push(a.current));if(e!=null&&e.current)for(let a of e.current)u.push(a);for(let a of(i=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?i:[])a!==document.body&&a!==document.head&&a instanceof HTMLElement&&a.id!=="headlessui-portal-root"&&(r&&(a.contains(r)||a.contains((l=r==null?void 0:r.getRootNode())==null?void 0:l.host))||u.some(p=>a.contains(p))||u.push(a));return u});return{resolveContainers:o,contains:B(i=>o().some(l=>l.contains(i)))}}let xo=f.createContext(null);function Oo({children:t,node:e}){let[r,n]=f.useState(null),o=Po(e??r);return f.createElement(xo.Provider,{value:o},t,o===null&&f.createElement(Dr,{features:Ut.Hidden,ref:i=>{var l,u;if(i){for(let a of(u=(l=Nt(i))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(a!==document.body&&a!==document.head&&a instanceof HTMLElement&&a!=null&&a.contains(i)){n(a);break}}}}))}function Po(t=null){var e;return(e=f.useContext(xo))!=null?e:t}function Ur(){let t=f.useRef(!1);return ee(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var ht=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(ht||{});function Ju(){let t=f.useRef(0);return fo(!0,"keydown",e=>{e.key==="Tab"&&(t.current=e.shiftKey?1:0)},!0),t}function Ao(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let e=new Set;for(let r of t.current)r.current instanceof HTMLElement&&e.add(r.current);return e}let Qu="div";var ke=(t=>(t[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t))(ke||{});function Zu(t,e){let r=f.useRef(null),n=ye(r,e),{initialFocus:o,initialFocusFallback:i,containers:l,features:u=15,...a}=t;mt()||(u=0);let p=vt(r);ns(u,{ownerDocument:p});let s=os(u,{ownerDocument:p,container:r,initialFocus:o,initialFocusFallback:i});is(u,{ownerDocument:p,container:r,containers:l,previousActiveElement:s});let g=Ju(),m=B(b=>{let w=r.current;w&&(x=>x())(()=>{Pe(g.current,{[ht.Forwards]:()=>{pt(w,he.First,{skipElements:[b.relatedTarget,i]})},[ht.Backwards]:()=>{pt(w,he.Last,{skipElements:[b.relatedTarget,i]})}})})}),E=Je(!!(u&2),"focus-trap#tab-lock"),d=Mr(),v=f.useRef(!1),y={ref:n,onKeyDown(b){b.key=="Tab"&&(v.current=!0,d.requestAnimationFrame(()=>{v.current=!1}))},onBlur(b){if(!(u&4))return;let w=Ao(l);r.current instanceof HTMLElement&&w.add(r.current);let x=b.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(To(w,x)||(v.current?pt(r.current,Pe(g.current,{[ht.Forwards]:()=>he.Next,[ht.Backwards]:()=>he.Previous})|he.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&ge(b.target)))}},h=ie();return f.createElement(f.Fragment,null,E&&f.createElement(Dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:Ut.Focusable}),h({ourProps:y,theirProps:a,defaultTag:Qu,name:"FocusTrap"}),E&&f.createElement(Dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:Ut.Focusable}))}let es=re(Zu),ts=Object.assign(es,{features:ke});function rs(t=!0){let e=f.useRef(Te.slice());return Lr(([r],[n])=>{n===!0&&r===!1&&jt(()=>{e.current.splice(0)}),n===!1&&r===!0&&(e.current=Te.slice())},[t,Te,e]),B(()=>{var r;return(r=e.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function ns(t,{ownerDocument:e}){let r=!!(t&8),n=rs(r);Lr(()=>{r||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ge(n())},[r]),ho(()=>{r&&ge(n())})}function os(t,{ownerDocument:e,container:r,initialFocus:n,initialFocusFallback:o}){let i=f.useRef(null),l=Je(!!(t&1),"focus-trap#initial-focus"),u=Ur();return Lr(()=>{if(t===0)return;if(!l){o!=null&&o.current&&ge(o.current);return}let a=r.current;a&&jt(()=>{if(!u.current)return;let p=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===p){i.current=p;return}}else if(a.contains(p)){i.current=p;return}if(n!=null&&n.current)ge(n.current);else{if(t&16){if(pt(a,he.First|he.AutoFocus)!==jr.Error)return}else if(pt(a,he.First)!==jr.Error)return;if(o!=null&&o.current&&(ge(o.current),(e==null?void 0:e.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=e==null?void 0:e.activeElement})},[o,l,t]),i}function is(t,{ownerDocument:e,container:r,containers:n,previousActiveElement:o}){let i=Ur(),l=!!(t&4);yo(e==null?void 0:e.defaultView,"focus",u=>{if(!l||!i.current)return;let a=Ao(n);r.current instanceof HTMLElement&&a.add(r.current);let p=o.current;if(!p)return;let s=u.target;s&&s instanceof HTMLElement?To(a,s)?(o.current=s,ge(s)):(u.preventDefault(),u.stopPropagation(),ge(p)):ge(o.current)},!0)}function To(t,e){for(let r of t)if(r.contains(e))return!0;return!1}function $o(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||((e=t.as)!=null?e:Fo)!==f.Fragment||f.Children.count(t.children)===1}let Vt=f.createContext(null);Vt.displayName="TransitionContext";var as=(t=>(t.Visible="visible",t.Hidden="hidden",t))(as||{});function ls(){let t=f.useContext(Vt);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function us(){let t=f.useContext(qt);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let qt=f.createContext(null);qt.displayName="NestingContext";function Gt(t){return"children"in t?Gt(t.children):t.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Co(t,e){let r=Ie(t),n=f.useRef([]),o=Ur(),i=Mr(),l=B((E,d=Ae.Hidden)=>{let v=n.current.findIndex(({el:y})=>y===E);v!==-1&&(Pe(d,{[Ae.Unmount](){n.current.splice(v,1)},[Ae.Hidden](){n.current[v].state="hidden"}}),i.microTask(()=>{var y;!Gt(n)&&o.current&&((y=r.current)==null||y.call(r))}))}),u=B(E=>{let d=n.current.find(({el:v})=>v===E);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:E,state:"visible"}),()=>l(E,Ae.Unmount)}),a=f.useRef([]),p=f.useRef(Promise.resolve()),s=f.useRef({enter:[],leave:[]}),g=B((E,d,v)=>{a.current.splice(0),e&&(e.chains.current[d]=e.chains.current[d].filter(([y])=>y!==E)),e==null||e.chains.current[d].push([E,new Promise(y=>{a.current.push(y)})]),e==null||e.chains.current[d].push([E,new Promise(y=>{Promise.all(s.current[d].map(([h,b])=>b)).then(()=>y())})]),d==="enter"?p.current=p.current.then(()=>e==null?void 0:e.wait.current).then(()=>v(d)):v(d)}),m=B((E,d,v)=>{Promise.all(s.current[d].splice(0).map(([y,h])=>h)).then(()=>{var y;(y=a.current.shift())==null||y()}).then(()=>v(d))});return f.useMemo(()=>({children:n,register:u,unregister:l,onStart:g,onStop:m,wait:p,chains:s}),[u,l,n,g,m,s,p])}let Fo=f.Fragment,Mo=Lt.RenderStrategy;function ss(t,e){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:l,beforeLeave:u,afterLeave:a,enter:p,enterFrom:s,enterTo:g,entered:m,leave:E,leaveFrom:d,leaveTo:v,...y}=t,[h,b]=f.useState(null),w=f.useRef(null),x=$o(t),P=ye(...x?[w,e,b]:e===null?[]:[e]),D=(r=y.unmount)==null||r?Ae.Unmount:Ae.Hidden,{show:_,appear:U,initial:H}=ls(),[j,z]=f.useState(_?"visible":"hidden"),V=us(),{register:C,unregister:T}=V;ee(()=>C(w),[C,w]),ee(()=>{if(D===Ae.Hidden&&w.current){if(_&&j!=="visible"){z("visible");return}return Pe(j,{hidden:()=>T(w),visible:()=>C(w)})}},[j,w,C,T,_,D]);let k=mt();ee(()=>{if(x&&k&&j==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,j,k,x]);let oe=H&&!U,ue=U&&_&&H,ve=f.useRef(!1),Z=Co(()=>{ve.current||(z("hidden"),T(w))},V),se=B(Le=>{ve.current=!0;let be=Le?"enter":"leave";Z.onStart(w,be,we=>{we==="enter"?i==null||i():we==="leave"&&(u==null||u())})}),q=B(Le=>{let be=Le?"enter":"leave";ve.current=!1,Z.onStop(w,be,we=>{we==="enter"?l==null||l():we==="leave"&&(a==null||a())}),be==="leave"&&!Gt(Z)&&(z("hidden"),T(w))});f.useEffect(()=>{x&&o||(se(_),q(_))},[_,x,o]);let Ne=!(!o||!x||!k||oe),[,J]=Mu(Ne,h,_,{start:se,end:q}),Vr=_e({ref:P,className:((n=Ir(y.className,ue&&p,ue&&s,J.enter&&p,J.enter&&J.closed&&s,J.enter&&!J.closed&&g,J.leave&&E,J.leave&&!J.closed&&d,J.leave&&J.closed&&v,!J.transition&&_&&m))==null?void 0:n.trim())||void 0,...Fu(J)}),je=0;j==="visible"&&(je|=le.Open),j==="hidden"&&(je|=le.Closed),J.enter&&(je|=le.Opening),J.leave&&(je|=le.Closing);let gt=ie();return f.createElement(qt.Provider,{value:Z},f.createElement(ku,{value:je},gt({ourProps:Vr,theirProps:y,defaultTag:Fo,features:Mo,visible:j==="visible",name:"Transition.Child"})))}function cs(t,e){let{show:r,appear:n=!1,unmount:o=!0,...i}=t,l=f.useRef(null),u=$o(t),a=ye(...u?[l,e]:e===null?[]:[e]);mt();let p=Ht();if(r===void 0&&p!==null&&(r=(p&le.Open)===le.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[s,g]=f.useState(r?"visible":"hidden"),m=Co(()=>{r||g("hidden")}),[E,d]=f.useState(!0),v=f.useRef([r]);ee(()=>{E!==!1&&v.current[v.current.length-1]!==r&&(v.current.push(r),d(!1))},[v,r]);let y=f.useMemo(()=>({show:r,appear:n,initial:E}),[r,n,E]);ee(()=>{r?g("visible"):!Gt(m)&&l.current!==null&&g("hidden")},[r,m]);let h={unmount:o},b=B(()=>{var P;E&&d(!1),(P=t.beforeEnter)==null||P.call(t)}),w=B(()=>{var P;E&&d(!1),(P=t.beforeLeave)==null||P.call(t)}),x=ie();return f.createElement(qt.Provider,{value:m},f.createElement(Vt.Provider,{value:y},x({ourProps:{...h,as:f.Fragment,children:f.createElement(Io,{ref:a,...h,...i,beforeEnter:b,beforeLeave:w})},theirProps:{},defaultTag:f.Fragment,features:Mo,visible:s==="visible",name:"Transition"})))}function fs(t,e){let r=f.useContext(Vt)!==null,n=Ht()!==null;return f.createElement(f.Fragment,null,!r&&n?f.createElement(Br,{ref:e,...t}):f.createElement(Io,{ref:e,...t}))}let Br=re(cs),Io=re(ss),Qe=re(fs),_o=Object.assign(Br,{Child:Qe,Root:Br});var ds=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(ds||{}),ps=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(ps||{});let ys={0(t,e){return t.titleId===e.id?t:{...t,titleId:e.id}}},Rr=f.createContext(null);Rr.displayName="DialogContext";function zt(t){let e=f.useContext(Rr);if(e===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,zt),r}return e}function vs(t,e){return Pe(e.type,ys,t,e)}let Do=re(function(t,e){let r=f.useId(),{id:n=`headlessui-dialog-${r}`,open:o,onClose:i,initialFocus:l,role:u="dialog",autoFocus:a=!0,__demoMode:p=!1,unmount:s=!1,...g}=t,m=f.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(m.current||(m.current=!0,console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=Ht();o===void 0&&E!==null&&(o=(E&le.Open)===le.Open);let d=f.useRef(null),v=ye(d,e),y=vt(d),h=o?0:1,[b,w]=f.useReducer(vs,{titleId:null,descriptionId:null,panelRef:f.createRef()}),x=B(()=>i(!1)),P=B(q=>w({type:0,id:q})),D=mt()?h===0:!1,[_,U]=qu(),H={get current(){var q;return(q=b.panelRef.current)!=null?q:d.current}},j=Po(),{resolveContainers:z}=Xu({mainTreeNode:j,portals:_,defaultContainers:[H]}),V=E!==null?(E&le.Closing)===le.Closing:!1;uu(p||V?!1:D,{allowed:B(()=>{var q,Ne;return[(Ne=(q=d.current)==null?void 0:q.closest("[data-headlessui-portal]"))!=null?Ne:null]}),disallowed:B(()=>{var q;return[(q=j==null?void 0:j.closest("body > *:not(#headlessui-portal-root)"))!=null?q:null]})}),Eu(D,z,q=>{q.preventDefault(),x()}),Yu(D,y==null?void 0:y.defaultView,q=>{q.preventDefault(),q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),x()}),Tu(p||V?!1:D,y,z),su(D,d,x);let[C,T]=Zl(),k=f.useMemo(()=>[{dialogState:h,close:x,setTitleId:P,unmount:s},b],[h,b,x,P,s]),oe=f.useMemo(()=>({open:h===0}),[h]),ue={ref:v,id:n,role:u,tabIndex:-1,"aria-modal":p?void 0:h===0?!0:void 0,"aria-labelledby":b.titleId,"aria-describedby":C,unmount:s},ve=!Ku(),Z=ke.None;D&&!p&&(Z|=ke.RestoreFocus,Z|=ke.TabLock,a&&(Z|=ke.AutoFocus),ve&&(Z|=ke.InitialFocus));let se=ie();return f.createElement(Nu,null,f.createElement(bo,{force:!0},f.createElement(zu,null,f.createElement(Rr.Provider,{value:k},f.createElement(So,{target:d},f.createElement(bo,{force:!1},f.createElement(T,{slot:oe},f.createElement(U,null,f.createElement(ts,{initialFocus:l,initialFocusFallback:d,containers:z,features:Z},f.createElement(iu,{value:x},se({ourProps:ue,theirProps:g,slot:oe,defaultTag:ms,features:hs,visible:h===0,name:"Dialog"})))))))))))}),ms="div",hs=Lt.RenderStrategy|Lt.Static;function gs(t,e){let{transition:r=!1,open:n,...o}=t,i=Ht(),l=t.hasOwnProperty("open")||i!==null,u=t.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof t.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if(typeof t.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return(n!==void 0||r)&&!o.static?f.createElement(Oo,null,f.createElement(_o,{show:n,transition:r,unmount:o.unmount},f.createElement(Do,{ref:e,...o}))):f.createElement(Oo,null,f.createElement(Do,{ref:e,open:n,...o}))}let bs="div";function ws(t,e){let r=f.useId(),{id:n=`headlessui-dialog-panel-${r}`,transition:o=!1,...i}=t,[{dialogState:l,unmount:u},a]=zt("Dialog.Panel"),p=ye(e,a.panelRef),s=f.useMemo(()=>({open:l===0}),[l]),g=B(y=>{y.stopPropagation()}),m={ref:p,id:n,onClick:g},E=o?Qe:f.Fragment,d=o?{unmount:u}:{},v=ie();return f.createElement(E,{...d},v({ourProps:m,theirProps:i,slot:s,defaultTag:bs,name:"Dialog.Panel"}))}let Es="div";function Ss(t,e){let{transition:r=!1,...n}=t,[{dialogState:o,unmount:i}]=zt("Dialog.Backdrop"),l=f.useMemo(()=>({open:o===0}),[o]),u={ref:e,"aria-hidden":!0},a=r?Qe:f.Fragment,p=r?{unmount:i}:{},s=ie();return f.createElement(a,{...p},s({ourProps:u,theirProps:n,slot:l,defaultTag:Es,name:"Dialog.Backdrop"}))}let xs="h2";function Os(t,e){let r=f.useId(),{id:n=`headlessui-dialog-title-${r}`,...o}=t,[{dialogState:i,setTitleId:l}]=zt("Dialog.Title"),u=ye(e);f.useEffect(()=>(l(n),()=>l(null)),[n,l]);let a=f.useMemo(()=>({open:i===0}),[i]),p={ref:u,id:n};return ie()({ourProps:p,theirProps:o,slot:a,defaultTag:xs,name:"Dialog.Title"})}let Ps=re(gs),Hr=re(ws);re(Ss);let As=re(Os),Ts=Object.assign(Ps,{Panel:Hr,Title:As,Description:nu});function ko({onClick:t}){return $.jsxs("button",{type:"button",className:"im-close-button text-gray-400 hover:text-gray-500",onClick:t,children:[$.jsx("span",{className:"sr-only",children:"Close"}),$.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true",children:$.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}const $s=({modalContext:t,modalProps:e,children:r})=>$.jsx("div",{className:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4",children:$.jsx("div",{className:kt("im-modal-positioner flex min-h-full justify-center",{"items-start":e.position==="top","items-center":e.position==="center","items-end":e.position==="bottom"}),children:$.jsx(Qe,{enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:t.afterLeave,className:kt("im-modal-wrapper w-full transition duration-300 ease-in-out",t.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Hr,{className:`im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:t.close})}),typeof r=="function"?r({modalContext:t,modalProps:e}):r]})})})}),Cs=({modalContext:t,modalProps:e,children:r})=>$.jsx("div",{className:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden",children:$.jsx("div",{className:kt("im-slideover-positioner flex min-h-full items-center",{"justify-start":e.position==="left","justify-end":e.position==="right"}),children:$.jsx(Qe,{enterFrom:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,enterTo:"opacity-100 translate-x-0",leaveFrom:"opacity-100 translate-x-0",leaveTo:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,afterLeave:t.afterLeave,className:kt("im-slideover-wrapper w-full transition duration-300 ease-in-out",t.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Hr,{className:`im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:t.close})}),typeof r=="function"?r({modalContext:t,modalProps:e}):r]})})})}),No=f.forwardRef(({name:t,children:e,...r},n)=>{const o=l=>typeof e=="function"?e(l):e,i=f.useRef(null);return f.useImperativeHandle(n,()=>i.current,[i]),$.jsx(Cr,{ref:i,name:t,...r,children:({afterLeave:l,close:u,emit:a,getChildModal:p,getParentModal:s,id:g,index:m,isOpen:E,modalContext:d,modalProps:v,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})=>$.jsx(_o,{appear:!0,show:E??!1,children:$.jsxs(Ts,{as:"div",className:"im-dialog relative z-20",onClose:()=>v.closeExplicitly?null:u(),"data-inertiaui-modal-id":g,"data-inertiaui-modal-index":m,children:[m===0?$.jsx(Qe,{enter:"transition transform ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition transform ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75","aria-hidden":"true"}):$.jsx("div",{})}):null,m>0&&y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75"}):null,v.slideover?$.jsx(Cs,{modalContext:d,modalProps:v,children:o({afterLeave:l,close:u,emit:a,getChildModal:p,getParentModal:s,id:g,index:m,isOpen:E,modalContext:d,modalProps:v,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})}):$.jsx($s,{modalContext:d,modalProps:v,children:o({afterLeave:l,close:u,emit:a,getChildModal:p,getParentModal:s,id:g,index:m,isOpen:E,modalContext:d,modalProps:v,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})})]})})})});No.displayName="Modal";const Fs=({href:t,method:e="get",data:r={},as:n="a",headers:o={},queryStringArrayFormat:i="brackets",onAfterLeave:l=null,onBlur:u=null,onClose:a=null,onError:p=null,onFocus:s=null,onStart:g=null,onSuccess:m=null,navigate:E=null,children:d,...v})=>{const[y,h]=f.useState(!1),[b,w]=f.useState(null),{stack:x,visit:P}=Dt(),D=f.useMemo(()=>E??xt("navigate"),[E]),_={},U={};Object.keys(v).forEach(T=>{Xn.includes(T)||(T.startsWith("on")&&typeof v[T]=="function"?T.toLowerCase()in window?_[T]=v[T]:U[T]=v[T]:_[T]=v[T])});const[H,j]=f.useState(!1);f.useEffect(()=>{b&&(b.onTopOfStack&&H?s==null||s():!b.onTopOfStack&&!H&&(u==null||u()),j(!b.onTopOfStack))},[x]);const z=f.useCallback(()=>{a==null||a()},[a]),V=f.useCallback(()=>{w(null),l==null||l()},[l]),C=f.useCallback(T=>{T==null||T.preventDefault(),!y&&(t.startsWith("#")||(h(!0),g==null||g()),P(t,e,r,o,li(Zr(v,Xn)),()=>z(x.length),V,i,D).then(k=>{w(k),k.registerEventListenersFromProps(U),m==null||m()}).catch(k=>{console.error(k),p==null||p(k)}).finally(()=>h(!1)))},[t,e,r,o,i,v,z,V]);return $.jsx(n,{..._,href:t,onClick:C,children:typeof d=="function"?d({loading:y}):d})};W.HeadlessModal=Cr,W.Modal=No,W.ModalLink=Fs,W.ModalRoot=Jn,W.ModalStackProvider=Kn,W.getConfig=xt,W.putConfig=ti,W.renderApp=Bl,W.resetConfig=ei,W.useModalIndex=Qn,W.useModalStack=Dt,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|
|
37
|
+
`))}else{let v=s.props,E=v==null?void 0:v.className,d=typeof E=="function"?(...h)=>It(E(...h),i.className):It(E,i.className),m=d?{className:d}:{},y=ro(s.props,_e(_t(i,["ref"])));for(let h in b)h in y&&delete b[h];return f.cloneElement(s,Object.assign({},y,b,p,{ref:o(s.ref,p.ref)},m))}return f.createElement(a,Object.assign({},_t(i,["ref"]),a!==f.Fragment&&p,a!==f.Fragment&&b),s)}function Yl(){let r=f.useRef([]),e=f.useCallback(t=>{for(let n of r.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return r.current=t,e}}function Kl(...r){return r.every(e=>e==null)?void 0:e=>{for(let t of r)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function ro(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let n of r)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):e[o]=n[o];if(e.disabled||e["aria-disabled"])for(let n in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(t[n]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let n in t)Object.assign(e,{[n](o,...a){let l=t[n];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...a)}}});return e}function te(r){var e;return Object.assign(f.forwardRef(r),{displayName:(e=r.displayName)!=null?e:r.name})}function _e(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function _t(r,e=[]){let t=Object.assign({},r);for(let n of e)n in t&&delete t[n];return t}let Xl="span";var Ur=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(Ur||{});function Jl(r,e){var t;let{features:n=1,...o}=r,a={ref:e,"aria-hidden":(n&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ae()({ourProps:a,theirProps:o,slot:{},defaultTag:Xl,name:"Hidden"})}let Dt=te(Jl),to=Symbol();function Ql(r,e=!0){return Object.assign(r,{[to]:e})}function ye(...r){let e=f.useRef(r);f.useEffect(()=>{e.current=r},[r]);let t=B(n=>{for(let o of e.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return r.every(n=>n==null||(n==null?void 0:n[to]))?void 0:t}let kt=f.createContext(null);kt.displayName="DescriptionContext";function no(){let r=f.useContext(kt);if(r===null){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,no),e}return r}function Zl(){let[r,e]=f.useState([]);return[r.length>0?r.join(" "):void 0,f.useMemo(()=>function(t){let n=B(a=>(e(l=>[...l,a]),()=>e(l=>{let u=l.slice(),i=u.indexOf(a);return i!==-1&&u.splice(i,1),u}))),o=f.useMemo(()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value}),[n,t.slot,t.name,t.props,t.value]);return f.createElement(kt.Provider,{value:o},t.children)},[e])]}let eu="p";function ru(r,e){let t=f.useId(),n=Gl(),{id:o=`headlessui-description-${t}`,...a}=r,l=no(),u=ye(e);ee(()=>l.register(o),[o,l.register]);let i=n||!1,p=f.useMemo(()=>({...l.slot,disabled:i}),[l.slot,i]),s={ref:u,...l.props,id:o};return ae()({ourProps:s,theirProps:a,slot:p,defaultTag:eu,name:l.name||"Description"})}let tu=te(ru),nu=Object.assign(tu,{});var oo=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(oo||{});let ou=f.createContext(()=>{});function au({value:r,children:e}){return f.createElement(ou.Provider,{value:r},e)}let iu=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}};function ao(r,e){let t=r(),n=new Set;return{getSnapshot(){return t},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...a){let l=e[o].call(t,...a);l&&(t=l,n.forEach(u=>u()))}}}function io(r){return f.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot)}let lu=new iu(()=>ao(()=>[],{ADD(r){return this.includes(r)?this:[...this,r]},REMOVE(r){let e=this.indexOf(r);if(e===-1)return this;let t=this.slice();return t.splice(e,1),t}}));function Je(r,e){let t=lu.get(e),n=f.useId(),o=io(t);if(ee(()=>{if(r)return t.dispatch("ADD",n),()=>t.dispatch("REMOVE",n)},[t,r]),!r)return!1;let a=o.indexOf(n),l=o.length;return a===-1&&(a=l,l+=1),a===l-1}let Nt=new Map,pr=new Map;function lo(r){var e;let t=(e=pr.get(r))!=null?e:0;return pr.set(r,t+1),t!==0?()=>uo(r):(Nt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0,()=>uo(r))}function uo(r){var e;let t=(e=pr.get(r))!=null?e:1;if(t===1?pr.delete(r):pr.set(r,t-1),t!==1)return;let n=Nt.get(r);n&&(n["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,Nt.delete(r))}function uu(r,{allowed:e,disallowed:t}={}){let n=Je(r,"inert-others");ee(()=>{var o,a;if(!n)return;let l=Oe();for(let i of(o=t==null?void 0:t())!=null?o:[])i&&l.add(lo(i));let u=(a=e==null?void 0:e())!=null?a:[];for(let i of u){if(!i)continue;let p=Nr(i);if(!p)continue;let s=i.parentElement;for(;s&&s!==p.body;){for(let b of s.children)u.some(v=>b.contains(v))||l.add(lo(b));s=s.parentElement}}return l.dispose},[n,e,t])}function su(r,e,t){let n=Ie(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});f.useEffect(()=>{if(!r)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let a=Oe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}return()=>a.dispose()},[e,n,r])}let Br=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(","),cu=["[data-autofocus]"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var he=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r[r.AutoFocus=64]="AutoFocus",r))(he||{}),jt=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(jt||{}),fu=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(fu||{});function du(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Br)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function pu(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(cu)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var so=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(so||{});function yu(r,e=0){var t;return r===((t=Nr(r))==null?void 0:t.body)?!1:Pe(e,{0(){return r.matches(Br)},1(){let n=r;for(;n!==null;){if(n.matches(Br))return!0;n=n.parentElement}return!1}})}var mu=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(mu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ge(r){r==null||r.focus({preventScroll:!0})}let vu=["textarea","input"].join(",");function hu(r){var e,t;return(t=(e=r==null?void 0:r.matches)==null?void 0:e.call(r,vu))!=null?t:!1}function gu(r,e=t=>t){return r.slice().sort((t,n)=>{let o=e(t),a=e(n);if(o===null||a===null)return 0;let l=o.compareDocumentPosition(a);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function yr(r,e,{sorted:t=!0,relativeTo:n=null,skipElements:o=[]}={}){let a=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r.ownerDocument,l=Array.isArray(r)?t?gu(r):r:e&64?pu(r):du(r);o.length>0&&l.length>1&&(l=l.filter(E=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===E:d===E))),n=n??a.activeElement;let u=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,l.indexOf(n))-1;if(e&4)return Math.max(0,l.indexOf(n))+1;if(e&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=e&32?{preventScroll:!0}:{},s=0,b=l.length,v;do{if(s>=b||s+b<=0)return 0;let E=i+s;if(e&16)E=(E+b)%b;else{if(E<0)return 3;if(E>=b)return 1}v=l[E],v==null||v.focus(p),s+=u}while(v!==a.activeElement);return e&6&&hu(v)&&v.select(),2}function co(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function bu(){return/Android/gi.test(window.navigator.userAgent)}function wu(){return co()||bu()}function mr(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return document.addEventListener(e,a,n),()=>document.removeEventListener(e,a,n)},[r,e,n])}function fo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return window.addEventListener(e,a,n),()=>window.removeEventListener(e,a,n)},[r,e,n])}const po=30;function Eu(r,e,t){let n=Je(r,"outside-click"),o=Ie(t),a=f.useCallback(function(i,p){if(i.defaultPrevented)return;let s=p(i);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let b=function v(E){return typeof E=="function"?v(E()):Array.isArray(E)||E instanceof Set?E:[E]}(e);for(let v of b)if(v!==null&&(v.contains(s)||i.composed&&i.composedPath().includes(v)))return;return!yu(s,so.Loose)&&s.tabIndex!==-1&&i.preventDefault(),o.current(i,s)},[o,e]),l=f.useRef(null);mr(n,"pointerdown",i=>{var p,s;l.current=((s=(p=i.composedPath)==null?void 0:p.call(i))==null?void 0:s[0])||i.target},!0),mr(n,"mousedown",i=>{var p,s;l.current=((s=(p=i.composedPath)==null?void 0:p.call(i))==null?void 0:s[0])||i.target},!0),mr(n,"click",i=>{wu()||l.current&&(a(i,()=>l.current),l.current=null)},!0);let u=f.useRef({x:0,y:0});mr(n,"touchstart",i=>{u.current.x=i.touches[0].clientX,u.current.y=i.touches[0].clientY},!0),mr(n,"touchend",i=>{let p={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(p.x-u.current.x)>=po||Math.abs(p.y-u.current.y)>=po))return a(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),fo(n,"blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function vr(...r){return f.useMemo(()=>Nr(...r),[...r])}function yo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{r=r??window;function a(l){o.current(l)}return r.addEventListener(e,a,n),()=>r.removeEventListener(e,a,n)},[r,e,n])}function Su(){let r;return{before({doc:e}){var t;let n=e.documentElement,o=(t=e.defaultView)!=null?t:window;r=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:e,d:t}){let n=e.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,r-o);t.style(n,"paddingRight",`${a}px`)}}}function xu(){return co()?{before({doc:r,d:e,meta:t}){function n(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}e.microTask(()=>{var o;if(window.getComputedStyle(r.documentElement).scrollBehavior!=="auto"){let u=Oe();u.style(r.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>u.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;e.addEventListener(r,"click",u=>{if(u.target instanceof HTMLElement)try{let i=u.target.closest("a");if(!i)return;let{hash:p}=new URL(i.href),s=r.querySelector(p);s&&!n(s)&&(l=s)}catch{}},!0),e.addEventListener(r,"touchstart",u=>{if(u.target instanceof HTMLElement)if(n(u.target)){let i=u.target;for(;i.parentElement&&n(i.parentElement);)i=i.parentElement;e.style(i,"overscrollBehavior","contain")}else e.style(u.target,"touchAction","none")}),e.addEventListener(r,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(n(u.target)){let i=u.target;for(;i.parentElement&&i.dataset.headlessuiPortal!==""&&!(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth);)i=i.parentElement;i.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),e.add(()=>{var u;let i=(u=window.scrollY)!=null?u:window.pageYOffset;a!==i&&window.scrollTo(0,a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Ou(){return{before({doc:r,d:e}){e.style(r.documentElement,"overflow","hidden")}}}function Pu(r){let e={};for(let t of r)Object.assign(e,t(e));return e}let De=ao(()=>new Map,{PUSH(r,e){var t;let n=(t=this.get(r))!=null?t:{doc:r,count:0,d:Oe(),meta:new Set};return n.count++,n.meta.add(e),this.set(r,n),this},POP(r,e){let t=this.get(r);return t&&(t.count--,t.meta.delete(e)),this},SCROLL_PREVENT({doc:r,d:e,meta:t}){let n={doc:r,d:e,meta:Pu(t)},o=[xu(),Su(),Ou()];o.forEach(({before:a})=>a==null?void 0:a(n)),o.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:r}){r.dispose()},TEARDOWN({doc:r}){this.delete(r)}});De.subscribe(()=>{let r=De.getSnapshot(),e=new Map;for(let[t]of r)e.set(t,t.documentElement.style.overflow);for(let t of r.values()){let n=e.get(t.doc)==="hidden",o=t.count!==0;(o&&!n||!o&&n)&&De.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&De.dispatch("TEARDOWN",t)}});function Au(r,e,t=()=>({containers:[]})){let n=io(De),o=e?n.get(e):void 0,a=o?o.count>0:!1;return ee(()=>{if(!(!e||!r))return De.dispatch("PUSH",e,t),()=>De.dispatch("POP",e,t)},[r,e]),a}function Tu(r,e,t=()=>[document.body]){let n=Je(r,"scroll-lock");Au(n,e,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function $u(r=0){let[e,t]=f.useState(r),n=f.useCallback(i=>t(i),[e]),o=f.useCallback(i=>t(p=>p|i),[e]),a=f.useCallback(i=>(e&i)===i,[e]),l=f.useCallback(i=>t(p=>p&~i),[t]),u=f.useCallback(i=>t(p=>p^i),[t]);return{flags:e,setFlag:n,addFlag:o,hasFlag:a,removeFlag:l,toggleFlag:u}}var mo,vo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((mo=process==null?void 0:process.env)==null?void 0:mo.NODE_ENV)==="test"&&typeof((vo=Element==null?void 0:Element.prototype)==null?void 0:vo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
38
|
+
`)),[]});var Cu=(r=>(r[r.None=0]="None",r[r.Closed=1]="Closed",r[r.Enter=2]="Enter",r[r.Leave=4]="Leave",r))(Cu||{});function Fu(r){let e={};for(let t in r)r[t]===!0&&(e[`data-${t}`]="");return e}function Mu(r,e,t,n){let[o,a]=f.useState(t),{hasFlag:l,addFlag:u,removeFlag:i}=$u(r&&o?3:0),p=f.useRef(!1),s=f.useRef(!1),b=Mt();return ee(()=>{var v;if(r){if(t&&a(!0),!e){t&&u(3);return}return(v=n==null?void 0:n.start)==null||v.call(n,t),Iu(e,{inFlight:p,prepare(){s.current?s.current=!1:s.current=p.current,p.current=!0,!s.current&&(t?(u(3),i(4)):(u(4),i(2)))},run(){s.current?t?(i(3),u(4)):(i(4),u(3)):t?i(1):u(1)},done(){var E;s.current&&typeof e.getAnimations=="function"&&e.getAnimations().length>0||(p.current=!1,i(7),t||a(!1),(E=n==null?void 0:n.end)==null||E.call(n,t))}})}},[r,t,e,b]),r?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Iu(r,{prepare:e,run:t,done:n,inFlight:o}){let a=Oe();return Du(r,{prepare:e,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(_u(r,n))})}),a.dispose}function _u(r,e){var t,n;let o=Oe();if(!r)return o.dispose;let a=!1;o.add(()=>{a=!0});let l=(n=(t=r.getAnimations)==null?void 0:t.call(r).filter(u=>u instanceof CSSTransition))!=null?n:[];return l.length===0?(e(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{a||e()}),o.dispose)}function Du(r,{inFlight:e,prepare:t}){if(e!=null&&e.current){t();return}let n=r.style.transition;r.style.transition="none",t(),r.offsetHeight,r.style.transition=n}function Lt(r,e){let t=f.useRef([]),n=B(r);f.useEffect(()=>{let o=[...t.current];for(let[a,l]of e.entries())if(t.current[a]!==l){let u=n(e,o);return t.current=e,u}},[n,...e])}let Rr=f.createContext(null);Rr.displayName="OpenClosedContext";var le=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(le||{});function Hr(){return f.useContext(Rr)}function ku({value:r,children:e}){return f.createElement(Rr.Provider,{value:r},e)}function Nu({children:r}){return f.createElement(Rr.Provider,{value:null},r)}function ju(r){function e(){document.readyState!=="loading"&&(r(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Te=[];ju(()=>{function r(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Te[0]===e.target)return;let t=e.target;t=t.closest(Br),Te.unshift(t??e.target),Te=Te.filter(n=>n!=null&&n.isConnected),Te.splice(10)}window.addEventListener("click",r,{capture:!0}),window.addEventListener("mousedown",r,{capture:!0}),window.addEventListener("focus",r,{capture:!0}),document.body.addEventListener("click",r,{capture:!0}),document.body.addEventListener("mousedown",r,{capture:!0}),document.body.addEventListener("focus",r,{capture:!0})});function ho(r){let e=B(r),t=f.useRef(!1);f.useEffect(()=>(t.current=!1,()=>{t.current=!0,jr(()=>{t.current&&e()})}),[e])}function Lu(){let r=typeof document>"u";return"useSyncExternalStore"in tr?(e=>e.useSyncExternalStore)(tr)(()=>()=>{},()=>!1,()=>!r):!1}function hr(){let r=Lu(),[e,t]=tr.useState(Me.isHandoffComplete);return e&&Me.isHandoffComplete===!1&&t(!1),tr.useEffect(()=>{e!==!0&&t(!0)},[e]),tr.useEffect(()=>Me.handoff(),[]),r?!1:e}let go=f.createContext(!1);function Wu(){return f.useContext(go)}function bo(r){return f.createElement(go.Provider,{value:r.force},r.children)}function Uu(r){let e=Wu(),t=f.useContext(Eo),n=vr(r),[o,a]=f.useState(()=>{var l;if(!e&&t!==null)return(l=t.current)!=null?l:null;if(Me.isServer)return null;let u=n==null?void 0:n.getElementById("headlessui-portal-root");if(u)return u;if(n===null)return null;let i=n.createElement("div");return i.setAttribute("id","headlessui-portal-root"),n.body.appendChild(i)});return f.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),f.useEffect(()=>{e||t!==null&&a(t.current)},[t,a,e]),o}let wo=f.Fragment,Bu=te(function(r,e){let t=r,n=f.useRef(null),o=ye(Ql(b=>{n.current=b}),e),a=vr(n),l=Uu(n),[u]=f.useState(()=>{var b;return Me.isServer?null:(b=a==null?void 0:a.createElement("div"))!=null?b:null}),i=f.useContext(Wt),p=hr();ee(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ee(()=>{if(u&&i)return i.register(u)},[i,u]),ho(()=>{var b;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((b=l.parentElement)==null||b.removeChild(l)))});let s=ae();return p?!l||!u?null:Jo.createPortal(s({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:wo,name:"Portal"}),u):null});function Ru(r,e){let t=ye(e),{enabled:n=!0,...o}=r,a=ae();return n?f.createElement(Bu,{...o,ref:t}):a({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:wo,name:"Portal"})}let Hu=f.Fragment,Eo=f.createContext(null);function Vu(r,e){let{target:t,...n}=r,o={ref:ye(e)},a=ae();return f.createElement(Eo.Provider,{value:t},a({ourProps:o,theirProps:n,defaultTag:Hu,name:"Popover.Group"}))}let Wt=f.createContext(null);function qu(){let r=f.useContext(Wt),e=f.useRef([]),t=B(a=>(e.current.push(a),r&&r.register(a),()=>n(a))),n=B(a=>{let l=e.current.indexOf(a);l!==-1&&e.current.splice(l,1),r&&r.unregister(a)}),o=f.useMemo(()=>({register:t,unregister:n,portals:e}),[t,n,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Wt.Provider,{value:o},a)},[o])]}let Gu=te(Ru),So=te(Vu),zu=Object.assign(Gu,{Group:So});function Yu(r,e=typeof document<"u"?document.defaultView:null,t){let n=Je(r,"escape");yo(e,"keydown",o=>{n&&(o.defaultPrevented||o.key===oo.Escape&&t(o))})}function Ku(){var r;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,n]=f.useState((r=e==null?void 0:e.matches)!=null?r:!1);return ee(()=>{if(!e)return;function o(a){n(a.matches)}return e.addEventListener("change",o),()=>e.removeEventListener("change",o)},[e]),t}function Xu({defaultContainers:r=[],portals:e,mainTreeNode:t}={}){let n=vr(t),o=B(()=>{var a,l;let u=[];for(let i of r)i!==null&&(i instanceof HTMLElement?u.push(i):"current"in i&&i.current instanceof HTMLElement&&u.push(i.current));if(e!=null&&e.current)for(let i of e.current)u.push(i);for(let i of(a=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?a:[])i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i.id!=="headlessui-portal-root"&&(t&&(i.contains(t)||i.contains((l=t==null?void 0:t.getRootNode())==null?void 0:l.host))||u.some(p=>i.contains(p))||u.push(i));return u});return{resolveContainers:o,contains:B(a=>o().some(l=>l.contains(a)))}}let xo=f.createContext(null);function Oo({children:r,node:e}){let[t,n]=f.useState(null),o=Po(e??t);return f.createElement(xo.Provider,{value:o},r,o===null&&f.createElement(Dt,{features:Ur.Hidden,ref:a=>{var l,u;if(a){for(let i of(u=(l=Nr(a))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i!=null&&i.contains(a)){n(i);break}}}}))}function Po(r=null){var e;return(e=f.useContext(xo))!=null?e:r}function Ut(){let r=f.useRef(!1);return ee(()=>(r.current=!0,()=>{r.current=!1}),[]),r}var gr=(r=>(r[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r))(gr||{});function Ju(){let r=f.useRef(0);return fo(!0,"keydown",e=>{e.key==="Tab"&&(r.current=e.shiftKey?1:0)},!0),r}function Ao(r){if(!r)return new Set;if(typeof r=="function")return new Set(r());let e=new Set;for(let t of r.current)t.current instanceof HTMLElement&&e.add(t.current);return e}let Qu="div";var ke=(r=>(r[r.None=0]="None",r[r.InitialFocus=1]="InitialFocus",r[r.TabLock=2]="TabLock",r[r.FocusLock=4]="FocusLock",r[r.RestoreFocus=8]="RestoreFocus",r[r.AutoFocus=16]="AutoFocus",r))(ke||{});function Zu(r,e){let t=f.useRef(null),n=ye(t,e),{initialFocus:o,initialFocusFallback:a,containers:l,features:u=15,...i}=r;hr()||(u=0);let p=vr(t);ns(u,{ownerDocument:p});let s=os(u,{ownerDocument:p,container:t,initialFocus:o,initialFocusFallback:a});as(u,{ownerDocument:p,container:t,containers:l,previousActiveElement:s});let b=Ju(),v=B(g=>{let w=t.current;w&&(x=>x())(()=>{Pe(b.current,{[gr.Forwards]:()=>{yr(w,he.First,{skipElements:[g.relatedTarget,a]})},[gr.Backwards]:()=>{yr(w,he.Last,{skipElements:[g.relatedTarget,a]})}})})}),E=Je(!!(u&2),"focus-trap#tab-lock"),d=Mt(),m=f.useRef(!1),y={ref:n,onKeyDown(g){g.key=="Tab"&&(m.current=!0,d.requestAnimationFrame(()=>{m.current=!1}))},onBlur(g){if(!(u&4))return;let w=Ao(l);t.current instanceof HTMLElement&&w.add(t.current);let x=g.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(To(w,x)||(m.current?yr(t.current,Pe(b.current,{[gr.Forwards]:()=>he.Next,[gr.Backwards]:()=>he.Previous})|he.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&ge(g.target)))}},h=ae();return f.createElement(f.Fragment,null,E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}),h({ourProps:y,theirProps:i,defaultTag:Qu,name:"FocusTrap"}),E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}))}let es=te(Zu),rs=Object.assign(es,{features:ke});function ts(r=!0){let e=f.useRef(Te.slice());return Lt(([t],[n])=>{n===!0&&t===!1&&jr(()=>{e.current.splice(0)}),n===!1&&t===!0&&(e.current=Te.slice())},[r,Te,e]),B(()=>{var t;return(t=e.current.find(n=>n!=null&&n.isConnected))!=null?t:null})}function ns(r,{ownerDocument:e}){let t=!!(r&8),n=ts(t);Lt(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ge(n())},[t]),ho(()=>{t&&ge(n())})}function os(r,{ownerDocument:e,container:t,initialFocus:n,initialFocusFallback:o}){let a=f.useRef(null),l=Je(!!(r&1),"focus-trap#initial-focus"),u=Ut();return Lt(()=>{if(r===0)return;if(!l){o!=null&&o.current&&ge(o.current);return}let i=t.current;i&&jr(()=>{if(!u.current)return;let p=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===p){a.current=p;return}}else if(i.contains(p)){a.current=p;return}if(n!=null&&n.current)ge(n.current);else{if(r&16){if(yr(i,he.First|he.AutoFocus)!==jt.Error)return}else if(yr(i,he.First)!==jt.Error)return;if(o!=null&&o.current&&(ge(o.current),(e==null?void 0:e.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=e==null?void 0:e.activeElement})},[o,l,r]),a}function as(r,{ownerDocument:e,container:t,containers:n,previousActiveElement:o}){let a=Ut(),l=!!(r&4);yo(e==null?void 0:e.defaultView,"focus",u=>{if(!l||!a.current)return;let i=Ao(n);t.current instanceof HTMLElement&&i.add(t.current);let p=o.current;if(!p)return;let s=u.target;s&&s instanceof HTMLElement?To(i,s)?(o.current=s,ge(s)):(u.preventDefault(),u.stopPropagation(),ge(p)):ge(o.current)},!0)}function To(r,e){for(let t of r)if(t.contains(e))return!0;return!1}function $o(r){var e;return!!(r.enter||r.enterFrom||r.enterTo||r.leave||r.leaveFrom||r.leaveTo)||((e=r.as)!=null?e:Fo)!==f.Fragment||f.Children.count(r.children)===1}let Vr=f.createContext(null);Vr.displayName="TransitionContext";var is=(r=>(r.Visible="visible",r.Hidden="hidden",r))(is||{});function ls(){let r=f.useContext(Vr);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}function us(){let r=f.useContext(qr);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}let qr=f.createContext(null);qr.displayName="NestingContext";function Gr(r){return"children"in r?Gr(r.children):r.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Co(r,e){let t=Ie(r),n=f.useRef([]),o=Ut(),a=Mt(),l=B((E,d=Ae.Hidden)=>{let m=n.current.findIndex(({el:y})=>y===E);m!==-1&&(Pe(d,{[Ae.Unmount](){n.current.splice(m,1)},[Ae.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var y;!Gr(n)&&o.current&&((y=t.current)==null||y.call(t))}))}),u=B(E=>{let d=n.current.find(({el:m})=>m===E);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:E,state:"visible"}),()=>l(E,Ae.Unmount)}),i=f.useRef([]),p=f.useRef(Promise.resolve()),s=f.useRef({enter:[],leave:[]}),b=B((E,d,m)=>{i.current.splice(0),e&&(e.chains.current[d]=e.chains.current[d].filter(([y])=>y!==E)),e==null||e.chains.current[d].push([E,new Promise(y=>{i.current.push(y)})]),e==null||e.chains.current[d].push([E,new Promise(y=>{Promise.all(s.current[d].map(([h,g])=>g)).then(()=>y())})]),d==="enter"?p.current=p.current.then(()=>e==null?void 0:e.wait.current).then(()=>m(d)):m(d)}),v=B((E,d,m)=>{Promise.all(s.current[d].splice(0).map(([y,h])=>h)).then(()=>{var y;(y=i.current.shift())==null||y()}).then(()=>m(d))});return f.useMemo(()=>({children:n,register:u,unregister:l,onStart:b,onStop:v,wait:p,chains:s}),[u,l,n,b,v,s,p])}let Fo=f.Fragment,Mo=Lr.RenderStrategy;function ss(r,e){var t,n;let{transition:o=!0,beforeEnter:a,afterEnter:l,beforeLeave:u,afterLeave:i,enter:p,enterFrom:s,enterTo:b,entered:v,leave:E,leaveFrom:d,leaveTo:m,...y}=r,[h,g]=f.useState(null),w=f.useRef(null),x=$o(r),P=ye(...x?[w,e,g]:e===null?[]:[e]),D=(t=y.unmount)==null||t?Ae.Unmount:Ae.Hidden,{show:_,appear:U,initial:H}=ls(),[j,z]=f.useState(_?"visible":"hidden"),V=us(),{register:C,unregister:T}=V;ee(()=>C(w),[C,w]),ee(()=>{if(D===Ae.Hidden&&w.current){if(_&&j!=="visible"){z("visible");return}return Pe(j,{hidden:()=>T(w),visible:()=>C(w)})}},[j,w,C,T,_,D]);let k=hr();ee(()=>{if(x&&k&&j==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,j,k,x]);let oe=H&&!U,ue=U&&_&&H,me=f.useRef(!1),Z=Co(()=>{me.current||(z("hidden"),T(w))},V),se=B(Le=>{me.current=!0;let be=Le?"enter":"leave";Z.onStart(w,be,we=>{we==="enter"?a==null||a():we==="leave"&&(u==null||u())})}),q=B(Le=>{let be=Le?"enter":"leave";me.current=!1,Z.onStop(w,be,we=>{we==="enter"?l==null||l():we==="leave"&&(i==null||i())}),be==="leave"&&!Gr(Z)&&(z("hidden"),T(w))});f.useEffect(()=>{x&&o||(se(_),q(_))},[_,x,o]);let Ne=!(!o||!x||!k||oe),[,J]=Mu(Ne,h,_,{start:se,end:q}),Vt=_e({ref:P,className:((n=It(y.className,ue&&p,ue&&s,J.enter&&p,J.enter&&J.closed&&s,J.enter&&!J.closed&&b,J.leave&&E,J.leave&&!J.closed&&d,J.leave&&J.closed&&m,!J.transition&&_&&v))==null?void 0:n.trim())||void 0,...Fu(J)}),je=0;j==="visible"&&(je|=le.Open),j==="hidden"&&(je|=le.Closed),J.enter&&(je|=le.Opening),J.leave&&(je|=le.Closing);let br=ae();return f.createElement(qr.Provider,{value:Z},f.createElement(ku,{value:je},br({ourProps:Vt,theirProps:y,defaultTag:Fo,features:Mo,visible:j==="visible",name:"Transition.Child"})))}function cs(r,e){let{show:t,appear:n=!1,unmount:o=!0,...a}=r,l=f.useRef(null),u=$o(r),i=ye(...u?[l,e]:e===null?[]:[e]);hr();let p=Hr();if(t===void 0&&p!==null&&(t=(p&le.Open)===le.Open),t===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[s,b]=f.useState(t?"visible":"hidden"),v=Co(()=>{t||b("hidden")}),[E,d]=f.useState(!0),m=f.useRef([t]);ee(()=>{E!==!1&&m.current[m.current.length-1]!==t&&(m.current.push(t),d(!1))},[m,t]);let y=f.useMemo(()=>({show:t,appear:n,initial:E}),[t,n,E]);ee(()=>{t?b("visible"):!Gr(v)&&l.current!==null&&b("hidden")},[t,v]);let h={unmount:o},g=B(()=>{var P;E&&d(!1),(P=r.beforeEnter)==null||P.call(r)}),w=B(()=>{var P;E&&d(!1),(P=r.beforeLeave)==null||P.call(r)}),x=ae();return f.createElement(qr.Provider,{value:v},f.createElement(Vr.Provider,{value:y},x({ourProps:{...h,as:f.Fragment,children:f.createElement(Io,{ref:i,...h,...a,beforeEnter:g,beforeLeave:w})},theirProps:{},defaultTag:f.Fragment,features:Mo,visible:s==="visible",name:"Transition"})))}function fs(r,e){let t=f.useContext(Vr)!==null,n=Hr()!==null;return f.createElement(f.Fragment,null,!t&&n?f.createElement(Bt,{ref:e,...r}):f.createElement(Io,{ref:e,...r}))}let Bt=te(cs),Io=te(ss),Qe=te(fs),_o=Object.assign(Bt,{Child:Qe,Root:Bt});var ds=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(ds||{}),ps=(r=>(r[r.SetTitleId=0]="SetTitleId",r))(ps||{});let ys={0(r,e){return r.titleId===e.id?r:{...r,titleId:e.id}}},Rt=f.createContext(null);Rt.displayName="DialogContext";function zr(r){let e=f.useContext(Rt);if(e===null){let t=new Error(`<${r} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zr),t}return e}function ms(r,e){return Pe(e.type,ys,r,e)}let Do=te(function(r,e){let t=f.useId(),{id:n=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:l,role:u="dialog",autoFocus:i=!0,__demoMode:p=!1,unmount:s=!1,...b}=r,v=f.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(v.current||(v.current=!0,console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=Hr();o===void 0&&E!==null&&(o=(E&le.Open)===le.Open);let d=f.useRef(null),m=ye(d,e),y=vr(d),h=o?0:1,[g,w]=f.useReducer(ms,{titleId:null,descriptionId:null,panelRef:f.createRef()}),x=B(()=>a(!1)),P=B(q=>w({type:0,id:q})),D=hr()?h===0:!1,[_,U]=qu(),H={get current(){var q;return(q=g.panelRef.current)!=null?q:d.current}},j=Po(),{resolveContainers:z}=Xu({mainTreeNode:j,portals:_,defaultContainers:[H]}),V=E!==null?(E&le.Closing)===le.Closing:!1;uu(p||V?!1:D,{allowed:B(()=>{var q,Ne;return[(Ne=(q=d.current)==null?void 0:q.closest("[data-headlessui-portal]"))!=null?Ne:null]}),disallowed:B(()=>{var q;return[(q=j==null?void 0:j.closest("body > *:not(#headlessui-portal-root)"))!=null?q:null]})}),Eu(D,z,q=>{q.preventDefault(),x()}),Yu(D,y==null?void 0:y.defaultView,q=>{q.preventDefault(),q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),x()}),Tu(p||V?!1:D,y,z),su(D,d,x);let[C,T]=Zl(),k=f.useMemo(()=>[{dialogState:h,close:x,setTitleId:P,unmount:s},g],[h,g,x,P,s]),oe=f.useMemo(()=>({open:h===0}),[h]),ue={ref:m,id:n,role:u,tabIndex:-1,"aria-modal":p?void 0:h===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":C,unmount:s},me=!Ku(),Z=ke.None;D&&!p&&(Z|=ke.RestoreFocus,Z|=ke.TabLock,i&&(Z|=ke.AutoFocus),me&&(Z|=ke.InitialFocus));let se=ae();return f.createElement(Nu,null,f.createElement(bo,{force:!0},f.createElement(zu,null,f.createElement(Rt.Provider,{value:k},f.createElement(So,{target:d},f.createElement(bo,{force:!1},f.createElement(T,{slot:oe},f.createElement(U,null,f.createElement(rs,{initialFocus:l,initialFocusFallback:d,containers:z,features:Z},f.createElement(au,{value:x},se({ourProps:ue,theirProps:b,slot:oe,defaultTag:vs,features:hs,visible:h===0,name:"Dialog"})))))))))))}),vs="div",hs=Lr.RenderStrategy|Lr.Static;function gs(r,e){let{transition:t=!1,open:n,...o}=r,a=Hr(),l=r.hasOwnProperty("open")||a!==null,u=r.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof r.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r.open}`);if(typeof r.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${r.onClose}`);return(n!==void 0||t)&&!o.static?f.createElement(Oo,null,f.createElement(_o,{show:n,transition:t,unmount:o.unmount},f.createElement(Do,{ref:e,...o}))):f.createElement(Oo,null,f.createElement(Do,{ref:e,open:n,...o}))}let bs="div";function ws(r,e){let t=f.useId(),{id:n=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=r,[{dialogState:l,unmount:u},i]=zr("Dialog.Panel"),p=ye(e,i.panelRef),s=f.useMemo(()=>({open:l===0}),[l]),b=B(y=>{y.stopPropagation()}),v={ref:p,id:n,onClick:b},E=o?Qe:f.Fragment,d=o?{unmount:u}:{},m=ae();return f.createElement(E,{...d},m({ourProps:v,theirProps:a,slot:s,defaultTag:bs,name:"Dialog.Panel"}))}let Es="div";function Ss(r,e){let{transition:t=!1,...n}=r,[{dialogState:o,unmount:a}]=zr("Dialog.Backdrop"),l=f.useMemo(()=>({open:o===0}),[o]),u={ref:e,"aria-hidden":!0},i=t?Qe:f.Fragment,p=t?{unmount:a}:{},s=ae();return f.createElement(i,{...p},s({ourProps:u,theirProps:n,slot:l,defaultTag:Es,name:"Dialog.Backdrop"}))}let xs="h2";function Os(r,e){let t=f.useId(),{id:n=`headlessui-dialog-title-${t}`,...o}=r,[{dialogState:a,setTitleId:l}]=zr("Dialog.Title"),u=ye(e);f.useEffect(()=>(l(n),()=>l(null)),[n,l]);let i=f.useMemo(()=>({open:a===0}),[a]),p={ref:u,id:n};return ae()({ourProps:p,theirProps:o,slot:i,defaultTag:xs,name:"Dialog.Title"})}let Ps=te(gs),Ht=te(ws);te(Ss);let As=te(Os),Ts=Object.assign(Ps,{Panel:Ht,Title:As,Description:nu});function ko({onClick:r}){return $.jsxs("button",{type:"button",className:"im-close-button text-gray-400 hover:text-gray-500",onClick:r,children:[$.jsx("span",{className:"sr-only",children:"Close"}),$.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true",children:$.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}const $s=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4",children:$.jsx("div",{className:kr("im-modal-positioner flex min-h-full justify-center",{"items-start":e.position==="top","items-center":e.position==="center","items-end":e.position==="bottom"}),children:$.jsx(Qe,{enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:r.afterLeave,className:kr("im-modal-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),Cs=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden",children:$.jsx("div",{className:kr("im-slideover-positioner flex min-h-full items-center",{"justify-start":e.position==="left","justify-end":e.position==="right"}),children:$.jsx(Qe,{enterFrom:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,enterTo:"opacity-100 translate-x-0",leaveFrom:"opacity-100 translate-x-0",leaveTo:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,afterLeave:r.afterLeave,className:kr("im-slideover-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),No=f.forwardRef(({name:r,children:e,...t},n)=>{const o=l=>typeof e=="function"?e(l):e,a=f.useRef(null);return f.useImperativeHandle(n,()=>a.current,[a]),$.jsx(Ct,{ref:a,name:r,...t,children:({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})=>$.jsx(_o,{appear:!0,show:d??!1,children:$.jsxs(Ts,{as:"div",className:"im-dialog relative z-20",onClose:()=>i.closeExplicitly?null:u(),"data-inertiaui-modal-id":v,"data-inertiaui-modal-index":E,children:[E===0?$.jsx(Qe,{enter:"transition transform ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition transform ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75","aria-hidden":"true"}):$.jsx("div",{})}):null,E>0&&y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75"}):null,i.slideover?$.jsx(Cs,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})}):$.jsx($s,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})})]})})})});No.displayName="Modal";const Fs=({href:r,method:e="get",data:t={},as:n="a",headers:o={},queryStringArrayFormat:a="brackets",onAfterLeave:l=null,onBlur:u=null,onClose:i=null,onError:p=null,onFocus:s=null,onStart:b=null,onSuccess:v=null,navigate:E=null,children:d,...m})=>{const[y,h]=f.useState(!1),[g,w]=f.useState(null),{stack:x,visit:P}=dr(),D=f.useMemo(()=>E??Or("navigate"),[E]),_={},U={};Object.keys(m).forEach(T=>{Jn.includes(T)||(T.startsWith("on")&&typeof m[T]=="function"?T.toLowerCase()in window?_[T]=m[T]:U[T]=m[T]:_[T]=m[T])});const[H,j]=f.useState(!1);f.useEffect(()=>{g&&(g.onTopOfStack&&H?s==null||s():!g.onTopOfStack&&!H&&(u==null||u()),j(!g.onTopOfStack))},[x]);const z=f.useCallback(()=>{i==null||i()},[i]),V=f.useCallback(()=>{w(null),l==null||l()},[l]),C=f.useCallback(T=>{T==null||T.preventDefault(),!y&&(r.startsWith("#")||(h(!0),b==null||b()),P(r,e,t,o,la(Zt(m,Jn)),()=>z(x.length),V,a,D).then(k=>{w(k),k.registerEventListenersFromProps(U),v==null||v()}).catch(k=>{console.error(k),p==null||p(k)}).finally(()=>h(!1)))},[r,e,t,o,a,m,z,V]);return $.jsx(n,{..._,href:r,onClick:C,children:typeof d=="function"?d({loading:y}):d})};function Ms(){return dr().stack[$t()]??null}L.HeadlessModal=Ct,L.Modal=No,L.ModalLink=Fs,L.ModalRoot=Qn,L.ModalStackProvider=Xn,L.getConfig=Or,L.putConfig=ra,L.renderApp=Bl,L.resetConfig=ea,L.useModal=Ms,L.useModalIndex=$t,L.useModalStack=dr,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|