@inertiaui/modal-react 0.5.2 → 0.5.3
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 +163 -162
- package/dist/inertiaui-modal.umd.cjs +8 -8
- package/package.json +2 -2
- package/src/ModalRoot.jsx +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(W,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):(W=typeof globalThis<"u"?globalThis:W||self,f(W.InertiaUIModal={},W.React,W.Axios,W.react,W.ReactDOM))})(this,function(W,f,me,tt,Jo){"use strict";var rc=Object.defineProperty;var nc=(W,f,me)=>f in W?rc(W,f,{enumerable:!0,configurable:!0,writable:!0,value:me}):W[f]=me;var ce=(W,f,me)=>nc(W,typeof f!="symbol"?f+"":f,me);function Qo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const rt=Qo(f),Et={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(Et))}put(e,r){if(typeof e=="object"){this.config={type:e.type??Et.type,modal:{...Et.modal,...e.modal??{}},slideover:{...Et.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let i=0;i<n.length-1;i++)o=o[n[i]]=o[n[i]]||{};o[n[n.length-1]]=r}get(e){if(typeof e>"u")return this.config;const r=e.split(".");let n=this.config;for(const o of r){if(n[o]===void 0)return null;n=n[o]}return n}}const St=new Zo,ei=()=>St.reset(),ti=(t,e)=>St.put(t,e),
|
|
1
|
+
(function(W,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):(W=typeof globalThis<"u"?globalThis:W||self,f(W.InertiaUIModal={},W.React,W.Axios,W.react,W.ReactDOM))})(this,function(W,f,me,tt,Jo){"use strict";var rc=Object.defineProperty;var nc=(W,f,me)=>f in W?rc(W,f,{enumerable:!0,configurable:!0,writable:!0,value:me}):W[f]=me;var ce=(W,f,me)=>nc(W,typeof f!="symbol"?f+"":f,me);function Qo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const rt=Qo(f),Et={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(Et))}put(e,r){if(typeof e=="object"){this.config={type:e.type??Et.type,modal:{...Et.modal,...e.modal??{}},slideover:{...Et.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let i=0;i<n.length-1;i++)o=o[n[i]]=o[n[i]]||{};o[n[n.length-1]]=r}get(e){if(typeof e>"u")return this.config;const r=e.split(".");let n=this.config;for(const o of r){if(n[o]===void 0)return null;n=n[o]}return n}}const St=new Zo,ei=()=>St.reset(),ti=(t,e)=>St.put(t,e),xt=t=>St.get(t),Ue=(t,e)=>St.get(t?`slideover.${e}`:`modal.${e}`);var Jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ni(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Qt={exports:{}},nt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -15,10 +15,10 @@
|
|
|
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
17
|
*/var Qr;function ii(){return Qr||(Qr=1,process.env.NODE_ENV!=="production"&&function(){var t=f,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),d=Symbol.iterator,v="@@iterator";function y(c){if(c===null||typeof c!="object")return null;var S=d&&c[d]||c[v];return typeof S=="function"?S:null}var h=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(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 L=O.map(function(I){return String(I)});L.unshift("Warning: "+S),Function.prototype.apply.call(console[c],console,L)}}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===i||U||c===o||c===p||c===s||_||c===E||x||P||D||typeof c=="object"&&c!==null&&(c.$$typeof===m||c.$$typeof===g||c.$$typeof===l||c.$$typeof===u||c.$$typeof===a||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"&&b("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 r:return"Portal";case i: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 a:return z(c,c.render,"ForwardRef");case g:var A=c.displayName||null;return A!==null?A:C(c.type)||"Memo";case m:{var N=c,L=N._payload,I=N._init;try{return C(I(L))}catch{return null}}}return null}var T=Object.assign,k=0,oe,ue,ve,Z,se,q,Ne;function J(){}J.__reactDisabledLog=!0;function Vr(){{if(k===0){oe=console.log,ue=console.info,ve=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:ve}),error:T({},c,{value:Z}),group:T({},c,{value:se}),groupCollapsed:T({},c,{value:q}),groupEnd:T({},c,{value:Ne})})}k<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var gt=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,
|
|
18
|
+
`+Le+c}}var we=!1,Yt;{var Ms=typeof WeakMap=="function"?WeakMap:Map;Yt=new Ms}function jo(c,S){if(!c||we)return"";{var O=Yt.get(c);if(O!==void 0)return O}var A;we=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=gt.current,gt.current=null,Vr();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
19
|
`),te=A.stack.split(`
|
|
20
20
|
`),G=M.length-1,Y=te.length-1;G>=1&&Y>=0&&M[G]!==te[Y];)Y--;for(;G>=1&&Y>=0;G--,Y--)if(M[G]!==te[Y]){if(G!==1||Y!==1)do if(G--,Y--,Y<0||M[G]!==te[Y]){var ae=`
|
|
21
|
-
`+M[G].replace(" at new "," at ");return c.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",c.displayName)),typeof c=="function"&&
|
|
21
|
+
`+M[G].replace(" at new "," at ");return c.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",c.displayName)),typeof c=="function"&&Yt.set(c,ae),ae}while(G>=1&&Y>=0);break}}}finally{we=!1,gt.current=L,je(),Error.prepareStackTrace=N}var et=c?c.displayName||c.name:"",We=et?be(et):"";return typeof c=="function"&&Yt.set(c,We),We}function Is(c,S,O){return jo(c,!1)}function _s(c){var S=c.prototype;return!!(S&&S.isReactComponent)}function Kt(c,S,O){if(c==null)return"";if(typeof c=="function")return jo(c,_s(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 a:return Is(c.render);case g:return Kt(c.type,S,O);case m:{var A=c,N=A._payload,L=A._init;try{return Kt(L(N),S,O)}catch{}}}return""}var bt=Object.prototype.hasOwnProperty,Lo={},Wo=h.ReactDebugCurrentFrame;function Xt(c){if(c){var S=c._owner,O=Kt(c.type,c._source,S?S.type:null);Wo.setExtraStackFrame(O)}else Wo.setExtraStackFrame(null)}function Ds(c,S,O,A,N){{var L=Function.call.bind(bt);for(var I in c)if(L(c,I)){var M=void 0;try{if(typeof c[I]!="function"){var te=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 te.name="Invariant Violation",te}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)&&(Xt(N),b("%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),Xt(null)),M instanceof Error&&!(M.message in Lo)&&(Lo[M.message]=!0,Xt(N),b("Failed %s type: %s",O,M.message),Xt(null))}}}var ks=Array.isArray;function qr(c){return ks(c)}function Ns(c){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&c[Symbol.toStringTag]||c.constructor.name||"Object";return O}}function js(c){try{return Uo(c),!1}catch{return!0}}function Uo(c){return""+c}function Bo(c){if(js(c))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ns(c)),Uo(c)}var wt=h.ReactCurrentOwner,Ls={key:!0,ref:!0,__self:!0,__source:!0},Ro,Ho,Gr;Gr={};function Ws(c){if(bt.call(c,"ref")){var S=Object.getOwnPropertyDescriptor(c,"ref").get;if(S&&S.isReactWarning)return!1}return c.ref!==void 0}function Us(c){if(bt.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function Bs(c,S){if(typeof c.ref=="string"&&wt.current&&S&&wt.current.stateNode!==S){var O=C(wt.current.type);Gr[O]||(b('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(wt.current.type),c.ref),Gr[O]=!0)}}function Rs(c,S){{var O=function(){Ro||(Ro=!0,b("%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 Hs(c,S){{var O=function(){Ho||(Ho=!0,b("%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 Vs=function(c,S,O,A,N,L,I){var M={$$typeof:e,type:c,key:S,ref:O,props:I,_owner:L};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 qs(c,S,O,A,N){{var L,I={},M=null,te=null;O!==void 0&&(Bo(O),M=""+O),Us(S)&&(Bo(S.key),M=""+S.key),Ws(S)&&(te=S.ref,Bs(S,N));for(L in S)bt.call(S,L)&&!Ls.hasOwnProperty(L)&&(I[L]=S[L]);if(c&&c.defaultProps){var G=c.defaultProps;for(L in G)I[L]===void 0&&(I[L]=G[L])}if(M||te){var Y=typeof c=="function"?c.displayName||c.name||"Unknown":c;M&&Rs(I,Y),te&&Hs(I,Y)}return Vs(c,M,te,N,A,wt.current,I)}}var zr=h.ReactCurrentOwner,Vo=h.ReactDebugCurrentFrame;function Ze(c){if(c){var S=c._owner,O=Kt(c.type,c._source,S?S.type:null);Vo.setExtraStackFrame(O)}else Vo.setExtraStackFrame(null)}var Yr;Yr=!1;function Kr(c){return typeof c=="object"&&c!==null&&c.$$typeof===e}function qo(){{if(zr.current){var c=C(zr.current.type);if(c)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+c+"`."}return""}}function Gs(c){return""}var Go={};function zs(c){{var S=qo();if(!S){var O=typeof c=="string"?c:c.displayName||c.name;O&&(S=`
|
|
24
24
|
|
|
@@ -27,12 +27,12 @@ Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(
|
|
|
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,xt=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),Ot=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=Ot(e,0,1),n=Ot(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(xt(ln,n)&&(o=ln[n],n="%"+o[0]+"%"),xt(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=Ot(m,0,1),d=Ot(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+"%",xt(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=xt(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,Pt=sa("%Object.getOwnPropertyDescriptor%",!0);if(Pt)try{Pt([],"length")}catch{Pt=null}var fn=Pt,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,At=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,Tt=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=$t(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=$t(e,m);return g&&!za(w)?"["+hr(w,g)+"]":"[ "+fe.call(w,", ")+" ]"}if(_a(e)){var x=$t(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",At.call(e),P,g)}if(Ha(e)){var D=[];return En&&En.call(e,function(C){D.push(m(C,e))}),jn("Set",Tt.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 _=$t(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(!At||!t||typeof t!="object")return!1;try{At.call(t);try{Tt.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(!Tt||!t||typeof t!="object")return!1;try{Tt.call(t);try{At.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],`
|
|
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
31
|
`)>=0)return!1;return!0}function Ya(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=fe.call(Array(t.indent+1)," ");else return null;return{base:r,prev:fe.call(Array(e+1),r)}}function hr(t,e){if(t.length===0)return"";var r=`
|
|
32
32
|
`+e.prev+e.base;return r+fe.call(t,","+r)+`
|
|
33
|
-
`+e.prev}function $t(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,Ct=Ln("%WeakMap%",!0),Ft=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(Ct&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Ja(e,i)}else if(Ft){if(r)return el(r,i)}else if(n)return nl(n,i)},has:function(i){if(Ct&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Za(e,i)}else if(Ft){if(r)return rl(r,i)}else if(n)return il(n,i);return!1},set:function(i,l){Ct&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Ct),Qa(e,i,l)):Ft?(r||(r=new Ft),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,Mt=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:Mt.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=Mt.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)||Mt.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=Mt.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 It=f.createContext(null);It.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"),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(It.Provider,{value:d,children:t})},_t=()=>{const t=f.useContext(It);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(It);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}=_t(),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}=_t(),[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 Dt(){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 kt(t){return Me.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function Nt(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 Nt(()=>{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 jt=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(jt||{}),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 Lt(a,r,n,l,u);let p=o??0;if(p&2){let{static:s=!1,...g}=a;if(s)return Lt(g,r,n,l,u)}if(p&1){let{unmount:s=!0,...g}=a;return Pe(s?0:1,{0(){return null},1(){return Lt({...g,hidden:!0,style:{display:"none"}},r,n,l,u)}})}return Lt(a,r,n,l,u)}function Lt(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(`
|
|
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
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(m=>` - ${m}`).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 Wt=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(Wt||{});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=kt(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 Ut=["[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(Ut)).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=kt(t))==null?void 0:r.body)?!1:Pe(e,{0(){return t.matches(Ut)},1(){let n=t;for(;n!==null;){if(n.matches(Ut))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(()=>kt(...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 Bt=f.createContext(null);Bt.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 Rt(){return f.useContext(Bt)}function ku({value:t,children:e}){return f.createElement(Bt.Provider,{value:t},e)}function Nu({children:t}){return f.createElement(Bt.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(Ut),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,Nt(()=>{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:Wt.Hidden,ref:i=>{var l,u;if(i){for(let a of(u=(l=kt(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:Wt.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:Wt.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&&Nt(()=>{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&&Nt(()=>{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 Ht=f.createContext(null);Ht.displayName="TransitionContext";var as=(t=>(t.Visible="visible",t.Hidden="hidden",t))(as||{});function ls(){let t=f.useContext(Ht);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(Vt);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Vt=f.createContext(null);Vt.displayName="NestingContext";function qt(t){return"children"in t?qt(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;!qt(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=jt.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"&&!qt(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(Vt.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=Rt();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"):!qt(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(Vt.Provider,{value:m},f.createElement(Ht.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(Ht)!==null,n=Rt()!==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 Gt(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,Gt),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=Rt();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=jt.RenderStrategy|jt.Static;function gs(t,e){let{transition:r=!1,open:n,...o}=t,i=Rt(),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]=Gt("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}]=Gt("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}]=Gt("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:Dt("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:Dt("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:Dt("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:Dt("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}=_t(),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=_t,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|