@g4rcez/components 2.0.19 → 2.0.21
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/components/display/notifications.d.ts +1 -1
- package/dist/components/floating/menu.d.ts +2 -2
- package/dist/components/floating/modal.d.ts +2 -2
- package/dist/components/index.d.ts +27 -25
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +27 -25
- package/dist/hooks/use-form.js +2 -2
- package/dist/hooks/use-preferences.d.ts +2 -0
- package/dist/hooks/use-preferences.d.ts.map +1 -0
- package/dist/hooks/use-preferences.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25351 -25323
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +65 -65
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,185 +1,193 @@
|
|
|
1
|
-
(function(ne,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ne=typeof globalThis<"u"?globalThis:ne||self,S(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,function(ne,S,m,uo){"use strict";function jp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=jp(S),gi=jp(uo);function zp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=zp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=zp(e))&&(r&&(r+=" "),r+=t);return r}const Rp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Hp=Bp,fo=(e,t)=>n=>{var r;if(t?.variants==null)return Hp(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const p=Rp(u)||Rp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(b=>{let[g,h]=b;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Hp(e,a,l,n?.class,n?.className)};var Wp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nT(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Pl,Up;function po(){return Up||(Up=1,Pl=TypeError),Pl}const rT=nT(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Al,Yp;function Sa(){if(Yp)return Al;Yp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,O=Array.prototype.slice,I=Math.floor,D=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,H=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function P(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||E.call(/e/,K))return K;var Fe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var tt=W<0?-I(-W):I(W);if(tt!==W){var ot=String(tt),Me=y.call(K,ot.length+1);return x.call(ot,Fe,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Fe,"$&_")}var $=rT,L=$.custom,U=le(L)?L:null,G={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Al=function W(K,Fe,tt,ot){var Me=Fe||{};if(de(Me,"quoteStyle")&&!de(G,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(de(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Nr=de(Me,"customInspect")?Me.customInspect:!0;if(typeof Nr!="boolean"&&Nr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(de(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(de(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=Me.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return we(K,Me);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var un=String(K);return co?P(K,un):un}if(typeof K=="bigint"){var Lr=String(K)+"n";return co?P(K,Lr):Lr}var Op=typeof Me.depth>"u"?5:Me.depth;if(typeof tt>"u"&&(tt=0),tt>=Op&&Op>0&&typeof K=="object")return J(K)?"[Array]":"[Object]";var hi=Kn(Me,tt);if(typeof ot>"u")ot=[];else if(Se(ot,K)>=0)return"[Circular]";function _n(mi,Cl,sR){if(Cl&&(ot=O.call(ot),ot.push(Cl)),sR){var tT={depth:Me.depth};return de(Me,"quoteStyle")&&(tT.quoteStyle=Me.quoteStyle),W(mi,tT,tt+1,ot)}return W(mi,Me,tt+1,ot)}if(typeof K=="function"&&!q(K)){var KS=Oe(K),GS=In(K,_n);return"[Function"+(KS?": "+KS:" (anonymous)")+"]"+(GS.length>0?" { "+C.call(GS,", ")+" }":"")}if(le(K)){var ZS=A?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):z.call(K);return typeof K=="object"&&!A?Ze(ZS):ZS}if(ce(K)){for(var wa="<"+w.call(String(K.nodeName)),Mp=K.attributes||[],kl=0;kl<Mp.length;kl++)wa+=" "+Mp[kl].name+"="+Z(ee(Mp[kl].value),"double",Me);return wa+=">",K.childNodes&&K.childNodes.length&&(wa+="..."),wa+="</"+w.call(String(K.nodeName))+">",wa}if(J(K)){if(K.length===0)return"[]";var Dp=In(K,_n);return hi&&!Kt(Dp)?"["+An(Dp,hi)+"]":"[ "+C.call(Dp,", ")+" ]"}if(X(K)){var Np=In(K,_n);return!("cause"in Error.prototype)&&"cause"in K&&!H.call(K,"cause")?"{ ["+String(K)+"] "+C.call(k.call("[cause]: "+_n(K.cause),Np),", ")+" }":Np.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call(Np,", ")+" }"}if(typeof K=="object"&&Nr){if(U&&typeof K[U]=="function"&&$)return $(K,{depth:Op-tt});if(Nr!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(Be(K)){var XS=[];return r&&r.call(K,function(mi,Cl){XS.push(_n(Cl,K,!0)+" => "+_n(mi,K))}),xt("Map",n.call(K),XS,hi)}if(F(K)){var QS=[];return s&&s.call(K,function(mi){QS.push(_n(mi,K))}),xt("Set",a.call(K),QS,hi)}if(ue(K))return Ft("WeakMap");if(Q(K))return Ft("WeakSet");if(Y(K))return Ft("WeakRef");if(j(K))return Ze(_n(Number(K)));if(he(K))return Ze(_n(D.call(K)));if(se(K))return Ze(b.call(K));if(oe(K))return Ze(_n(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof Wp<"u"&&K===Wp)return"{ [object globalThis] }";if(!R(K)&&!q(K)){var Lp=In(K,_n),JS=M?M(K)===Object.prototype:K instanceof Object||K.constructor===Object,Fp=K instanceof Object?"":"null prototype",eT=!JS&&N&&Object(K)===K&&N in K?y.call(Pe(K),8,-1):Fp?"Object":"",aR=JS||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Vp=aR+(eT||Fp?"["+C.call(k.call([],eT||[],Fp||[]),": ")+"] ":"");return Lp.length===0?Vp+"{}":hi?Vp+"{"+An(Lp,hi)+"}":Vp+"{ "+C.call(Lp,", ")+" }"}return String(K)};function Z(W,K,Fe){var tt=Fe.quoteStyle||K,ot=G[tt];return ot+W+ot}function ee(W){return x.call(String(W),/"/g,""")}function te(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function J(W){return Pe(W)==="[object Array]"&&te(W)}function R(W){return Pe(W)==="[object Date]"&&te(W)}function q(W){return Pe(W)==="[object RegExp]"&&te(W)}function X(W){return Pe(W)==="[object Error]"&&te(W)}function oe(W){return Pe(W)==="[object String]"&&te(W)}function j(W){return Pe(W)==="[object Number]"&&te(W)}function se(W){return Pe(W)==="[object Boolean]"&&te(W)}function le(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!z)return!1;try{return z.call(W),!0}catch{}return!1}function he(W){if(!W||typeof W!="object"||!D)return!1;try{return D.call(W),!0}catch{}return!1}var xe=Object.prototype.hasOwnProperty||function(W){return W in this};function de(W,K){return xe.call(W,K)}function Pe(W){return g.call(W)}function Oe(W){if(W.name)return W.name;var K=v.call(h.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function Se(W,K){if(W.indexOf)return W.indexOf(K);for(var Fe=0,tt=W.length;Fe<tt;Fe++)if(W[Fe]===K)return Fe;return-1}function Be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function Y(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function F(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function Q(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function ce(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function we(W,K){if(W.length>K.maxStringLength){var Fe=W.length-K.maxStringLength,tt="... "+Fe+" more character"+(Fe>1?"s":"");return we(y.call(W,0,K.maxStringLength),K)+tt}var ot=B[K.quoteStyle||"single"];ot.lastIndex=0;var Me=x.call(x.call(W,ot,"\\$1"),/[\x00-\x1f]/g,Le);return Z(Me,"single",K)}function Le(W){var K=W.charCodeAt(0),Fe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Fe?"\\"+Fe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ze(W){return"Object("+W+")"}function Ft(W){return W+" { ? }"}function xt(W,K,Fe,tt){var ot=tt?An(Fe,tt):C.call(Fe,", ");return W+" ("+K+") {"+ot+"}"}function Kt(W){for(var K=0;K<W.length;K++)if(Se(W[K],`
|
|
1
|
+
(function(te,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(te=typeof globalThis<"u"?globalThis:te||self,S(te.components={},te.React,te["react/jsx-runtime"],te.ReactDOM))})(this,function(te,S,m,uo){"use strict";function jp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=jp(S),gi=jp(uo);function zp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=zp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=zp(e))&&(r&&(r+=" "),r+=t);return r}const Rp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Hp=Bp,fo=(e,t)=>n=>{var r;if(t?.variants==null)return Hp(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const p=Rp(u)||Rp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(b=>{let[g,h]=b;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Hp(e,a,l,n?.class,n?.className)};var Wp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oT(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Pl,Up;function po(){return Up||(Up=1,Pl=TypeError),Pl}const iT=oT(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Al,Yp;function Sa(){if(Yp)return Al;Yp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,O=Array.prototype.slice,I=Math.floor,D=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,H=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function P(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||E.call(/e/,K))return K;var Fe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var tt=W<0?-I(-W):I(W);if(tt!==W){var ot=String(tt),Me=y.call(K,ot.length+1);return x.call(ot,Fe,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Fe,"$&_")}var $=iT,L=$.custom,U=le(L)?L:null,G={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Al=function W(K,Fe,tt,ot){var Me=Fe||{};if(de(Me,"quoteStyle")&&!de(G,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(de(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Nr=de(Me,"customInspect")?Me.customInspect:!0;if(typeof Nr!="boolean"&&Nr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(de(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(de(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=Me.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return we(K,Me);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var un=String(K);return co?P(K,un):un}if(typeof K=="bigint"){var Lr=String(K)+"n";return co?P(K,Lr):Lr}var Op=typeof Me.depth>"u"?5:Me.depth;if(typeof tt>"u"&&(tt=0),tt>=Op&&Op>0&&typeof K=="object")return J(K)?"[Array]":"[Object]";var hi=Kn(Me,tt);if(typeof ot>"u")ot=[];else if(Te(ot,K)>=0)return"[Circular]";function _n(mi,Cl,hR){if(Cl&&(ot=O.call(ot),ot.push(Cl)),hR){var rT={depth:Me.depth};return de(Me,"quoteStyle")&&(rT.quoteStyle=Me.quoteStyle),W(mi,rT,tt+1,ot)}return W(mi,Me,tt+1,ot)}if(typeof K=="function"&&!q(K)){var ZS=Oe(K),XS=In(K,_n);return"[Function"+(ZS?": "+ZS:" (anonymous)")+"]"+(XS.length>0?" { "+C.call(XS,", ")+" }":"")}if(le(K)){var QS=A?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):z.call(K);return typeof K=="object"&&!A?Ze(QS):QS}if(ce(K)){for(var wa="<"+w.call(String(K.nodeName)),Mp=K.attributes||[],kl=0;kl<Mp.length;kl++)wa+=" "+Mp[kl].name+"="+Z(ee(Mp[kl].value),"double",Me);return wa+=">",K.childNodes&&K.childNodes.length&&(wa+="..."),wa+="</"+w.call(String(K.nodeName))+">",wa}if(J(K)){if(K.length===0)return"[]";var Dp=In(K,_n);return hi&&!Kt(Dp)?"["+An(Dp,hi)+"]":"[ "+C.call(Dp,", ")+" ]"}if(X(K)){var Np=In(K,_n);return!("cause"in Error.prototype)&&"cause"in K&&!H.call(K,"cause")?"{ ["+String(K)+"] "+C.call(k.call("[cause]: "+_n(K.cause),Np),", ")+" }":Np.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call(Np,", ")+" }"}if(typeof K=="object"&&Nr){if(U&&typeof K[U]=="function"&&$)return $(K,{depth:Op-tt});if(Nr!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(Be(K)){var JS=[];return r&&r.call(K,function(mi,Cl){JS.push(_n(Cl,K,!0)+" => "+_n(mi,K))}),xt("Map",n.call(K),JS,hi)}if(F(K)){var eT=[];return s&&s.call(K,function(mi){eT.push(_n(mi,K))}),xt("Set",a.call(K),eT,hi)}if(ue(K))return Ft("WeakMap");if(Q(K))return Ft("WeakSet");if(Y(K))return Ft("WeakRef");if(j(K))return Ze(_n(Number(K)));if(he(K))return Ze(_n(D.call(K)));if(se(K))return Ze(b.call(K));if(oe(K))return Ze(_n(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof Wp<"u"&&K===Wp)return"{ [object globalThis] }";if(!R(K)&&!q(K)){var Lp=In(K,_n),tT=M?M(K)===Object.prototype:K instanceof Object||K.constructor===Object,Fp=K instanceof Object?"":"null prototype",nT=!tT&&N&&Object(K)===K&&N in K?y.call(Pe(K),8,-1):Fp?"Object":"",pR=tT||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Vp=pR+(nT||Fp?"["+C.call(k.call([],nT||[],Fp||[]),": ")+"] ":"");return Lp.length===0?Vp+"{}":hi?Vp+"{"+An(Lp,hi)+"}":Vp+"{ "+C.call(Lp,", ")+" }"}return String(K)};function Z(W,K,Fe){var tt=Fe.quoteStyle||K,ot=G[tt];return ot+W+ot}function ee(W){return x.call(String(W),/"/g,""")}function ne(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function J(W){return Pe(W)==="[object Array]"&&ne(W)}function R(W){return Pe(W)==="[object Date]"&&ne(W)}function q(W){return Pe(W)==="[object RegExp]"&&ne(W)}function X(W){return Pe(W)==="[object Error]"&&ne(W)}function oe(W){return Pe(W)==="[object String]"&&ne(W)}function j(W){return Pe(W)==="[object Number]"&&ne(W)}function se(W){return Pe(W)==="[object Boolean]"&&ne(W)}function le(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!z)return!1;try{return z.call(W),!0}catch{}return!1}function he(W){if(!W||typeof W!="object"||!D)return!1;try{return D.call(W),!0}catch{}return!1}var xe=Object.prototype.hasOwnProperty||function(W){return W in this};function de(W,K){return xe.call(W,K)}function Pe(W){return g.call(W)}function Oe(W){if(W.name)return W.name;var K=v.call(h.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function Te(W,K){if(W.indexOf)return W.indexOf(K);for(var Fe=0,tt=W.length;Fe<tt;Fe++)if(W[Fe]===K)return Fe;return-1}function Be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function Y(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function F(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function Q(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function ce(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function we(W,K){if(W.length>K.maxStringLength){var Fe=W.length-K.maxStringLength,tt="... "+Fe+" more character"+(Fe>1?"s":"");return we(y.call(W,0,K.maxStringLength),K)+tt}var ot=B[K.quoteStyle||"single"];ot.lastIndex=0;var Me=x.call(x.call(W,ot,"\\$1"),/[\x00-\x1f]/g,Le);return Z(Me,"single",K)}function Le(W){var K=W.charCodeAt(0),Fe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Fe?"\\"+Fe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ze(W){return"Object("+W+")"}function Ft(W){return W+" { ? }"}function xt(W,K,Fe,tt){var ot=tt?An(Fe,tt):C.call(Fe,", ");return W+" ("+K+") {"+ot+"}"}function Kt(W){for(var K=0;K<W.length;K++)if(Te(W[K],`
|
|
2
2
|
`)>=0)return!1;return!0}function Kn(W,K){var Fe;if(W.indent===" ")Fe=" ";else if(typeof W.indent=="number"&&W.indent>0)Fe=C.call(Array(W.indent+1)," ");else return null;return{base:Fe,prev:C.call(Array(K+1),Fe)}}function An(W,K){if(W.length===0)return"";var Fe=`
|
|
3
3
|
`+K.prev+K.base;return Fe+C.call(W,","+Fe)+`
|
|
4
|
-
`+K.prev}function In(W,K){var Fe=J(W),tt=[];if(Fe){tt.length=W.length;for(var ot=0;ot<W.length;ot++)tt[ot]=de(W,ot)?K(W[ot],W):""}var Me=typeof V=="function"?V(W):[],Nr;if(A){Nr={};for(var co=0;co<Me.length;co++)Nr["$"+Me[co]]=Me[co]}for(var un in W)de(W,un)&&(Fe&&String(Number(un))===un&&un<W.length||A&&Nr["$"+un]instanceof Symbol||(E.call(/[^\w$]/,un)?tt.push(K(un,W)+": "+K(W[un],W)):tt.push(un+": "+K(W[un],W))));if(typeof V=="function")for(var Lr=0;Lr<Me.length;Lr++)H.call(W,Me[Lr])&&tt.push("["+K(Me[Lr])+"]: "+K(W[Me[Lr]],W));return tt}return Al}var Il,Kp;function oT(){if(Kp)return Il;Kp=1;var e=Sa(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Il=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Il}var _l,Gp;function Zp(){return Gp||(Gp=1,_l=Object),_l}var Ol,Xp;function iT(){return Xp||(Xp=1,Ol=Error),Ol}var Ml,Qp;function aT(){return Qp||(Qp=1,Ml=EvalError),Ml}var Dl,Jp;function sT(){return Jp||(Jp=1,Dl=RangeError),Dl}var Nl,eh;function lT(){return eh||(eh=1,Nl=ReferenceError),Nl}var Ll,th;function cT(){return th||(th=1,Ll=SyntaxError),Ll}var Fl,nh;function uT(){return nh||(nh=1,Fl=URIError),Fl}var Vl,rh;function dT(){return rh||(rh=1,Vl=Math.abs),Vl}var $l,oh;function fT(){return oh||(oh=1,$l=Math.floor),$l}var jl,ih;function pT(){return ih||(ih=1,jl=Math.max),jl}var zl,ah;function hT(){return ah||(ah=1,zl=Math.min),zl}var Bl,sh;function mT(){return sh||(sh=1,Bl=Math.pow),Bl}var Rl,lh;function gT(){return lh||(lh=1,Rl=Math.round),Rl}var Hl,ch;function vT(){return ch||(ch=1,Hl=Number.isNaN||function(t){return t!==t}),Hl}var Wl,uh;function yT(){if(uh)return Wl;uh=1;var e=vT();return Wl=function(n){return e(n)||n===0?n:n<0?-1:1},Wl}var ql,dh;function bT(){return dh||(dh=1,ql=Object.getOwnPropertyDescriptor),ql}var Ul,fh;function ph(){if(fh)return Ul;fh=1;var e=bT();if(e)try{e([],"length")}catch{e=null}return Ul=e,Ul}var Yl,hh;function xT(){if(hh)return Yl;hh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Yl=e,Yl}var Kl,mh;function wT(){return mh||(mh=1,Kl=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),Kl}var Gl,gh;function ST(){if(gh)return Gl;gh=1;var e=typeof Symbol<"u"&&Symbol,t=wT();return Gl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Gl}var Zl,vh;function yh(){return vh||(vh=1,Zl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Zl}var Xl,bh;function xh(){if(bh)return Xl;bh=1;var e=Zp();return Xl=e.getPrototypeOf||null,Xl}var Ql,wh;function TT(){if(wh)return Ql;wh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Ql=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),b=[],g=0;g<f;g++)b[g]="$"+g;if(d=Function("binder","return function ("+a(b,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},Ql}var Jl,Sh;function Ta(){if(Sh)return Jl;Sh=1;var e=TT();return Jl=Function.prototype.bind||e,Jl}var ec,Th;function tc(){return Th||(Th=1,ec=Function.prototype.call),ec}var nc,Eh;function kh(){return Eh||(Eh=1,nc=Function.prototype.apply),nc}var rc,Ch;function ET(){return Ch||(Ch=1,rc=typeof Reflect<"u"&&Reflect&&Reflect.apply),rc}var oc,Ph;function kT(){if(Ph)return oc;Ph=1;var e=Ta(),t=kh(),n=tc(),r=ET();return oc=r||e.call(n,t),oc}var ic,Ah;function Ih(){if(Ah)return ic;Ah=1;var e=Ta(),t=po(),n=tc(),r=kT();return ic=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},ic}var ac,_h;function CT(){if(_h)return ac;_h=1;var e=Ih(),t=ph(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return ac=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,ac}var sc,Oh;function PT(){if(Oh)return sc;Oh=1;var e=yh(),t=xh(),n=CT();return sc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,sc}var lc,Mh;function AT(){if(Mh)return lc;Mh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ta();return lc=n.call(e,t),lc}var cc,Dh;function uc(){if(Dh)return cc;Dh=1;var e,t=Zp(),n=iT(),r=aT(),o=sT(),i=lT(),a=cT(),s=po(),l=uT(),c=dT(),u=fT(),d=pT(),p=hT(),f=mT(),b=gT(),g=yT(),h=Function,v=function(q){try{return h('"use strict"; return ('+q+").constructor;")()}catch{}},y=ph(),x=xT(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,E=ST()(),k=PT(),C=xh(),O=yh(),I=kh(),D=tc(),V={},z=typeof Uint8Array>"u"||!k?e:k(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":V,"%AsyncGenerator%":V,"%AsyncGeneratorFunction%":V,"%AsyncIteratorPrototype%":V,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":V,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&k?k(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":z,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":I,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":O};if(k)try{null.error}catch(q){var N=k(k(q));A["%Error.prototype%"]=N}var H=function q(X){var oe;if(X==="%AsyncFunction%")oe=v("async function () {}");else if(X==="%GeneratorFunction%")oe=v("function* () {}");else if(X==="%AsyncGeneratorFunction%")oe=v("async function* () {}");else if(X==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(oe=j.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=q("%AsyncGenerator%");se&&k&&(oe=k(se.prototype))}return A[X]=oe,oe},M={__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"]},P=Ta(),$=AT(),L=P.call(D,Array.prototype.concat),U=P.call(I,Array.prototype.splice),G=P.call(D,String.prototype.replace),B=P.call(D,String.prototype.slice),Z=P.call(D,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,te=/\\(\\)?/g,J=function(X){var oe=B(X,0,1),j=B(X,-1);if(oe==="%"&&j!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&oe!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return G(X,ee,function(le,he,xe,de){se[se.length]=xe?G(de,te,"$1"):he||le}),se},R=function(X,oe){var j=X,se;if($(M,j)&&(se=M[j],j="%"+se[0]+"%"),$(A,j)){var le=A[j];if(le===V&&(le=H(j)),typeof le>"u"&&!oe)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:j,value:le}}throw new a("intrinsic "+X+" does not exist!")};return cc=function(X,oe){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new s('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=J(X),se=j.length>0?j[0]:"",le=R("%"+se+"%",oe),he=le.name,xe=le.value,de=!1,Pe=le.alias;Pe&&(se=Pe[0],U(j,L([0,1],Pe)));for(var Oe=1,Se=!0;Oe<j.length;Oe+=1){var Be=j[Oe],ue=B(Be,0,1),Y=B(Be,-1);if((ue==='"'||ue==="'"||ue==="`"||Y==='"'||Y==="'"||Y==="`")&&ue!==Y)throw new a("property names with quotes must have matching quotes");if((Be==="constructor"||!Se)&&(de=!0),se+="."+Be,he="%"+se+"%",$(A,he))xe=A[he];else if(xe!=null){if(!(Be in xe)){if(!oe)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(y&&Oe+1>=j.length){var F=y(xe,Be);Se=!!F,Se&&"get"in F&&!("originalValue"in F.get)?xe=F.get:xe=xe[Be]}else Se=$(xe,Be),xe=xe[Be];Se&&!de&&(A[he]=xe)}}return xe},cc}var dc,Nh;function Lh(){if(Nh)return dc;Nh=1;var e=uc(),t=Ih(),n=t([e("%String.prototype.indexOf%")]);return dc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},dc}var fc,Fh;function Vh(){if(Fh)return fc;Fh=1;var e=uc(),t=Lh(),n=Sa(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return fc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var b=l(d,f);return c(d)===0&&(d=void 0),b}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,b){d||(d=new o),a(d,f,b)}};return p},fc}var pc,$h;function IT(){if($h)return pc;$h=1;var e=uc(),t=Lh(),n=Sa(),r=Vh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return pc=i?function(){var d,p,f={assert:function(b){if(!f.has(b))throw new o("Side channel does not contain "+n(b))},delete:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(d)return c(d,b)}else if(r&&p)return p.delete(b);return!1},get:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?a(d,b):p&&p.get(b)},has:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?l(d,b):!!p&&p.has(b)},set:function(b,g){i&&b&&(typeof b=="object"||typeof b=="function")?(d||(d=new i),s(d,b,g)):r&&(p||(p=r()),p.set(b,g))}};return f}:r,pc}var hc,jh;function _T(){if(jh)return hc;jh=1;var e=po(),t=Sa(),n=oT(),r=Vh(),o=IT(),i=o||r||n;return hc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},hc}var zh=e=>Array.isArray(e),mc=e=>e===void 0,gc=e=>e===null,OT=Function.bind.call(Function.call,Object.prototype.toString),MT=e=>!!e&&OT(e)==="[object Error]"||e instanceof Error,Bh=(e,t)=>e instanceof t,DT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},NT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Bh(e,Date),je={array:zh,date:NT,empty:e=>gc(e)||mc(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Bh,isError:MT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>gc(e)||mc(e),null:gc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!zh(e)&&typeof e=="object",primitive:DT,string:e=>typeof e=="string",undefined:mc},LT=e=>Object.keys(e),On=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},FT=e=>e.replace(/[^0-9]/g,"");const vc="-",VT=e=>{const t=jT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(vc);return s[0]===""&&s.length!==1&&s.shift(),Rh(s,t)||$T(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Rh=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Rh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(vc);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Hh=/^\[(.+)\]$/,$T=e=>{if(Hh.test(e)){const t=Hh.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)yc(n[o],r,o,t);return r},yc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Wh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(zT(o)){yc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{yc(a,Wh(t,i),n,r)})})},Wh=(e,t)=>{let n=e;return t.split(vc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zT=e=>e.isThemeGetter,BT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},bc="!",xc=":",RT=xc.length,HT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&s===0){if(g===xc){i.push(o.slice(l,b)),l=b+RT;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=WT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+xc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},WT=e=>e.endsWith(bc)?e.substring(0,e.length-1):e.startsWith(bc)?e.substring(1):e,qT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},UT=e=>({cache:BT(e.cacheSize),parseClassName:HT(e),sortModifiers:qT(e),...VT(e)}),YT=/\s+/,KT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(YT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?b.substring(0,g):b);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(b),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),x=f?y+bc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let E=0;E<w.length;++E){const k=w[E];a.push(x+k)}l=u+(l.length>0?" "+l:l)}return l};function GT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qh(t))&&(r&&(r+=" "),r+=n);return r}const qh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=" "),n+=t);return n};function ZT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=UT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=KT(l,n);return o(l,u),u}return function(){return i(GT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Uh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,XT=/^\d+\/\d+$/,QT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>XT.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),sr=e=>!!e&&Number.isInteger(Number(e)),wc=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Gn=e=>QT.test(e),rE=()=>!0,oE=e=>JT.test(e)&&!eE.test(e),Kh=()=>!1,iE=e=>tE.test(e),aE=e=>nE.test(e),sE=e=>!me(e)&&!ge(e),lE=e=>mo(e,Jh,Kh),me=e=>Uh.test(e),Fr=e=>mo(e,em,oE),Sc=e=>mo(e,pE,Ve),Gh=e=>mo(e,Xh,Kh),cE=e=>mo(e,Qh,aE),Ea=e=>mo(e,tm,iE),ge=e=>Yh.test(e),vi=e=>go(e,em),uE=e=>go(e,hE),Zh=e=>go(e,Xh),dE=e=>go(e,Jh),fE=e=>go(e,Qh),ka=e=>go(e,tm,!0),mo=(e,t,n)=>{const r=Uh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Yh.exec(e);return r?r[1]?t(r[1]):n:!1},Xh=e=>e==="position"||e==="percentage",Qh=e=>e==="image"||e==="url",Jh=e=>e==="length"||e==="size"||e==="bg-size",em=e=>e==="length",pE=e=>e==="number",hE=e=>e==="family-name",tm=e=>e==="shadow",mE=ZT(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("text-shadow"),f=It("drop-shadow"),b=It("blur"),g=It("perspective"),h=It("aspect"),v=It("ease"),y=It("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...T(),ge,me],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ge,me,l],O=()=>[ho,"full","auto",...C()],I=()=>[sr,"none","subgrid",ge,me],D=()=>["auto",{span:["full",sr,ge,me]},sr,ge,me],V=()=>[sr,"auto",ge,me],z=()=>["auto","min","max","fr",ge,me],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...C()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,ge,me],$=()=>[...T(),Zh,Gh,{position:[ge,me]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",dE,lE,{size:[ge,me]}],G=()=>[wc,vi,Fr],B=()=>["","none","full",c,ge,me],Z=()=>["",Ve,vi,Fr],ee=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ve,wc,Zh,Gh],R=()=>["","none",b,ge,me],q=()=>["none",Ve,ge,me],X=()=>["none",Ve,ge,me],oe=()=>[Ve,ge,me],j=()=>[ho,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[rE],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[sE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ve],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,me,ge,h]}],container:["container"],columns:[{columns:[Ve,me,ge,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[sr,"auto",ge,me]}],basis:[{basis:[ho,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,ho,"auto","initial","none",me]}],grow:[{grow:["",Ve,ge,me]}],shrink:[{shrink:["",Ve,ge,me]}],order:[{order:[sr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,vi,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Sc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wc,me]}],"font-family":[{font:[uE,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Ve,"none",ge,Sc]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",ge,Fr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Ve,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,ge,me],radial:["",ge,me],conic:[sr,ge,me]},fE,cE]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,ge,me]}],"outline-w":[{outline:["",Ve,vi,Fr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,ka,Ea]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,ka,Ea]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Ve,Fr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,ka,Ea]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Ve,ge,me]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:R()}],brightness:[{brightness:[Ve,ge,me]}],contrast:[{contrast:[Ve,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",f,ka,Ea]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Ve,ge,me]}],"hue-rotate":[{"hue-rotate":[Ve,ge,me]}],invert:[{invert:["",Ve,ge,me]}],saturate:[{saturate:[Ve,ge,me]}],sepia:[{sepia:["",Ve,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Ve,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",ge,me]}],ease:[{ease:["linear","initial",v,ge,me]}],delay:[{delay:[Ve,ge,me]}],animate:[{animate:["none",y,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ge,me]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Ve,vi,Fr,Sc]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Zn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},gE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Tc=e=>je.function(e),Te=(...e)=>mE(Bp(e)),nm=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},yi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},rm=e=>e.scrollHeight>e.clientHeight,bi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},vE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},en=S.forwardRef(function(t,n){const r=t.as||"span";return m.jsx(r,{ref:n,...t,as:void 0})}),yE=fo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Ca=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return m.jsxs(en,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Te(yE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),lr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t};function bE(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const xE=({children:e,...t})=>{const n=lr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:bE(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),m.jsx("div",{...t,ref:r,children:o?e:null})},wE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},SE=fo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),TE=fo("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:wE,defaultVariants:{theme:"primary",size:"default"}}),Pa=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(en,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Te(TE({size:a,theme:o?"loading":i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:SE({theme:n})}):null,r,s.children]})}),xi=S.createContext({});function bn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ec=typeof window<"u",Aa=Ec?S.useLayoutEffect:S.useEffect,Ia=S.createContext(null);function kc(e,t){e.indexOf(t)===-1&&e.push(t)}function _a(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function EE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Xn=(e,t,n)=>n>t?t:n<e?e:n;let vo=()=>{},tn=()=>{};process.env.NODE_ENV!=="production"&&(vo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});const Qn={},om=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function im(e){return typeof e=="object"&&e!==null}const am=e=>/^0[^.\s]+$/u.test(e);function Cc(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,kE=(e,t)=>n=>t(e(n)),wi=(...e)=>e.reduce(kE),yo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Pc{constructor(){this.subscriptions=[]}add(t){return kc(this.subscriptions,t),()=>_a(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fn=e=>e*1e3,Mn=e=>e/1e3;function sm(e,t){return t?e*(1e3/t):0}const lm=new Set;function Ac(e,t,n){e||lm.has(t)||(console.warn(t),lm.add(t))}const CE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},cm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,PE=1e-7,AE=12;function IE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=cm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>PE&&++s<AE);return a}function Si(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>IE(i,0,1,e,n);return i=>i===0||i===1?i:cm(o(i),t,r)}const um=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dm=e=>t=>1-e(1-t),fm=Si(.33,1.53,.69,.99),Ic=dm(fm),pm=um(Ic),hm=e=>(e*=2)<1?.5*Ic(e):.5*(2-Math.pow(2,-10*(e-1))),_c=e=>1-Math.sin(Math.acos(e)),mm=dm(_c),gm=um(_c),_E=Si(.42,0,1,1),OE=Si(0,0,.58,1),vm=Si(.42,0,.58,1),ym=e=>Array.isArray(e)&&typeof e[0]!="number";function bm(e,t){return ym(e)?e[CE(0,e.length,t)]:e}const xm=e=>Array.isArray(e)&&typeof e[0]=="number",wm={linear:dn,easeIn:_E,easeInOut:vm,easeOut:OE,circIn:_c,circInOut:gm,circOut:mm,backIn:Ic,backInOut:pm,backOut:fm,anticipate:hm},ME=e=>typeof e=="string",Oc=e=>{if(xm(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Si(t,n,r,o)}else if(ME(e))return tn(wm[e]!==void 0,`Invalid easing type '${e}'`),wm[e];return e},Oa=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function DE(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const b=p&&o?n:r;return d&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const NE=40;function Sm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Oa.reduce((x,T)=>(x[T]=DE(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:f,postRender:b}=a,g=()=>{const x=Qn.useManualTiming?o.timestamp:performance.now();n=!1,Qn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,NE),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),f.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},h=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:Oa.reduce((x,T)=>{const w=a[T];return x[T]=(E,k=!1,C=!1)=>(n||h(),w.schedule(E,k,C)),x},{}),cancel:x=>{for(let T=0;T<Oa.length;T++)a[Oa[T]].cancel(x)},state:o,steps:a}}const{schedule:ct,cancel:Jn,state:Vt,steps:Mc}=Sm(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Ma;function LE(){Ma=void 0}const Gt={now:()=>(Ma===void 0&&Gt.set(Vt.isProcessing||Qn.useManualTiming?Vt.timestamp:performance.now()),Ma),set:e=>{Ma=e,queueMicrotask(LE)}},Tm=e=>t=>typeof t=="string"&&t.startsWith(e),Dc=Tm("--"),FE=Tm("var(--"),Nc=e=>FE(e)?VE.test(e.split("/*")[0].trim()):!1,VE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ti={...bo,transform:e=>Xn(0,1,e)},Da={...bo,default:1},Ei=e=>Math.round(e*1e5)/1e5,Lc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $E(e){return e==null}const jE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fc=(e,t)=>n=>!!(typeof n=="string"&&jE.test(n)&&n.startsWith(e)||t&&!$E(n)&&Object.prototype.hasOwnProperty.call(n,t)),Em=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Lc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},zE=e=>Xn(0,255,e),Vc={...bo,transform:e=>Math.round(zE(e))},Vr={test:Fc("rgb","red"),parse:Em("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vc.transform(e)+", "+Vc.transform(t)+", "+Vc.transform(n)+", "+Ei(Ti.transform(r))+")"};function BE(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const $c={test:Fc("#"),parse:BE,transform:Vr.transform},ki=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),cr=ki("deg"),Dn=ki("%"),Ee=ki("px"),RE=ki("vh"),HE=ki("vw"),km={...Dn,parse:e=>Dn.parse(e)/100,transform:e=>Dn.transform(e*100)},xo={test:Fc("hsl","hue"),parse:Em("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Dn.transform(Ei(t))+", "+Dn.transform(Ei(n))+", "+Ei(Ti.transform(r))+")"},Pt={test:e=>Vr.test(e)||$c.test(e)||xo.test(e),parse:e=>Vr.test(e)?Vr.parse(e):xo.test(e)?xo.parse(e):$c.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Vr.transform(e):xo.transform(e),getAnimatableNone:e=>{const t=Pt.parse(e);return t.alpha=0,Pt.transform(t)}},WE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qE(e){return isNaN(e)&&typeof e=="string"&&(e.match(Lc)?.length||0)+(e.match(WE)?.length||0)>0}const Cm="number",Pm="color",UE="var",YE="var(",Am="${}",KE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ci(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(KE,l=>(Pt.test(l)?(r.color.push(i),o.push(Pm),n.push(Pt.parse(l))):l.startsWith(YE)?(r.var.push(i),o.push(UE),n.push(l)):(r.number.push(i),o.push(Cm),n.push(parseFloat(l))),++i,Am)).split(Am);return{values:n,split:s,indexes:r,types:o}}function Im(e){return Ci(e).values}function _m(e){const{split:t,types:n}=Ci(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===Cm?i+=Ei(o[a]):s===Pm?i+=Pt.transform(o[a]):i+=o[a]}return i}}const GE=e=>typeof e=="number"?0:Pt.test(e)?Pt.getAnimatableNone(e):e;function ZE(e){const t=Im(e);return _m(e)(t.map(GE))}const ur={test:qE,parse:Im,createTransformer:_m,getAnimatableNone:ZE};function jc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=jc(l,s,e+1/3),i=jc(l,s,e),a=jc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Na(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,zc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},QE=[$c,Vr,xo],JE=e=>QE.find(t=>t.test(e));function Om(e){const t=JE(e);if(vo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===xo&&(n=XE(n)),n}const Mm=(e,t)=>{const n=Om(e),r=Om(t);if(!n||!r)return Na(e,t);const o={...n};return i=>(o.red=zc(n.red,r.red,i),o.green=zc(n.green,r.green,i),o.blue=zc(n.blue,r.blue,i),o.alpha=ut(n.alpha,r.alpha,i),Vr.transform(o))},Bc=new Set(["none","hidden"]);function ek(e,t){return Bc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tk(e,t){return n=>ut(e,t,n)}function Rc(e){return typeof e=="number"?tk:typeof e=="string"?Nc(e)?Na:Pt.test(e)?Mm:ok:Array.isArray(e)?Dm:typeof e=="object"?Pt.test(e)?Mm:nk:Na}function Dm(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Rc(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function nk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Rc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function rk(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const ok=(e,t)=>{const n=ur.createTransformer(t),r=Ci(e),o=Ci(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Bc.has(e)&&!o.values.length||Bc.has(t)&&!r.values.length?ek(e,t):wi(Dm(rk(r,o),o.values),n):(vo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Na(e,t))};function Nm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):Rc(e)(e,t)}const ik=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ct.update(t,n),stop:()=>Jn(t),now:()=>Vt.isProcessing?Vt.timestamp:Gt.now()}},Lm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},La=2e4;function Hc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<La;)t+=n,r=e.next(t);return t>=La?1/0:t}function Fm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Hc(r),La);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const ak=5;function Vm(e,t,n){const r=Math.max(t-ak,0);return sm(n-e(r),t-r)}const ht={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Wc=.001;function sk({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;vo(e<=fn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Xn(ht.minDamping,ht.maxDamping,a),e=Xn(ht.minDuration,ht.maxDuration,Mn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=qc(c,a),b=Math.exp(-d);return Wc-p/f*b},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-d),g=qc(Math.pow(c,2),a);return(-o(c)+Wc>0?-1:1)*((p-f)*b)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Wc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=ck(o,i,s);if(e=fn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const lk=12;function ck(e,t,n){let r=n;for(let o=1;o<lk;o++)r=r-e(r)/t(r);return r}function qc(e,t){return e*Math.sqrt(1-t*t)}const uk=["duration","bounce"],dk=["stiffness","damping","mass"];function $m(e,t){return t.some(n=>e[n]!==void 0)}function fk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!$m(e,dk)&&$m(e,uk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=sk(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Pi(e=ht.visualDuration,t=ht.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=fk({...n,velocity:-Mn(n.velocity||0)}),b=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=Mn(Math.sqrt(l/u)),y=Math.abs(h)<5;r||(r=y?ht.restSpeed.granular:ht.restSpeed.default),o||(o=y?ht.restDelta.granular:ht.restDelta.default);let x;if(g<1){const w=qc(v,g);x=E=>{const k=Math.exp(-g*v*E);return a-k*((b+g*v*h)/w*Math.sin(w*E)+h*Math.cos(w*E))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(h+(b+v*h)*w);else{const w=v*Math.sqrt(g*g-1);x=E=>{const k=Math.exp(-g*v*E),C=Math.min(w*E,300);return a-k*((b+g*v*h)*Math.sinh(C)+w*h*Math.cosh(C))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const E=x(w);if(f)s.done=w>=d;else{let k=w===0?b:0;g<1&&(k=w===0?fn(b):Vm(x,w,E));const C=Math.abs(k)<=r,O=Math.abs(a-E)<=o;s.done=C&&O}return s.value=s.done?a:E,s},toString:()=>{const w=Math.min(Hc(T),La),E=Lm(k=>T.next(w*k).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Pi.applyToOptions=e=>{const t=Fm(e,100,Pi);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};function Uc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=C=>s!==void 0&&C<s||l!==void 0&&C>l,b=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const y=C=>-g*Math.exp(-C/r),x=C=>v+y(C),T=C=>{const O=y(C),I=x(C);p.done=Math.abs(O)<=c,p.value=p.done?v:I};let w,E;const k=C=>{f(p.value)&&(w=C,E=Pi({keyframes:[p.value,b(p.value)],velocity:Vm(x,C,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let O=!1;return!E&&w===void 0&&(O=!0,T(C),k(C)),w!==void 0&&C>=w?E.next(C-w):(!O&&T(C),p)}}}function pk(e,t,n){const r=[],o=n||Qn.mix||Nm,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||dn:t;s=wi(l,s)}r.push(s)}return r}function jm(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(tn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=pk(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=yo(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Xn(e[0],e[i-1],u)):c}function zm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=yo(0,t,r);e.push(ut(n,1,o))}}function Bm(e){const t=[0];return zm(t,e.length-1),t}function hk(e,t){return e.map(n=>n*t)}function mk(e,t){return e.map(()=>t||vm).splice(0,e.length-1)}function wo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=ym(r)?r.map(Oc):Oc(r),i={done:!1,value:t[0]},a=hk(n&&n.length===t.length?n:Bm(t),e),s=jm(a,t,{ease:Array.isArray(o)?o:mk(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const gk=e=>e!==null;function Yc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(gk),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const vk={decay:Uc,inertia:Uc,tween:wo,keyframes:wo,spring:Pi};function Rm(e){typeof e.type=="string"&&(e.type=vk[e.type])}class Kc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const yk=e=>e/100;class Gc extends Kc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Gt.now()&&this.tick(Gt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Rm(t);const{type:n=wo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||wo;process.env.NODE_ENV!=="production"&&l!==wo&&tn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==wo&&typeof s[0]!="number"&&(this.mixKeyframes=wi(yk,Nm(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Hc(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:f,type:b,onUpdate:g,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/s;let O=Math.floor(C),I=C%1;!I&&C>=1&&(I=1),I===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(I=1-I,f&&(I-=f/s)):p==="mirror"&&(T=a)),x=Xn(0,1,I)*s}const w=y?{done:!1,value:u[0]}:T.next(x);i&&(w.value=i(w.value));let{done:E}=w;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&b!==Uc&&(w.value=Yc(u,this.options,h,this.speed)),g&&g(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Mn(this.calculatedDuration)}get time(){return Mn(this.currentTime)}set time(t){t=fn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Gt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ik,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Gt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function bk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $r=e=>e*180/Math.PI,Zc=e=>{const t=$r(Math.atan2(e[1],e[0]));return Xc(t)},xk={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Zc,rotateZ:Zc,skewX:e=>$r(Math.atan(e[1])),skewY:e=>$r(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xc=e=>(e=e%360,e<0&&(e+=360),e),Hm=Zc,Wm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),wk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wm,scaleY:qm,scale:e=>(Wm(e)+qm(e))/2,rotateX:e=>Xc($r(Math.atan2(e[6],e[5]))),rotateY:e=>Xc($r(Math.atan2(-e[2],e[0]))),rotateZ:Hm,rotate:Hm,skewX:e=>$r(Math.atan(e[4])),skewY:e=>$r(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qc(e){return e.includes("scale")?1:0}function Jc(e,t){if(!e||e==="none")return Qc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=wk,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=xk,o=s}if(!o)return Qc(t);const i=r[t],a=o[1].split(",").map(Tk);return typeof i=="function"?i(a):a[i]}const Sk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Jc(n,t)};function Tk(e){return parseFloat(e.trim())}const So=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],To=new Set(So),Um=e=>e===bo||e===Ee,Ek=new Set(["x","y","z"]),kk=So.filter(e=>!Ek.has(e));function Ck(e){const t=[];return kk.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const jr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Jc(t,"x"),y:(e,{transform:t})=>Jc(t,"y")};jr.translateX=jr.x,jr.translateY=jr.y;const zr=new Set;let eu=!1,tu=!1,nu=!1;function Ym(){if(tu){const e=Array.from(zr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Ck(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}tu=!1,eu=!1,zr.forEach(e=>e.complete(nu)),zr.clear()}function Km(){zr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tu=!0)})}function Pk(){nu=!0,Km(),Ym(),nu=!1}class ru{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(zr.add(this),eu||(eu=!0,ct.read(Km),ct.resolveKeyframes(Ym))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}bk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),zr.delete(this)}cancel(){this.state==="scheduled"&&(zr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ak=e=>e.startsWith("--");function Ik(e,t,n){Ak(t)?e.style.setProperty(t,n):e.style[t]=n}const _k=Cc(()=>window.ScrollTimeline!==void 0),Ok={};function Mk(e,t){const n=Cc(e);return()=>Ok[t]??n()}const Gm=Mk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ai=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ai([0,.65,.55,1]),circOut:Ai([.55,0,1,.45]),backIn:Ai([.31,.01,.66,-.59]),backOut:Ai([.33,1.53,.69,.99])};function Xm(e,t){if(e)return typeof e=="function"?Gm()?Lm(e,t):"ease-out":xm(e)?Ai(e):Array.isArray(e)?e.map(n=>Xm(n,t)||Zm.easeOut):Zm[e]}function Dk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Xm(s,o);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(u,p)}function ou(e){return typeof e=="function"&&"applyToOptions"in e}function Nk({type:e,...t}){return ou(e)&&Gm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Lk extends Kc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,tn(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=Nk(t);this.animation=Dk(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Yc(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):Ik(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Mn(Number(t))}get time(){return Mn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_k()?(this.animation.timeline=t,dn):n(this)}}const Qm={anticipate:hm,backInOut:pm,circInOut:gm};function Fk(e){return e in Qm}function Vk(e){typeof e.ease=="string"&&Fk(e.ease)&&(e.ease=Qm[e.ease])}const Jm=10;class $k extends Lk{constructor(t){Vk(t),Rm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Gc({...a,autoplay:!1}),l=fn(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-Jm).value,s.sample(l).value,Jm),s.stop()}}const eg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ur.test(e)||e==="0")&&!e.startsWith("url("));function jk(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zk(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=eg(o,t),s=eg(i,t);return vo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:jk(e)||(n==="spring"||ou(n))&&r}function iu(e){return im(e)&&"offsetHeight"in e}const Bk=new Set(["opacity","clipPath","filter","transform"]),Rk=Cc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hk(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!iu(t?.owner?.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return Rk()&&n&&Bk.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const Wk=40;class qk extends Kc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Gt.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||ru;this.keyframeResolver=new f(s,(b,g,h)=>this.onKeyframesResolved(b,g,p,!h),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Gt.now(),zk(t,i,a,s)||((Qn.instantAnimations||!l)&&u?.(Yc(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Wk?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&Hk(p)?new $k({...p,element:p.motionValue.owner.current}):new Gc(p);f.finished.then(()=>this.notifyFinished()).catch(dn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pk()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Uk{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Yk extends Uk{then(t,n){return this.finished.finally(t).then(()=>{})}}const Kk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gk(e){const t=Kk.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Zk=4;function tg(e,t,n=1){tn(n<=Zk,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Gk(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return om(a)?parseFloat(a):a}return Nc(o)?tg(o,t,n+1):o}function au(e,t){return e?.[t]??e?.default??e}const ng=new Set(["width","height","top","left","right","bottom",...So]),Xk={test:e=>e==="auto",parse:e=>e},rg=e=>t=>t.test(e),og=[bo,Ee,Dn,cr,HE,RE,Xk],ig=e=>og.find(rg(e));function Qk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||am(e):!0}const Jk=new Set(["brightness","contrast","saturate","opacity"]);function eC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Lc)||[];if(!r)return e;const o=n.replace(r,"");let i=Jk.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const tC=/\b([a-z-]*)\(.*?\)/gu,su={...ur,getAnimatableNone:e=>{const t=e.match(tC);return t?t.map(eC).join(" "):e}},ag={...bo,transform:Math.round},lu={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:cr,rotateX:cr,rotateY:cr,rotateZ:cr,scale:Da,scaleX:Da,scaleY:Da,scaleZ:Da,skew:cr,skewX:cr,skewY:cr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:Ti,originX:km,originY:km,originZ:Ee},zIndex:ag,fillOpacity:Ti,strokeOpacity:Ti,numOctaves:ag},nC={...lu,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:su,WebkitFilter:su},sg=e=>nC[e];function lg(e,t){let n=sg(e);return n!==su&&(n=ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rC=new Set(["auto","none","0"]);function oC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!rC.has(i)&&Ci(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=lg(n,o)}class iC extends ru{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Nc(c))){const u=tg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ng.has(r)||t.length!==2)return;const[o,i]=t,a=ig(o),s=ig(i);if(a!==s)if(Um(a)&&Um(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else jr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Qk(t[o]))&&r.push(o);r.length&&oC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=jr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function cg(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const ug=(e,t)=>t&&typeof e=="number"?t.transform(e):e,dg=30,aC=e=>!isNaN(parseFloat(e)),Ii={current:void 0};class sC{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Gt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();o&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ac(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ct.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ii.current&&Ii.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>dg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,dg);return sm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Br(e,t){return new sC(e,t)}const{schedule:cu}=Sm(queueMicrotask,!1),xn={x:!1,y:!1};function fg(){return xn.x||xn.y}function lC(e){return e==="x"||e==="y"?xn[e]?null:(xn[e]=!0,()=>{xn[e]=!1}):xn.x||xn.y?null:(xn.x=xn.y=!0,()=>{xn.x=xn.y=!1})}function pg(e,t){const n=cg(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function hg(e){return!(e.pointerType==="touch"||fg())}function cC(e,t,n={}){const[r,o,i]=pg(e,n),a=s=>{if(!hg(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{hg(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const mg=(e,t)=>t?e===t?!0:mg(e,t.parentElement):!1,uu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,uC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dC(e){return uC.has(e.tagName)||e.tabIndex!==-1}const Fa=new WeakSet;function gg(e){return t=>{t.key==="Enter"&&e(t)}}function du(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=gg(()=>{if(Fa.has(n))return;du(n,"down");const o=gg(()=>{du(n,"up")}),i=()=>du(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function vg(e){return uu(e)&&!fg()}function pC(e,t,n={}){const[r,o,i]=pg(e,n),a=s=>{const l=s.currentTarget;if(!vg(s))return;Fa.add(l);const c=t(l,s),u=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),Fa.has(l)&&Fa.delete(l),vg(f)&&typeof c=="function"&&c(f,{success:b})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||mg(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),iu(s)&&(s.addEventListener("focus",c=>fC(c,o)),!dC(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function fu(e){return im(e)&&"ownerSVGElement"in e}function yg(e){return fu(e)&&e.tagName==="svg"}function hC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=jm(o,i,a);return t?s(r):s}const _t=e=>!!(e&&e.getVelocity),mC=[...og,Pt,ur],gC=e=>mC.find(rg(e)),Eo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class vC extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=iu(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function yC({children:e,isPresent:t,anchorX:n}){const r=S.useId(),o=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(Eo);return S.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
|
|
5
|
-
[data-motion-pop-id="${r}"] {
|
|
6
|
-
position: absolute !important;
|
|
7
|
-
width: ${s}px !important;
|
|
8
|
-
height: ${l}px !important;
|
|
9
|
-
${p}px !important;
|
|
10
|
-
top: ${c}px !important;
|
|
11
|
-
}
|
|
12
|
-
`),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),m.jsx(vC,{isPresent:t,childRef:o,sizeRef:i,children:_.cloneElement(e,{ref:o})})}const bC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(xC),c=S.useId();let u=!0,d=S.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return i&&u&&(d={...d}),S.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),_.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(yC,{isPresent:n,anchorX:s,children:e})),m.jsx(Ia.Provider,{value:d,children:e})};function xC(){return new Map}function bg(e=!0){const t=S.useContext(Ia);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Va=e=>e.key||"";function xg(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const wn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=bg(a),u=S.useMemo(()=>xg(e),[e]),d=a&&!l?[]:u.map(Va),p=S.useRef(!0),f=S.useRef(u),b=bn(()=>new Map),[g,h]=S.useState(u),[v,y]=S.useState(u);Aa(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const E=Va(v[w]);d.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let E=0;E<v.length;E++){const k=v[E],C=Va(k);d.includes(C)||(w.splice(E,0,k),x.push(k))}return i==="wait"&&x.length&&(w=x),y(xg(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=S.useContext(xi);return m.jsx(m.Fragment,{children:v.map(w=>{const E=Va(w),k=a&&!l?!1:u===v||d.includes(E),C=()=>{if(b.has(E))b.set(E,!0);else return;let O=!0;b.forEach(I=>{I||(O=!1)}),O&&(T?.(),y(f.current),a&&c?.(),r&&r())};return m.jsx(bC,{isPresent:k,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:k?void 0:C,anchorX:s,children:w},E)})})},wC=S.createContext(null);function SC(){const e=S.useRef(!1);return Aa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function TC(){const e=SC(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ct.postRender(r),[r]),t]}const EC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function wg(){const e=new Set,t=new WeakMap,n=()=>e.forEach(EC);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Sg=e=>e===!0,kC=e=>Sg(e===!0)||e==="id",CC=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(xi),o=S.useContext(wC),[i,a]=TC(),s=S.useRef(null),l=r.id||o;s.current===null&&(kC(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Sg(n)&&r.group||wg()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(xi.Provider,{value:c,children:e})},Tg=S.createContext({strict:!1}),Eg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ko={};for(const e in Eg)ko[e]={isEnabled:t=>Eg[e].some(n=>!!t[n])};function PC(e){for(const t in e)ko[t]={...ko[t],...e[t]}}const AC=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function $a(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AC.has(e)}let kg=e=>!$a(e);function Cg(e){typeof e=="function"&&(kg=t=>t.startsWith("on")?!$a(t):e(t))}try{Cg(require("@emotion/is-prop-valid").default)}catch{}function IC(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(kg(o)||n===!0&&$a(o)||!t&&!$a(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function pu({children:e,isValidProp:t,...n}){t&&Cg(t),n={...S.useContext(Eo),...n},n.isStatic=bn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(Eo.Provider,{value:r,children:e})}function _C(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ac(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ja=S.createContext({});function za(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _i(e){return typeof e=="string"||Array.isArray(e)}const hu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mu=["initial",...hu];function Ba(e){return za(e.animate)||mu.some(t=>_i(e[t]))}function Pg(e){return!!(Ba(e)||e.variants)}function OC(e,t){if(Ba(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_i(n)?n:void 0,animate:_i(r)?r:void 0}}return e.inherit!==!1?t:{}}function MC(e){const{initial:t,animate:n}=OC(e,S.useContext(ja));return S.useMemo(()=>({initial:t,animate:n}),[Ag(t),Ag(n)])}function Ag(e){return Array.isArray(e)?e.join(" "):e}const DC=Symbol.for("motionComponentSymbol");function Co(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function NC(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Co(n)&&(n.current=r))},[t])}const gu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ig="data-"+gu("framerAppearId"),_g=S.createContext({});function LC(e,t,n,r,o){const{visualElement:i}=S.useContext(ja),a=S.useContext(Tg),s=S.useContext(Ia),l=S.useContext(Eo).reducedMotion,c=S.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=S.useContext(_g);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&FC(c.current,n,o,d);const p=S.useRef(!1);S.useInsertionEffect(()=>{u&&p.current&&u.update(n,s)});const f=n[Ig],b=S.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Aa(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),cu.render(u.render),b.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!b.current&&u.animationState&&u.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1))}),u}function FC(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Og(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&Co(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Og(e){if(e)return e.options.allowProjection!==!1?e.projection:Og(e.parent)}function VC({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&PC(e);function i(s,l){let c;const u={...S.useContext(Eo),...s,layoutId:$C(s)},{isStatic:d}=u,p=MC(s),f=r(s,d);if(!d&&Ec){jC(u,e);const b=zC(u);c=b.MeasureLayout,p.visualElement=LC(o,f,u,t,b.ProjectionNode)}return m.jsxs(ja.Provider,{value:p,children:[c&&p.visualElement?m.jsx(c,{visualElement:p.visualElement,...u}):null,n(o,s,NC(f,p.visualElement,l),f,d,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=S.forwardRef(i);return a[DC]=o,a}function $C({layoutId:e}){const t=S.useContext(xi).id;return t&&e!==void 0?t+"-"+e:e}function jC(e,t){const n=S.useContext(Tg).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?vo(!1,r):tn(!1,r)}}function zC(e){const{drag:t,layout:n}=ko;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Oi={};function BC(e){for(const t in e)Oi[t]=e[t],Dc(t)&&(Oi[t].isCSSVariable=!0)}function Mg(e,{layout:t,layoutId:n}){return To.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Oi[e]||e==="opacity")}const RC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HC=So.length;function WC(e,t,n){let r="",o=!0;for(let i=0;i<HC;i++){const a=So[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=ug(s,lu[a]);if(!l){o=!1;const u=RC[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function vu(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if(To.has(l)){a=!0;continue}else if(Dc(l)){o[l]=c;continue}else{const u=ug(c,lu[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=WC(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const yu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Dg(e,t,n){for(const r in t)!_t(t[r])&&!Mg(r,n)&&(e[r]=t[r])}function qC({transformTemplate:e},t){return S.useMemo(()=>{const n=yu();return vu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function UC(e,t){const n=e.style||{},r={};return Dg(r,n,e),Object.assign(r,qC(e,t)),r}function YC(e,t){const n={},r=UC(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const KC={offset:"stroke-dashoffset",array:"stroke-dasharray"},GC={offset:"strokeDashoffset",array:"strokeDasharray"};function ZC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?KC:GC;e[i.offset]=Ee.transform(-r);const a=Ee.transform(t),s=Ee.transform(n);e[i.array]=`${a} ${s}`}function Ng(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(vu(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&ZC(d,o,i,a,!1)}const Lg=()=>({...yu(),attrs:{}}),Fg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function XC(e,t,n,r){const o=S.useMemo(()=>{const i=Lg();return Ng(i,t,Fg(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Dg(i,e.style,e),o.style={...i,...o.style}}return o}const QC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function bu(e){return typeof e!="string"||e.includes("-")?!1:!!(QC.indexOf(e)>-1||/[A-Z]/u.test(e))}function JC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(bu(n)?XC:YC)(r,i,a,n),c=IC(r,typeof n=="string",e),u=n!==S.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=S.useMemo(()=>_t(d)?d.get():d,[d]);return S.createElement(n,{...u,children:p})}}function Vg(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xu(e,t,n,r){if(typeof t=="function"){const[o,i]=Vg(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Vg(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ra(e){return _t(e)?e.get():e}function eP({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:tP(n,r,o,e),renderState:t()}}const $g=e=>(t,n)=>{const r=S.useContext(ja),o=S.useContext(Ia),i=()=>eP(e,t,r,o);return n?i():bn(i)};function tP(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ra(i[p]);let{initial:a,animate:s}=e;const l=Ba(e),c=Pg(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!za(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const b=xu(e,p[f]);if(b){const{transitionEnd:g,transition:h,...v}=b;for(const y in v){let x=v[y];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}}}return o}function wu(e,t,n){const{style:r}=e,o={};for(const i in r)(_t(r[i])||t.style&&_t(t.style[i])||Mg(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const nP={useVisualState:$g({scrapeMotionValuesFromProps:wu,createRenderState:yu})};function jg(e,t,n){const r=wu(e,t,n);for(const o in e)if(_t(e[o])||_t(t[o])){const i=So.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const rP={useVisualState:$g({scrapeMotionValuesFromProps:jg,createRenderState:Lg})};function oP(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...bu(r)?rP:nP,preloadedFeatures:e,useRender:JC(o),createVisualElement:t,Component:r};return VC(a)}}function Mi(e,t,n){const r=e.getProps();return xu(r,t,n!==void 0?n:r.custom,e)}const Su=e=>Array.isArray(e);function iP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Br(n))}function aP(e){return Su(e)?e[e.length-1]||0:e}function sP(e,t){const n=Mi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=aP(i[a]);iP(e,a,s)}}function lP(e){return!!(_t(e)&&e.add)}function Tu(e,t){const n=e.getValue("willChange");if(lP(n))return n.add(t);if(!n&&Qn.WillChange){const r=new Qn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zg(e){return e.props[Ig]}const cP=e=>e!==null;function uP(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(cP),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const dP={type:"spring",stiffness:500,damping:25,restSpeed:10},fP=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),pP={type:"keyframes",duration:.8},hP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mP=(e,{keyframes:t})=>t.length>2?pP:To.has(e)?e.startsWith("scale")?fP(t[1]):dP:hP;function gP({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Eu=(e,t,n,r={},o,i)=>a=>{const s=au(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};gP(s)||Object.assign(u,mP(e,u)),u.duration&&(u.duration=fn(u.duration)),u.repeatDelay&&(u.repeatDelay=fn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Qn.instantAnimations||Qn.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=uP(u.keyframes,s);if(p!==void 0){ct.update(()=>{u.onUpdate(p),u.onComplete()});return}}return s.isSync?new Gc(u):new qk(u)};function vP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ku(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),p=s[u];if(p===void 0||c&&vP(c,u))continue;const f={delay:n,...au(i||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===b&&!f.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=zg(e);if(v){const y=window.MotionHandoffAnimation(v,u,ct);y!==null&&(f.startTime=y,g=!0)}}Tu(e,u),d.start(Eu(u,d,p,e.shouldReduceMotion&&ng.has(u)?{type:!1}:f,e,g));const h=d.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{ct.update(()=>{a&&sP(e,a)})}),l}function Cu(e,t,n={}){const r=Mi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(ku(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return yP(e,t,c+l,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function yP(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(bP).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Cu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function bP(e,t){return e.sortNodePosition(t)}function xP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Cu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Cu(e,t,n);else{const o=typeof t=="function"?Mi(e,t,n.custom):t;r=Promise.all(ku(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Bg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const wP=mu.length;function Rg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Rg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wP;n++){const r=mu[n],o=e.props[r];(_i(o)||o===!1)&&(t[r]=o)}return t}const SP=[...hu].reverse(),TP=hu.length;function EP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>xP(e,n,r)))}function kP(e){let t=EP(e),n=Hg(),r=!0;const o=l=>(c,u)=>{const d=Mi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Rg(e.parent)||{},d=[],p=new Set;let f={},b=1/0;for(let h=0;h<TP;h++){const v=SP[h],y=n[v],x=c[v]!==void 0?c[v]:u[v],T=_i(x),w=v===l?y.isActive:null;w===!1&&(b=h);let E=x===u[v]&&x!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||za(x)||typeof x=="boolean")continue;const k=CP(y.prevProp,x);let C=k||v===l&&y.isActive&&!E&&T||h>b&&T,O=!1;const I=Array.isArray(x)?x:[x];let D=I.reduce(o(v),{});w===!1&&(D={});const{prevResolvedValues:V={}}=y,z={...V,...D},A=M=>{C=!0,p.has(M)&&(O=!0,p.delete(M)),y.needsAnimating[M]=!0;const P=e.getValue(M);P&&(P.liveStyle=!1)};for(const M in z){const P=D[M],$=V[M];if(f.hasOwnProperty(M))continue;let L=!1;Su(P)&&Su($)?L=!Bg(P,$):L=P!==$,L?P!=null?A(M):p.add(M):P!==void 0&&p.has(M)?A(M):y.protectedKeys[M]=!0}y.prevProp=x,y.prevResolvedValues=D,y.isActive&&(f={...f,...D}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(E&&k)||O)&&d.push(...I.map(M=>({animation:M,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Mi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),h[v]=y??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Hg(),r=!0}}}function CP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bg(t,e):!1}function Rr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hg(){return{animate:Rr(!0),whileInView:Rr(),whileHover:Rr(),whileTap:Rr(),whileDrag:Rr(),whileFocus:Rr(),exit:Rr()}}class dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class PP extends dr{constructor(t){super(t),t.animationState||(t.animationState=kP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();za(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let AP=0;class IP extends dr{constructor(){super(...arguments),this.id=AP++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const _P={animation:{Feature:PP},exit:{Feature:IP}};function Di(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ni(e){return{point:{x:e.pageX,y:e.pageY}}}const OP=e=>t=>uu(t)&&e(t,Ni(t));function Li(e,t,n,r){return Di(e,t,OP(n),r)}function Wg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function MP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function DP(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const qg=1e-4,NP=1-qg,LP=1+qg,Ug=.01,FP=0-Ug,VP=0+Ug;function qt(e){return e.max-e.min}function $P(e,t,n){return Math.abs(e-t)<=n}function Yg(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=qt(n)/qt(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=NP&&e.scale<=LP||isNaN(e.scale))&&(e.scale=1),(e.translate>=FP&&e.translate<=VP||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){Yg(e.x,t.x,n.x,r?r.originX:void 0),Yg(e.y,t.y,n.y,r?r.originY:void 0)}function Kg(e,t,n){e.min=n.min+t.min,e.max=e.min+qt(t)}function jP(e,t,n){Kg(e.x,t.x,n.x),Kg(e.y,t.y,n.y)}function Gg(e,t,n){e.min=t.min-n.min,e.max=e.min+qt(t)}function Vi(e,t,n){Gg(e.x,t.x,n.x),Gg(e.y,t.y,n.y)}const Zg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:Zg(),y:Zg()}),Xg=()=>({min:0,max:0}),yt=()=>({x:Xg(),y:Xg()});function pn(e){return[e("x"),e("y")]}function Pu(e){return e===void 0||e===1}function Au({scale:e,scaleX:t,scaleY:n}){return!Pu(e)||!Pu(t)||!Pu(n)}function Hr(e){return Au(e)||Qg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Qg(e){return Jg(e.x)||Jg(e.y)}function Jg(e){return e&&e!=="0%"}function Ha(e,t,n){const r=e-n,o=t*r;return n+o}function ev(e,t,n,r,o){return o!==void 0&&(e=Ha(e,o,r)),Ha(e,n,r)+t}function Iu(e,t=0,n=1,r,o){e.min=ev(e.min,t,n,r,o),e.max=ev(e.max,t,n,r,o)}function tv(e,{x:t,y:n}){Iu(e.x,t.translate,t.scale,t.originPoint),Iu(e.y,n.translate,n.scale,n.originPoint)}const nv=.999999999999,rv=1.0000000000001;function zP(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Io(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,tv(e,a)),r&&Hr(i.latestValues)&&Io(e,i.latestValues))}t.x<rv&&t.x>nv&&(t.x=1),t.y<rv&&t.y>nv&&(t.y=1)}function Ao(e,t){e.min=e.min+t,e.max=e.max+t}function ov(e,t,n,r,o=.5){const i=ut(e.min,e.max,o);Iu(e,t,n,i,r)}function Io(e,t){ov(e.x,t.x,t.scaleX,t.scale,t.originX),ov(e.y,t.y,t.scaleY,t.scale,t.originY)}function iv(e,t){return Wg(DP(e.getBoundingClientRect(),t))}function BP(e,t,n){const r=iv(e,n),{scroll:o}=t;return o&&(Ao(r.x,o.offset.x),Ao(r.y,o.offset.y)),r}const av=({current:e})=>e?e.ownerDocument.defaultView:null,sv=(e,t)=>Math.abs(e-t);function RP(e,t){const n=sv(e.x,t.x),r=sv(e.y,t.y);return Math.sqrt(n**2+r**2)}class lv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Ou(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=RP(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:b}=d,{timestamp:g}=Vt;this.history.push({...b,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=_u(p,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:b,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Ou(d.type==="pointercancel"?this.lastMoveEventInfo:_u(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),b&&b(d,h)},!uu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Ni(t),s=_u(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Vt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Ou(s,this.history)),this.removeListeners=wi(Li(this.contextWindow,"pointermove",this.handlePointerMove),Li(this.contextWindow,"pointerup",this.handlePointerUp),Li(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jn(this.updatePoint)}}function _u(e,t){return t?{point:t(e.point)}:e}function cv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ou({point:e},t){return{point:e,delta:cv(e,uv(t)),offset:cv(e,HP(t)),velocity:WP(t,.1)}}function HP(e){return e[0]}function uv(e){return e[e.length-1]}function WP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=uv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function qP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function dv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function UP(e,{top:t,left:n,bottom:r,right:o}){return{x:dv(e.x,n,o),y:dv(e.y,t,r)}}function fv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function YP(e,t){return{x:fv(e.x,t.x),y:fv(e.y,t.y)}}function KP(e,t){let n=.5;const r=qt(e),o=qt(t);return o>r?n=yo(t.min,t.max-r,e.min):r>o&&(n=yo(e.min,e.max-o,t.min)),Xn(0,1,n)}function GP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Mu=.35;function ZP(e=Mu){return e===!1?e=0:e===!0&&(e=Mu),{x:pv(e,"left","right"),y:pv(e,"top","bottom")}}function pv(e,t,n){return{min:hv(e,t),max:hv(e,n)}}function hv(e,t){return typeof e=="number"?e:e[t]||0}const XP=new WeakMap;class QP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ni(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:b}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lC(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(h=>{let v=this.getAxisMotionValue(h).get()||0;if(Dn.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[h];x&&(v=qt(x)*(parseFloat(v)/100))}}this.originPoint[h]=v}),b&&ct.postRender(()=>b(u,d)),Tu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:b,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=JP(h),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>pn(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new lv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:av(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Wa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=qP(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Co(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=UP(r.layoutBox,t):this.constraints=!1,this.elastic=ZP(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=GP(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Co(t))return!1;const r=t.current;tn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=BP(r,o.root,this.visualElement.getTransformPagePoint());let a=YP(o.layout.layoutBox,i);if(n){const s=n(MP(a));this.hasMutatedConstraints=!!s,s&&(a=Wg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!Wa(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Tu(this.visualElement,t),r.start(Eu(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){pn(n=>{const{drag:r}=this.getProps();if(!Wa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-ut(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Co(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=KP({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pn(a=>{if(!Wa(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ut(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;XP.set(this.visualElement,this);const t=this.visualElement.current,n=Li(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Co(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ct.read(r);const a=Di(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Mu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Wa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eA extends dr{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new QP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const mv=e=>(t,n)=>{e&&ct.postRender(()=>e(t,n))};class tA extends dr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new lv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:av(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:mv(t),onStart:mv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Li(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const qa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function gv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $i={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=gv(e,t.target.x),r=gv(e,t.target.y);return`${n}% ${r}%`}},nA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ur.parse(e);if(o.length>5)return r;const i=ur.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ut(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class rA extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;BC(oA),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),qa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||ct.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),cu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vv(e){const[t,n]=bg(),r=S.useContext(xi);return m.jsx(rA,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(_g),isPresent:t,safeToRemove:n})}const oA={borderRadius:{...$i,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$i,borderTopRightRadius:$i,borderBottomLeftRadius:$i,borderBottomRightRadius:$i,boxShadow:nA};function yv(e,t,n){const r=_t(e)?e:Br(e);return r.start(Eu("",r,t,n)),r.animation}const iA=(e,t)=>e.depth-t.depth;class aA{constructor(){this.children=[],this.isDirty=!1}add(t){kc(this.children,t),this.isDirty=!0}remove(t){_a(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iA),this.isDirty=!1,this.children.forEach(t)}}function sA(e,t){const n=Gt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Jn(r),e(i-t))};return ct.setup(r,!0),()=>Jn(r)}const bv=["TopLeft","TopRight","BottomLeft","BottomRight"],lA=bv.length,xv=e=>typeof e=="string"?parseFloat(e):e,wv=e=>typeof e=="number"||Ee.test(e);function cA(e,t,n,r,o,i){o?(e.opacity=ut(0,n.opacity??1,uA(r)),e.opacityExit=ut(t.opacity??1,0,dA(r))):i&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let a=0;a<lA;a++){const s=`border${bv[a]}Radius`;let l=Sv(t,s),c=Sv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||wv(l)===wv(c)?(e[s]=Math.max(ut(xv(l),xv(c),r),0),(Dn.test(c)||Dn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function Sv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uA=Tv(0,.5,mm),dA=Tv(.5,.95,dn);function Tv(e,t,n){return r=>r<e?0:r>t?1:n(yo(e,t,r))}function Ev(e,t){e.min=t.min,e.max=t.max}function hn(e,t){Ev(e.x,t.x),Ev(e.y,t.y)}function kv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cv(e,t,n,r,o){return e-=t,e=Ha(e,1/n,r),o!==void 0&&(e=Ha(e,1/o,r)),e}function fA(e,t=0,n=1,r=.5,o,i=e,a=e){if(Dn.test(t)&&(t=parseFloat(t),t=ut(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ut(i.min,i.max,r);e===i&&(s-=t),e.min=Cv(e.min,t,n,s,o),e.max=Cv(e.max,t,n,s,o)}function Pv(e,t,[n,r,o],i,a){fA(e,t[n],t[r],t[o],t.scale,i,a)}const pA=["x","scaleX","originX"],hA=["y","scaleY","originY"];function Av(e,t,n,r){Pv(e.x,t,pA,n?n.x:void 0,r?r.x:void 0),Pv(e.y,t,hA,n?n.y:void 0,r?r.y:void 0)}function Iv(e){return e.translate===0&&e.scale===1}function _v(e){return Iv(e.x)&&Iv(e.y)}function Ov(e,t){return e.min===t.min&&e.max===t.max}function mA(e,t){return Ov(e.x,t.x)&&Ov(e.y,t.y)}function Mv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dv(e,t){return Mv(e.x,t.x)&&Mv(e.y,t.y)}function Nv(e){return qt(e.x)/qt(e.y)}function Lv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gA{constructor(){this.members=[]}add(t){kc(this.members,t),t.scheduleRender()}remove(t){if(_a(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vA(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Du=["","X","Y","Z"],yA={visibility:"hidden"},bA=1e3;let xA=0;function Nu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fv(r)}function Vv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=xA++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(TA),this.nodes.forEach(AA),this.nodes.forEach(IA),this.nodes.forEach(EA)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new aA)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Pc),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=fu(a)&&!yg(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=sA(d,250),qa.hasAnimatedSinceResize&&(qa.hasAnimatedSinceResize=!1,this.nodes.forEach(jv))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||NA,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=c.getProps(),v=!this.targetLayout||!Dv(this.targetLayout,f),y=!d&&p;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...au(b,"layout"),onPlay:g,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||jv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Jn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_A),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($v);return}this.isUpdating||this.nodes.forEach(CA),this.isUpdating=!1,this.nodes.forEach(PA),this.nodes.forEach(wA),this.nodes.forEach(SA),this.clearAllSnapshots();const s=Gt.now();Vt.delta=Xn(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Mc.update.process(Vt),Mc.preRender.process(Vt),Mc.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kA),this.sharedNodes.forEach(OA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qt(this.snapshot.measuredBox.x)&&!qt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!_v(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||Hr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),LA(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(FA))){const{scroll:c}=this.root;c&&(Ao(s.x,c.offset.x),Ao(s.y,c.offset.y))}return s}removeElementScroll(a){const s=yt();if(hn(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&hn(s,a),Ao(s.x,u.offset.x),Ao(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=yt();hn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Io(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Hr(u.latestValues)&&Io(l,u.latestValues)}return Hr(this.latestValues)&&Io(l,this.latestValues),l}removeTransform(a){const s=yt();hn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Hr(c.latestValues))continue;Au(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();hn(u,d),Av(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Hr(this.latestValues)&&Av(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Vi(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),jP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),tv(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Vi(this.relativeTargetOrigin,this.target,p.target),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Au(this.parent.latestValues)||Qg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Vt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;zP(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kv(this.prevProjectionDelta.x,this.projectionDelta.x),kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!Lv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=yt(),f=l?l.source:void 0,b=this.layout?this.layout.source:void 0,g=f!==b,h=this.getStack(),v=!h||h.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(DA));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;zv(d.x,a.x,w),zv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MA(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&mA(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),hn(x,this.relativeTarget)),g&&(this.animationValues=u,cA(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Jn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{qa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Br(0)),this.currentAnimation=yv(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&qv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=qt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=qt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}hn(s,l),Io(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new gA),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Nu("z",a,c,this.animationValues);for(let u=0;u<Du.length;u++)Nu(`rotate${Du[u]}`,a,c,this.animationValues),Nu(`skew${Du[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return yA;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ra(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Ra(a?.pointerEvents)||""),this.hasProjected&&!Hr(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=vA(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:p}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in Oi){if(u[f]===void 0)continue;const{correct:b,applyTo:g,isCSSVariable:h}=Oi[f],v=s.transform==="none"?u[f]:b(u[f],c);if(g){const y=g.length;for(let x=0;x<y;x++)s[g[x]]=v}else h?this.options.visualElement.renderState.vars[f]=v:s[f]=v}return this.options.layoutId&&(s.pointerEvents=c===this?Ra(a?.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach($v),this.root.sharedNodes.clear()}}}function wA(e){e.updateLayout()}function SA(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],p=qt(d);d.min=n[u].min,d.max=d.min+p}):qv(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],p=qt(n[u]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const a=Po();Fi(a,n,t.layoutBox);const s=Po();i?Fi(s,e.applyTransform(r,!0),t.measuredBox):Fi(s,n,t.layoutBox);const l=!_v(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:p}=u;if(d&&p){const f=yt();Vi(f,t.layoutBox,d.layoutBox);const b=yt();Vi(b,n,p.layoutBox),Dv(f,b)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function TA(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function EA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kA(e){e.clearSnapshot()}function $v(e){e.clearMeasurements()}function CA(e){e.isLayoutDirty=!1}function PA(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AA(e){e.resolveTargetDelta()}function IA(e){e.calcProjection()}function _A(e){e.resetSkewAndRotation()}function OA(e){e.removeLeadSnapshot()}function zv(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bv(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function MA(e,t,n,r){Bv(e.x,t.x,n.x,r),Bv(e.y,t.y,n.y,r)}function DA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const NA={duration:.45,ease:[.4,0,.1,1]},Rv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hv=Rv("applewebkit/")&&!Rv("chrome/")?Math.round:dn;function Wv(e){e.min=Hv(e.min),e.max=Hv(e.max)}function LA(e){Wv(e.x),Wv(e.y)}function qv(e,t,n){return e==="position"||e==="preserve-aspect"&&!$P(Nv(t),Nv(n),.2)}function FA(e){return e!==e.root&&e.scroll?.wasRoot}const VA=Vv({attachResizeListener:(e,t)=>Di(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Lu={current:void 0},Uv=Vv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lu.current){const e=new VA({});e.mount(window),e.setOptions({layoutScroll:!0}),Lu.current=e}return Lu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$A={pan:{Feature:tA},drag:{Feature:eA,ProjectionNode:Uv,MeasureLayout:vv}};function Yv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ct.postRender(()=>i(t,Ni(t)))}class jA extends dr{mount(){const{current:t}=this.node;t&&(this.unmount=cC(t,(n,r)=>(Yv(this.node,r,"Start"),o=>Yv(this.node,o,"End"))))}unmount(){}}class zA extends dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wi(Di(this.node.current,"focus",()=>this.onFocus()),Di(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Kv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ct.postRender(()=>i(t,Ni(t)))}class BA extends dr{mount(){const{current:t}=this.node;t&&(this.unmount=pC(t,(n,r)=>(Kv(this.node,r,"Start"),(o,{success:i})=>Kv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Fu=new WeakMap,Vu=new WeakMap,RA=e=>{const t=Fu.get(e.target);t&&t(e)},HA=e=>{e.forEach(RA)};function WA({root:e,...t}){const n=e||document;Vu.has(n)||Vu.set(n,{});const r=Vu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(HA,{root:e,...t})),r[o]}function qA(e,t,n){const r=WA(t);return Fu.set(e,n),r.observe(e),()=>{Fu.delete(e),r.unobserve(e)}}const UA={some:0,all:1};class YA extends dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:UA[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=c?u:d;p&&p(l)};return qA(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(KA(t,n))&&this.startObserver()}unmount(){}}function KA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const GA={inView:{Feature:YA},tap:{Feature:BA},focus:{Feature:zA},hover:{Feature:jA}},ZA={layout:{ProjectionNode:Uv,MeasureLayout:vv}},$u={current:null},Gv={current:!1};function XA(){if(Gv.current=!0,!!Ec)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$u.current=e.matches;e.addListener(t),t()}else $u.current=!1}const ji=new WeakMap;function QA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(_t(o))e.addValue(r,o);else if(_t(i))e.addValue(r,Br(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Br(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Zv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xv{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ru,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Gt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ct.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Ba(n),this.isVariantNode=Pg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];l[p]!==void 0&&_t(f)&&f.set(l[p],!1)}}mount(t){this.current=t,ji.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Gv.current||XA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$u.current,process.env.NODE_ENV!=="production"&&Ac(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Jn(this.notifyUpdate),Jn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=To.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ko){const n=ko[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Zv.length;r++){const o=Zv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=QA(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Br(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(om(r)||am(r))?r=parseFloat(r):!gC(r)&&ur.test(n)&&(r=lg(t,n)),this.setBaseTarget(t,_t(r)?r.get():r)),_t(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=xu(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!_t(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qv extends Xv{constructor(){super(...arguments),this.KeyframeResolver=iC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_t(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Jv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function JA(e){return window.getComputedStyle(e)}class ey extends Qv{constructor(){super(...arguments),this.type="html",this.renderInstance=Jv}readValueFromInstance(t,n){if(To.has(n))return this.projection?.isProjecting?Qc(n):Sk(t,n);{const r=JA(t),o=(Dc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return iv(t,n)}build(t,n,r){vu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return wu(t,n,r)}}const ty=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function eI(e,t,n,r){Jv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ty.has(o)?o:gu(o),t.attrs[o])}class ny extends Qv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(To.has(n)){const r=sg(n);return r&&r.default||0}return n=ty.has(n)?n:gu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jg(t,n,r)}build(t,n,r){Ng(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){eI(t,n,r,o)}mount(t){this.isSVGTag=Fg(t.tagName),super.mount(t)}}const tI=(e,t)=>bu(e)?new ny(t):new ey(t,{allowProjection:e!==S.Fragment}),nI=oP({..._P,...GA,...$A,...ZA},tI),We=_C(nI);function rI(e){return S.useEffect(()=>()=>e(),[])}function _o(e){const t=bn(()=>Br(e)),{isStatic:n}=S.useContext(Eo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function ry(e,t){const n=_o(t()),r=()=>n.set(t());return r(),Aa(()=>{const o=()=>ct.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Jn(r)}}),n}function oI(e){Ii.current=[],e();const t=ry(Ii.current,e);return Ii.current=void 0,t}function iI(e,t,n,r){if(typeof e=="function")return oI(e);const o=typeof t=="function"?t:hC(t,n,r);return Array.isArray(e)?oy(e,o):oy([e],([i])=>o(i))}function oy(e,t){const n=bn(()=>[]);return ry(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ju(e){return typeof e=="object"&&!Array.isArray(e)}function iy(e,t,n,r){return typeof e=="string"&&ju(t)?cg(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function aI(e,t,n){return e*(t+1)}function ay(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function sI(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(_a(e,o),r--)}}function lI(e,t,n,r,o,i){sI(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ut(o,i,r[a]),easing:bm(n,a)})}function cI(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function uI(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const dI="easeInOut",fI=20;function pI(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const b=e[f];if(typeof b=="string"){c.set(b,d);continue}else if(!Array.isArray(b)){c.set(b.name,ay(d,b.at,u,c));continue}let[g,h,v={}]=b;v.at!==void 0&&(d=ay(d,v.at,u,c));let y=0;const x=(T,w,E,k=0,C=0)=>{const O=hI(T),{delay:I=0,times:D=Bm(O),type:V="keyframes",repeat:z,repeatType:A,repeatDelay:N=0,...H}=w;let{ease:M=t.ease||"easeOut",duration:P}=w;const $=typeof I=="function"?I(k,C):I,L=O.length,U=ou(V)?V:o?.[V||"keyframes"];if(L<=2&&U){let ee=100;if(L===2&&vI(O)){const R=O[1]-O[0];ee=Math.abs(R)}const te={...H};P!==void 0&&(te.duration=fn(P));const J=Fm(te,ee,U);M=J.ease,P=J.duration}P??(P=i);const G=d+$;D.length===1&&D[0]===0&&(D[1]=1);const B=D.length-O.length;if(B>0&&zm(D,B),O.length===1&&O.unshift(null),z){tn(z<fI,"Repeat count too high, must be less than 20"),P=aI(P,z);const ee=[...O],te=[...D];M=Array.isArray(M)?[...M]:[M];const J=[...M];for(let R=0;R<z;R++){O.push(...ee);for(let q=0;q<ee.length;q++)D.push(te[q]+(R+1)),M.push(q===0?"linear":bm(J,q-1))}cI(D,z)}const Z=G+P;lI(E,O,M,D,G,Z),y=Math.max($+P,y),p=Math.max(Z,p)};if(_t(g)){const T=sy(g,s);x(h,v,ly("default",T))}else{const T=iy(g,h,r,l),w=T.length;for(let E=0;E<w;E++){h=h,v=v;const k=T[E],C=sy(k,s);for(const O in h)x(h[O],mI(v,O),ly(O,C),E,w)}}u=d,d+=y}return s.forEach((f,b)=>{for(const g in f){const h=f[g];h.sort(uI);const v=[],y=[],x=[];for(let w=0;w<h.length;w++){const{at:E,value:k,easing:C}=h[w];v.push(k),y.push(yo(0,p,E)),x.push(C||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(dI)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(b)||a.set(b,{keyframes:{},transition:{}});const T=a.get(b);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:x,times:y,...n}}}),a}function sy(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ly(e,t){return t[e]||(t[e]=[]),t[e]}function hI(e){return Array.isArray(e)?e:[e]}function mI(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const gI=e=>typeof e=="number",vI=e=>e.every(gI);function yI(e,t){return e in t}class bI extends Xv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(yI(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function xI(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=fu(e)&&!yg(e)?new ny(t):new ey(t);n.mount(e),ji.set(e,n)}function wI(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new bI(t);n.mount(e),ji.set(e,n)}function SI(e,t){return _t(e)||typeof e=="number"||typeof e=="string"&&!ju(t)}function cy(e,t,n,r){const o=[];if(SI(e,t))o.push(yv(e,ju(t)&&t.default||t,n&&(n.default||n)));else{const i=iy(e,t,r),a=i.length;tn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?xI:wI;ji.has(l)||c(l);const u=ji.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...ku(u,{...t,transition:d},{}))}}return o}function TI(e,t,n){const r=[];return pI(e,t,n,{spring:Pi}).forEach(({keyframes:i,transition:a},s)=>{r.push(...cy(s,i,a))}),r}function EI(e){return Array.isArray(e)&&e.some(Array.isArray)}function kI(e){function t(n,r,o){let i=[];EI(n)?i=TI(n,r,e):i=cy(n,r,o,e);const a=new Yk(i);return e&&e.animations.push(a),a}return t}function CI(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>kI(e));return rI(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class PI{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const AI=()=>new PI;function II(){return bn(AI)}const uy=S.createContext(null);function _I(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=ut(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?EE(e,o,o+i):e}function OI({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>We[t]),l=[],c=S.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(b=>d===b.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(DI)},updateOrder:(d,p,f)=>{if(c.current)return;const b=_I(l,d,p,f);l!==b&&(c.current=!0,r(b.map(MI).filter(g=>o.indexOf(g)!==-1)))}};return S.useEffect(()=>{c.current=!1}),m.jsx(s,{...i,ref:a,ignoreStrict:!0,children:m.jsx(uy.Provider,{value:u,children:e})})}const dy=S.forwardRef(OI);function MI(e){return e.value}function DI(e,t){return e.layout.min-t.layout.min}function fy(e,t=0){return _t(e)?e:_o(t)}function NI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>We[r]),c=S.useContext(uy),u={x:fy(t.x),y:fy(t.y)},d=iI([u.x,u.y],([g,h])=>g||h?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:b}=c;return m.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&b(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const py=S.forwardRef(NI);function LI(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function FI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:LI(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Oc(r)(l/c)*c}return t+l}}/**
|
|
4
|
+
`+K.prev}function In(W,K){var Fe=J(W),tt=[];if(Fe){tt.length=W.length;for(var ot=0;ot<W.length;ot++)tt[ot]=de(W,ot)?K(W[ot],W):""}var Me=typeof V=="function"?V(W):[],Nr;if(A){Nr={};for(var co=0;co<Me.length;co++)Nr["$"+Me[co]]=Me[co]}for(var un in W)de(W,un)&&(Fe&&String(Number(un))===un&&un<W.length||A&&Nr["$"+un]instanceof Symbol||(E.call(/[^\w$]/,un)?tt.push(K(un,W)+": "+K(W[un],W)):tt.push(un+": "+K(W[un],W))));if(typeof V=="function")for(var Lr=0;Lr<Me.length;Lr++)H.call(W,Me[Lr])&&tt.push("["+K(Me[Lr])+"]: "+K(W[Me[Lr]],W));return tt}return Al}var Il,Kp;function aT(){if(Kp)return Il;Kp=1;var e=Sa(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Il=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Il}var _l,Gp;function Zp(){return Gp||(Gp=1,_l=Object),_l}var Ol,Xp;function sT(){return Xp||(Xp=1,Ol=Error),Ol}var Ml,Qp;function lT(){return Qp||(Qp=1,Ml=EvalError),Ml}var Dl,Jp;function cT(){return Jp||(Jp=1,Dl=RangeError),Dl}var Nl,eh;function uT(){return eh||(eh=1,Nl=ReferenceError),Nl}var Ll,th;function dT(){return th||(th=1,Ll=SyntaxError),Ll}var Fl,nh;function fT(){return nh||(nh=1,Fl=URIError),Fl}var Vl,rh;function pT(){return rh||(rh=1,Vl=Math.abs),Vl}var $l,oh;function hT(){return oh||(oh=1,$l=Math.floor),$l}var jl,ih;function mT(){return ih||(ih=1,jl=Math.max),jl}var zl,ah;function gT(){return ah||(ah=1,zl=Math.min),zl}var Bl,sh;function vT(){return sh||(sh=1,Bl=Math.pow),Bl}var Rl,lh;function yT(){return lh||(lh=1,Rl=Math.round),Rl}var Hl,ch;function bT(){return ch||(ch=1,Hl=Number.isNaN||function(t){return t!==t}),Hl}var Wl,uh;function xT(){if(uh)return Wl;uh=1;var e=bT();return Wl=function(n){return e(n)||n===0?n:n<0?-1:1},Wl}var ql,dh;function wT(){return dh||(dh=1,ql=Object.getOwnPropertyDescriptor),ql}var Ul,fh;function ph(){if(fh)return Ul;fh=1;var e=wT();if(e)try{e([],"length")}catch{e=null}return Ul=e,Ul}var Yl,hh;function ST(){if(hh)return Yl;hh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Yl=e,Yl}var Kl,mh;function TT(){return mh||(mh=1,Kl=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),Kl}var Gl,gh;function ET(){if(gh)return Gl;gh=1;var e=typeof Symbol<"u"&&Symbol,t=TT();return Gl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Gl}var Zl,vh;function yh(){return vh||(vh=1,Zl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Zl}var Xl,bh;function xh(){if(bh)return Xl;bh=1;var e=Zp();return Xl=e.getPrototypeOf||null,Xl}var Ql,wh;function kT(){if(wh)return Ql;wh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Ql=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),b=[],g=0;g<f;g++)b[g]="$"+g;if(d=Function("binder","return function ("+a(b,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},Ql}var Jl,Sh;function Ta(){if(Sh)return Jl;Sh=1;var e=kT();return Jl=Function.prototype.bind||e,Jl}var ec,Th;function tc(){return Th||(Th=1,ec=Function.prototype.call),ec}var nc,Eh;function kh(){return Eh||(Eh=1,nc=Function.prototype.apply),nc}var rc,Ch;function CT(){return Ch||(Ch=1,rc=typeof Reflect<"u"&&Reflect&&Reflect.apply),rc}var oc,Ph;function PT(){if(Ph)return oc;Ph=1;var e=Ta(),t=kh(),n=tc(),r=CT();return oc=r||e.call(n,t),oc}var ic,Ah;function Ih(){if(Ah)return ic;Ah=1;var e=Ta(),t=po(),n=tc(),r=PT();return ic=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},ic}var ac,_h;function AT(){if(_h)return ac;_h=1;var e=Ih(),t=ph(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return ac=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,ac}var sc,Oh;function IT(){if(Oh)return sc;Oh=1;var e=yh(),t=xh(),n=AT();return sc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,sc}var lc,Mh;function _T(){if(Mh)return lc;Mh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ta();return lc=n.call(e,t),lc}var cc,Dh;function uc(){if(Dh)return cc;Dh=1;var e,t=Zp(),n=sT(),r=lT(),o=cT(),i=uT(),a=dT(),s=po(),l=fT(),c=pT(),u=hT(),d=mT(),p=gT(),f=vT(),b=yT(),g=xT(),h=Function,v=function(q){try{return h('"use strict"; return ('+q+").constructor;")()}catch{}},y=ph(),x=ST(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,E=ET()(),k=IT(),C=xh(),O=yh(),I=kh(),D=tc(),V={},z=typeof Uint8Array>"u"||!k?e:k(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":V,"%AsyncGenerator%":V,"%AsyncGeneratorFunction%":V,"%AsyncIteratorPrototype%":V,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":V,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&k?k(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":z,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":I,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":O};if(k)try{null.error}catch(q){var N=k(k(q));A["%Error.prototype%"]=N}var H=function q(X){var oe;if(X==="%AsyncFunction%")oe=v("async function () {}");else if(X==="%GeneratorFunction%")oe=v("function* () {}");else if(X==="%AsyncGeneratorFunction%")oe=v("async function* () {}");else if(X==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(oe=j.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=q("%AsyncGenerator%");se&&k&&(oe=k(se.prototype))}return A[X]=oe,oe},M={__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"]},P=Ta(),$=_T(),L=P.call(D,Array.prototype.concat),U=P.call(I,Array.prototype.splice),G=P.call(D,String.prototype.replace),B=P.call(D,String.prototype.slice),Z=P.call(D,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,J=function(X){var oe=B(X,0,1),j=B(X,-1);if(oe==="%"&&j!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&oe!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return G(X,ee,function(le,he,xe,de){se[se.length]=xe?G(de,ne,"$1"):he||le}),se},R=function(X,oe){var j=X,se;if($(M,j)&&(se=M[j],j="%"+se[0]+"%"),$(A,j)){var le=A[j];if(le===V&&(le=H(j)),typeof le>"u"&&!oe)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:j,value:le}}throw new a("intrinsic "+X+" does not exist!")};return cc=function(X,oe){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new s('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=J(X),se=j.length>0?j[0]:"",le=R("%"+se+"%",oe),he=le.name,xe=le.value,de=!1,Pe=le.alias;Pe&&(se=Pe[0],U(j,L([0,1],Pe)));for(var Oe=1,Te=!0;Oe<j.length;Oe+=1){var Be=j[Oe],ue=B(Be,0,1),Y=B(Be,-1);if((ue==='"'||ue==="'"||ue==="`"||Y==='"'||Y==="'"||Y==="`")&&ue!==Y)throw new a("property names with quotes must have matching quotes");if((Be==="constructor"||!Te)&&(de=!0),se+="."+Be,he="%"+se+"%",$(A,he))xe=A[he];else if(xe!=null){if(!(Be in xe)){if(!oe)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(y&&Oe+1>=j.length){var F=y(xe,Be);Te=!!F,Te&&"get"in F&&!("originalValue"in F.get)?xe=F.get:xe=xe[Be]}else Te=$(xe,Be),xe=xe[Be];Te&&!de&&(A[he]=xe)}}return xe},cc}var dc,Nh;function Lh(){if(Nh)return dc;Nh=1;var e=uc(),t=Ih(),n=t([e("%String.prototype.indexOf%")]);return dc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},dc}var fc,Fh;function Vh(){if(Fh)return fc;Fh=1;var e=uc(),t=Lh(),n=Sa(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return fc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var b=l(d,f);return c(d)===0&&(d=void 0),b}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,b){d||(d=new o),a(d,f,b)}};return p},fc}var pc,$h;function OT(){if($h)return pc;$h=1;var e=uc(),t=Lh(),n=Sa(),r=Vh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return pc=i?function(){var d,p,f={assert:function(b){if(!f.has(b))throw new o("Side channel does not contain "+n(b))},delete:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(d)return c(d,b)}else if(r&&p)return p.delete(b);return!1},get:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?a(d,b):p&&p.get(b)},has:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?l(d,b):!!p&&p.has(b)},set:function(b,g){i&&b&&(typeof b=="object"||typeof b=="function")?(d||(d=new i),s(d,b,g)):r&&(p||(p=r()),p.set(b,g))}};return f}:r,pc}var hc,jh;function MT(){if(jh)return hc;jh=1;var e=po(),t=Sa(),n=aT(),r=Vh(),o=OT(),i=o||r||n;return hc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},hc}var zh=e=>Array.isArray(e),mc=e=>e===void 0,gc=e=>e===null,DT=Function.bind.call(Function.call,Object.prototype.toString),NT=e=>!!e&&DT(e)==="[object Error]"||e instanceof Error,Bh=(e,t)=>e instanceof t,LT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},FT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Bh(e,Date),je={array:zh,date:FT,empty:e=>gc(e)||mc(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Bh,isError:NT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>gc(e)||mc(e),null:gc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!zh(e)&&typeof e=="object",primitive:LT,string:e=>typeof e=="string",undefined:mc},VT=e=>Object.keys(e),On=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},$T=e=>e.replace(/[^0-9]/g,"");const vc="-",jT=e=>{const t=BT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(vc);return s[0]===""&&s.length!==1&&s.shift(),Rh(s,t)||zT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Rh=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Rh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(vc);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Hh=/^\[(.+)\]$/,zT=e=>{if(Hh.test(e)){const t=Hh.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},BT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)yc(n[o],r,o,t);return r},yc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Wh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(RT(o)){yc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{yc(a,Wh(t,i),n,r)})})},Wh=(e,t)=>{let n=e;return t.split(vc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},RT=e=>e.isThemeGetter,HT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},bc="!",xc=":",WT=xc.length,qT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&s===0){if(g===xc){i.push(o.slice(l,b)),l=b+WT;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=UT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+xc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},UT=e=>e.endsWith(bc)?e.substring(0,e.length-1):e.startsWith(bc)?e.substring(1):e,YT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},KT=e=>({cache:HT(e.cacheSize),parseClassName:qT(e),sortModifiers:YT(e),...jT(e)}),GT=/\s+/,ZT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(GT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?b.substring(0,g):b);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(b),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),x=f?y+bc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let E=0;E<w.length;++E){const k=w[E];a.push(x+k)}l=u+(l.length>0?" "+l:l)}return l};function XT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qh(t))&&(r&&(r+=" "),r+=n);return r}const qh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=" "),n+=t);return n};function QT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=KT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=ZT(l,n);return o(l,u),u}return function(){return i(XT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Uh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JT=/^\d+\/\d+$/,eE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>JT.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),sr=e=>!!e&&Number.isInteger(Number(e)),wc=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Gn=e=>eE.test(e),iE=()=>!0,aE=e=>tE.test(e)&&!nE.test(e),Kh=()=>!1,sE=e=>rE.test(e),lE=e=>oE.test(e),cE=e=>!me(e)&&!ge(e),uE=e=>mo(e,Jh,Kh),me=e=>Uh.test(e),Fr=e=>mo(e,em,aE),Sc=e=>mo(e,mE,Ve),Gh=e=>mo(e,Xh,Kh),dE=e=>mo(e,Qh,lE),Ea=e=>mo(e,tm,sE),ge=e=>Yh.test(e),vi=e=>go(e,em),fE=e=>go(e,gE),Zh=e=>go(e,Xh),pE=e=>go(e,Jh),hE=e=>go(e,Qh),ka=e=>go(e,tm,!0),mo=(e,t,n)=>{const r=Uh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Yh.exec(e);return r?r[1]?t(r[1]):n:!1},Xh=e=>e==="position"||e==="percentage",Qh=e=>e==="image"||e==="url",Jh=e=>e==="length"||e==="size"||e==="bg-size",em=e=>e==="length",mE=e=>e==="number",gE=e=>e==="family-name",tm=e=>e==="shadow",vE=QT(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("text-shadow"),f=It("drop-shadow"),b=It("blur"),g=It("perspective"),h=It("aspect"),v=It("ease"),y=It("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...T(),ge,me],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ge,me,l],O=()=>[ho,"full","auto",...C()],I=()=>[sr,"none","subgrid",ge,me],D=()=>["auto",{span:["full",sr,ge,me]},sr,ge,me],V=()=>[sr,"auto",ge,me],z=()=>["auto","min","max","fr",ge,me],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...C()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,ge,me],$=()=>[...T(),Zh,Gh,{position:[ge,me]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",pE,uE,{size:[ge,me]}],G=()=>[wc,vi,Fr],B=()=>["","none","full",c,ge,me],Z=()=>["",Ve,vi,Fr],ee=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ve,wc,Zh,Gh],R=()=>["","none",b,ge,me],q=()=>["none",Ve,ge,me],X=()=>["none",Ve,ge,me],oe=()=>[Ve,ge,me],j=()=>[ho,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[iE],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[cE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ve],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,me,ge,h]}],container:["container"],columns:[{columns:[Ve,me,ge,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[sr,"auto",ge,me]}],basis:[{basis:[ho,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,ho,"auto","initial","none",me]}],grow:[{grow:["",Ve,ge,me]}],shrink:[{shrink:["",Ve,ge,me]}],order:[{order:[sr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,vi,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Sc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wc,me]}],"font-family":[{font:[fE,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Ve,"none",ge,Sc]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",ge,Fr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Ve,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,ge,me],radial:["",ge,me],conic:[sr,ge,me]},hE,dE]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,ge,me]}],"outline-w":[{outline:["",Ve,vi,Fr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,ka,Ea]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,ka,Ea]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Ve,Fr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,ka,Ea]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Ve,ge,me]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:R()}],brightness:[{brightness:[Ve,ge,me]}],contrast:[{contrast:[Ve,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",f,ka,Ea]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Ve,ge,me]}],"hue-rotate":[{"hue-rotate":[Ve,ge,me]}],invert:[{invert:["",Ve,ge,me]}],saturate:[{saturate:[Ve,ge,me]}],sepia:[{sepia:["",Ve,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Ve,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",ge,me]}],ease:[{ease:["linear","initial",v,ge,me]}],delay:[{delay:[Ve,ge,me]}],animate:[{animate:["none",y,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ge,me]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Ve,vi,Fr,Sc]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Zn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},yE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Tc=e=>je.function(e),Se=(...e)=>vE(Bp(e)),nm=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},yi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},rm=e=>e.scrollHeight>e.clientHeight,bi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},bE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},en=S.forwardRef(function(t,n){const r=t.as||"span";return m.jsx(r,{ref:n,...t,as:void 0})}),xE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},wE=fo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),SE=fo("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:xE,defaultVariants:{theme:"primary",size:"default"}}),Ca=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(en,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Se(SE({size:a,theme:o?"loading":i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:wE({theme:n})}):null,r,s.children]})}),TE=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})};var wt=function(){return wt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wt.apply(this,arguments)};function Ec(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function kc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var xi=function(e){return e.replace(new RegExp(" ","g")," ")},om=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},EE=function(e){return e.replace(/^0+([0-9]+)/,"$1")},im=function(e,t,n){var r=e.length-2,o=EE(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},am=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Pa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},kE=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Cc=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},CE=function(e){return e==="money"||e==="currency"},PE=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return wt(wt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Aa=function(e,t){var n=om(am(e),t.fraction.length),r="".concat(t.currency).concat(im(n,t.group,t.decimal));return xi(r)},AE=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=Ec(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var b=PE(r,i,s);return b.currency=xi("".concat(b.currency.trim()," ")),b.literal=xi(b.literal.trim()),b},[r,i]),p=function(b){var g=Aa(b.target.value,d),h=Pa(g);b.target.value=g,b.target.setAttribute("data-number",h.toString()),l?.(b),h!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var b=u.current.value;if(b!==""){var g=Aa(b,d),h=Pa(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l?.(wt(wt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Aa(c.defaultValue,d):void 0;return S.createElement("input",wt({},c,{value:typeof c.value=="string"?Aa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),IE=1,_E=function(e){return e==="percentage"||e==="percent"||e==="percentual"},OE=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return wt(wt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ia=function(e,t){var n=om(am(e),t.fraction.length),r="".concat(im(n,t.group,t.decimal)," ").concat(t.percentSign);return xi(r)},ME=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=Ec(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=kc(S.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Ia(y,d))},[a.value]);var d=S.useMemo(function(){var v=OE(r);return v.percentSign=xi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-IE,f=function(v){var y,x=s.current;x&&(x.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},b=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,T=y.selectionEnd,w=x!==T,E=p<x;!w&&E&&f()}i?.(v)},g=function(v){var y=Ia(v.target.value,d),x=Pa(y);u(y),v.target.value=y,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=Ia(v,d),x=Pa(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(wt(wt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return f()},[c]);var h=a.defaultValue?Ia(a.defaultValue,d):void 0;return S.createElement("input",wt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:b,ref:s,type:"text"}))}),wi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},DE=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=_a[i];a===void 0?r.push(i.replace(wi.dots,"\\.").replace(wi.openParenthesis,"\\(").replace(wi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(wi.leadingBars,"\\")},Si=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Pc(o,n);var i=DE(o);return n?"^".concat(i,"$"):i},NE=function(e){return e.replace(wi.escape,"\\$&")},Pc=function(e,t){var n=e.map(function(r){return typeof r=="string"?NE(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},_a={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},LE=/\d/,sm="(dd) 9dddd-dddd",lm="(dd) dddd-dddd",cm="ddd.ddd.ddd-dd",um="dd.ddd.ddd/dddd-dd",Oa=function(e){return e.replace(/\D/g,"")},FE=["2",/[0-3]/,":",/[0-5]/,/\d/],VE=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Gt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:cm,isoDate:"dddd-dd-dd",cnpj:um,telephone:lm,cellphone:sm,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Oa(e).length<=11?cm:um},int:function(e){return e===void 0&&(e=""),LE.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Oa(e);return t.length<11?lm:sm},time:function(e){var t=Oa(e),n=t[0];return n==="2"?FE:VE}},Zt=function(e,t,n){var r;return n===void 0&&(n={}),wt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Si(e,"",!0),infinity:n.infinity},n)},Rt={cellTelephone:Zt(Gt.cellTelephone,"tel"),cellphone:Zt(Gt.cellphone,"tel"),cep:Zt(Gt.cep,"decimal"),cnpj:Zt(Gt.cnpj,"decimal"),color:Zt(Gt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Zt(Gt.cpf,"decimal"),cpfCnpj:Zt(Gt.cpfCnpj,"decimal",{transform:Oa}),creditCard:Zt(Gt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Zt(Gt.date,"decimal"),int:Zt(Gt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Zt(Gt.isoDate,"decimal"),telephone:Zt(Gt.telephone,"tel"),time:Zt(Gt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Zt(Gt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function dm(e,t,n,r){var o,i;r===void 0&&(r=_a);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var fm=function(e){return e},$E=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Si(e,n,t));return r.test(n)};function jE(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var zE=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Ec(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),b=S.useRef(null);S.useImperativeHandle(t,function(){return b.current});var g=Cc(s),h=Cc(d),v=Cc(u),y=S.useRef($E(u,i,f.value||f.defaultValue)),x=p??"input",T=kc(S.useState(""),2),w=T[0],E=T[1],k=jE(w),C=S.useCallback(function(N,H){var M,P,$=(M=N??H)!==null&&M!==void 0?M:"";if(u===void 0)return $;var L=(P=$?.toString())!==null&&P!==void 0?P:"";return dm(L,typeof u=="function"?u(L):u,a??fm,c??_a)},[a,u,c]),O=kc(S.useState(function(){return C(f.value,f.defaultValue)}),2),I=O[0],D=O[1],V=C(f.defaultValue,f.defaultValue),z=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(I);return Array.isArray(N)?Pc(N,i):Si(u,I,i)}return typeof u=="string"?Si(u,I,i):Pc(u,i)},[l,I,i,u]);S.useEffect(function(){if(f.value!==void 0){var N=C(f.value,f.defaultValue);D(N),b.current!==null&&(b.current.value=N)}},[f.value,u,a,f.defaultValue]);var A=function(N){var H,M,P,$,L,U=N.currentTarget,G=N.target.value;if(v.current===void 0)return D(G),(H=h.current)===null||H===void 0||H.call(h,G),(M=g.current)===null||M===void 0||M.call(g,N),d?.(G);var B=new RegExp(Si(v.current,G,i)),Z=(P=U.selectionEnd)!==null&&P!==void 0?P:0,ee=function(X,oe,j){if(X.type!=="number")return X.setSelectionRange(oe,j)};if(r&&y.current&&G.length>=I.length)return U.value=I,ee(U,Z-1,Z-1);var ne=!1;G.length<k.length&&(y.current=!1,ne=!0),B.test(G)&&(y.current=!0);var J=Z,R=G[J-1],q=dm(G,typeof v.current=="function"?v.current(G):v.current,a??fm,c??_a);for(U.value=q,D(q);J<q.length&&q.charAt(J-1)!==R;)J+=1;ne?ee(U,Z,Z):ee(U,J,J),N.target.value=q,E(q),($=h.current)===null||$===void 0||$.call(h,q),(L=g.current)===null||L===void 0||L.call(g,N)};return S.createElement(x,wt({},f,{ref:b,pattern:z,onChange:A,defaultValue:pm(f.defaultValue)?V:void 0,value:pm(f.value)?C(f.value,f.value):f.value}))}),pm=function(e){return typeof e=="string"},hm=S.forwardRef(function(e,t){return CE(e.mask)?S.createElement(AE,wt({},e,{mask:void 0,ref:t})):_E(e.mask)?S.createElement(ME,wt({},e,{mask:void 0,ref:t})):S.createElement(zE,wt({},e,{ref:t}))}),Xt=function(e){return function(t){return S.createElement(hm,wt({},e,t))}};Xt(Rt.cellTelephone),Xt(Rt.cellphone),Xt(Rt.cep),Xt(Rt.cnpj),Xt(Rt.color),Xt(Rt.cpf),Xt(Rt.cpfCnpj),Xt(Rt.creditCard),Xt(Rt.date),Xt(Rt.int),Xt(Rt.isoDate),Xt(Rt.telephone),Xt(Rt.time),Xt(Rt.uuid);var mm=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&kE(Rt,t.mask)?Rt[t.mask]:{mask:t.mask}},[t.mask]),o=wt(wt({},t),r);return S.createElement(hm,wt({},o,{ref:n}))});/**
|
|
13
5
|
* @license lucide-react v0.523.0 - ISC
|
|
14
6
|
*
|
|
15
7
|
* This source code is licensed under the ISC license.
|
|
16
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const
|
|
9
|
+
*/const BE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),gm=e=>{const t=RE(e);return t.charAt(0).toUpperCase()+t.slice(1)},vm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),HE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
18
10
|
* @license lucide-react v0.523.0 - ISC
|
|
19
11
|
*
|
|
20
12
|
* This source code is licensed under the ISC license.
|
|
21
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/var
|
|
14
|
+
*/var WE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
23
15
|
* @license lucide-react v0.523.0 - ISC
|
|
24
16
|
*
|
|
25
17
|
* This source code is licensed under the ISC license.
|
|
26
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
19
|
+
*/const qE=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...WE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vm("lucide",o),...!i&&!HE(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
28
20
|
* @license lucide-react v0.523.0 - ISC
|
|
29
21
|
*
|
|
30
22
|
* This source code is licensed under the ISC license.
|
|
31
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(
|
|
24
|
+
*/const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(qE,{ref:i,iconNode:t,className:vm(`lucide-${BE(gm(e))}`,`lucide-${e}`,r),...o}));return n.displayName=gm(e),n};/**
|
|
33
25
|
* @license lucide-react v0.523.0 - ISC
|
|
34
26
|
*
|
|
35
27
|
* This source code is licensed under the ISC license.
|
|
36
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
29
|
+
*/const UE=Xe("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
38
30
|
* @license lucide-react v0.523.0 - ISC
|
|
39
31
|
*
|
|
40
32
|
* This source code is licensed under the ISC license.
|
|
41
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
34
|
+
*/const YE=Xe("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
43
35
|
* @license lucide-react v0.523.0 - ISC
|
|
44
36
|
*
|
|
45
37
|
* This source code is licensed under the ISC license.
|
|
46
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
39
|
+
*/const ym=Xe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
48
40
|
* @license lucide-react v0.523.0 - ISC
|
|
49
41
|
*
|
|
50
42
|
* This source code is licensed under the ISC license.
|
|
51
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
44
|
+
*/const KE=Xe("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/**
|
|
53
45
|
* @license lucide-react v0.523.0 - ISC
|
|
54
46
|
*
|
|
55
47
|
* This source code is licensed under the ISC license.
|
|
56
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
49
|
+
*/const GE=Xe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
58
50
|
* @license lucide-react v0.523.0 - ISC
|
|
59
51
|
*
|
|
60
52
|
* This source code is licensed under the ISC license.
|
|
61
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
54
|
+
*/const Ac=Xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
63
55
|
* @license lucide-react v0.523.0 - ISC
|
|
64
56
|
*
|
|
65
57
|
* This source code is licensed under the ISC license.
|
|
66
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
59
|
+
*/const ZE=Xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
68
60
|
* @license lucide-react v0.523.0 - ISC
|
|
69
61
|
*
|
|
70
62
|
* This source code is licensed under the ISC license.
|
|
71
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
64
|
+
*/const Ic=Xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
73
65
|
* @license lucide-react v0.523.0 - ISC
|
|
74
66
|
*
|
|
75
67
|
* This source code is licensed under the ISC license.
|
|
76
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
69
|
+
*/const bm=Xe("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
78
70
|
* @license lucide-react v0.523.0 - ISC
|
|
79
71
|
*
|
|
80
72
|
* This source code is licensed under the ISC license.
|
|
81
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
74
|
+
*/const XE=Xe("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
83
75
|
* @license lucide-react v0.523.0 - ISC
|
|
84
76
|
*
|
|
85
77
|
* This source code is licensed under the ISC license.
|
|
86
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
79
|
+
*/const QE=Xe("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
88
80
|
* @license lucide-react v0.523.0 - ISC
|
|
89
81
|
*
|
|
90
82
|
* This source code is licensed under the ISC license.
|
|
91
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
84
|
+
*/const JE=Xe("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
|
|
93
85
|
* @license lucide-react v0.523.0 - ISC
|
|
94
86
|
*
|
|
95
87
|
* This source code is licensed under the ISC license.
|
|
96
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
89
|
+
*/const xm=Xe("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
98
90
|
* @license lucide-react v0.523.0 - ISC
|
|
99
91
|
*
|
|
100
92
|
* This source code is licensed under the ISC license.
|
|
101
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
94
|
+
*/const wm=Xe("file-video-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/**
|
|
103
95
|
* @license lucide-react v0.523.0 - ISC
|
|
104
96
|
*
|
|
105
97
|
* This source code is licensed under the ISC license.
|
|
106
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
99
|
+
*/const Sm=Xe("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
108
100
|
* @license lucide-react v0.523.0 - ISC
|
|
109
101
|
*
|
|
110
102
|
* This source code is licensed under the ISC license.
|
|
111
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
104
|
+
*/const ek=Xe("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
113
105
|
* @license lucide-react v0.523.0 - ISC
|
|
114
106
|
*
|
|
115
107
|
* This source code is licensed under the ISC license.
|
|
116
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
109
|
+
*/const tk=Xe("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
118
110
|
* @license lucide-react v0.523.0 - ISC
|
|
119
111
|
*
|
|
120
112
|
* This source code is licensed under the ISC license.
|
|
121
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
114
|
+
*/const Tm=Xe("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
|
|
123
115
|
* @license lucide-react v0.523.0 - ISC
|
|
124
116
|
*
|
|
125
117
|
* This source code is licensed under the ISC license.
|
|
126
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
119
|
+
*/const nk=Xe("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
128
120
|
* @license lucide-react v0.523.0 - ISC
|
|
129
121
|
*
|
|
130
122
|
* This source code is licensed under the ISC license.
|
|
131
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
124
|
+
*/const _c=Xe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
133
125
|
* @license lucide-react v0.523.0 - ISC
|
|
134
126
|
*
|
|
135
127
|
* This source code is licensed under the ISC license.
|
|
136
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
129
|
+
*/const rk=Xe("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
138
130
|
* @license lucide-react v0.523.0 - ISC
|
|
139
131
|
*
|
|
140
132
|
* This source code is licensed under the ISC license.
|
|
141
133
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
134
|
+
*/const ok=Xe("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
|
|
143
135
|
* @license lucide-react v0.523.0 - ISC
|
|
144
136
|
*
|
|
145
137
|
* This source code is licensed under the ISC license.
|
|
146
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
139
|
+
*/const Oc=Xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
148
140
|
* @license lucide-react v0.523.0 - ISC
|
|
149
141
|
*
|
|
150
142
|
* This source code is licensed under the ISC license.
|
|
151
143
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
144
|
+
*/const ik=Xe("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
153
145
|
* @license lucide-react v0.523.0 - ISC
|
|
154
146
|
*
|
|
155
147
|
* This source code is licensed under the ISC license.
|
|
156
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
149
|
+
*/const ak=Xe("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
158
150
|
* @license lucide-react v0.523.0 - ISC
|
|
159
151
|
*
|
|
160
152
|
* This source code is licensed under the ISC license.
|
|
161
153
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const
|
|
154
|
+
*/const Mc=Xe("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
|
|
163
155
|
* @license lucide-react v0.523.0 - ISC
|
|
164
156
|
*
|
|
165
157
|
* This source code is licensed under the ISC license.
|
|
166
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
159
|
+
*/const Ma=Xe("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
168
160
|
* @license lucide-react v0.523.0 - ISC
|
|
169
161
|
*
|
|
170
162
|
* This source code is licensed under the ISC license.
|
|
171
163
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const
|
|
164
|
+
*/const sk=Xe("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
173
165
|
* @license lucide-react v0.523.0 - ISC
|
|
174
166
|
*
|
|
175
167
|
* This source code is licensed under the ISC license.
|
|
176
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const
|
|
169
|
+
*/const lk=Xe("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
|
|
178
170
|
* @license lucide-react v0.523.0 - ISC
|
|
179
171
|
*
|
|
180
172
|
* This source code is licensed under the ISC license.
|
|
181
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const Oo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Sy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},i_={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Ty=e=>m.jsx(We.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Sy,exit:Sy.false,transition:i_,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Te("aria-hidden:pointer-events-none",e.className),children:e.children}),a_=fo("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),s_=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx(wn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?m.jsx(We.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Te("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx(Ty,{"data-open":!!i,open:!!i,children:m.jsxs(en,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Te(a_({theme:n}),t),children:[m.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?m.jsx(vy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(Ru,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(r_,{"aria-hidden":"true",size:20}):null,r,m.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?m.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:m.jsx(Oo,{size:20})}):null]})})}):null})}),Ey=6048e5,l_=864e5,c_=6e4,u_=36e5,d_=1e3,ky=Symbol.for("constructDateFrom");function nt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ky in e?e[ky](t):e instanceof Date?new e.constructor(t):new Date(t)}function qe(e,t){return nt(t||e,e)}function Ya(e,t,n){const r=qe(e,n?.in);return isNaN(t)?nt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Cy(e,t,n){const r=qe(e,n?.in);if(isNaN(t))return nt(e,NaN);if(!t)return r;const o=r.getDate(),i=nt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Mo(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=qe(e,n?.in),d=o||r?Cy(u,o+r*12):u,p=a||i?Ya(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return nt(e,+p+g)}let f_={};function Wr(){return f_}function Nn(e,t){const n=Wr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=qe(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Do(e,t){return Nn(e,{...t,weekStartsOn:1})}function Py(e,t){const n=qe(e,t?.in),r=n.getFullYear(),o=nt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Do(o),a=nt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Do(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ka(e){const t=qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ga(e,...t){const n=nt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function qr(e,t){const n=qe(e,t?.in);return n.setHours(0,0,0,0),n}function p_(e,t,n){const[r,o]=Ga(n?.in,e,t),i=qr(r),a=qr(o),s=+i-Ka(i),l=+a-Ka(a);return Math.round((s-l)/l_)}function h_(e,t){const n=Py(e,t),r=nt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Do(r)}function m_(e){return nt(e,Date.now())}function g_(e,t,n){const[r,o]=Ga(n?.in,e,t);return+qr(r)==+qr(o)}function v_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Za(e){return!(!v_(e)&&typeof e!="number"||isNaN(+qe(e)))}function y_(e,t){const[n,r]=Ga(e,t.start,t.end);return{start:n,end:r}}function Ay(e,t){const{start:n,end:r}=y_(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(nt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Iy(e,t){const n=qe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function b_(e,t){const n=qe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function x_(e,t){const n=Wr(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=qe(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const w_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},S_=(e,t,n)=>{let r;const o=w_[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function qu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const T_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},k_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C_={date:qu({formats:T_,defaultWidth:"full"}),time:qu({formats:E_,defaultWidth:"full"}),dateTime:qu({formats:k_,defaultWidth:"full"})},P_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},A_=(e,t,n,r)=>P_[e];function zi(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const I_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},__={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},O_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},M_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},D_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},N_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},L_={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:zi({values:I_,defaultWidth:"wide"}),quarter:zi({values:__,defaultWidth:"wide",argumentCallback:e=>e-1}),month:zi({values:O_,defaultWidth:"wide"}),day:zi({values:M_,defaultWidth:"wide"}),dayPeriod:zi({values:D_,defaultWidth:"wide",formattingValues:N_,defaultFormattingWidth:"wide"})};function Bi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?V_(s,d=>d.test(a)):F_(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function F_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function V_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function $_(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const j_=/^(\d+)(th|st|nd|rd)?/i,z_=/\d+/i,B_={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},R_={any:[/^b/i,/^(a|c)/i]},H_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},W_={any:[/1/i,/2/i,/3/i,/4/i]},q_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},U_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Y_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},K_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},G_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Z_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},X_={ordinalNumber:$_({matchPattern:j_,parsePattern:z_,valueCallback:e=>parseInt(e,10)}),era:Bi({matchPatterns:B_,defaultMatchWidth:"wide",parsePatterns:R_,defaultParseWidth:"any"}),quarter:Bi({matchPatterns:H_,defaultMatchWidth:"wide",parsePatterns:W_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bi({matchPatterns:q_,defaultMatchWidth:"wide",parsePatterns:U_,defaultParseWidth:"any"}),day:Bi({matchPatterns:Y_,defaultMatchWidth:"wide",parsePatterns:K_,defaultParseWidth:"any"}),dayPeriod:Bi({matchPatterns:G_,defaultMatchWidth:"any",parsePatterns:Z_,defaultParseWidth:"any"})},_y={code:"en-US",formatDistance:S_,formatLong:C_,formatRelative:A_,localize:L_,match:X_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Q_(e,t){const n=qe(e,t?.in);return p_(n,b_(n))+1}function Oy(e,t){const n=qe(e,t?.in),r=+Do(n)-+h_(n);return Math.round(r/Ey)+1}function Uu(e,t){const n=qe(e,t?.in),r=n.getFullYear(),o=Wr(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=nt(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Nn(a,t),l=nt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Nn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function J_(e,t){const n=Wr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Uu(e,t),i=nt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Nn(i,t)}function My(e,t){const n=qe(e,t?.in),r=+Nn(n,t)-+J_(n,t);return Math.round(r/Ey)+1}function rt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return rt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):rt(n+1,2)},d(e,t){return rt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return rt(e.getHours()%12||12,t.length)},H(e,t){return rt(e.getHours(),t.length)},m(e,t){return rt(e.getMinutes(),t.length)},s(e,t){return rt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return rt(o,t.length)}},No={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dy={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return fr.y(e,t)},Y:function(e,t,n,r){const o=Uu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return rt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):rt(i,t.length)},R:function(e,t){const n=Py(e);return rt(n,t.length)},u:function(e,t){const n=e.getFullYear();return rt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return rt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=My(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):rt(o,t.length)},I:function(e,t,n){const r=Oy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):rt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fr.d(e,t)},D:function(e,t,n){const r=Q_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):rt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return rt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return rt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return rt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=No.noon:r===0?o=No.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fr.s(e,t)},S:function(e,t){return fr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ly(r);case"XXXX":case"XX":return Ur(r);case"XXXXX":case"XXX":default:return Ur(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ly(r);case"xxxx":case"xx":return Ur(r);case"xxxxx":case"xxx":default:return Ur(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ny(r,":");case"OOOO":default:return"GMT"+Ur(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ny(r,":");case"zzzz":default:return"GMT"+Ur(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return rt(r,t.length)},T:function(e,t,n){return rt(+e,t.length)}};function Ny(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+rt(i,2)}function Ly(e,t){return e%60===0?(e>0?"-":"+")+rt(Math.abs(e)/60,2):Ur(e,t)}function Ur(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=rt(Math.trunc(r/60),2),i=rt(r%60,2);return n+o+t+i}const Fy=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Vy=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Yu={p:Vy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Fy(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Fy(r,t)).replace("{{time}}",Vy(o,t))}},eO=/^D+$/,tO=/^Y+$/,nO=["D","DD","YY","YYYY"];function $y(e){return eO.test(e)}function jy(e){return tO.test(e)}function Ku(e,t,n){const r=rO(e,t,n);if(console.warn(r),nO.includes(e))throw new RangeError(r)}function rO(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const oO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aO=/^'([^]*?)'?$/,sO=/''/g,lO=/[a-zA-Z]/;function Gu(e,t,n){const r=Wr(),o=r.locale??_y,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=qe(e,n?.in);if(!Za(s))throw new RangeError("Invalid time value");let l=t.match(iO).map(u=>{const d=u[0];if(d==="p"||d==="P"){const p=Yu[d];return p(u,o.formatLong)}return u}).join("").match(oO).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:cO(u)};if(Dy[d])return{isToken:!0,value:u};if(d.match(lO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(jy(d)||$y(d))&&Ku(d,t,String(e));const p=Dy[d[0]];return p(s,d,o.localize,c)}).join("")}function cO(e){const t=e.match(aO);return t?t[1].replace(sO,"'"):e}function uO(e,t){const n=qe(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=nt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function dO(){return Object.assign({},Wr())}function fO(e,t){const n=qe(e,t?.in).getDay();return n===0?7:n}function pO(e,t){return+qe(e)>+qe(t)}function hO(e,t){return+qe(e)<+qe(t)}function mO(e,t){const n=gO(t)?new t(0):nt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function gO(e){return typeof e=="function"&&e.prototype?.constructor===e}const vO=10;class zy{subPriority=0;validate(t,n){return!0}}class yO extends zy{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class bO extends zy{priority=vO;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>nt(n,r))}set(t,n){return n.timestampIsSet?t:nt(t,mO(t,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new yO(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class xO extends Ke{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const wt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Ln={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function St(e,t){return e&&{value:t(e.value),rest:e.rest}}function mt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Fn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*u_+i*c_+a*d_),rest:t.slice(n[0].length)}}function By(e){return mt(wt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+e+"}"),t)}}function Xa(e,t){switch(e){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Zu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ry(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function Hy(e){return e%400===0||e%4===0&&e%100!==0}class wO extends Ke{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return St(bt(4,t),o);case"yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=Ry(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class SO extends Ke{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return St(bt(4,t),o);case"Yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Uu(t,o);if(r.isTwoDigitYear){const s=Ry(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Nn(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Nn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class TO extends Ke{priority=130;parse(t,n){return Xa(n==="R"?4:n.length,t)}set(t,n,r){const o=nt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Do(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class EO extends Ke{priority=130;parse(t,n){return Xa(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class kO extends Ke{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class CO extends Ke{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class PO extends Ke{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return St(mt(wt.month,t),o);case"MM":return St(bt(2,t),o);case"Mo":return St(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class AO extends Ke{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return St(mt(wt.month,t),o);case"LL":return St(bt(2,t),o);case"Lo":return St(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function IO(e,t,n){const r=qe(e,n?.in),o=My(r,n)-t;return r.setDate(r.getDate()-o*7),qe(r,n?.in)}class _O extends Ke{priority=100;parse(t,n,r){switch(n){case"w":return mt(wt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Nn(IO(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function OO(e,t,n){const r=qe(e,n?.in),o=Oy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class MO extends Ke{priority=100;parse(t,n,r){switch(n){case"I":return mt(wt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Do(OO(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const DO=[31,28,31,30,31,30,31,31,30,31,30,31],NO=[31,29,31,30,31,30,31,31,30,31,30,31];class LO extends Ke{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return mt(wt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=Hy(r),i=t.getMonth();return o?n>=1&&n<=NO[i]:n>=1&&n<=DO[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class FO extends Ke{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return mt(wt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return Hy(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Xu(e,t,n){const r=Wr(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=qe(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return Ya(i,u,n)}class VO extends Ke{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Xu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class $O extends Ke{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return St(bt(n.length,t),i);case"eo":return St(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Xu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class jO extends Ke{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return St(bt(n.length,t),i);case"co":return St(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Xu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function zO(e,t,n){const r=qe(e,n?.in),o=fO(r,n),i=t-o;return Ya(r,i,n)}class BO extends Ke{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return St(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return St(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return St(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return St(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=zO(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class RO extends Ke{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Zu(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class HO extends Ke{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Zu(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class WO extends Ke{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Zu(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class qO extends Ke{priority=70;parse(t,n,r){switch(n){case"h":return mt(wt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class UO extends Ke{priority=70;parse(t,n,r){switch(n){case"H":return mt(wt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class YO extends Ke{priority=70;parse(t,n,r){switch(n){case"K":return mt(wt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class KO extends Ke{priority=70;parse(t,n,r){switch(n){case"k":return mt(wt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class GO extends Ke{priority=60;parse(t,n,r){switch(n){case"m":return mt(wt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class ZO extends Ke{priority=50;parse(t,n,r){switch(n){case"s":return mt(wt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class XO extends Ke{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return St(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class QO extends Ke{priority=10;parse(t,n){switch(n){case"X":return Fn(Ln.basicOptionalMinutes,t);case"XX":return Fn(Ln.basic,t);case"XXXX":return Fn(Ln.basicOptionalSeconds,t);case"XXXXX":return Fn(Ln.extendedOptionalSeconds,t);case"XXX":default:return Fn(Ln.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-Ka(t)-r)}incompatibleTokens=["t","T","x"]}class JO extends Ke{priority=10;parse(t,n){switch(n){case"x":return Fn(Ln.basicOptionalMinutes,t);case"xx":return Fn(Ln.basic,t);case"xxxx":return Fn(Ln.basicOptionalSeconds,t);case"xxxxx":return Fn(Ln.extendedOptionalSeconds,t);case"xxx":default:return Fn(Ln.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-Ka(t)-r)}incompatibleTokens=["t","T","X"]}class eM extends Ke{priority=40;parse(t){return By(t)}set(t,n,r){return[nt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class tM extends Ke{priority=20;parse(t){return By(t)}set(t,n,r){return[nt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const nM={G:new xO,y:new wO,Y:new SO,R:new TO,u:new EO,Q:new kO,q:new CO,M:new PO,L:new AO,w:new _O,I:new MO,d:new LO,D:new FO,E:new VO,e:new $O,c:new jO,i:new BO,a:new RO,b:new HO,B:new WO,h:new qO,H:new UO,K:new YO,k:new KO,m:new GO,s:new ZO,S:new XO,X:new QO,x:new JO,t:new eM,T:new tM},rM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,iM=/^'([^]*?)'?$/,aM=/''/g,sM=/\S/,lM=/[a-zA-Z]/;function cM(e,t,n,r){const o=()=>nt(n,NaN),i=dO(),a=i.locale??_y,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():qe(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new bO(r?.in,n)],d=t.match(oM).map(h=>{const v=h[0];if(v in Yu){const y=Yu[v];return y(h,a.formatLong)}return h}).join("").match(rM),p=[];for(let h of d){jy(h)&&Ku(h,t,e),$y(h)&&Ku(h,t,e);const v=h[0],y=nM[v];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=p.find(E=>x.includes(E.token)||E.token===v);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${h}\` at the same time`)}else if(y.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);p.push({token:v,fullToken:h});const T=y.run(e,h,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(lM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(h==="''"?h="'":v==="'"&&(h=uM(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&sM.test(e))return o();const f=u.map(h=>h.priority).sort((h,v)=>v-h).filter((h,v,y)=>y.indexOf(h)===v).map(h=>u.filter(v=>v.priority===h).sort((v,y)=>y.subPriority-v.subPriority)).map(h=>h[0]);let b=qe(n,r?.in);if(isNaN(+b))return o();const g={};for(const h of f){if(!h.validate(b,c))return o();const v=h.set(b,g,c);Array.isArray(v)?(b=v[0],Object.assign(g,v[1])):b=v}return b}function uM(e){return e.match(iM)[1].replace(aM,"'")}function dM(e,t,n){const[r,o]=Ga(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function fM(e,t){return g_(nt(e,e),m_(e))}function pM(e,t,n){return Ya(e,-t,n)}function hM(e,t,n){const r=qe(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=nt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=uO(a);return r.setMonth(t,Math.min(i,s)),r}function mM(e,t,n){let r=qe(e,n?.in);return isNaN(+r)?nt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=hM(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function gM(e,t,n){const r=qe(e,n?.in);return isNaN(+r)?nt(e,NaN):(r.setFullYear(t),r)}function vM(e,t,n){return Cy(e,-t,n)}function Ri(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=vM(e,o+r*12,n),d=pM(u,a+i*7,n),p=l+s*60,b=(c+p*60)*1e3;return nt(e,+d-b)}var Tt=function(){return Tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tt.apply(this,arguments)};function Qu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ju(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Hi=function(e){return e.replace(new RegExp(" ","g")," ")},Wy=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},yM=function(e){return e.replace(/^0+([0-9]+)/,"$1")},qy=function(e,t,n){var r=e.length-2,o=yM(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Uy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Qa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},bM=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ed=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},xM=function(e){return e==="money"||e==="currency"},wM=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ja=function(e,t){var n=Wy(Uy(e),t.fraction.length),r="".concat(t.currency).concat(qy(n,t.group,t.decimal));return Hi(r)},SM=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=Qu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var b=wM(r,i,s);return b.currency=Hi("".concat(b.currency.trim()," ")),b.literal=Hi(b.literal.trim()),b},[r,i]),p=function(b){var g=Ja(b.target.value,d),h=Qa(g);b.target.value=g,b.target.setAttribute("data-number",h.toString()),l?.(b),h!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var b=u.current.value;if(b!==""){var g=Ja(b,d),h=Qa(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l?.(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Ja(c.defaultValue,d):void 0;return S.createElement("input",Tt({},c,{value:typeof c.value=="string"?Ja(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),TM=1,EM=function(e){return e==="percentage"||e==="percent"||e==="percentual"},kM=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},es=function(e,t){var n=Wy(Uy(e),t.fraction.length),r="".concat(qy(n,t.group,t.decimal)," ").concat(t.percentSign);return Hi(r)},CM=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=Qu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=Ju(S.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(es(y,d))},[a.value]);var d=S.useMemo(function(){var v=kM(r);return v.percentSign=Hi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-TM,f=function(v){var y,x=s.current;x&&(x.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},b=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,T=y.selectionEnd,w=x!==T,E=p<x;!w&&E&&f()}i?.(v)},g=function(v){var y=es(v.target.value,d),x=Qa(y);u(y),v.target.value=y,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=es(v,d),x=Qa(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return f()},[c]);var h=a.defaultValue?es(a.defaultValue,d):void 0;return S.createElement("input",Tt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:b,ref:s,type:"text"}))}),Wi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},PM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ts[i];a===void 0?r.push(i.replace(Wi.dots,"\\.").replace(Wi.openParenthesis,"\\(").replace(Wi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Wi.leadingBars,"\\")},qi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return td(o,n);var i=PM(o);return n?"^".concat(i,"$"):i},AM=function(e){return e.replace(Wi.escape,"\\$&")},td=function(e,t){var n=e.map(function(r){return typeof r=="string"?AM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ts={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},IM=/\d/,Yy="(dd) 9dddd-dddd",Ky="(dd) dddd-dddd",Gy="ddd.ddd.ddd-dd",Zy="dd.ddd.ddd/dddd-dd",ns=function(e){return e.replace(/\D/g,"")},_M=["2",/[0-3]/,":",/[0-5]/,/\d/],OM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Zt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Gy,isoDate:"dddd-dd-dd",cnpj:Zy,telephone:Ky,cellphone:Yy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ns(e).length<=11?Gy:Zy},int:function(e){return e===void 0&&(e=""),IM.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ns(e);return t.length<11?Ky:Yy},time:function(e){var t=ns(e),n=t[0];return n==="2"?_M:OM}},Xt=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:qi(e,"",!0),infinity:n.infinity},n)},Rt={cellTelephone:Xt(Zt.cellTelephone,"tel"),cellphone:Xt(Zt.cellphone,"tel"),cep:Xt(Zt.cep,"decimal"),cnpj:Xt(Zt.cnpj,"decimal"),color:Xt(Zt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Xt(Zt.cpf,"decimal"),cpfCnpj:Xt(Zt.cpfCnpj,"decimal",{transform:ns}),creditCard:Xt(Zt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Xt(Zt.date,"decimal"),int:Xt(Zt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Xt(Zt.isoDate,"decimal"),telephone:Xt(Zt.telephone,"tel"),time:Xt(Zt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Xt(Zt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Xy(e,t,n,r){var o,i;r===void 0&&(r=ts);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var Qy=function(e){return e},MM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(qi(e,n,t));return r.test(n)};function DM(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var NM=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Qu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),b=S.useRef(null);S.useImperativeHandle(t,function(){return b.current});var g=ed(s),h=ed(d),v=ed(u),y=S.useRef(MM(u,i,f.value||f.defaultValue)),x=p??"input",T=Ju(S.useState(""),2),w=T[0],E=T[1],k=DM(w),C=S.useCallback(function(N,H){var M,P,$=(M=N??H)!==null&&M!==void 0?M:"";if(u===void 0)return $;var L=(P=$?.toString())!==null&&P!==void 0?P:"";return Xy(L,typeof u=="function"?u(L):u,a??Qy,c??ts)},[a,u,c]),O=Ju(S.useState(function(){return C(f.value,f.defaultValue)}),2),I=O[0],D=O[1],V=C(f.defaultValue,f.defaultValue),z=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(I);return Array.isArray(N)?td(N,i):qi(u,I,i)}return typeof u=="string"?qi(u,I,i):td(u,i)},[l,I,i,u]);S.useEffect(function(){if(f.value!==void 0){var N=C(f.value,f.defaultValue);D(N),b.current!==null&&(b.current.value=N)}},[f.value,u,a,f.defaultValue]);var A=function(N){var H,M,P,$,L,U=N.currentTarget,G=N.target.value;if(v.current===void 0)return D(G),(H=h.current)===null||H===void 0||H.call(h,G),(M=g.current)===null||M===void 0||M.call(g,N),d?.(G);var B=new RegExp(qi(v.current,G,i)),Z=(P=U.selectionEnd)!==null&&P!==void 0?P:0,ee=function(X,oe,j){if(X.type!=="number")return X.setSelectionRange(oe,j)};if(r&&y.current&&G.length>=I.length)return U.value=I,ee(U,Z-1,Z-1);var te=!1;G.length<k.length&&(y.current=!1,te=!0),B.test(G)&&(y.current=!0);var J=Z,R=G[J-1],q=Xy(G,typeof v.current=="function"?v.current(G):v.current,a??Qy,c??ts);for(U.value=q,D(q);J<q.length&&q.charAt(J-1)!==R;)J+=1;te?ee(U,Z,Z):ee(U,J,J),N.target.value=q,E(q),($=h.current)===null||$===void 0||$.call(h,q),(L=g.current)===null||L===void 0||L.call(g,N)};return S.createElement(x,Tt({},f,{ref:b,pattern:z,onChange:A,defaultValue:Jy(f.defaultValue)?V:void 0,value:Jy(f.value)?C(f.value,f.value):f.value}))}),Jy=function(e){return typeof e=="string"},eb=S.forwardRef(function(e,t){return xM(e.mask)?S.createElement(SM,Tt({},e,{mask:void 0,ref:t})):EM(e.mask)?S.createElement(CM,Tt({},e,{mask:void 0,ref:t})):S.createElement(NM,Tt({},e,{ref:t}))}),Qt=function(e){return function(t){return S.createElement(eb,Tt({},e,t))}};Qt(Rt.cellTelephone),Qt(Rt.cellphone),Qt(Rt.cep),Qt(Rt.cnpj),Qt(Rt.color),Qt(Rt.cpf),Qt(Rt.cpfCnpj),Qt(Rt.creditCard),Qt(Rt.date),Qt(Rt.int),Qt(Rt.isoDate),Qt(Rt.telephone),Qt(Rt.time),Qt(Rt.uuid);var tb=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&bM(Rt,t.mask)?Rt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return S.createElement(eb,Tt({},o,{ref:n}))}),rs={exports:{}},nd={},os={exports:{}},rd={};/**
|
|
174
|
+
*/const vo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Da={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},lr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(lr(a,t,n,s))},[]),Em=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:Em(a,t,n,s)}},{}),km={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Na=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},ck={default:e=>Na(e,{result:km.default}),dark:e=>Na(e,{result:km.dark})},yo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},uk=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Dc=(e,t)=>{const n=lr(e.colors,yo(t?.colors)),r=lr(e.spacing,yo(t?.spacing)),o=lr(e.rounded,yo(t?.rounded)),i=lr(e.shadow,yo(t?.rounded)),a=lr(e.zIndex,yo(t?.zIndex??uk)),s=e.custom?lr(e.custom,yo(t?.customTokens)):[];return n.concat(r,o,s,a,i)},dk=(e,t)=>Na(Dc(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),fk=(e,t)=>Dc(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),pk=(e,t)=>Na(Dc(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),La={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>m.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Fa={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},bo=S.createContext({tweaks:Fa,parser:Da.hsla,map:La,locale:void 0}),St=()=>{const e=S.useContext(bo);return e?e.map:La},Nc=()=>{const e=S.useContext(bo);return e?e.tweaks:Fa};function Va(){return typeof window<"u"}function cr(e){return Lc(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(Lc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lc(e){return Va()?e instanceof Node||e instanceof qt(e).Node:!1}function it(e){return Va()?e instanceof Element||e instanceof qt(e).Element:!1}function Tt(e){return Va()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function $a(e){return!Va()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const hk=new Set(["inline","contents"]);function Ti(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hk.has(o)}const mk=new Set(["table","td","th"]);function gk(e){return mk.has(cr(e))}const vk=[":popover-open",":modal"];function ja(e){return vk.some(t=>{try{return e.matches(t)}catch{return!1}})}const yk=["transform","translate","scale","rotate","perspective"],bk=["transform","translate","scale","rotate","perspective","filter"],xk=["paint","layout","strict","content"];function Fc(e){const t=za(),n=it(e)?tn(e):e;return yk.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bk.some(r=>(n.willChange||"").includes(r))||xk.some(r=>(n.contain||"").includes(r))}function wk(e){let t=Qn(e);for(;Tt(t)&&!Xn(t);){if(Fc(t))return t;if(ja(t))return null;t=Qn(t)}return null}function za(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Sk=new Set(["html","body","#document"]);function Xn(e){return Sk.has(cr(e))}function tn(e){return qt(e).getComputedStyle(e)}function Ba(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qn(e){if(cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$a(e)&&e.host||Mn(e);return $a(t)?t.host:t}function Cm(e){const t=Qn(e);return Xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&Ti(t)?t:Cm(t)}function ur(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Cm(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=Vc(a);return t.concat(a,a.visualViewport||[],Ti(o)?o:[],s&&n?ur(s):[])}return t.concat(o,ur(o,[],n))}function Vc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Tk=["top","right","bottom","left"],Pm=["start","end"],Am=Tk.reduce((e,t)=>e.concat(t,t+"-"+Pm[0],t+"-"+Pm[1]),[]),dr=Math.min,nn=Math.max,Ra=Math.round,xo=Math.floor,Dn=e=>({x:e,y:e}),Ek={left:"right",right:"left",bottom:"top",top:"bottom"},kk={start:"end",end:"start"};function $c(e,t,n){return nn(e,dr(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function Im(e){return e==="x"?"y":"x"}function jc(e){return e==="y"?"height":"width"}const Ck=new Set(["top","bottom"]);function Jn(e){return Ck.has(Nn(e))?"y":"x"}function zc(e){return Im(Jn(e))}function _m(e,t,n){n===void 0&&(n=!1);const r=bn(e),o=zc(e),i=jc(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Wa(a)),[a,Wa(a)]}function Pk(e){const t=Wa(e);return[Ha(e),t,Ha(t)]}function Ha(e){return e.replace(/start|end/g,t=>kk[t])}const Om=["left","right"],Mm=["right","left"],Ak=["top","bottom"],Ik=["bottom","top"];function _k(e,t,n){switch(e){case"top":case"bottom":return n?t?Mm:Om:t?Om:Mm;case"left":case"right":return t?Ak:Ik;default:return[]}}function Ok(e,t,n,r){const o=bn(e);let i=_k(Nn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ha)))),i}function Wa(e){return e.replace(/left|right|bottom|top/g,t=>Ek[t])}function Mk(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dm(e){return typeof e!="number"?Mk(e):{top:e,right:e,bottom:e,left:e}}function qa(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
175
|
+
* tabbable 6.2.0
|
|
176
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
177
|
+
*/var Dk=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ua=Dk.join(","),Nm=typeof Element>"u",wo=Nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ya=!Nm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ka=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},Nk=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Lm=function(t,n,r){if(Ka(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ua));return n&&wo.call(t,Ua)&&o.unshift(t),o=o.filter(r),o},Fm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ka(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=wo.call(a,Ua);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ka(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},Vm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},$m=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Nk(t))&&!Vm(t)?0:t.tabIndex},Lk=function(t,n){var r=$m(t);return r<0&&n&&!Vm(t)?0:r},Fk=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jm=function(t){return t.tagName==="INPUT"},Vk=function(t){return jm(t)&&t.type==="hidden"},$k=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},jk=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},zk=function(t){if(!t.name)return!0;var n=t.form||Ya(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=jk(o,t.form);return!i||i===t},Bk=function(t){return jm(t)&&t.type==="radio"},Rk=function(t){return Bk(t)&&!zk(t)},Hk=function(t){var n,r=t&&Ya(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ya(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},zm=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Wk=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(wo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ya(t);if(l&&!l.shadowRoot&&o(l)===!0)return zm(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(Hk(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return zm(t);return!1},qk=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Bc=function(t,n){return!(n.disabled||Ka(n)||Vk(n)||Wk(n,t)||$k(n)||qk(n))},Rc=function(t,n){return!(Rk(n)||$m(n)<0||!Bc(t,n))},Uk=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Yk=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=Lk(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(Fk).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ga=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Fm([t],n.includeContainer,{filter:Rc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Uk}):r=Lm(t,n.includeContainer,Rc.bind(null,n)),Yk(r)},Kk=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Fm([t],n.includeContainer,{filter:Bc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Lm(t,n.includeContainer,Bc.bind(null,n)),r},Bm=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wo.call(t,Ua)===!1?!1:Rc(n,t)};function Hc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Rm(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Hm(){return/apple/i.test(navigator.vendor)}function Wc(){const e=/android/i;return e.test(Hc())||e.test(Rm())}function Gk(){return Hc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Wm(){return Rm().includes("jsdom/")}const qm="data-floating-ui-focusable",Zk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qc="ArrowLeft",Uc="ArrowRight",Xk="ArrowUp",Qk="ArrowDown";function Ln(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Nt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&$a(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Fn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Yc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Jk(e){return e.matches("html,body")}function Vt(e){return e?.ownerDocument||document}function Kc(e){return Tt(e)&&e.matches(Zk)}function Gc(e){return e?e.getAttribute("role")==="combobox"&&Kc(e):!1}function eC(e){if(!e||Wm())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Za(e){return e?e.hasAttribute(qm)?e:e.querySelector("["+qm+"]")||e:null}function $r(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...$r(e,o.id,n)])}function tC(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),$r(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Um(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function $t(e){e.preventDefault(),e.stopPropagation()}function nC(e){return"nativeEvent"in e}function Ym(e){return e.mozInputSource===0&&e.isTrusted?!0:Wc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Km(e){return Wm()?!1:!Wc()&&e.width===0&&e.height===0||Wc()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function So(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var rC=typeof document<"u",oC=function(){},Ke=rC?S.useLayoutEffect:oC;const iC={..._};function Lt(e){const t=_.useRef(e);return Ke(()=>{t.current=e}),t}const aC=iC.useInsertionEffect||(e=>e());function ht(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return aC(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Xa(e,t,n){return Math.floor(e/t)!==n}function Ei(e,t){return t<0||t>=e.current.length}function Zc(e,t){return Ht(e,{disabledIndices:t})}function Gm(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&Qa(e,a,o));return a}function sC(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,p=u;if(n.key===Xk){if(d&&$t(n),u===-1)p=c;else if(p=Ht(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||p<0)){const f=u%a,b=c%a,g=c-(b-f);b===f?p=c:p=b>f?g:g-a}Ei(e,p)&&(p=u)}if(n.key===Qk&&(d&&$t(n),u===-1?p=l:(p=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(p=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Ei(e,p)&&(p=u)),r==="both"){const f=xo(u/a);n.key===(i?qc:Uc)&&(d&&$t(n),u%a!==a-1?(p=Ht(e,{startingIndex:u,disabledIndices:s}),o&&Xa(p,a,f)&&(p=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(p=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),Xa(p,a,f)&&(p=u)),n.key===(i?Uc:qc)&&(d&&$t(n),u%a!==0?(p=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Xa(p,a,f)&&(p=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(p=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Xa(p,a,f)&&(p=u));const b=xo(c/a)===f;Ei(e,p)&&(o&&b?p=n.key===(i?Uc:qc)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):p=u)}return p}function lC(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function cC(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function uC(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Qa(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const ki=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zm(e,t){const n=Ga(e,ki()),r=n.length;if(r===0)return;const o=Ln(Vt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Xm(e){return Zm(Vt(e).body,1)||e}function Qm(e){return Zm(Vt(e).body,-1)||e}function Ci(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nt(n,r)}function dC(e){Ga(e,ki()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Jm(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function eg(e,t,n){let{reference:r,floating:o}=e;const i=Jn(t),a=zc(t),s=jc(a),l=Nn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(bn(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const fC=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=eg(c,r,l),p=r,f={},b=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[h]:{...f[h],...T}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=eg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Ja(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Vr(t,e),b=Dm(f),h=s[p?d==="floating"?"reference":"floating":d],v=qa(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=qa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+b.top)/T.y,bottom:(w.bottom-v.bottom+b.bottom)/T.y,left:(v.left-w.left+b.left)/T.x,right:(w.right-v.right+b.right)/T.x}}const pC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Vr(e,t)||{};if(c==null)return{};const d=Dm(u),p={x:n,y:r},f=zc(o),b=jc(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[b]+i.reference[f]-p[f]-i.floating[b],w=p[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=E?E[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=s.floating[x]||i.floating[b]);const C=T/2-w/2,O=k/2-g[b]/2-1,I=dr(d[v],O),D=dr(d[y],O),V=I,z=k-g[b]-D,A=k/2-g[b]/2+C,N=$c(V,A,z),H=!l.arrow&&bn(o)!=null&&A!==N&&i.reference[b]/2-(A<V?I:D)-g[b]/2<0,M=H?A<V?A-V:A-z:0;return{[f]:p[f]+M,data:{[f]:N,centerOffset:A-N-M,...H&&{alignmentOffset:M}},reset:H}}});function hC(e,t,n){return(e?[...n.filter(o=>bn(o)===e),...n.filter(o=>bn(o)!==e)]:n.filter(o=>Nn(o)===o)).filter(o=>e?bn(o)===e||(t?Ha(o)!==o:!1):!0)}const mC=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Am,autoAlignment:f=!0,...b}=Vr(e,t),g=d!==void 0||p===Am?hC(d||null,f,p):p,h=await Ja(t,b),v=((n=a.autoPlacement)==null?void 0:n.index)||0,y=g[v];if(y==null)return{};const x=_m(y,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==y)return{reset:{placement:g[0]}};const T=[h[Nn(y)],h[x[0]],h[x[1]]],w=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:T}],E=g[v+1];if(E)return{data:{index:v+1,overflows:w},reset:{placement:E}};const k=w.map(I=>{const D=bn(I.placement);return[I.placement,D&&u?I.overflows.slice(0,2).reduce((V,z)=>V+z,0):I.overflows[0],I.overflows]}).sort((I,D)=>I[1]-D[1]),O=((o=k.filter(I=>I[2].slice(0,bn(I[0])?2:3).every(D=>D<=0))[0])==null?void 0:o[0])||k[0][0];return O!==s?{data:{index:v+1,overflows:w},reset:{placement:O}}:{}}}},gC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...h}=Vr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Nn(o),y=Jn(s),x=Nn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Wa(s)]:Pk(s)),E=b!=="none";!p&&E&&w.push(...Ok(s,g,b,T));const k=[s,...w],C=await Ja(t,h),O=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(C[v]),d){const A=_m(o,a,T);O.push(C[A[0]],C[A[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(A=>A<=0)){var D,V;const A=(((D=i.flip)==null?void 0:D.index)||0)+1,N=k[A];if(N&&(!(d==="alignment"?y!==Jn(N):!1)||I.every(P=>Jn(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:A,overflows:I},reset:{placement:N}};let H=(V=I.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:V.placement;if(!H)switch(f){case"bestFit":{var z;const M=(z=I.filter(P=>{if(E){const $=Jn(P.placement);return $===y||$==="y"}return!0}).map(P=>[P.placement,P.overflows.filter($=>$>0).reduce(($,L)=>$+L,0)]).sort((P,$)=>P[1]-$[1])[0])==null?void 0:z[0];M&&(H=M);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}},vC=new Set(["left","top"]);async function yC(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Nn(n),s=bn(n),l=Jn(n)==="y",c=vC.has(a)?-1:1,u=i&&l?-1:1,d=Vr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const bC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await yC(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},xC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=Vr(e,t),c={x:n,y:r},u=await Ja(t,l),d=Jn(Nn(o)),p=Im(d);let f=c[p],b=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],x=f-u[v];f=$c(y,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+u[h],x=b-u[v];b=$c(y,b,x)}const g=s.fn({...t,[p]:f,[d]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[d]:a}}}}}},wC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Vr(e,t),u=await Ja(t,c),d=Nn(o),p=bn(o),f=Jn(o)==="y",{width:b,height:g}=i.floating;let h,v;d==="top"||d==="bottom"?(h=d,v=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,h=p==="end"?"top":"bottom");const y=g-u.top-u.bottom,x=b-u.left-u.right,T=dr(g-u[h],y),w=dr(b-u[v],x),E=!t.middlewareData.shift;let k=T,C=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),E&&!p){const I=nn(u.left,0),D=nn(u.right,0),V=nn(u.top,0),z=nn(u.bottom,0);f?C=b-2*(I!==0||D!==0?I+D:nn(u.left,u.right)):k=g-2*(V!==0||z!==0?V+z:nn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:k});const O=await a.getDimensions(s.floating);return b!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}};function tg(e){const t=tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ra(n)!==i||Ra(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Xc(e){return it(e)?e:e.contextElement}function To(e){const t=Xc(e);if(!Tt(t))return Dn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=tg(t);let a=(i?Ra(n.width):n.width)/r,s=(i?Ra(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const SC=Dn(0);function ng(e){const t=qt(e);return!za()||!t.visualViewport?SC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function jr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xc(e);let a=Dn(1);t&&(r?it(r)&&(a=To(r)):a=To(e));const s=TC(i,n,r)?ng(i):Dn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=qt(i),f=r&&it(r)?qt(r):r;let b=p,g=Vc(b);for(;g&&r&&f!==b;){const h=To(g),v=g.getBoundingClientRect(),y=tn(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,b=qt(g),g=Vc(b)}}return qa({width:u,height:d,x:l,y:c})}function Qc(e,t){const n=Ba(e).scrollLeft;return t?t.left+n:jr(Mn(e)).left+n}function rg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Qc(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function EC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Mn(r),s=t?ja(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Dn(1);const u=Dn(0),d=Tt(r);if((d||!d&&!i)&&((cr(r)!=="body"||Ti(a))&&(l=Ba(r)),Tt(r))){const f=jr(r);c=To(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=a&&!d&&!i?rg(a,l,!0):Dn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function kC(e){return Array.from(e.getClientRects())}function CC(e){const t=Mn(e),n=Ba(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Qc(e);const s=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function PC(e,t){const n=qt(e),r=Mn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=za();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}const AC=new Set(["absolute","fixed"]);function IC(e,t){const n=jr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tt(e)?To(e):Dn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function og(e,t,n){let r;if(t==="viewport")r=PC(e,n);else if(t==="document")r=CC(Mn(e));else if(it(t))r=IC(t,n);else{const o=ng(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qa(r)}function ig(e,t){const n=Qn(e);return n===t||!it(n)||Xn(n)?!1:tn(n).position==="fixed"||ig(n,t)}function _C(e,t){const n=t.get(e);if(n)return n;let r=ur(e,[],!1).filter(s=>it(s)&&cr(s)!=="body"),o=null;const i=tn(e).position==="fixed";let a=i?Qn(e):e;for(;it(a)&&!Xn(a);){const s=tn(a),l=Fc(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&AC.has(o.position)||Ti(a)&&!l&&ig(e,a))?r=r.filter(u=>u!==a):o=s,a=Qn(a)}return t.set(e,r),r}function OC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ja(t)?[]:_C(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=og(t,u,o);return c.top=nn(d.top,c.top),c.right=dr(d.right,c.right),c.bottom=dr(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},og(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function MC(e){const{width:t,height:n}=tg(e);return{width:t,height:n}}function DC(e,t,n){const r=Tt(t),o=Mn(t),i=n==="fixed",a=jr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Dn(0);function c(){l.x=Qc(o)}if(r||!r&&!i)if((cr(t)!=="body"||Ti(o))&&(s=Ba(t)),r){const f=jr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?rg(o,s):Dn(0),d=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:d,y:p,width:a.width,height:a.height}}function Jc(e){return tn(e).position==="static"}function ag(e,t){if(!Tt(e)||tn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mn(e)===n&&(n=n.ownerDocument.body),n}function sg(e,t){const n=qt(e);if(ja(e))return n;if(!Tt(e)){let o=Qn(e);for(;o&&!Xn(o);){if(it(o)&&!Jc(o))return o;o=Qn(o)}return n}let r=ag(e,t);for(;r&&gk(r)&&Jc(r);)r=ag(r,t);return r&&Xn(r)&&Jc(r)&&!Fc(r)?n:r||wk(e)||n}const NC=async function(e){const t=this.getOffsetParent||sg,n=this.getDimensions,r=await n(e.floating);return{reference:DC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LC(e){return tn(e).direction==="rtl"}const FC={convertOffsetParentRelativeRectToViewportRelativeRect:EC,getDocumentElement:Mn,getClippingRect:OC,getOffsetParent:sg,getElementRects:NC,getClientRects:kC,getDimensions:MC,getScale:To,isElement:it,isRTL:LC};function lg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VC(e,t){let n=null,r;const o=Mn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const b=xo(d),g=xo(o.clientWidth-(u+p)),h=xo(o.clientHeight-(d+f)),v=xo(u),x={rootMargin:-b+"px "+-g+"px "+-h+"px "+-v+"px",threshold:nn(0,dr(1,l))||1};let T=!0;function w(E){const k=E[0].intersectionRatio;if(k!==l){if(!T)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!lg(c,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(w,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(e)}return a(!0),i}function Eo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Xc(e),u=o||i?[...c?ur(c):[],...ur(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?VC(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let b,g=l?jr(e):null;l&&h();function h(){const v=jr(e);g&&!lg(g,v)&&n(),g=v,b=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const $C=bC,jC=mC,zC=xC,BC=gC,RC=wC,cg=pC,HC=(e,t,n)=>{const r=new Map,o={platform:FC,...n},i={...o.platform,_c:r};return fC(e,t,{...o,platform:i})};var WC=typeof document<"u",qC=function(){},es=WC?S.useLayoutEffect:qC;function ts(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ts(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ts(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ug(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dg(e,t){const n=ug(e);return Math.round(t*n)/n}function eu(e){const t=_.useRef(e);return es(()=>{t.current=e}),t}function UC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=_.useState(r);ts(p,r)||f(r);const[b,g]=_.useState(null),[h,v]=_.useState(null),y=_.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),x=_.useCallback(P=>{P!==k.current&&(k.current=P,v(P))},[]),T=i||b,w=a||h,E=_.useRef(null),k=_.useRef(null),C=_.useRef(u),O=l!=null,I=eu(l),D=eu(o),V=eu(c),z=_.useCallback(()=>{if(!E.current||!k.current)return;const P={placement:t,strategy:n,middleware:p};D.current&&(P.platform=D.current),HC(E.current,k.current,P).then($=>{const L={...$,isPositioned:V.current!==!1};A.current&&!ts(C.current,L)&&(C.current=L,gi.flushSync(()=>{d(L)}))})},[p,t,n,D,V]);es(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const A=_.useRef(!1);es(()=>(A.current=!0,()=>{A.current=!1}),[]),es(()=>{if(T&&(E.current=T),w&&(k.current=w),T&&w){if(I.current)return I.current(T,w,z);z()}},[T,w,z,I,O]);const N=_.useMemo(()=>({reference:E,floating:k,setReference:y,setFloating:x}),[y,x]),H=_.useMemo(()=>({reference:T,floating:w}),[T,w]),M=_.useMemo(()=>{const P={position:n,left:0,top:0};if(!H.floating)return P;const $=dg(H.floating,u.x),L=dg(H.floating,u.y);return s?{...P,transform:"translate("+$+"px, "+L+"px)",...ug(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:L}},[n,s,H.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:z,refs:N,elements:H,floatingStyles:M}),[u,z,N,H,M])}const YC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?cg({element:r.current,padding:o}).fn(n):{}:r?cg({element:r,padding:o}).fn(n):{}}}},Pi=(e,t)=>({...$C(e),options:[e,t]}),tu=(e,t)=>({...zC(e),options:[e,t]}),nu=(e,t)=>({...BC(e),options:[e,t]}),fg=(e,t)=>({...RC(e),options:[e,t]}),KC=(e,t)=>({...jC(e),options:[e,t]}),pg=(e,t)=>({...YC(e),options:[e,t]});function GC(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const hg=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function ZC(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=_.useState(()=>new Set),a=_.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=_.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=_.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(GC).forEach((d,p)=>{c.set(d,p)}),c},[o]);return m.jsx(hg.Provider,{value:_.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function mg(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=_.useContext(hg),[s,l]=_.useState(null),c=_.useRef(null),u=_.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d?.textContent)!=null?p:null}},[s,i,a,t]);return Ke(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ke(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),_.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const XC="data-floating-ui-focusable",gg="active",vg="selected",Ai="ArrowLeft",Ii="ArrowRight",yg="ArrowUp",ns="ArrowDown",QC={..._};let bg=!1,JC=0;const xg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+JC++;function eP(){const[e,t]=_.useState(()=>bg?xg():void 0);return Ke(()=>{e==null&&t(xg())},[]),_.useEffect(()=>{bg=!0},[]),e}const _i=QC.useId||eP;let Oi;process.env.NODE_ENV!=="production"&&(Oi=new Set);function rs(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Oi)!=null&&e.has(o))){var i;(i=Oi)==null||i.add(o),console.warn(o)}}function tP(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Oi)!=null&&e.has(o))){var i;(i=Oi)==null||i.add(o),console.error(o)}}const wg=_.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:p,d:f,style:{transform:b,...g}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||rs("The `ref` prop is required for `FloatingArrow`."));const v=_i(),[y,x]=_.useState(!1);if(Ke(()=>{if(!o)return;tn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,w]=r.split("-"),E=T==="top"||T==="bottom";let k=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(k=null);const C=u*2,O=C/2,I=s/2*(c/-8+1),D=l/2*c/4,V=!!f,z=k&&w==="end"?"bottom":"top";let A=k&&w==="end"?"right":"left";k&&y&&(A=w==="end"?"left":"right");const N=i?.x!=null?k||i.x:"",H=i?.y!=null?k||i.y:"",M=f||"M0,0"+(" H"+s)+(" L"+(s-I)+","+(l-D))+(" Q"+s/2+","+l+" "+I+","+(l-D))+" Z",P={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[T];return m.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:V?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[A]:N,[z]:H,[T]:E||V?"100%":"calc(100% - "+C/2+"px)",transform:[P,b].filter($=>!!$).join(" "),...g},children:[C>0&&m.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:p,strokeWidth:C+(f?0:1),d:M}),m.jsx("path",{stroke:C&&!f?h.fill:"none",d:M}),m.jsx("clipPath",{id:v,children:m.jsx("rect",{x:-O,y:O*(V?-1:1),width:s+C,height:s})})]})});function Sg(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Tg=_.createContext(null),Eg=_.createContext(null),fr=()=>{var e;return((e=_.useContext(Tg))==null?void 0:e.id)||null},pr=()=>_.useContext(Eg);function nP(e){const t=_i(),n=pr(),o=fr();return Ke(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function rP(e){const{children:t,id:n}=e,r=fr();return m.jsx(Tg.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function oP(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(a=>{n.current=[...n.current,a]},[]),o=_.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=_.useState(()=>Sg());return m.jsx(Eg.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function zr(e){return"data-floating-ui-"+e}function jt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const kg=zr("safe-polygon");function ru(e,t,n){if(n&&!So(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function ou(e){return typeof e=="function"?e():e}function Cg(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=pr(),b=fr(),g=Lt(c),h=Lt(l),v=Lt(n),y=Lt(d),x=_.useRef(),T=_.useRef(-1),w=_.useRef(),E=_.useRef(-1),k=_.useRef(!0),C=_.useRef(!1),O=_.useRef(()=>{}),I=_.useRef(!1),D=ht(()=>{var M;const P=(M=o.current.openEvent)==null?void 0:M.type;return P?.includes("mouse")&&P!=="mousedown"});_.useEffect(()=>{if(!s)return;function M(P){let{open:$}=P;$||(jt(T),jt(E),k.current=!0,I.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),_.useEffect(()=>{if(!s||!g.current||!n)return;function M($){D()&&r(!1,$,"hover")}const P=Vt(a.floating).documentElement;return P.addEventListener("mouseleave",M),()=>{P.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,D]);const V=_.useCallback(function(M,P,$){P===void 0&&(P=!0),$===void 0&&($="hover");const L=ru(h.current,"close",x.current);L&&!w.current?(jt(T),T.current=window.setTimeout(()=>r(!1,M,$),L)):P&&(jt(T),r(!1,M,$))},[h,r]),z=ht(()=>{O.current(),w.current=void 0}),A=ht(()=>{if(C.current){const M=Vt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(kg),C.current=!1}}),N=ht(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);_.useEffect(()=>{if(!s)return;function M(G){if(jt(T),k.current=!1,u&&!So(x.current)||ou(y.current)>0&&!ru(h.current,"open"))return;const B=ru(h.current,"open",x.current);B?T.current=window.setTimeout(()=>{v.current||r(!0,G,"hover")},B):n||r(!0,G,"hover")}function P(G){if(N()){A();return}O.current();const B=Vt(a.floating);if(jt(E),I.current=!1,g.current&&o.current.floatingContext){n||jt(T),w.current=g.current({...o.current.floatingContext,tree:f,x:G.clientX,y:G.clientY,onClose(){A(),z(),N()||V(G,!0,"safe-polygon")}});const ee=w.current;B.addEventListener("mousemove",ee),O.current=()=>{B.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Nt(a.floating,G.relatedTarget):!0)&&V(G)}function $(G){N()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:G.clientX,y:G.clientY,onClose(){A(),z(),N()||V(G)}})(G))}function L(){jt(T)}function U(G){N()||V(G,!1)}if(it(a.domReference)){const G=a.domReference,B=a.floating;return n&&G.addEventListener("mouseleave",$),p&&G.addEventListener("mousemove",M,{once:!0}),G.addEventListener("mouseenter",M),G.addEventListener("mouseleave",P),B&&(B.addEventListener("mouseleave",$),B.addEventListener("mouseenter",L),B.addEventListener("mouseleave",U)),()=>{n&&G.removeEventListener("mouseleave",$),p&&G.removeEventListener("mousemove",M),G.removeEventListener("mouseenter",M),G.removeEventListener("mouseleave",P),B&&(B.removeEventListener("mouseleave",$),B.removeEventListener("mouseenter",L),B.removeEventListener("mouseleave",U))}}},[a,s,e,u,p,V,z,A,r,n,v,f,h,g,o,N,y]),Ke(()=>{var M;if(s&&n&&(M=g.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&D()){C.current=!0;const $=a.floating;if(it(a.domReference)&&$){var P;const L=Vt(a.floating).body;L.setAttribute(kg,"");const U=a.domReference,G=f==null||(P=f.nodesRef.current.find(B=>B.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return G&&(G.style.pointerEvents=""),L.style.pointerEvents="none",U.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{L.style.pointerEvents="",U.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,n,b,a,f,g,D]),Ke(()=>{n||(x.current=void 0,I.current=!1,z(),A())},[n,z,A]),_.useEffect(()=>()=>{z(),jt(T),jt(E),A()},[s,a.domReference,z,A]);const H=_.useMemo(()=>{function M(P){x.current=P.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(P){const{nativeEvent:$}=P;function L(){!k.current&&!v.current&&r(!0,$,"hover")}u&&!So(x.current)||n||ou(y.current)===0||I.current&&P.movementX**2+P.movementY**2<2||(jt(E),x.current==="touch"?L():(I.current=!0,E.current=window.setTimeout(L,ou(y.current))))}}},[u,r,n,v,y]);return _.useMemo(()=>s?{reference:H}:{},[s,H])}let Pg=0;function Br(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Pg);const i=()=>e?.focus({preventScroll:n});o?i():Pg=requestAnimationFrame(i)}function iu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&$a(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function iP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function aP(e){return e?.ownerDocument||document}const ko={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ag(e){return e==="inert"?ko.inert:e==="aria-hidden"?ko["aria-hidden"]:ko.none}let os=new WeakSet,is={},au=0;const sP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ig=e=>e&&(e.host||Ig(e.parentNode)),lP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ig(n);return e.contains(r)?r:null}).filter(n=>n!=null);function cP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=lP(t,e),s=new Set,l=new Set(a),c=[];is[o]||(is[o]=new WeakMap);const u=is[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(cr(b)!=="script")if(s.has(b))p(b);else{const g=i?b.getAttribute(i):null,h=g!==null&&g!=="false",v=Ag(i),y=(v.get(b)||0)+1,x=(u.get(b)||0)+1;v.set(b,y),u.set(b,x),c.push(b),y===1&&h&&os.add(b),x===1&&b.setAttribute(o,""),!h&&i&&b.setAttribute(i,i==="inert"?"":"true")}})}return au++,()=>{c.forEach(f=>{const b=Ag(i),h=(b.get(f)||0)-1,v=(u.get(f)||0)-1;b.set(f,h),u.set(f,v),h||(!os.has(f)&&i&&f.removeAttribute(i),os.delete(f)),v||f.removeAttribute(o)}),au--,au||(ko.inert=new WeakMap,ko["aria-hidden"]=new WeakMap,ko.none=new WeakMap,os=new WeakSet,is={})}}function _g(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=aP(e[0]).body;return cP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const as={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},ss=_.forwardRef(function(t,n){const[r,o]=_.useState();Ke(()=>{Hm()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zr("focus-guard")]:"",style:as};return m.jsx("span",{...t,...i})}),Og=_.createContext(null),Mg=zr("portal");function uP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=_i(),o=Dg(),[i,a]=_.useState(null),s=_.useRef(null);return Ke(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ke(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Mg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ke(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!Lc(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Mg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function hr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=uP({id:n,root:r}),[a,s]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=a?.modal,f=a?.open,b=!!a&&!a.modal&&a.open&&o&&!!(r||i);return _.useEffect(()=>{if(!i||!o||p)return;function g(h){i&&Ci(h)&&(h.type==="focusin"?Jm:dC)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,p]),_.useEffect(()=>{i&&(f||Jm(i))},[f,i]),m.jsxs(Og.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[b&&i&&m.jsx(ss,{"data-type":"outside",ref:l,onFocus:g=>{if(Ci(g,i)){var h;(h=u.current)==null||h.focus()}else{const v=a?a.domReference:null,y=Qm(v);y?.focus()}}}),b&&i&&m.jsx("span",{"aria-owns":i.id,style:as}),i&&gi.createPortal(t,i),b&&i&&m.jsx(ss,{"data-type":"outside",ref:c,onFocus:g=>{if(Ci(g,i)){var h;(h=d.current)==null||h.focus()}else{const v=a?a.domReference:null,y=Xm(v);y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Dg=()=>_.useContext(Og);function Ng(e){return _.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const dP=20;let mr=[];function su(){mr=mr.filter(e=>e.isConnected)}function fP(e){su(),e&&cr(e)!=="body"&&(mr.push(e),mr.length>dP&&(mr=mr.slice(-20)))}function Lg(){return su(),mr[mr.length-1]}function pP(e){const t=ki();return Bm(e,t)?e:Ga(e,t)[0]||e}function Fg(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=ki(),i=Kk(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Bm(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const hP=_.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:as})});function Rr(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:p=!1,getInsideElements:f=()=>[]}=e,{open:b,onOpenChange:g,events:h,dataRef:v,elements:{domReference:y,floating:x}}=t,T=ht(()=>{var j;return(j=v.current.floatingContext)==null?void 0:j.nodeId}),w=ht(f),E=typeof a=="number"&&a<0,k=Gc(y)&&E,C=sP(),O=C?i:!0,I=!O||C&&p,D=Lt(o),V=Lt(a),z=Lt(s),A=pr(),N=Dg(),H=_.useRef(null),M=_.useRef(null),P=_.useRef(!1),$=_.useRef(!1),L=_.useRef(-1),U=_.useRef(-1),G=N!=null,B=Za(x),Z=ht(function(j){return j===void 0&&(j=B),j?Ga(j,ki()):[]}),ee=ht(j=>{const se=Z(j);return D.current.map(le=>y&&le==="reference"?y:B&&le==="floating"?B:se).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function j(le){if(le.key==="Tab"){Nt(B,Ln(Vt(B)))&&Z().length===0&&!k&&$t(le);const he=ee(),xe=Fn(le);D.current[0]==="reference"&&xe===y&&($t(le),le.shiftKey?Br(he[he.length-1]):Br(he[1])),D.current[1]==="floating"&&xe===B&&le.shiftKey&&($t(le),Br(he[0]))}}const se=Vt(B);return se.addEventListener("keydown",j),()=>{se.removeEventListener("keydown",j)}},[r,y,B,c,D,k,Z,ee]),_.useEffect(()=>{if(r||!x)return;function j(se){const le=Fn(se),xe=Z().indexOf(le);xe!==-1&&(L.current=xe)}return x.addEventListener("focusin",j),()=>{x.removeEventListener("focusin",j)}},[r,x,Z]),_.useEffect(()=>{if(r||!d)return;function j(){$.current=!0,setTimeout(()=>{$.current=!1})}function se(xe){const de=xe.relatedTarget,Pe=xe.currentTarget,Oe=Fn(xe);queueMicrotask(()=>{const Te=T(),Be=!(Nt(y,de)||Nt(x,de)||Nt(de,x)||Nt(N?.portalNode,de)||de!=null&&de.hasAttribute(zr("focus-guard"))||A&&($r(A.nodesRef.current,Te).find(ue=>{var Y,F;return Nt((Y=ue.context)==null?void 0:Y.elements.floating,de)||Nt((F=ue.context)==null?void 0:F.elements.domReference,de)})||Um(A.nodesRef.current,Te).find(ue=>{var Y,F,Q;return[(Y=ue.context)==null?void 0:Y.elements.floating,Za((F=ue.context)==null?void 0:F.elements.floating)].includes(de)||((Q=ue.context)==null?void 0:Q.elements.domReference)===de})));if(Pe===y&&B&&Fg(B,D),l&&Pe!==y&&!(Oe!=null&&Oe.isConnected)&&Ln(Vt(B))===Vt(B).body){Tt(B)&&B.focus();const ue=L.current,Y=Z(),F=Y[ue]||Y[Y.length-1]||B;Tt(F)&&F.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(k||!c)&&de&&Be&&!$.current&&de!==Lg()&&(P.current=!0,g(!1,xe,"focus-out"))})}const le=!!(!A&&N);function he(){jt(U),v.current.insideReactTree=!0,U.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Tt(y))return y.addEventListener("focusout",se),y.addEventListener("pointerdown",j),x.addEventListener("focusout",se),le&&x.addEventListener("focusout",he,!0),()=>{y.removeEventListener("focusout",se),y.removeEventListener("pointerdown",j),x.removeEventListener("focusout",se),le&&x.removeEventListener("focusout",he,!0)}},[r,y,x,B,c,A,N,g,d,l,Z,k,T,D,v]);const ne=_.useRef(null),J=_.useRef(null),R=Ng([ne,N?.beforeInsideRef]),q=Ng([J,N?.afterInsideRef]);_.useEffect(()=>{var j,se;if(r||!x)return;const le=Array.from((N==null||(j=N.portalNode)==null?void 0:j.querySelectorAll("["+zr("portal")+"]"))||[]),xe=(se=(A?Um(A.nodesRef.current,T()):[]).find(Oe=>{var Te;return Gc(((Te=Oe.context)==null?void 0:Te.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,de=[x,xe,...le,...w(),H.current,M.current,ne.current,J.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,D.current.includes("reference")||k?y:null].filter(Oe=>Oe!=null),Pe=c||k?_g(de,!I,I):_g(de);return()=>{Pe()}},[r,y,x,c,D,N,k,O,I,A,T,w]),Ke(()=>{if(r||!Tt(B))return;const j=Vt(B),se=Ln(j);queueMicrotask(()=>{const le=ee(B),he=V.current,xe=(typeof he=="number"?le[he]:he.current)||B,de=Nt(B,se);!E&&!de&&b&&Br(xe,{preventScroll:xe===B})})},[r,b,B,E,ee,V]),Ke(()=>{if(r||!B)return;const j=Vt(B),se=Ln(j);fP(se);function le(de){let{reason:Pe,event:Oe,nested:Te}=de;if(["hover","safe-polygon"].includes(Pe)&&Oe.type==="mouseleave"&&(P.current=!0),Pe==="outside-press")if(Te)P.current=!1;else if(Ym(Oe)||Km(Oe))P.current=!1;else{let Be=!1;document.createElement("div").focus({get preventScroll(){return Be=!0,!1}}),Be?P.current=!1:P.current=!0}}h.on("openchange",le);const he=j.createElement("span");he.setAttribute("tabindex","-1"),he.setAttribute("aria-hidden","true"),Object.assign(he.style,as),G&&y&&y.insertAdjacentElement("afterend",he);function xe(){if(typeof z.current=="boolean"){const de=y||Lg();return de&&de.isConnected?de:he}return z.current.current||he}return()=>{h.off("openchange",le);const de=Ln(j),Pe=Nt(x,de)||A&&$r(A.nodesRef.current,T(),!1).some(Te=>{var Be;return Nt((Be=Te.context)==null?void 0:Be.elements.floating,de)}),Oe=xe();queueMicrotask(()=>{const Te=pP(Oe);z.current&&!P.current&&Tt(Te)&&(!(Te!==de&&de!==j.body)||Pe)&&Te.focus({preventScroll:!0}),he.remove()})}},[r,x,B,z,v,h,A,G,y,T]),_.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(su)}),[r]),Ke(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:b,onOpenChange:g,domReference:y}),()=>{N.setFocusManagerState(null)}},[r,N,c,b,g,d,y]),Ke(()=>{r||B&&Fg(B,D)},[r,B,D]);function X(j){return r||!u||!c?null:m.jsx(hP,{ref:j==="start"?H:M,onClick:se=>g(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const oe=!r&&O&&(c?!k:!0)&&(G||c);return m.jsxs(m.Fragment,{children:[oe&&m.jsx(ss,{"data-type":"inside",ref:R,onFocus:j=>{if(c){const le=ee();Br(o[0]==="reference"?le[0]:le[le.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(P.current=!1,Ci(j,N.portalNode)){const le=Xm(y);le?.focus()}else{var se;(se=N.beforeOutsideRef.current)==null||se.focus()}}}),!k&&X("start"),n,X("end"),oe&&m.jsx(ss,{"data-type":"inside",ref:q,onFocus:j=>{if(c)Br(ee()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(P.current=!0),Ci(j,N.portalNode)){const le=Qm(y);le?.focus()}else{var se;(se=N.afterOutsideRef.current)==null||se.focus()}}})]})}let ls=0;const Vg="--floating-ui-scrollbar-width";function mP(){const e=Hc(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Vg,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Vg),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let $g=()=>{};const lu=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ke(()=>{if(r)return ls++,ls===1&&($g=mP()),()=>{ls--,ls===0&&$g()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function jg(e){return Tt(e.target)&&e.target.tagName==="BUTTON"}function gP(e){return Tt(e.target)&&e.target.tagName==="A"}function zg(e){return Kc(e)}function Co(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,p=_.useRef(),f=_.useRef(!1),b=_.useMemo(()=>({onPointerDown(g){p.current=g.pointerType},onMouseDown(g){const h=p.current;g.button===0&&s!=="click"&&(So(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){const h=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}So(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){p.current=void 0,!(g.defaultPrevented||!u||jg(g))&&(g.key===" "&&!zg(i)&&(g.preventDefault(),f.current=!0),!gP(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||jg(g)||zg(i)||g.key===" "&&f.current&&(f.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return _.useMemo(()=>a?{reference:b}:{},[a,b])}function vP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function Bg(e){return e!=null&&e.clientX!=null}function yP(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=_.useRef(!1),p=_.useRef(null),[f,b]=_.useState(),[g,h]=_.useState([]),v=ht((E,k)=>{d.current||r.current.openEvent&&!Bg(r.current.openEvent)||a.setPositionReference(vP(i,{x:E,y:k,axis:l,dataRef:r,pointerType:f}))}),y=ht(E=>{c!=null||u!=null||(n?p.current||h([]):v(E.clientX,E.clientY))}),x=So(f)?o:n,T=_.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const E=qt(o);function k(C){const O=Fn(C);Nt(o,O)?(E.removeEventListener("mousemove",k),p.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||Bg(r.current.openEvent)){E.addEventListener("mousemove",k);const C=()=>{E.removeEventListener("mousemove",k),p.current=null};return p.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);_.useEffect(()=>T(),[T,g]),_.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),_.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ke(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=_.useMemo(()=>{function E(k){let{pointerType:C}=k;b(C)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return _.useMemo(()=>s?{reference:w}:{},[s,w])}const bP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},xP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Rg=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function gr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:b}=t,g=pr(),h=ht(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=_.useRef(!1),{escapeKey:x,outsidePress:T}=Rg(f),{escapeKey:w,outsidePress:E}=Rg(b),k=_.useRef(!1),C=ht(A=>{var N;if(!n||!a||!s||A.key!=="Escape"||k.current)return;const H=(N=i.current.floatingContext)==null?void 0:N.nodeId,M=g?$r(g.nodesRef.current,H):[];if(!x&&(A.stopPropagation(),M.length>0)){let P=!0;if(M.forEach($=>{var L;if((L=$.context)!=null&&L.open&&!$.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,nC(A)?A.nativeEvent:A,"escape-key")}),O=ht(A=>{var N;const H=()=>{var M;C(A),(M=Fn(A))==null||M.removeEventListener("keydown",H)};(N=Fn(A))==null||N.addEventListener("keydown",H)}),I=ht(A=>{var N;const H=i.current.insideReactTree;i.current.insideReactTree=!1;const M=y.current;if(y.current=!1,c==="click"&&M||H||typeof v=="function"&&!v(A))return;const P=Fn(A),$="["+zr("inert")+"]",L=Vt(o.floating).querySelectorAll($);let U=it(P)?P:null;for(;U&&!Xn(U);){const ee=Qn(U);if(Xn(ee)||!it(ee))break;U=ee}if(L.length&&it(P)&&!Jk(P)&&!Nt(P,o.floating)&&Array.from(L).every(ee=>!Nt(U,ee)))return;if(Tt(P)&&z){const ee=Xn(P),ne=tn(P),J=/auto|scroll/,R=ee||J.test(ne.overflowX),q=ee||J.test(ne.overflowY),X=R&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,oe=q&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,j=ne.direction==="rtl",se=oe&&(j?A.offsetX<=P.offsetWidth-P.clientWidth:A.offsetX>P.clientWidth),le=X&&A.offsetY>P.clientHeight;if(se||le)return}const G=(N=i.current.floatingContext)==null?void 0:N.nodeId,B=g&&$r(g.nodesRef.current,G).some(ee=>{var ne;return Yc(A,(ne=ee.context)==null?void 0:ne.elements.floating)});if(Yc(A,o.floating)||Yc(A,o.domReference)||B)return;const Z=g?$r(g.nodesRef.current,G):[];if(Z.length>0){let ee=!0;if(Z.forEach(ne=>{var J;if((J=ne.context)!=null&&J.open&&!ne.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,A,"outside-press")}),D=ht(A=>{var N;const H=()=>{var M;I(A),(M=Fn(A))==null||M.removeEventListener(c,H)};(N=Fn(A))==null||N.addEventListener(c,H)});_.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let A=-1;function N(L){r(!1,L,"ancestor-scroll")}function H(){window.clearTimeout(A),k.current=!0}function M(){A=window.setTimeout(()=>{k.current=!1},za()?5:0)}const P=Vt(o.floating);s&&(P.addEventListener("keydown",w?O:C,w),P.addEventListener("compositionstart",H),P.addEventListener("compositionend",M)),v&&P.addEventListener(c,E?D:I,E);let $=[];return p&&(it(o.domReference)&&($=ur(o.domReference)),it(o.floating)&&($=$.concat(ur(o.floating))),!it(o.reference)&&o.reference&&o.reference.contextElement&&($=$.concat(ur(o.reference.contextElement)))),$=$.filter(L=>{var U;return L!==((U=P.defaultView)==null?void 0:U.visualViewport)}),$.forEach(L=>{L.addEventListener("scroll",N,{passive:!0})}),()=>{s&&(P.removeEventListener("keydown",w?O:C,w),P.removeEventListener("compositionstart",H),P.removeEventListener("compositionend",M)),v&&P.removeEventListener(c,E?D:I,E),$.forEach(L=>{L.removeEventListener("scroll",N)}),window.clearTimeout(A)}},[i,o,s,v,c,n,r,p,a,x,T,C,w,O,I,E,D]),_.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const V=_.useMemo(()=>({onKeyDown:C,...u&&{[bP[d]]:A=>{r(!1,A.nativeEvent,"reference-press")},...d!=="click"&&{onClick(A){r(!1,A.nativeEvent,"reference-press")}}}}),[C,r,u,d]),z=_.useMemo(()=>({onKeyDown:C,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[xP[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return _.useMemo(()=>a?{reference:V,floating:z}:{},[a,V,z])}function wP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=_i(),i=_.useRef({}),[a]=_.useState(()=>Sg()),s=fr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!it(f)&&tP("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=_.useState(r.reference),u=ht((f,b,g)=>{i.current.openEvent=f?b:void 0,a.emit("openchange",{open:f,event:b,reason:g,nested:s}),n?.(f,b,g)}),d=_.useMemo(()=>({setPositionReference:c}),[]),p=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function er(e){e===void 0&&(e={});const{nodeId:t}=e,n=wP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=_.useState(null),[s,l]=_.useState(null),u=o?.domReference||i,d=_.useRef(null),p=pr();Ke(()=>{u&&(d.current=u)},[u]);const f=UC({...e,elements:{...o,...s&&{reference:s}}}),b=_.useCallback(x=>{const T=it(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=_.useCallback(x=>{(it(x)||x===null)&&(d.current=x,a(x)),(it(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!it(x))&&f.refs.setReference(x)},[f.refs]),h=_.useMemo(()=>({...f.refs,setReference:g,setPositionReference:b,domReference:d}),[f.refs,g,b]),v=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=_.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Ke(()=>{r.dataRef.current.floatingContext=y;const x=p?.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),_.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function cu(){return Gk()&&Hm()}function SP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=_.useRef(!1),u=_.useRef(-1),d=_.useRef(!0);_.useEffect(()=>{if(!s)return;const f=qt(a.domReference);function b(){!n&&Tt(a.domReference)&&a.domReference===Ln(Vt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function h(){d.current=!1}return f.addEventListener("blur",b),cu()&&(f.addEventListener("keydown",g,!0),f.addEventListener("pointerdown",h,!0)),()=>{f.removeEventListener("blur",b),cu()&&(f.removeEventListener("keydown",g,!0),f.removeEventListener("pointerdown",h,!0))}},[a.domReference,n,s]),_.useEffect(()=>{if(!s)return;function f(b){let{reason:g}=b;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),_.useEffect(()=>()=>{jt(u)},[]);const p=_.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const b=Fn(f.nativeEvent);if(l&&it(b)){if(cu()&&!f.relatedTarget){if(!d.current&&!Kc(b))return}else if(!eC(b))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const b=f.relatedTarget,g=f.nativeEvent,h=it(b)&&b.hasAttribute(zr("focus-guard"))&&b.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=Ln(a.domReference?a.domReference.ownerDocument:document);!b&&y===a.domReference||Nt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||Nt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return _.useMemo(()=>s?{reference:p}:{},[s,p])}function uu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[gg]:a,[vg]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[XC]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[gg,vg].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,b=new Array(f),g=0;g<f;g++)b[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...b)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function tr(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=_.useCallback(s=>uu(s,e,"reference"),t),i=_.useCallback(s=>uu(s,e,"floating"),n),a=_.useCallback(s=>uu(s,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const TP="Escape";function cs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function us(e,t){return cs(t,e===yg||e===ns,e===Ai||e===Ii)}function du(e,t,n){return cs(t,e===ns,n?e===Ai:e===Ii)||e==="Enter"||e===" "||e===""}function Hg(e,t,n){return cs(t,n?e===Ai:e===Ii,e===ns)}function Wg(e,t,n,r){const o=n?e===Ii:e===Ai,i=e===yg;return t==="both"||t==="horizontal"&&r&&r>1?e===TP:cs(t,o,i)}function ds(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:p=!1,nested:f=!1,rtl:b=!1,virtual:g=!1,focusItemOnOpen:h="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:k=!0,virtualItemRef:C,itemSizes:O,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(p||rs("`useListNavigation` looping must be enabled to allow escaping."),g||rs("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&E>1&&rs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=Za(o.floating),V=Lt(D),z=fr(),A=pr();Ke(()=>{e.dataRef.current.orientation=T},[e,T]);const N=ht(()=>{l(P.current===-1?null:P.current)}),H=Gc(o.domReference),M=_.useRef(h),P=_.useRef(u??-1),$=_.useRef(null),L=_.useRef(!0),U=_.useRef(N),G=_.useRef(!!o.floating),B=_.useRef(n),Z=_.useRef(!1),ee=_.useRef(!1),ne=Lt(x),J=Lt(n),R=Lt(k),q=Lt(u),[X,oe]=_.useState(),[j,se]=_.useState(),le=ht(()=>{function ue(ce){if(g){var we;(we=ce.id)!=null&&we.endsWith("-fui-option")&&(ce.id=i+"-"+Math.random().toString(16).slice(2,10)),oe(ce.id),A?.events.emit("virtualfocus",ce),C&&(C.current=ce)}else Br(ce,{sync:Z.current,preventScroll:!0})}const Y=a.current[P.current],F=ee.current;Y&&ue(Y),(Z.current?ce=>ce():requestAnimationFrame)(()=>{const ce=a.current[P.current]||Y;if(!ce)return;Y||ue(ce);const we=R.current;we&&xe&&(F||!L.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Ke(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ee.current=!0,P.current=u,N()):G.current&&(P.current=-1,U.current()))},[c,n,o.floating,u,N]),Ke(()=>{if(c&&n&&o.floating)if(s==null){if(Z.current=!1,q.current!=null)return;if(G.current&&(P.current=-1,le()),(!B.current||!G.current)&&M.current&&($.current!=null||M.current===!0&&$.current==null)){let ue=0;const Y=()=>{a.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Y),ue++):(P.current=$.current==null||du($.current,T,b)||f?Zc(a,ne.current):Gm(a,ne.current),$.current=null,N())};Y()}}else Ei(a,s)||(P.current=s,le(),ee.current=!1)},[c,n,o.floating,s,q,f,a,T,b,N,le,ne]),Ke(()=>{var ue;if(!c||o.floating||!A||g||!G.current)return;const Y=A.nodesRef.current,F=(ue=Y.find(we=>we.id===z))==null||(ue=ue.context)==null?void 0:ue.elements.floating,Q=Ln(Vt(o.floating)),ce=Y.some(we=>we.context&&Nt(we.context.elements.floating,Q));F&&!ce&&L.current&&F.focus({preventScroll:!0})},[c,o.floating,A,z,g]),Ke(()=>{if(!c||!A||!g||z)return;function ue(Y){se(Y.id),C&&(C.current=Y)}return A.events.on("virtualfocus",ue),()=>{A.events.off("virtualfocus",ue)}},[c,A,g,z,C]),Ke(()=>{U.current=N,B.current=n,G.current=!!o.floating}),Ke(()=>{n||($.current=null,M.current=h)},[n,h]);const he=s!=null,xe=_.useMemo(()=>{function ue(F){if(!J.current)return;const Q=a.current.indexOf(F);Q!==-1&&P.current!==Q&&(P.current=Q,N())}return{onFocus(F){let{currentTarget:Q}=F;Z.current=!0,ue(Q)},onClick:F=>{let{currentTarget:Q}=F;return Q.focus({preventScroll:!0})},onMouseMove(F){let{currentTarget:Q}=F;Z.current=!0,ee.current=!1,v&&ue(Q)},onPointerLeave(F){let{pointerType:Q}=F;if(!(!L.current||Q==="touch")&&(Z.current=!0,!!v&&(P.current=-1,N(),!g))){var ce;(ce=V.current)==null||ce.focus({preventScroll:!0})}}}},[J,V,v,a,N,g]),de=_.useCallback(()=>{var ue;return w??(A==null||(ue=A.nodesRef.current.find(Y=>Y.id===z))==null||(ue=ue.context)==null||(ue=ue.dataRef)==null?void 0:ue.current.orientation)},[z,A,w]),Pe=ht(ue=>{if(L.current=!1,Z.current=!0,ue.which===229||!J.current&&ue.currentTarget===V.current)return;if(f&&Wg(ue.key,T,b,E)){us(ue.key,de())||$t(ue),r(!1,ue.nativeEvent,"list-navigation"),Tt(o.domReference)&&(g?A?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const Y=P.current,F=Zc(a,x),Q=Gm(a,x);if(H||(ue.key==="Home"&&($t(ue),P.current=F,N()),ue.key==="End"&&($t(ue),P.current=Q,N())),E>1){const ce=O||Array.from({length:a.current.length},()=>({width:1,height:1})),we=lC(ce,E,I),Le=we.findIndex(xt=>xt!=null&&!Qa(a,xt,x)),Ze=we.reduce((xt,Kt,Kn)=>Kt!=null&&!Qa(a,Kt,x)?Kn:xt,-1),Ft=we[sC({current:we.map(xt=>xt!=null?a.current[xt]:null)},{event:ue,orientation:T,loop:p,rtl:b,cols:E,disabledIndices:uC([...(typeof x!="function"?x:null)||a.current.map((xt,Kt)=>Qa(a,Kt,x)?Kt:void 0),void 0],we),minIndex:Le,maxIndex:Ze,prevIndex:cC(P.current>Q?F:P.current,ce,we,E,ue.key===ns?"bl":ue.key===(b?Ai:Ii)?"tr":"tl"),stopEvent:!0})];if(Ft!=null&&(P.current=Ft,N()),T==="both")return}if(us(ue.key,T)){if($t(ue),n&&!g&&Ln(ue.currentTarget.ownerDocument)===ue.currentTarget){P.current=du(ue.key,T,b)?F:Q,N();return}du(ue.key,T,b)?p?P.current=Y>=Q?d&&Y!==a.current.length?-1:F:Ht(a,{startingIndex:Y,disabledIndices:x}):P.current=Math.min(Q,Ht(a,{startingIndex:Y,disabledIndices:x})):p?P.current=Y<=F?d&&Y!==-1?a.current.length:Q:Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x}):P.current=Math.max(F,Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x})),Ei(a,P.current)&&(P.current=-1),N()}}),Oe=_.useMemo(()=>g&&n&&he&&{"aria-activedescendant":j||X},[g,n,he,j,X]),Te=_.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...H?{}:Oe,onKeyDown:Pe,onPointerMove(){L.current=!0}}),[Oe,Pe,T,H]),Be=_.useMemo(()=>{function ue(F){h==="auto"&&Ym(F.nativeEvent)&&(M.current=!0)}function Y(F){M.current=h,h==="auto"&&Km(F.nativeEvent)&&(M.current=!0)}return{...Oe,onKeyDown(F){L.current=!1;const Q=F.key.startsWith("Arrow"),ce=["Home","End"].includes(F.key),we=Q||ce,Le=Hg(F.key,T,b),Ze=Wg(F.key,T,b,E),Ft=Hg(F.key,de(),b),xt=us(F.key,T),Kt=(f?Ft:xt)||F.key==="Enter"||F.key.trim()==="";if(g&&n){const W=A?.nodesRef.current.find(Fe=>Fe.parentId==null),K=A&&W?tC(A.nodesRef.current,W.id):null;if(we&&K&&C){const Fe=new KeyboardEvent("keydown",{key:F.key,bubbles:!0});if(Le||Ze){var Kn,An;const tt=((Kn=K.context)==null?void 0:Kn.elements.domReference)===F.currentTarget,ot=Ze&&!tt?(An=K.context)==null?void 0:An.elements.domReference:Le?a.current.find(Me=>Me?.id===X):null;ot&&($t(F),ot.dispatchEvent(Fe),se(void 0))}if((xt||ce)&&K.context&&K.context.open&&K.parentId&&F.currentTarget!==K.context.elements.domReference){var In;$t(F),(In=K.context.elements.domReference)==null||In.dispatchEvent(Fe);return}}return Pe(F)}if(!(!n&&!y&&Q)){if(Kt){const W=us(F.key,de());$.current=f&&W?null:F.key}if(f){Ft&&($t(F),n?(P.current=Zc(a,ne.current),N()):r(!0,F.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(P.current=u),$t(F),!n&&y?r(!0,F.nativeEvent,"list-navigation"):Pe(F),n&&N())}},onFocus(){n&&!g&&(P.current=-1,N())},onPointerDown:Y,onPointerEnter:Y,onMouseDown:ue,onClick:ue}},[X,Oe,E,Pe,ne,h,a,f,N,r,n,y,T,de,b,u,A,g,C]);return _.useMemo(()=>c?{reference:Be,floating:Te,item:xe}:{},[c,Be,Te,xe])}const EP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function vr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=_i(),u=((n=i.domReference)==null?void 0:n.id)||c,d=_.useMemo(()=>{var y;return((y=Za(i.floating))==null?void 0:y.id)||a},[i.floating,a]),p=(r=EP.get(l))!=null?r:l,b=fr()!=null,g=_.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:u},...p==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,o,u,l]),h=_.useMemo(()=>{const y={id:d,...p&&{role:p}};return p==="tooltip"||l==="label"?y:{...y,...p==="menu"&&{"aria-labelledby":u}}},[p,d,u,l]),v=_.useCallback(y=>{let{active:x,selected:T}=y;const w={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...w,"aria-selected":T}}return{}},[d,l]);return _.useMemo(()=>s?{reference:g,floating:h,item:v}:{},[s,g,h,v])}const qg=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Po(e,t){return typeof e=="function"?e(t):e}function kP(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function CP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=_.useState("unmounted"),c=kP(n,a);return!c&&s==="close"&&l("unmounted"),Ke(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{gi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Ug(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=_.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,b]=_.useState(()=>({...Po(i,c),...Po(n,c)})),{isMounted:g,status:h}=CP(e,{duration:a}),v=Lt(n),y=Lt(r),x=Lt(o),T=Lt(i);return Ke(()=>{const w=Po(v.current,c),E=Po(x.current,c),k=Po(T.current,c),C=Po(y.current,c)||Object.keys(w).reduce((O,I)=>(O[I]="",O),{});if(h==="initial"&&b(O=>({transitionProperty:O.transitionProperty,...k,...w})),h==="open"&&b({transitionProperty:Object.keys(C).map(qg).join(","),transitionDuration:d+"ms",...k,...C}),h==="close"){const O=E||w;b({transitionProperty:Object.keys(O).map(qg).join(","),transitionDuration:p+"ms",...k,...O})}},[p,x,v,y,T,d,h,c]),{isMounted:g,styles:f}}function PP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,b=_.useRef(-1),g=_.useRef(""),h=_.useRef((n=f??a)!=null?n:-1),v=_.useRef(null),y=ht(s),x=ht(l),T=Lt(u),w=Lt(p);Ke(()=>{r&&(jt(b),v.current=null,g.current="")},[r]),Ke(()=>{if(r&&g.current===""){var I;h.current=(I=f??a)!=null?I:-1}},[r,f,a]);const E=ht(I=>{I?o.current.typing||(o.current.typing=I,x(I)):o.current.typing&&(o.current.typing=I,x(I))}),k=ht(I=>{function D(H,M,P){const $=T.current?T.current(M,P):M.find(L=>L?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return $?H.indexOf($):-1}const V=i.current;if(g.current.length>0&&g.current[0]!==" "&&(D(V,V,g.current)===-1?E(!1):I.key===" "&&$t(I)),V==null||w.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&($t(I),E(!0)),V.every(H=>{var M,P;return H?((M=H[0])==null?void 0:M.toLocaleLowerCase())!==((P=H[1])==null?void 0:P.toLocaleLowerCase()):!0})&&g.current===I.key&&(g.current="",h.current=v.current),g.current+=I.key,jt(b),b.current=window.setTimeout(()=>{g.current="",h.current=v.current,E(!1)},d);const A=h.current,N=D(V,[...V.slice((A||0)+1),...V.slice(0,(A||0)+1)],g.current);N!==-1?(y(N),v.current=N):I.key!==" "&&(g.current="",E(!1))}),C=_.useMemo(()=>({onKeyDown:k}),[k]),O=_.useMemo(()=>({onKeyDown:k,onKeyUp(I){I.key===" "&&E(!1)}}),[k,E]);return _.useMemo(()=>c?{reference:C,floating:O}:{},[c,C,O])}function Yg(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Yg(e,o.id,n)])}function Kg(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function AP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Gg(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,p){const f=performance.now(),b=f-l;if(a===null||s===null||b===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/b;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:b,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){jt(o),h()}if(jt(o),!g.domReference||!g.floating||b==null||p==null||f==null)return;const{clientX:E,clientY:k}=T,C=[E,k],O=iP(T),I=T.type==="mouseleave",D=iu(g.floating,O),V=iu(g.domReference,O),z=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),N=b.split("-")[0],H=p>A.right-A.width/2,M=f>A.bottom-A.height/2,P=AP(C,z),$=A.width>z.width,L=A.height>z.height,U=($?z:A).left,G=($?z:A).right,B=(L?z:A).top,Z=(L?z:A).bottom;if(D&&(i=!0,!I))return;if(V&&(i=!1),V&&!I){i=!0;return}if(I&&it(T.relatedTarget)&&iu(g.floating,T.relatedTarget)||y&&Yg(y.nodesRef.current,v).length)return;if(N==="top"&&f>=z.bottom-1||N==="bottom"&&f<=z.top+1||N==="left"&&p>=z.right-1||N==="right"&&p<=z.left+1)return w();let ee=[];switch(N){case"top":ee=[[U,z.top+1],[U,A.bottom-1],[G,A.bottom-1],[G,z.top+1]];break;case"bottom":ee=[[U,A.top+1],[U,z.bottom-1],[G,z.bottom-1],[G,A.top+1]];break;case"left":ee=[[A.right-1,Z],[A.right-1,B],[z.left+1,B],[z.left+1,Z]];break;case"right":ee=[[z.right-1,Z],[z.right-1,B],[A.left+1,B],[A.left+1,Z]];break}function ne(J){let[R,q]=J;switch(N){case"top":{const X=[$?R+t/2:H?R+t*4:R-t*4,q+t+1],oe=[$?R-t/2:H?R+t*4:R-t*4,q+t+1],j=[[A.left,H||$?A.bottom-t:A.top],[A.right,H?$?A.bottom-t:A.top:A.bottom-t]];return[X,oe,...j]}case"bottom":{const X=[$?R+t/2:H?R+t*4:R-t*4,q-t],oe=[$?R-t/2:H?R+t*4:R-t*4,q-t],j=[[A.left,H||$?A.top+t:A.bottom],[A.right,H?$?A.top+t:A.bottom:A.top+t]];return[X,oe,...j]}case"left":{const X=[R+t+1,L?q+t/2:M?q+t*4:q-t*4],oe=[R+t+1,L?q-t/2:M?q+t*4:q-t*4];return[...[[M||L?A.right-t:A.left,A.top],[M?L?A.right-t:A.left:A.right-t,A.bottom]],X,oe]}case"right":{const X=[R-t,L?q+t/2:M?q+t*4:q-t*4],oe=[R-t,L?q-t/2:M?q+t*4:q-t*4],j=[[M||L?A.left+t:A.right,A.top],[M?L?A.left+t:A.right:A.left+t,A.bottom]];return[X,oe,...j]}}}if(!Kg([E,k],ee)){if(i&&!P)return w();if(!I&&r){const J=c(T.clientX,T.clientY);if(J!==null&&J<.1)return w()}Kg([E,k],ne([p,f]))?!i&&r&&(o.current=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const Zg=200,IP=500,Ao=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},Xg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Qg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},fu=(e,t)=>{const n=Xg(t,Qg.basic,e)||Xg(t,Qg.extend,e);return n===void 0||n===e?void 0:n},yr=()=>typeof window>"u",pu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Jg=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},_P=e=>!e,hu=()=>{},ev=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},mu=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=hu,followCursor:d=!1,...p},f){const[b,g]=S.useState(n??!1),h=S.useRef(null),v=t||"span",y=A=>{g(A),u?.(A)},{refs:x,floatingStyles:T,context:w}=er({placement:i,open:b,whileElementsMounted:Eo,onOpenChange:n?void 0:y,middleware:[tu(),Pi(5),KC(),pg({padding:5,element:h}),nu({fallbackAxisSideDirection:"start"})]}),E=gr(w,{enabled:l}),k=vr(w,{role:"tooltip",enabled:l}),C=SP(w,{enabled:l?a:!1}),O=Co(w,{enabled:l?c:!1}),I=yP(w,{enabled:!!l&&!!d}),D=Cg(w,{move:!0,delay:{open:Zg},enabled:l?s:!1,handleClose:c?Gg():null}),{getReferenceProps:V,getFloatingProps:z}=tr([k,E,I,a?C:void 0,s?D:void 0,c?O:void 0]);return S.useEffect(()=>g(n===void 0?!1:n),[n]),m.jsxs(S.Fragment,{children:[m.jsx(v,{...V(p),ref:Zn(x.setReference,f),children:r}),b&&m.jsx(hr,{children:m.jsxs(en,{...z(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(wg,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),tv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:Se("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?m.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?m.jsx(mu,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:m.jsx("span",{className:"cursor-help",children:m.jsx(_c,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:m.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?m.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[m.jsx(bm,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(XE,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Mi=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:b,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const E=Nc(),k=T!==void 0?T:E.input.iconFeedback,C=d??f,O=St(),I=e??O.inputOptionalLabel;return m.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Se("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[m.jsx(tv,{info:s,hideLeft:v,reportStatus:k,title:b,placeholder:h,children:I||n?m.jsxs(S.Fragment,{children:[y?null:m.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:I}),n?m.jsx(S.Fragment,{children:n}):null]}):null}),m.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),m.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),m.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),nv=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:b="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,E=x.id??x.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const C=k.current,O=yi(k.current),I=r?.(C),D=V=>{const z=V;if(z.key==="Enter"&&C.enterKeyHint==="next"){const A=C.getAttribute("data-next");if(A){const N=document.getElementById(A);if(N)return N.focus(),void z.preventDefault()}}};return C.addEventListener("keydown",D),()=>{I?.(),O(),C.removeEventListener("keydown",D)}},[]),m.jsx(Mi,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Se(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:m.jsx(w,{...n,...x,id:E,name:E,type:b,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Zn(T,k),className:Se("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),Io=nv(mm,"input",{type:"text"}),OP=fo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),fs=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return m.jsxs(en,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Se(OP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Hr=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:b,...g},h)=>{const v=St(),y=S.useRef(null),x=g.id??g.name;S.useImperativeHandle(h,()=>y.current),S.useEffect(()=>{if(y.current===null)return;const w=new AbortController,E=y.current,k=yi(y.current);return E.addEventListener("change",()=>E.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{k(),w.abort()}},[]);const T=()=>y.current?.focus();return m.jsx(Mi,{info:n,left:f,error:b,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:m.jsxs("label",{htmlFor:x,children:[p,m.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(Ac,{size:20}),m.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:m.jsxs("select",{...g,id:x,name:x,required:e,ref:Zn(h,y),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Se("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>S.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})});function rv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ov(...e){return t=>{let n=!1;const r=e.map(o=>{const i=rv(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():rv(e[o],null)}}}}function rn(...e){return _.useCallback(ov(...e),e)}function ps(e){const t=MP(e),n=_.forwardRef((r,o)=>{const{children:i,...a}=r,s=_.Children.toArray(i),l=s.find(NP);if(l){const c=l.props.children,u=s.map(d=>d===l?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:d);return m.jsx(t,{...a,ref:o,children:_.isValidElement(c)?_.cloneElement(c,void 0,u):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var iv=ps("Slot");function MP(e){const t=_.forwardRef((n,r)=>{const{children:o,...i}=n;if(_.isValidElement(o)){const a=FP(o),s=LP(i,o.props);return o.type!==_.Fragment&&(s.ref=r?ov(r,a):a),_.cloneElement(o,s)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DP=Symbol("radix.slottable");function NP(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DP}function LP(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function FP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var VP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=VP.reduce((e,t)=>{const n=ps(`Primitive.${t}`),r=_.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function av(e,t){e&&gi.flushSync(()=>e.dispatchEvent(t))}var $P=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),jP="VisuallyHidden",gu=_.forwardRef((e,t)=>m.jsx(zt.span,{...e,ref:t,style:{...$P,...e.style}}));gu.displayName=jP;function hs(e,t=[]){let n=[];function r(i,a){const s=_.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:p,children:f,...b}=d,g=p?.[e]?.[l]||s,h=_.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){const f=p?.[e]?.[l]||s,b=_.useContext(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>_.createContext(a));return function(s){const l=s?.[e]||i;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,zP(o,...t)]}function zP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function sv(e){const t=e+"CollectionProvider",[n,r]=hs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=S.useRef(null),x=S.useRef(new Map).current;return m.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=ps(s),c=S.forwardRef((g,h)=>{const{scope:v,children:y}=g,x=i(s,v),T=rn(h,x.collectionRef);return m.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ps(u),f=S.forwardRef((g,h)=>{const{scope:v,children:y,...x}=g,T=S.useRef(null),w=rn(h,T),E=i(u,v);return S.useEffect(()=>(E.itemMap.set(T,{ref:T,...x}),()=>void E.itemMap.delete(T))),m.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function b(g){const h=i(e+"CollectionConsumer",g);return S.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},b,r]}function _t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var _o=globalThis?.document?_.useLayoutEffect:()=>{},BP=_[" useInsertionEffect ".trim().toString()]||_o;function lv({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=RP({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=_.useRef(e!==void 0);_.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=_.useCallback(u=>{if(s){const d=HP(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function RP({defaultProp:e,onChange:t}){const[n,r]=_.useState(e),o=_.useRef(n),i=_.useRef(t);return BP(()=>{i.current=t},[t]),_.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function HP(e){return typeof e=="function"}function WP(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var cv=e=>{const{present:t,children:n}=e,r=qP(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=rn(r.ref,UP(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};cv.displayName="Presence";function qP(e){const[t,n]=_.useState(),r=_.useRef(null),o=_.useRef(e),i=_.useRef("none"),a=e?"mounted":"unmounted",[s,l]=WP(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=ms(r.current);i.current=s==="mounted"?c:"none"},[s]),_o(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ms(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_o(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ms(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=ms(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:_.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function ms(e){return e?.animationName||"none"}function UP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var YP=_.createContext(void 0);function KP(e){const t=_.useContext(YP);return e||t||"ltr"}function Wr(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>t.current?.(...n),[])}function GP(e,t=globalThis?.document){const n=Wr(e);_.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ZP="DismissableLayer",vu="dismissableLayer.update",XP="dismissableLayer.pointerDownOutside",QP="dismissableLayer.focusOutside",uv,dv=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fv=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=_.useContext(dv),[u,d]=_.useState(null),p=u?.ownerDocument??globalThis?.document,[,f]=_.useState({}),b=rn(t,k=>d(k)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=eA(k=>{const C=k.target,O=[...c.branches].some(I=>I.contains(C));!T||O||(o?.(k),a?.(k),k.defaultPrevented||s?.())},p),E=tA(k=>{const C=k.target;[...c.branches].some(I=>I.contains(C))||(i?.(k),a?.(k),k.defaultPrevented||s?.())},p);return GP(k=>{y===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},p),_.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(uv=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),hv(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=uv)}},[u,p,n,c]),_.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),hv())},[u,c]),_.useEffect(()=>{const k=()=>f({});return document.addEventListener(vu,k),()=>document.removeEventListener(vu,k)},[]),m.jsx(zt.div,{...l,ref:b,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:_t(e.onFocusCapture,E.onFocusCapture),onBlurCapture:_t(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:_t(e.onPointerDownCapture,w.onPointerDownCapture)})});fv.displayName=ZP;var JP="DismissableLayerBranch",pv=_.forwardRef((e,t)=>{const n=_.useContext(dv),r=_.useRef(null),o=rn(t,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(zt.div,{...e,ref:o})});pv.displayName=JP;function eA(e,t=globalThis?.document){const n=Wr(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){mv(XP,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tA(e,t=globalThis?.document){const n=Wr(e),r=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!r.current&&mv(QP,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hv(){const e=new CustomEvent(vu);document.dispatchEvent(e)}function mv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?av(o,i):o.dispatchEvent(i)}var nA=fv,rA=pv,oA="Portal",gv=_.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=_.useState(!1);_o(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?uo.createPortal(m.jsx(zt.div,{...r,ref:t}),a):null});gv.displayName=oA;function qr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function iA(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function aA(e){const[t,n]=_.useState(void 0);return _o(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function vv(e,[t,n]){return Math.min(n,Math.max(t,e))}var yu="Progress",bu=100,[sA,XR]=hs(yu),[lA,cA]=sA(yu),yv=_.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=uA,...a}=e;(o||o===0)&&!Sv(o)&&console.error(dA(`${o}`,"Progress"));const s=Sv(o)?o:bu;r!==null&&!Tv(r,s)&&console.error(fA(`${r}`,"Progress"));const l=Tv(r,s)?r:null,c=gs(l)?i(l,s):void 0;return m.jsx(lA,{scope:n,value:l,max:s,children:m.jsx(zt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":gs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":wv(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});yv.displayName=yu;var bv="ProgressIndicator",xv=_.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=cA(bv,n);return m.jsx(zt.div,{"data-state":wv(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});xv.displayName=bv;function uA(e,t){return`${Math.round(e/t*100)}%`}function wv(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function gs(e){return typeof e=="number"}function Sv(e){return gs(e)&&!isNaN(e)&&e>0}function Tv(e,t){return gs(e)&&!isNaN(e)&&e<=t&&e>=0}function dA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bu}\`.`}function fA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
178
|
+
- a positive number
|
|
179
|
+
- less than the value passed to \`max\` (or ${bu} if no \`max\` prop is set)
|
|
180
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
181
|
+
|
|
182
|
+
Defaulting to \`null\`.`}var pA=yv,hA=xv,Ev=["PageUp","PageDown"],kv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Cv={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oo="Slider",[xu,mA,gA]=sv(Oo),[Pv,QR]=hs(Oo,[gA]),[vA,vs]=Pv(Oo),Av=_.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:b,...g}=e,h=_.useRef(new Set),v=_.useRef(0),x=a==="horizontal"?yA:bA,[T=[],w]=lv({prop:u,defaultProp:c,onChange:D=>{[...h.current][v.current]?.focus(),d(D)}}),E=_.useRef(T);function k(D){const V=EA(T,D);I(D,V)}function C(D){I(D,v.current)}function O(){const D=E.current[v.current];T[v.current]!==D&&p(T)}function I(D,V,{commit:z}={commit:!1}){const A=AA(i),N=IA(Math.round((D-r)/i)*i+r,A),H=vv(N,[r,o]);w((M=[])=>{const P=SA(M,H,V);if(PA(P,l*i)){v.current=P.indexOf(H);const $=String(P)!==String(M);return $&&z&&p(P),$?P:M}else return M})}return m.jsx(vA,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:b,children:m.jsx(xu.Provider,{scope:e.__scopeSlider,children:m.jsx(xu.Slot,{scope:e.__scopeSlider,children:m.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:_t(g.onPointerDown,()=>{s||(E.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:k,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:O,onHomeKeyDown:()=>!s&&I(r,0,{commit:!0}),onEndKeyDown:()=>!s&&I(o,T.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:V})=>{if(!s){const N=Ev.includes(D.key)||D.shiftKey&&kv.includes(D.key)?10:1,H=v.current,M=T[H],P=i*N*V;I(M+P,H,{commit:!0})}}})})})})});Av.displayName=Oo;var[Iv,_v]=Pv(Oo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),yA=_.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=_.useState(null),f=rn(t,x=>p(x)),b=_.useRef(void 0),g=KP(o),h=g==="ltr",v=h&&!i||!h&&i;function y(x){const T=b.current||d.getBoundingClientRect(),w=[0,T.width],k=Tu(w,v?[n,r]:[r,n]);return b.current=T,k(x-T.left)}return m.jsx(Iv,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:m.jsx(Ov,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a?.(T)},onSlideMove:x=>{const T=y(x.clientX);s?.(T)},onSlideEnd:()=>{b.current=void 0,l?.()},onStepKeyDown:x=>{const w=Cv[v?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:w?-1:1})}})})}),bA=_.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=_.useRef(null),d=rn(t,u),p=_.useRef(void 0),f=!o;function b(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=Tu(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return m.jsx(Iv,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:m.jsx(Ov,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=b(g.clientY);i?.(h)},onSlideMove:g=>{const h=b(g.clientY);a?.(h)},onSlideEnd:()=>{p.current=void 0,s?.()},onStepKeyDown:g=>{const v=Cv[f?"from-bottom":"from-top"].includes(g.key);l?.({event:g,direction:v?-1:1})}})})}),Ov=_.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=vs(Oo,n);return m.jsx(zt.span,{...c,ref:t,onKeyDown:_t(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Ev.concat(kv).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:_t(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:_t(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:_t(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),Mv="SliderTrack",Dv=_.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=vs(Mv,n);return m.jsx(zt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Dv.displayName=Mv;var wu="SliderRange",Nv=_.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=vs(wu,n),i=_v(wu,n),a=_.useRef(null),s=rn(t,a),l=o.values.length,c=o.values.map(p=>Vv(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return m.jsx(zt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});Nv.displayName=wu;var Su="SliderThumb",Lv=_.forwardRef((e,t)=>{const n=mA(e.__scopeSlider),[r,o]=_.useState(null),i=rn(t,s=>o(s)),a=_.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return m.jsx(xA,{...e,ref:i,index:a})}),xA=_.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=vs(Su,n),s=_v(Su,n),[l,c]=_.useState(null),u=rn(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=aA(l),f=a.values[r],b=f===void 0?0:Vv(f,a.min,a.max),g=TA(r,a.values.length),h=p?.[s.size],v=h?kA(h,b,s.direction):0;return _.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${v}px)`},children:[m.jsx(xu.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(zt.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:_t(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&m.jsx(Fv,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});Lv.displayName=Su;var wA="RadioBubbleInput",Fv=_.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=_.useRef(null),i=rn(o,r),a=iA(t);return _.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),m.jsx(zt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Fv.displayName=wA;function SA(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Vv(e,t,n){const i=100/(n-t)*(e-t);return vv(i,[0,100])}function TA(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function EA(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function kA(e,t,n){const r=e/2,i=Tu([0,50],[0,r]);return(r-i(t)*n)*n}function CA(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function PA(e,t){if(t>0){const n=CA(e);return Math.min(...n)>=t}return!0}function Tu(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function AA(e){return(String(e).split(".")[1]||"").length}function IA(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var _A=Av,OA=Dv,MA=Nv,DA=Lv,Eu="ToastProvider",[ku,NA,LA]=sv("Toast"),[$v,JR]=hs("Toast",[LA]),[FA,ys]=$v(Eu),jv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=_.useState(null),[c,u]=_.useState(0),d=_.useRef(!1),p=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Eu}\`. Expected non-empty \`string\`.`),m.jsx(ku.Provider,{scope:t,children:m.jsx(FA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:_.useCallback(()=>u(f=>f+1),[]),onToastRemove:_.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};jv.displayName=Eu;var zv="ToastViewport",VA=["F8"],Cu="toast.viewportPause",Pu="toast.viewportResume",Bv=_.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=VA,label:o="Notifications ({hotkey})",...i}=e,a=ys(zv,n),s=NA(n),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=rn(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;_.useEffect(()=>{const h=v=>{r.length!==0&&r.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),_.useEffect(()=>{const h=l.current,v=d.current;if(b&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Cu);v.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Pu);v.dispatchEvent(E),a.isClosePausedRef.current=!1}},T=E=>{!h.contains(E.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,a.isClosePausedRef]);const g=_.useCallback(({tabbingDirection:h})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...XA(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return _.useEffect(()=>{const h=d.current;if(h){const v=y=>{const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const w=document.activeElement,E=y.shiftKey;if(y.target===h&&E){c.current?.focus();return}const O=g({tabbingDirection:E?"backwards":"forwards"}),I=O.findIndex(D=>D===w);_u(O.slice(I+1))?y.preventDefault():E?c.current?.focus():u.current?.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),m.jsxs(rA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&m.jsx(Au,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});_u(h)}}),m.jsx(ku.Slot,{scope:n,children:m.jsx(zt.ol,{tabIndex:-1,...i,ref:p})}),b&&m.jsx(Au,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});_u(h)}})]})});Bv.displayName=zv;var Rv="ToastFocusProxy",Au=_.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=ys(Rv,n);return m.jsx(gu,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});Au.displayName=Rv;var Di="Toast",$A="toast.swipeStart",jA="toast.swipeMove",zA="toast.swipeCancel",BA="toast.swipeEnd",Hv=_.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=lv({prop:r,defaultProp:o??!0,onChange:i,caller:Di});return m.jsx(cv,{present:n||s,children:m.jsx(WA,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wr(e.onPause),onResume:Wr(e.onResume),onSwipeStart:_t(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_t(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:_t(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:_t(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Hv.displayName=Di;var[RA,HA]=$v(Di,{onClose(){}}),WA=_.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...b}=e,g=ys(Di,n),[h,v]=_.useState(null),y=rn(t,A=>v(A)),x=_.useRef(null),T=_.useRef(null),w=o||g.duration,E=_.useRef(0),k=_.useRef(w),C=_.useRef(0),{onToastAdd:O,onToastRemove:I}=g,D=Wr(()=>{h?.contains(document.activeElement)&&g.viewport?.focus(),a()}),V=_.useCallback(A=>{!A||A===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(D,A))},[D]);_.useEffect(()=>{const A=g.viewport;if(A){const N=()=>{V(k.current),c?.()},H=()=>{const M=new Date().getTime()-E.current;k.current=k.current-M,window.clearTimeout(C.current),l?.()};return A.addEventListener(Cu,H),A.addEventListener(Pu,N),()=>{A.removeEventListener(Cu,H),A.removeEventListener(Pu,N)}}},[g.viewport,w,l,c,V]),_.useEffect(()=>{i&&!g.isClosePausedRef.current&&V(w)},[i,w,g.isClosePausedRef,V]),_.useEffect(()=>(O(),()=>I()),[O,I]);const z=_.useMemo(()=>h?Gv(h):null,[h]);return g.viewport?m.jsxs(m.Fragment,{children:[z&&m.jsx(qA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),m.jsx(RA,{scope:n,onClose:D,children:gi.createPortal(m.jsx(ku.ItemSlot,{scope:n,children:m.jsx(nA,{asChild:!0,onEscapeKeyDown:_t(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||D(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(zt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_t(e.onKeyDown,A=>{A.key==="Escape"&&(s?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:_t(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:_t(e.onPointerMove,A=>{if(!x.current)return;const N=A.clientX-x.current.x,H=A.clientY-x.current.y,M=!!T.current,P=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,L=P?$(0,N):0,U=P?0:$(0,H),G=A.pointerType==="touch"?10:2,B={x:L,y:U},Z={originalEvent:A,delta:B};M?(T.current=B,bs(jA,d,Z,{discrete:!1})):Zv(B,g.swipeDirection,G)?(T.current=B,bs($A,u,Z,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(N)>G||Math.abs(H)>G)&&(x.current=null)}),onPointerUp:_t(e.onPointerUp,A=>{const N=T.current,H=A.target;if(H.hasPointerCapture(A.pointerId)&&H.releasePointerCapture(A.pointerId),T.current=null,x.current=null,N){const M=A.currentTarget,P={originalEvent:A,delta:N};Zv(N,g.swipeDirection,g.swipeThreshold)?bs(BA,f,P,{discrete:!0}):bs(zA,p,P,{discrete:!0}),M.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),qA=e=>{const{__scopeToast:t,children:n,...r}=e,o=ys(Di,t),[i,a]=_.useState(!1),[s,l]=_.useState(!1);return GA(()=>a(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:m.jsx(gv,{asChild:!0,children:m.jsx(gu,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},UA="ToastTitle",Wv=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(zt.div,{...r,ref:t})});Wv.displayName=UA;var YA="ToastDescription",qv=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(zt.div,{...r,ref:t})});qv.displayName=YA;var Uv="ToastAction",KA=_.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Kv,{altText:n,asChild:!0,children:m.jsx(Iu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Uv}\`. Expected non-empty \`string\`.`),null)});KA.displayName=Uv;var Yv="ToastClose",Iu=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=HA(Yv,n);return m.jsx(Kv,{asChild:!0,children:m.jsx(zt.button,{type:"button",...r,ref:t,onClick:_t(e.onClick,o.onClose)})})});Iu.displayName=Yv;var Kv=_.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(zt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Gv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ZA(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Gv(r))}}),t}function bs(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?av(o,i):o.dispatchEvent(i)}var Zv=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function GA(e=()=>{}){const t=Wr(e);_o(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function ZA(e){return e.nodeType===e.ELEMENT_NODE}function XA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _u(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var QA=jv,JA=Bv,eI=Hv,tI=Wv,nI=qv,rI=Iu;const oI=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));je.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(je.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(mu,{title:"",ref:r,as:DA,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},iI=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Ao()),s=r||o||[];return m.jsxs(_A,{...i,defaultValue:r,value:o,className:Se("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(OA,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(MA,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>m.jsx(oI,{tooltip:t??!1},`${a.current}-${c}`))]})},br=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},aI=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=br(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},b=u.current;return b.addEventListener("change",f),()=>b?.removeEventListener("change",f)}},[]);const p=()=>{const f=!u.current?.checked;l(f),o?.onCheck?.(f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:Se("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[m.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[m.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:m.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),m.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:m.jsx("span",{className:"font-medium text-foreground",children:e})})]}),m.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Ni=S.createContext({});function xn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ou=typeof window<"u",xs=Ou?S.useLayoutEffect:S.useEffect,ws=S.createContext(null);function Mu(e,t){e.indexOf(t)===-1&&e.push(t)}function Ss(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function sI([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const nr=(e,t,n)=>n>t?t:n<e?e:n;let Mo=()=>{},on=()=>{};process.env.NODE_ENV!=="production"&&(Mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},on=(e,t)=>{if(!e)throw new Error(t)});const rr={},Xv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Qv(e){return typeof e=="object"&&e!==null}const Jv=e=>/^0[^.\s]+$/u.test(e);function Du(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,lI=(e,t)=>n=>t(e(n)),Li=(...e)=>e.reduce(lI),Do=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Nu{constructor(){this.subscriptions=[]}add(t){return Mu(this.subscriptions,t),()=>Ss(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fn=e=>e*1e3,Vn=e=>e/1e3;function ey(e,t){return t?e*(1e3/t):0}const ty=new Set;function Lu(e,t,n){e||ty.has(t)||(console.warn(t),ty.add(t))}const cI=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},ny=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uI=1e-7,dI=12;function fI(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=ny(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>uI&&++s<dI);return a}function Fi(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>fI(i,0,1,e,n);return i=>i===0||i===1?i:ny(o(i),t,r)}const ry=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oy=e=>t=>1-e(1-t),iy=Fi(.33,1.53,.69,.99),Fu=oy(iy),ay=ry(Fu),sy=e=>(e*=2)<1?.5*Fu(e):.5*(2-Math.pow(2,-10*(e-1))),Vu=e=>1-Math.sin(Math.acos(e)),ly=oy(Vu),cy=ry(Vu),pI=Fi(.42,0,1,1),hI=Fi(0,0,.58,1),uy=Fi(.42,0,.58,1),dy=e=>Array.isArray(e)&&typeof e[0]!="number";function fy(e,t){return dy(e)?e[cI(0,e.length,t)]:e}const py=e=>Array.isArray(e)&&typeof e[0]=="number",hy={linear:dn,easeIn:pI,easeInOut:uy,easeOut:hI,circIn:Vu,circInOut:cy,circOut:ly,backIn:Fu,backInOut:ay,backOut:iy,anticipate:sy},mI=e=>typeof e=="string",$u=e=>{if(py(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Fi(t,n,r,o)}else if(mI(e))return on(hy[e]!==void 0,`Invalid easing type '${e}'`),hy[e];return e},Ts=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const b=p&&o?n:r;return d&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const vI=40;function my(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ts.reduce((x,T)=>(x[T]=gI(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:f,postRender:b}=a,g=()=>{const x=rr.useManualTiming?o.timestamp:performance.now();n=!1,rr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,vI),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),f.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},h=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:Ts.reduce((x,T)=>{const w=a[T];return x[T]=(E,k=!1,C=!1)=>(n||h(),w.schedule(E,k,C)),x},{}),cancel:x=>{for(let T=0;T<Ts.length;T++)a[Ts[T]].cancel(x)},state:o,steps:a}}const{schedule:ct,cancel:or,state:Bt,steps:ju}=my(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Es;function yI(){Es=void 0}const Qt={now:()=>(Es===void 0&&Qt.set(Bt.isProcessing||rr.useManualTiming?Bt.timestamp:performance.now()),Es),set:e=>{Es=e,queueMicrotask(yI)}},gy=e=>t=>typeof t=="string"&&t.startsWith(e),zu=gy("--"),bI=gy("var(--"),Bu=e=>bI(e)?xI.test(e.split("/*")[0].trim()):!1,xI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,No={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Vi={...No,transform:e=>nr(0,1,e)},ks={...No,default:1},$i=e=>Math.round(e*1e5)/1e5,Ru=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wI(e){return e==null}const SI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hu=(e,t)=>n=>!!(typeof n=="string"&&SI.test(n)&&n.startsWith(e)||t&&!wI(n)&&Object.prototype.hasOwnProperty.call(n,t)),vy=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Ru);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},TI=e=>nr(0,255,e),Wu={...No,transform:e=>Math.round(TI(e))},Ur={test:Hu("rgb","red"),parse:vy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wu.transform(e)+", "+Wu.transform(t)+", "+Wu.transform(n)+", "+$i(Vi.transform(r))+")"};function EI(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const qu={test:Hu("#"),parse:EI,transform:Ur.transform},ji=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xr=ji("deg"),$n=ji("%"),Ee=ji("px"),kI=ji("vh"),CI=ji("vw"),yy={...$n,parse:e=>$n.parse(e)/100,transform:e=>$n.transform(e*100)},Lo={test:Hu("hsl","hue"),parse:vy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$n.transform($i(t))+", "+$n.transform($i(n))+", "+$i(Vi.transform(r))+")"},Pt={test:e=>Ur.test(e)||qu.test(e)||Lo.test(e),parse:e=>Ur.test(e)?Ur.parse(e):Lo.test(e)?Lo.parse(e):qu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ur.transform(e):Lo.transform(e),getAnimatableNone:e=>{const t=Pt.parse(e);return t.alpha=0,Pt.transform(t)}},PI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function AI(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ru)?.length||0)+(e.match(PI)?.length||0)>0}const by="number",xy="color",II="var",_I="var(",wy="${}",OI=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function zi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(OI,l=>(Pt.test(l)?(r.color.push(i),o.push(xy),n.push(Pt.parse(l))):l.startsWith(_I)?(r.var.push(i),o.push(II),n.push(l)):(r.number.push(i),o.push(by),n.push(parseFloat(l))),++i,wy)).split(wy);return{values:n,split:s,indexes:r,types:o}}function Sy(e){return zi(e).values}function Ty(e){const{split:t,types:n}=zi(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===by?i+=$i(o[a]):s===xy?i+=Pt.transform(o[a]):i+=o[a]}return i}}const MI=e=>typeof e=="number"?0:Pt.test(e)?Pt.getAnimatableNone(e):e;function DI(e){const t=Sy(e);return Ty(e)(t.map(MI))}const wr={test:AI,parse:Sy,createTransformer:Ty,getAnimatableNone:DI};function Uu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function NI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Uu(l,s,e+1/3),i=Uu(l,s,e),a=Uu(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Cs(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,Yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},LI=[qu,Ur,Lo],FI=e=>LI.find(t=>t.test(e));function Ey(e){const t=FI(e);if(Mo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Lo&&(n=NI(n)),n}const ky=(e,t)=>{const n=Ey(e),r=Ey(t);if(!n||!r)return Cs(e,t);const o={...n};return i=>(o.red=Yu(n.red,r.red,i),o.green=Yu(n.green,r.green,i),o.blue=Yu(n.blue,r.blue,i),o.alpha=ut(n.alpha,r.alpha,i),Ur.transform(o))},Ku=new Set(["none","hidden"]);function VI(e,t){return Ku.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $I(e,t){return n=>ut(e,t,n)}function Gu(e){return typeof e=="number"?$I:typeof e=="string"?Bu(e)?Cs:Pt.test(e)?ky:BI:Array.isArray(e)?Cy:typeof e=="object"?Pt.test(e)?ky:jI:Cs}function Cy(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Gu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function jI(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Gu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function zI(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const BI=(e,t)=>{const n=wr.createTransformer(t),r=zi(e),o=zi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ku.has(e)&&!o.values.length||Ku.has(t)&&!r.values.length?VI(e,t):Li(Cy(zI(r,o),o.values),n):(Mo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Cs(e,t))};function Py(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):Gu(e)(e,t)}const RI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ct.update(t,n),stop:()=>or(t),now:()=>Bt.isProcessing?Bt.timestamp:Qt.now()}},Ay=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ps=2e4;function Zu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ps;)t+=n,r=e.next(t);return t>=Ps?1/0:t}function Iy(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Zu(r),Ps);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Vn(o)}}const HI=5;function _y(e,t,n){const r=Math.max(t-HI,0);return ey(n-e(r),t-r)}const mt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Xu=.001;function WI({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;Mo(e<=fn(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=nr(mt.minDamping,mt.maxDamping,a),e=nr(mt.minDuration,mt.maxDuration,Vn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Qu(c,a),b=Math.exp(-d);return Xu-p/f*b},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-d),g=Qu(Math.pow(c,2),a);return(-o(c)+Xu>0?-1:1)*((p-f)*b)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Xu+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=UI(o,i,s);if(e=fn(e),isNaN(l))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const qI=12;function UI(e,t,n){let r=n;for(let o=1;o<qI;o++)r=r-e(r)/t(r);return r}function Qu(e,t){return e*Math.sqrt(1-t*t)}const YI=["duration","bounce"],KI=["stiffness","damping","mass"];function Oy(e,t){return t.some(n=>e[n]!==void 0)}function GI(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!Oy(e,KI)&&Oy(e,YI))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*nr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=WI(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Bi(e=mt.visualDuration,t=mt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=GI({...n,velocity:-Vn(n.velocity||0)}),b=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=Vn(Math.sqrt(l/u)),y=Math.abs(h)<5;r||(r=y?mt.restSpeed.granular:mt.restSpeed.default),o||(o=y?mt.restDelta.granular:mt.restDelta.default);let x;if(g<1){const w=Qu(v,g);x=E=>{const k=Math.exp(-g*v*E);return a-k*((b+g*v*h)/w*Math.sin(w*E)+h*Math.cos(w*E))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(h+(b+v*h)*w);else{const w=v*Math.sqrt(g*g-1);x=E=>{const k=Math.exp(-g*v*E),C=Math.min(w*E,300);return a-k*((b+g*v*h)*Math.sinh(C)+w*h*Math.cosh(C))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const E=x(w);if(f)s.done=w>=d;else{let k=w===0?b:0;g<1&&(k=w===0?fn(b):_y(x,w,E));const C=Math.abs(k)<=r,O=Math.abs(a-E)<=o;s.done=C&&O}return s.value=s.done?a:E,s},toString:()=>{const w=Math.min(Zu(T),Ps),E=Ay(k=>T.next(w*k).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Bi.applyToOptions=e=>{const t=Iy(e,100,Bi);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};function Ju({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=C=>s!==void 0&&C<s||l!==void 0&&C>l,b=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const y=C=>-g*Math.exp(-C/r),x=C=>v+y(C),T=C=>{const O=y(C),I=x(C);p.done=Math.abs(O)<=c,p.value=p.done?v:I};let w,E;const k=C=>{f(p.value)&&(w=C,E=Bi({keyframes:[p.value,b(p.value)],velocity:_y(x,C,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let O=!1;return!E&&w===void 0&&(O=!0,T(C),k(C)),w!==void 0&&C>=w?E.next(C-w):(!O&&T(C),p)}}}function ZI(e,t,n){const r=[],o=n||rr.mix||Py,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||dn:t;s=Li(l,s)}r.push(s)}return r}function My(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(on(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=ZI(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Do(e[d],e[d+1],u);return s[d](p)};return n?u=>c(nr(e[0],e[i-1],u)):c}function Dy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Do(0,t,r);e.push(ut(n,1,o))}}function Ny(e){const t=[0];return Dy(t,e.length-1),t}function XI(e,t){return e.map(n=>n*t)}function QI(e,t){return e.map(()=>t||uy).splice(0,e.length-1)}function Fo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=dy(r)?r.map($u):$u(r),i={done:!1,value:t[0]},a=XI(n&&n.length===t.length?n:Ny(t),e),s=My(a,t,{ease:Array.isArray(o)?o:QI(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const JI=e=>e!==null;function ed(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(JI),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const e_={decay:Ju,inertia:Ju,tween:Fo,keyframes:Fo,spring:Bi};function Ly(e){typeof e.type=="string"&&(e.type=e_[e.type])}class td{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const t_=e=>e/100;class nd extends td{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Qt.now()&&this.tick(Qt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ly(t);const{type:n=Fo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Fo;process.env.NODE_ENV!=="production"&&l!==Fo&&on(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==Fo&&typeof s[0]!="number"&&(this.mixKeyframes=Li(t_,Py(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Zu(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:f,type:b,onUpdate:g,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/s;let O=Math.floor(C),I=C%1;!I&&C>=1&&(I=1),I===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(I=1-I,f&&(I-=f/s)):p==="mirror"&&(T=a)),x=nr(0,1,I)*s}const w=y?{done:!1,value:u[0]}:T.next(x);i&&(w.value=i(w.value));let{done:E}=w;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&b!==Ju&&(w.value=ed(u,this.options,h,this.speed)),g&&g(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Vn(this.calculatedDuration)}get time(){return Vn(this.currentTime)}set time(t){t=fn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Qt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Vn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=RI,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Qt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function n_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yr=e=>e*180/Math.PI,rd=e=>{const t=Yr(Math.atan2(e[1],e[0]));return od(t)},r_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rd,rotateZ:rd,skewX:e=>Yr(Math.atan(e[1])),skewY:e=>Yr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},od=e=>(e=e%360,e<0&&(e+=360),e),Fy=rd,Vy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),$y=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),o_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vy,scaleY:$y,scale:e=>(Vy(e)+$y(e))/2,rotateX:e=>od(Yr(Math.atan2(e[6],e[5]))),rotateY:e=>od(Yr(Math.atan2(-e[2],e[0]))),rotateZ:Fy,rotate:Fy,skewX:e=>Yr(Math.atan(e[4])),skewY:e=>Yr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function id(e){return e.includes("scale")?1:0}function ad(e,t){if(!e||e==="none")return id(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=o_,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=r_,o=s}if(!o)return id(t);const i=r[t],a=o[1].split(",").map(a_);return typeof i=="function"?i(a):a[i]}const i_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ad(n,t)};function a_(e){return parseFloat(e.trim())}const Vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$o=new Set(Vo),jy=e=>e===No||e===Ee,s_=new Set(["x","y","z"]),l_=Vo.filter(e=>!s_.has(e));function c_(e){const t=[];return l_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Kr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ad(t,"x"),y:(e,{transform:t})=>ad(t,"y")};Kr.translateX=Kr.x,Kr.translateY=Kr.y;const Gr=new Set;let sd=!1,ld=!1,cd=!1;function zy(){if(ld){const e=Array.from(Gr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=c_(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ld=!1,sd=!1,Gr.forEach(e=>e.complete(cd)),Gr.clear()}function By(){Gr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ld=!0)})}function u_(){cd=!0,By(),zy(),cd=!1}class ud{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Gr.add(this),sd||(sd=!0,ct.read(By),ct.resolveKeyframes(zy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}n_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gr.delete(this)}cancel(){this.state==="scheduled"&&(Gr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const d_=e=>e.startsWith("--");function f_(e,t,n){d_(t)?e.style.setProperty(t,n):e.style[t]=n}const p_=Du(()=>window.ScrollTimeline!==void 0),h_={};function m_(e,t){const n=Du(e);return()=>h_[t]??n()}const Ry=m_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ri=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ri([0,.65,.55,1]),circOut:Ri([.55,0,1,.45]),backIn:Ri([.31,.01,.66,-.59]),backOut:Ri([.33,1.53,.69,.99])};function Wy(e,t){if(e)return typeof e=="function"?Ry()?Ay(e,t):"ease-out":py(e)?Ri(e):Array.isArray(e)?e.map(n=>Wy(n,t)||Hy.easeOut):Hy[e]}function g_(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Wy(s,o);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(u,p)}function dd(e){return typeof e=="function"&&"applyToOptions"in e}function v_({type:e,...t}){return dd(e)&&Ry()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class y_ extends td{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,on(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=v_(t);this.animation=g_(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=ed(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):f_(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Vn(Number(t))}get time(){return Vn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&p_()?(this.animation.timeline=t,dn):n(this)}}const qy={anticipate:sy,backInOut:ay,circInOut:cy};function b_(e){return e in qy}function x_(e){typeof e.ease=="string"&&b_(e.ease)&&(e.ease=qy[e.ease])}const Uy=10;class w_ extends y_{constructor(t){x_(t),Ly(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new nd({...a,autoplay:!1}),l=fn(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-Uy).value,s.sample(l).value,Uy),s.stop()}}const Yy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(wr.test(e)||e==="0")&&!e.startsWith("url("));function S_(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function T_(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Yy(o,t),s=Yy(i,t);return Mo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:S_(e)||(n==="spring"||dd(n))&&r}function fd(e){return Qv(e)&&"offsetHeight"in e}const E_=new Set(["opacity","clipPath","filter","transform"]),k_=Du(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function C_(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!fd(t?.owner?.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return k_()&&n&&E_.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const P_=40;class A_ extends td{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Qt.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||ud;this.keyframeResolver=new f(s,(b,g,h)=>this.onKeyframesResolved(b,g,p,!h),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Qt.now(),T_(t,i,a,s)||((rr.instantAnimations||!l)&&u?.(ed(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>P_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&C_(p)?new w_({...p,element:p.motionValue.owner.current}):new nd(p);f.finished.then(()=>this.notifyFinished()).catch(dn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),u_()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class I_{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class __ extends I_{then(t,n){return this.finished.finally(t).then(()=>{})}}const O_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function M_(e){const t=O_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const D_=4;function Ky(e,t,n=1){on(n<=D_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=M_(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Xv(a)?parseFloat(a):a}return Bu(o)?Ky(o,t,n+1):o}function pd(e,t){return e?.[t]??e?.default??e}const Gy=new Set(["width","height","top","left","right","bottom",...Vo]),N_={test:e=>e==="auto",parse:e=>e},Zy=e=>t=>t.test(e),Xy=[No,Ee,$n,xr,CI,kI,N_],Qy=e=>Xy.find(Zy(e));function L_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jv(e):!0}const F_=new Set(["brightness","contrast","saturate","opacity"]);function V_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ru)||[];if(!r)return e;const o=n.replace(r,"");let i=F_.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $_=/\b([a-z-]*)\(.*?\)/gu,hd={...wr,getAnimatableNone:e=>{const t=e.match($_);return t?t.map(V_).join(" "):e}},Jy={...No,transform:Math.round},md={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:xr,rotateX:xr,rotateY:xr,rotateZ:xr,scale:ks,scaleX:ks,scaleY:ks,scaleZ:ks,skew:xr,skewX:xr,skewY:xr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:Vi,originX:yy,originY:yy,originZ:Ee},zIndex:Jy,fillOpacity:Vi,strokeOpacity:Vi,numOctaves:Jy},j_={...md,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:hd,WebkitFilter:hd},eb=e=>j_[e];function tb(e,t){let n=eb(e);return n!==hd&&(n=wr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const z_=new Set(["auto","none","0"]);function B_(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!z_.has(i)&&zi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=tb(n,o)}class R_ extends ud{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Bu(c))){const u=Ky(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Gy.has(r)||t.length!==2)return;const[o,i]=t,a=Qy(o),s=Qy(i);if(a!==s)if(jy(a)&&jy(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Kr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||L_(t[o]))&&r.push(o);r.length&&B_(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Kr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Kr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function nb(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const rb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ob=30,H_=e=>!isNaN(parseFloat(e)),Hi={current:void 0};class W_{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Qt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();o&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=H_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Lu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Nu);const r=this.events[t].add(n);return t==="change"?()=>{r(),ct.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Hi.current&&Hi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ob)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ob);return ey(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zr(e,t){return new W_(e,t)}const{schedule:gd}=my(queueMicrotask,!1),wn={x:!1,y:!1};function ib(){return wn.x||wn.y}function q_(e){return e==="x"||e==="y"?wn[e]?null:(wn[e]=!0,()=>{wn[e]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}function ab(e,t){const n=nb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function sb(e){return!(e.pointerType==="touch"||ib())}function U_(e,t,n={}){const[r,o,i]=ab(e,n),a=s=>{if(!sb(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{sb(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const lb=(e,t)=>t?e===t?!0:lb(e,t.parentElement):!1,vd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Y_=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function K_(e){return Y_.has(e.tagName)||e.tabIndex!==-1}const As=new WeakSet;function cb(e){return t=>{t.key==="Enter"&&e(t)}}function yd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const G_=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=cb(()=>{if(As.has(n))return;yd(n,"down");const o=cb(()=>{yd(n,"up")}),i=()=>yd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ub(e){return vd(e)&&!ib()}function Z_(e,t,n={}){const[r,o,i]=ab(e,n),a=s=>{const l=s.currentTarget;if(!ub(s))return;As.add(l);const c=t(l,s),u=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),As.has(l)&&As.delete(l),ub(f)&&typeof c=="function"&&c(f,{success:b})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||lb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),fd(s)&&(s.addEventListener("focus",c=>G_(c,o)),!K_(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function bd(e){return Qv(e)&&"ownerSVGElement"in e}function db(e){return bd(e)&&e.tagName==="svg"}function X_(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=My(o,i,a);return t?s(r):s}const Ot=e=>!!(e&&e.getVelocity),Q_=[...Xy,Pt,wr],J_=e=>Q_.find(Zy(e)),jo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class eO extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=fd(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function tO({children:e,isPresent:t,anchorX:n}){const r=S.useId(),o=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(jo);return S.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
|
|
183
|
+
[data-motion-pop-id="${r}"] {
|
|
184
|
+
position: absolute !important;
|
|
185
|
+
width: ${s}px !important;
|
|
186
|
+
height: ${l}px !important;
|
|
187
|
+
${p}px !important;
|
|
188
|
+
top: ${c}px !important;
|
|
189
|
+
}
|
|
190
|
+
`),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),m.jsx(eO,{isPresent:t,childRef:o,sizeRef:i,children:_.cloneElement(e,{ref:o})})}const nO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=xn(rO),c=S.useId();let u=!0,d=S.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return i&&u&&(d={...d}),S.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),_.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(tO,{isPresent:n,anchorX:s,children:e})),m.jsx(ws.Provider,{value:d,children:e})};function rO(){return new Map}function fb(e=!0){const t=S.useContext(ws);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Is=e=>e.key||"";function pb(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Sn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=fb(a),u=S.useMemo(()=>pb(e),[e]),d=a&&!l?[]:u.map(Is),p=S.useRef(!0),f=S.useRef(u),b=xn(()=>new Map),[g,h]=S.useState(u),[v,y]=S.useState(u);xs(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const E=Is(v[w]);d.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let E=0;E<v.length;E++){const k=v[E],C=Is(k);d.includes(C)||(w.splice(E,0,k),x.push(k))}return i==="wait"&&x.length&&(w=x),y(pb(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=S.useContext(Ni);return m.jsx(m.Fragment,{children:v.map(w=>{const E=Is(w),k=a&&!l?!1:u===v||d.includes(E),C=()=>{if(b.has(E))b.set(E,!0);else return;let O=!0;b.forEach(I=>{I||(O=!1)}),O&&(T?.(),y(f.current),a&&c?.(),r&&r())};return m.jsx(nO,{isPresent:k,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:k?void 0:C,anchorX:s,children:w},E)})})},oO=S.createContext(null);function iO(){const e=S.useRef(!1);return xs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function aO(){const e=iO(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ct.postRender(r),[r]),t]}const sO=e=>!e.isLayoutDirty&&e.willUpdate(!1);function hb(){const e=new Set,t=new WeakMap,n=()=>e.forEach(sO);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const mb=e=>e===!0,lO=e=>mb(e===!0)||e==="id",cO=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(Ni),o=S.useContext(oO),[i,a]=aO(),s=S.useRef(null),l=r.id||o;s.current===null&&(lO(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:mb(n)&&r.group||hb()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(Ni.Provider,{value:c,children:e})},gb=S.createContext({strict:!1}),vb={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zo={};for(const e in vb)zo[e]={isEnabled:t=>vb[e].some(n=>!!t[n])};function uO(e){for(const t in e)zo[t]={...zo[t],...e[t]}}const dO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _s(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dO.has(e)}let yb=e=>!_s(e);function bb(e){typeof e=="function"&&(yb=t=>t.startsWith("on")?!_s(t):e(t))}try{bb(require("@emotion/is-prop-valid").default)}catch{}function fO(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(yb(o)||n===!0&&_s(o)||!t&&!_s(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function xd({children:e,isValidProp:t,...n}){t&&bb(t),n={...S.useContext(jo),...n},n.isStatic=xn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(jo.Provider,{value:r,children:e})}function pO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Lu(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Os=S.createContext({});function Ms(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Wi(e){return typeof e=="string"||Array.isArray(e)}const wd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sd=["initial",...wd];function Ds(e){return Ms(e.animate)||Sd.some(t=>Wi(e[t]))}function xb(e){return!!(Ds(e)||e.variants)}function hO(e,t){if(Ds(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wi(n)?n:void 0,animate:Wi(r)?r:void 0}}return e.inherit!==!1?t:{}}function mO(e){const{initial:t,animate:n}=hO(e,S.useContext(Os));return S.useMemo(()=>({initial:t,animate:n}),[wb(t),wb(n)])}function wb(e){return Array.isArray(e)?e.join(" "):e}const gO=Symbol.for("motionComponentSymbol");function Bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vO(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Bo(n)&&(n.current=r))},[t])}const Td=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sb="data-"+Td("framerAppearId"),Tb=S.createContext({});function yO(e,t,n,r,o){const{visualElement:i}=S.useContext(Os),a=S.useContext(gb),s=S.useContext(ws),l=S.useContext(jo).reducedMotion,c=S.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=S.useContext(Tb);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&bO(c.current,n,o,d);const p=S.useRef(!1);S.useInsertionEffect(()=>{u&&p.current&&u.update(n,s)});const f=n[Sb],b=S.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return xs(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),gd.render(u.render),b.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!b.current&&u.animationState&&u.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1))}),u}function bO(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Eb(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&Bo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Eb(e){if(e)return e.options.allowProjection!==!1?e.projection:Eb(e.parent)}function xO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&uO(e);function i(s,l){let c;const u={...S.useContext(jo),...s,layoutId:wO(s)},{isStatic:d}=u,p=mO(s),f=r(s,d);if(!d&&Ou){SO(u,e);const b=TO(u);c=b.MeasureLayout,p.visualElement=yO(o,f,u,t,b.ProjectionNode)}return m.jsxs(Os.Provider,{value:p,children:[c&&p.visualElement?m.jsx(c,{visualElement:p.visualElement,...u}):null,n(o,s,vO(f,p.visualElement,l),f,d,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=S.forwardRef(i);return a[gO]=o,a}function wO({layoutId:e}){const t=S.useContext(Ni).id;return t&&e!==void 0?t+"-"+e:e}function SO(e,t){const n=S.useContext(gb).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Mo(!1,r):on(!1,r)}}function TO(e){const{drag:t,layout:n}=zo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const qi={};function EO(e){for(const t in e)qi[t]=e[t],zu(t)&&(qi[t].isCSSVariable=!0)}function kb(e,{layout:t,layoutId:n}){return $o.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qi[e]||e==="opacity")}const kO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CO=Vo.length;function PO(e,t,n){let r="",o=!0;for(let i=0;i<CO;i++){const a=Vo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=rb(s,md[a]);if(!l){o=!1;const u=kO[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Ed(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if($o.has(l)){a=!0;continue}else if(zu(l)){o[l]=c;continue}else{const u=rb(c,md[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=PO(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const kd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cb(e,t,n){for(const r in t)!Ot(t[r])&&!kb(r,n)&&(e[r]=t[r])}function AO({transformTemplate:e},t){return S.useMemo(()=>{const n=kd();return Ed(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IO(e,t){const n=e.style||{},r={};return Cb(r,n,e),Object.assign(r,AO(e,t)),r}function _O(e,t){const n={},r=IO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const OO={offset:"stroke-dashoffset",array:"stroke-dasharray"},MO={offset:"strokeDashoffset",array:"strokeDasharray"};function DO(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?OO:MO;e[i.offset]=Ee.transform(-r);const a=Ee.transform(t),s=Ee.transform(n);e[i.array]=`${a} ${s}`}function Pb(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Ed(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&DO(d,o,i,a,!1)}const Ab=()=>({...kd(),attrs:{}}),Ib=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NO(e,t,n,r){const o=S.useMemo(()=>{const i=Ab();return Pb(i,t,Ib(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cb(i,e.style,e),o.style={...i,...o.style}}return o}const LO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Cd(e){return typeof e!="string"||e.includes("-")?!1:!!(LO.indexOf(e)>-1||/[A-Z]/u.test(e))}function FO(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Cd(n)?NO:_O)(r,i,a,n),c=fO(r,typeof n=="string",e),u=n!==S.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=S.useMemo(()=>Ot(d)?d.get():d,[d]);return S.createElement(n,{...u,children:p})}}function _b(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Pd(e,t,n,r){if(typeof t=="function"){const[o,i]=_b(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=_b(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ns(e){return Ot(e)?e.get():e}function VO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:$O(n,r,o,e),renderState:t()}}const Ob=e=>(t,n)=>{const r=S.useContext(Os),o=S.useContext(ws),i=()=>VO(e,t,r,o);return n?i():xn(i)};function $O(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ns(i[p]);let{initial:a,animate:s}=e;const l=Ds(e),c=xb(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Ms(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const b=Pd(e,p[f]);if(b){const{transitionEnd:g,transition:h,...v}=b;for(const y in v){let x=v[y];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}}}return o}function Ad(e,t,n){const{style:r}=e,o={};for(const i in r)(Ot(r[i])||t.style&&Ot(t.style[i])||kb(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const jO={useVisualState:Ob({scrapeMotionValuesFromProps:Ad,createRenderState:kd})};function Mb(e,t,n){const r=Ad(e,t,n);for(const o in e)if(Ot(e[o])||Ot(t[o])){const i=Vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const zO={useVisualState:Ob({scrapeMotionValuesFromProps:Mb,createRenderState:Ab})};function BO(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Cd(r)?zO:jO,preloadedFeatures:e,useRender:FO(o),createVisualElement:t,Component:r};return xO(a)}}function Ui(e,t,n){const r=e.getProps();return Pd(r,t,n!==void 0?n:r.custom,e)}const Id=e=>Array.isArray(e);function RO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zr(n))}function HO(e){return Id(e)?e[e.length-1]||0:e}function WO(e,t){const n=Ui(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=HO(i[a]);RO(e,a,s)}}function qO(e){return!!(Ot(e)&&e.add)}function _d(e,t){const n=e.getValue("willChange");if(qO(n))return n.add(t);if(!n&&rr.WillChange){const r=new rr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Db(e){return e.props[Sb]}const UO=e=>e!==null;function YO(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UO),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const KO={type:"spring",stiffness:500,damping:25,restSpeed:10},GO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ZO={type:"keyframes",duration:.8},XO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},QO=(e,{keyframes:t})=>t.length>2?ZO:$o.has(e)?e.startsWith("scale")?GO(t[1]):KO:XO;function JO({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Od=(e,t,n,r={},o,i)=>a=>{const s=pd(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};JO(s)||Object.assign(u,QO(e,u)),u.duration&&(u.duration=fn(u.duration)),u.repeatDelay&&(u.repeatDelay=fn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(rr.instantAnimations||rr.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=YO(u.keyframes,s);if(p!==void 0){ct.update(()=>{u.onUpdate(p),u.onComplete()});return}}return s.isSync?new nd(u):new A_(u)};function eM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Md(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),p=s[u];if(p===void 0||c&&eM(c,u))continue;const f={delay:n,...pd(i||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===b&&!f.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=Db(e);if(v){const y=window.MotionHandoffAnimation(v,u,ct);y!==null&&(f.startTime=y,g=!0)}}_d(e,u),d.start(Od(u,d,p,e.shouldReduceMotion&&Gy.has(u)?{type:!1}:f,e,g));const h=d.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{ct.update(()=>{a&&WO(e,a)})}),l}function Dd(e,t,n={}){const r=Ui(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Md(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return tM(e,t,c+l,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function tM(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(nM).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Dd(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function nM(e,t){return e.sortNodePosition(t)}function rM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Dd(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Dd(e,t,n);else{const o=typeof t=="function"?Ui(e,t,n.custom):t;r=Promise.all(Md(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Nb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const oM=Sd.length;function Lb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Lb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<oM;n++){const r=Sd[n],o=e.props[r];(Wi(o)||o===!1)&&(t[r]=o)}return t}const iM=[...wd].reverse(),aM=wd.length;function sM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>rM(e,n,r)))}function lM(e){let t=sM(e),n=Fb(),r=!0;const o=l=>(c,u)=>{const d=Ui(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Lb(e.parent)||{},d=[],p=new Set;let f={},b=1/0;for(let h=0;h<aM;h++){const v=iM[h],y=n[v],x=c[v]!==void 0?c[v]:u[v],T=Wi(x),w=v===l?y.isActive:null;w===!1&&(b=h);let E=x===u[v]&&x!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||Ms(x)||typeof x=="boolean")continue;const k=cM(y.prevProp,x);let C=k||v===l&&y.isActive&&!E&&T||h>b&&T,O=!1;const I=Array.isArray(x)?x:[x];let D=I.reduce(o(v),{});w===!1&&(D={});const{prevResolvedValues:V={}}=y,z={...V,...D},A=M=>{C=!0,p.has(M)&&(O=!0,p.delete(M)),y.needsAnimating[M]=!0;const P=e.getValue(M);P&&(P.liveStyle=!1)};for(const M in z){const P=D[M],$=V[M];if(f.hasOwnProperty(M))continue;let L=!1;Id(P)&&Id($)?L=!Nb(P,$):L=P!==$,L?P!=null?A(M):p.add(M):P!==void 0&&p.has(M)?A(M):y.protectedKeys[M]=!0}y.prevProp=x,y.prevResolvedValues=D,y.isActive&&(f={...f,...D}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(E&&k)||O)&&d.push(...I.map(M=>({animation:M,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Ui(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),h[v]=y??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Fb(),r=!0}}}function cM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Nb(t,e):!1}function Xr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fb(){return{animate:Xr(!0),whileInView:Xr(),whileHover:Xr(),whileTap:Xr(),whileDrag:Xr(),whileFocus:Xr(),exit:Xr()}}class Sr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class uM extends Sr{constructor(t){super(t),t.animationState||(t.animationState=lM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ms(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let dM=0;class fM extends Sr{constructor(){super(...arguments),this.id=dM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const pM={animation:{Feature:uM},exit:{Feature:fM}};function Yi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ki(e){return{point:{x:e.pageX,y:e.pageY}}}const hM=e=>t=>vd(t)&&e(t,Ki(t));function Gi(e,t,n,r){return Yi(e,t,hM(n),r)}function Vb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const $b=1e-4,vM=1-$b,yM=1+$b,jb=.01,bM=0-jb,xM=0+jb;function Ut(e){return e.max-e.min}function wM(e,t,n){return Math.abs(e-t)<=n}function zb(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=Ut(n)/Ut(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vM&&e.scale<=yM||isNaN(e.scale))&&(e.scale=1),(e.translate>=bM&&e.translate<=xM||isNaN(e.translate))&&(e.translate=0)}function Zi(e,t,n,r){zb(e.x,t.x,n.x,r?r.originX:void 0),zb(e.y,t.y,n.y,r?r.originY:void 0)}function Bb(e,t,n){e.min=n.min+t.min,e.max=e.min+Ut(t)}function SM(e,t,n){Bb(e.x,t.x,n.x),Bb(e.y,t.y,n.y)}function Rb(e,t,n){e.min=t.min-n.min,e.max=e.min+Ut(t)}function Xi(e,t,n){Rb(e.x,t.x,n.x),Rb(e.y,t.y,n.y)}const Hb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ro=()=>({x:Hb(),y:Hb()}),Wb=()=>({min:0,max:0}),yt=()=>({x:Wb(),y:Wb()});function pn(e){return[e("x"),e("y")]}function Nd(e){return e===void 0||e===1}function Ld({scale:e,scaleX:t,scaleY:n}){return!Nd(e)||!Nd(t)||!Nd(n)}function Qr(e){return Ld(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return Ub(e.x)||Ub(e.y)}function Ub(e){return e&&e!=="0%"}function Ls(e,t,n){const r=e-n,o=t*r;return n+o}function Yb(e,t,n,r,o){return o!==void 0&&(e=Ls(e,o,r)),Ls(e,n,r)+t}function Fd(e,t=0,n=1,r,o){e.min=Yb(e.min,t,n,r,o),e.max=Yb(e.max,t,n,r,o)}function Kb(e,{x:t,y:n}){Fd(e.x,t.translate,t.scale,t.originPoint),Fd(e.y,n.translate,n.scale,n.originPoint)}const Gb=.999999999999,Zb=1.0000000000001;function TM(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Wo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Kb(e,a)),r&&Qr(i.latestValues)&&Wo(e,i.latestValues))}t.x<Zb&&t.x>Gb&&(t.x=1),t.y<Zb&&t.y>Gb&&(t.y=1)}function Ho(e,t){e.min=e.min+t,e.max=e.max+t}function Xb(e,t,n,r,o=.5){const i=ut(e.min,e.max,o);Fd(e,t,n,i,r)}function Wo(e,t){Xb(e.x,t.x,t.scaleX,t.scale,t.originX),Xb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Vb(gM(e.getBoundingClientRect(),t))}function EM(e,t,n){const r=Qb(e,n),{scroll:o}=t;return o&&(Ho(r.x,o.offset.x),Ho(r.y,o.offset.y)),r}const Jb=({current:e})=>e?e.ownerDocument.defaultView:null,ex=(e,t)=>Math.abs(e-t);function kM(e,t){const n=ex(e.x,t.x),r=ex(e.y,t.y);return Math.sqrt(n**2+r**2)}class tx{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=$d(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=kM(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:b}=d,{timestamp:g}=Bt;this.history.push({...b,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vd(p,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:b,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=$d(d.type==="pointercancel"?this.lastMoveEventInfo:Vd(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),b&&b(d,h)},!vd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Ki(t),s=Vd(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Bt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$d(s,this.history)),this.removeListeners=Li(Gi(this.contextWindow,"pointermove",this.handlePointerMove),Gi(this.contextWindow,"pointerup",this.handlePointerUp),Gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),or(this.updatePoint)}}function Vd(e,t){return t?{point:t(e.point)}:e}function nx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $d({point:e},t){return{point:e,delta:nx(e,rx(t)),offset:nx(e,CM(t)),velocity:PM(t,.1)}}function CM(e){return e[0]}function rx(e){return e[e.length-1]}function PM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=rx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const i=Vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function AM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function ox(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function IM(e,{top:t,left:n,bottom:r,right:o}){return{x:ox(e.x,n,o),y:ox(e.y,t,r)}}function ix(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _M(e,t){return{x:ix(e.x,t.x),y:ix(e.y,t.y)}}function OM(e,t){let n=.5;const r=Ut(e),o=Ut(t);return o>r?n=Do(t.min,t.max-r,e.min):r>o&&(n=Do(e.min,e.max-o,t.min)),nr(0,1,n)}function MM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jd=.35;function DM(e=jd){return e===!1?e=0:e===!0&&(e=jd),{x:ax(e,"left","right"),y:ax(e,"top","bottom")}}function ax(e,t,n){return{min:sx(e,t),max:sx(e,n)}}function sx(e,t){return typeof e=="number"?e:e[t]||0}const NM=new WeakMap;class LM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ki(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:b}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=q_(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(h=>{let v=this.getAxisMotionValue(h).get()||0;if($n.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[h];x&&(v=Ut(x)*(parseFloat(v)/100))}}this.originPoint[h]=v}),b&&ct.postRender(()=>b(u,d)),_d(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:b,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=FM(h),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>pn(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new tx(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Fs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=AM(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Bo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=IM(r.layoutBox,t):this.constraints=!1,this.elastic=DM(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=MM(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bo(t))return!1;const r=t.current;on(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=EM(r,o.root,this.visualElement.getTransformPagePoint());let a=_M(o.layout.layoutBox,i);if(n){const s=n(mM(a));this.hasMutatedConstraints=!!s,s&&(a=Vb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!Fs(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return _d(this.visualElement,t),r.start(Od(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){pn(n=>{const{drag:r}=this.getProps();if(!Fs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-ut(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=OM({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pn(a=>{if(!Fs(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ut(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;NM.set(this.visualElement,this);const t=this.visualElement.current,n=Gi(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Bo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ct.read(r);const a=Yi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=jd,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Fs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function FM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class VM extends Sr{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new LM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const lx=e=>(t,n)=>{e&&ct.postRender(()=>e(t,n))};class $M extends Sr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new tx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:lx(t),onStart:lx(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Gi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Qi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=cx(e,t.target.x),r=cx(e,t.target.y);return`${n}% ${r}%`}},jM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=wr.parse(e);if(o.length>5)return r;const i=wr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ut(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class zM extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;EO(BM),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Vs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||ct.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ux(e){const[t,n]=fb(),r=S.useContext(Ni);return m.jsx(zM,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Tb),isPresent:t,safeToRemove:n})}const BM={borderRadius:{...Qi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qi,borderTopRightRadius:Qi,borderBottomLeftRadius:Qi,borderBottomRightRadius:Qi,boxShadow:jM};function dx(e,t,n){const r=Ot(e)?e:Zr(e);return r.start(Od("",r,t,n)),r.animation}const RM=(e,t)=>e.depth-t.depth;class HM{constructor(){this.children=[],this.isDirty=!1}add(t){Mu(this.children,t),this.isDirty=!0}remove(t){Ss(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(RM),this.isDirty=!1,this.children.forEach(t)}}function WM(e,t){const n=Qt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(or(r),e(i-t))};return ct.setup(r,!0),()=>or(r)}const fx=["TopLeft","TopRight","BottomLeft","BottomRight"],qM=fx.length,px=e=>typeof e=="string"?parseFloat(e):e,hx=e=>typeof e=="number"||Ee.test(e);function UM(e,t,n,r,o,i){o?(e.opacity=ut(0,n.opacity??1,YM(r)),e.opacityExit=ut(t.opacity??1,0,KM(r))):i&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let a=0;a<qM;a++){const s=`border${fx[a]}Radius`;let l=mx(t,s),c=mx(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||hx(l)===hx(c)?(e[s]=Math.max(ut(px(l),px(c),r),0),($n.test(c)||$n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function mx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const YM=gx(0,.5,ly),KM=gx(.5,.95,dn);function gx(e,t,n){return r=>r<e?0:r>t?1:n(Do(e,t,r))}function vx(e,t){e.min=t.min,e.max=t.max}function hn(e,t){vx(e.x,t.x),vx(e.y,t.y)}function yx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bx(e,t,n,r,o){return e-=t,e=Ls(e,1/n,r),o!==void 0&&(e=Ls(e,1/o,r)),e}function GM(e,t=0,n=1,r=.5,o,i=e,a=e){if($n.test(t)&&(t=parseFloat(t),t=ut(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ut(i.min,i.max,r);e===i&&(s-=t),e.min=bx(e.min,t,n,s,o),e.max=bx(e.max,t,n,s,o)}function xx(e,t,[n,r,o],i,a){GM(e,t[n],t[r],t[o],t.scale,i,a)}const ZM=["x","scaleX","originX"],XM=["y","scaleY","originY"];function wx(e,t,n,r){xx(e.x,t,ZM,n?n.x:void 0,r?r.x:void 0),xx(e.y,t,XM,n?n.y:void 0,r?r.y:void 0)}function Sx(e){return e.translate===0&&e.scale===1}function Tx(e){return Sx(e.x)&&Sx(e.y)}function Ex(e,t){return e.min===t.min&&e.max===t.max}function QM(e,t){return Ex(e.x,t.x)&&Ex(e.y,t.y)}function kx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cx(e,t){return kx(e.x,t.x)&&kx(e.y,t.y)}function Px(e){return Ut(e.x)/Ut(e.y)}function Ax(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class JM{constructor(){this.members=[]}add(t){Mu(this.members,t),t.scheduleRender()}remove(t){if(Ss(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eD(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const zd=["","X","Y","Z"],tD={visibility:"hidden"},nD=1e3;let rD=0;function Bd(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ix(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Db(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ix(r)}function _x({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=rD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(aD),this.nodes.forEach(dD),this.nodes.forEach(fD),this.nodes.forEach(sD)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new HM)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Nu),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=bd(a)&&!db(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=WM(d,250),Vs.hasAnimatedSinceResize&&(Vs.hasAnimatedSinceResize=!1,this.nodes.forEach(Mx))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||vD,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=c.getProps(),v=!this.targetLayout||!Cx(this.targetLayout,f),y=!d&&p;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...pd(b,"layout"),onPlay:g,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||Mx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),or(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(pD),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ix(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ox);return}this.isUpdating||this.nodes.forEach(cD),this.isUpdating=!1,this.nodes.forEach(uD),this.nodes.forEach(oD),this.nodes.forEach(iD),this.clearAllSnapshots();const s=Qt.now();Bt.delta=nr(0,1e3/60,s-Bt.timestamp),Bt.timestamp=s,Bt.isProcessing=!0,ju.update.process(Bt),ju.preRender.process(Bt),ju.render.process(Bt),Bt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lD),this.sharedNodes.forEach(hD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ut(this.snapshot.measuredBox.x)&&!Ut(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!Tx(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||Qr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),yD(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(bD))){const{scroll:c}=this.root;c&&(Ho(s.x,c.offset.x),Ho(s.y,c.offset.y))}return s}removeElementScroll(a){const s=yt();if(hn(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&hn(s,a),Ho(s.x,u.offset.x),Ho(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=yt();hn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Wo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Qr(u.latestValues)&&Wo(l,u.latestValues)}return Qr(this.latestValues)&&Wo(l,this.latestValues),l}removeTransform(a){const s=yt();hn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Qr(c.latestValues))continue;Ld(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();hn(u,d),wx(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Qr(this.latestValues)&&wx(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Bt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Bt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Xi(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Kb(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Xi(this.relativeTargetOrigin,this.target,p.target),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ld(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Bt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;TM(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yx(this.prevProjectionDelta.x,this.projectionDelta.x),yx(this.prevProjectionDelta.y,this.projectionDelta.y)),Zi(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!Ax(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ax(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ro(),this.projectionDelta=Ro(),this.projectionDeltaWithTransform=Ro()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ro();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=yt(),f=l?l.source:void 0,b=this.layout?this.layout.source:void 0,g=f!==b,h=this.getStack(),v=!h||h.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(gD));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Dx(d.x,a.x,w),Dx(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mD(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&QM(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),hn(x,this.relativeTarget)),g&&(this.animationValues=u,UM(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(or(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{Vs.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zr(0)),this.currentAnimation=dx(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&$x(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=Ut(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Ut(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}hn(s,l),Wo(s,u),Zi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new JM),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Bd("z",a,c,this.animationValues);for(let u=0;u<zd.length;u++)Bd(`rotate${zd[u]}`,a,c,this.animationValues),Bd(`skew${zd[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return tD;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ns(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Ns(a?.pointerEvents)||""),this.hasProjected&&!Qr(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=eD(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:p}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in qi){if(u[f]===void 0)continue;const{correct:b,applyTo:g,isCSSVariable:h}=qi[f],v=s.transform==="none"?u[f]:b(u[f],c);if(g){const y=g.length;for(let x=0;x<y;x++)s[g[x]]=v}else h?this.options.visualElement.renderState.vars[f]=v:s[f]=v}return this.options.layoutId&&(s.pointerEvents=c===this?Ns(a?.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Ox),this.root.sharedNodes.clear()}}}function oD(e){e.updateLayout()}function iD(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],p=Ut(d);d.min=n[u].min,d.max=d.min+p}):$x(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],p=Ut(n[u]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const a=Ro();Zi(a,n,t.layoutBox);const s=Ro();i?Zi(s,e.applyTransform(r,!0),t.measuredBox):Zi(s,n,t.layoutBox);const l=!Tx(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:p}=u;if(d&&p){const f=yt();Xi(f,t.layoutBox,d.layoutBox);const b=yt();Xi(b,n,p.layoutBox),Cx(f,b)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function aD(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lD(e){e.clearSnapshot()}function Ox(e){e.clearMeasurements()}function cD(e){e.isLayoutDirty=!1}function uD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dD(e){e.resolveTargetDelta()}function fD(e){e.calcProjection()}function pD(e){e.resetSkewAndRotation()}function hD(e){e.removeLeadSnapshot()}function Dx(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nx(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function mD(e,t,n,r){Nx(e.x,t.x,n.x,r),Nx(e.y,t.y,n.y,r)}function gD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vD={duration:.45,ease:[.4,0,.1,1]},Lx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fx=Lx("applewebkit/")&&!Lx("chrome/")?Math.round:dn;function Vx(e){e.min=Fx(e.min),e.max=Fx(e.max)}function yD(e){Vx(e.x),Vx(e.y)}function $x(e,t,n){return e==="position"||e==="preserve-aspect"&&!wM(Px(t),Px(n),.2)}function bD(e){return e!==e.root&&e.scroll?.wasRoot}const xD=_x({attachResizeListener:(e,t)=>Yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rd={current:void 0},jx=_x({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rd.current){const e=new xD({});e.mount(window),e.setOptions({layoutScroll:!0}),Rd.current=e}return Rd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wD={pan:{Feature:$M},drag:{Feature:VM,ProjectionNode:jx,MeasureLayout:ux}};function zx(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ct.postRender(()=>i(t,Ki(t)))}class SD extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=U_(t,(n,r)=>(zx(this.node,r,"Start"),o=>zx(this.node,o,"End"))))}unmount(){}}class TD extends Sr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Li(Yi(this.node.current,"focus",()=>this.onFocus()),Yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Bx(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ct.postRender(()=>i(t,Ki(t)))}class ED extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=Z_(t,(n,r)=>(Bx(this.node,r,"Start"),(o,{success:i})=>Bx(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Hd=new WeakMap,Wd=new WeakMap,kD=e=>{const t=Hd.get(e.target);t&&t(e)},CD=e=>{e.forEach(kD)};function PD({root:e,...t}){const n=e||document;Wd.has(n)||Wd.set(n,{});const r=Wd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(CD,{root:e,...t})),r[o]}function AD(e,t,n){const r=PD(t);return Hd.set(e,n),r.observe(e),()=>{Hd.delete(e),r.unobserve(e)}}const ID={some:0,all:1};class _D extends Sr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ID[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=c?u:d;p&&p(l)};return AD(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(OD(t,n))&&this.startObserver()}unmount(){}}function OD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const MD={inView:{Feature:_D},tap:{Feature:ED},focus:{Feature:TD},hover:{Feature:SD}},DD={layout:{ProjectionNode:jx,MeasureLayout:ux}},qd={current:null},Rx={current:!1};function ND(){if(Rx.current=!0,!!Ou)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qd.current=e.matches;e.addListener(t),t()}else qd.current=!1}const Ji=new WeakMap;function LD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Ot(o))e.addValue(r,o);else if(Ot(i))e.addValue(r,Zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Zr(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Hx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Wx{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ud,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Qt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ct.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Ds(n),this.isVariantNode=xb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];l[p]!==void 0&&Ot(f)&&f.set(l[p],!1)}}mount(t){this.current=t,Ji.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Rx.current||ND(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qd.current,process.env.NODE_ENV!=="production"&&Lu(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),or(this.notifyUpdate),or(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$o.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zo){const n=zo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Hx.length;r++){const o=Hx[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=LD(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Xv(r)||Jv(r))?r=parseFloat(r):!J_(r)&&wr.test(n)&&(r=tb(t,n)),this.setBaseTarget(t,Ot(r)?r.get():r)),Ot(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Pd(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ot(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Nu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class qx extends Wx{constructor(){super(...arguments),this.KeyframeResolver=R_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ot(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ux(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function FD(e){return window.getComputedStyle(e)}class Yx extends qx{constructor(){super(...arguments),this.type="html",this.renderInstance=Ux}readValueFromInstance(t,n){if($o.has(n))return this.projection?.isProjecting?id(n):i_(t,n);{const r=FD(t),o=(zu(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){Ed(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ad(t,n,r)}}const Kx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function VD(e,t,n,r){Ux(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Kx.has(o)?o:Td(o),t.attrs[o])}class Gx extends qx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($o.has(n)){const r=eb(n);return r&&r.default||0}return n=Kx.has(n)?n:Td(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Mb(t,n,r)}build(t,n,r){Pb(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){VD(t,n,r,o)}mount(t){this.isSVGTag=Ib(t.tagName),super.mount(t)}}const $D=(e,t)=>Cd(e)?new Gx(t):new Yx(t,{allowProjection:e!==S.Fragment}),jD=BO({...pM,...MD,...wD,...DD},$D),We=pO(jD);function zD(e){return S.useEffect(()=>()=>e(),[])}function qo(e){const t=xn(()=>Zr(e)),{isStatic:n}=S.useContext(jo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Zx(e,t){const n=qo(t()),r=()=>n.set(t());return r(),xs(()=>{const o=()=>ct.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),or(r)}}),n}function BD(e){Hi.current=[],e();const t=Zx(Hi.current,e);return Hi.current=void 0,t}function RD(e,t,n,r){if(typeof e=="function")return BD(e);const o=typeof t=="function"?t:X_(t,n,r);return Array.isArray(e)?Xx(e,o):Xx([e],([i])=>o(i))}function Xx(e,t){const n=xn(()=>[]);return Zx(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Ud(e){return typeof e=="object"&&!Array.isArray(e)}function Qx(e,t,n,r){return typeof e=="string"&&Ud(t)?nb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function HD(e,t,n){return e*(t+1)}function Jx(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function WD(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ss(e,o),r--)}}function qD(e,t,n,r,o,i){WD(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ut(o,i,r[a]),easing:fy(n,a)})}function UD(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function YD(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const KD="easeInOut",GD=20;function ZD(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const b=e[f];if(typeof b=="string"){c.set(b,d);continue}else if(!Array.isArray(b)){c.set(b.name,Jx(d,b.at,u,c));continue}let[g,h,v={}]=b;v.at!==void 0&&(d=Jx(d,v.at,u,c));let y=0;const x=(T,w,E,k=0,C=0)=>{const O=XD(T),{delay:I=0,times:D=Ny(O),type:V="keyframes",repeat:z,repeatType:A,repeatDelay:N=0,...H}=w;let{ease:M=t.ease||"easeOut",duration:P}=w;const $=typeof I=="function"?I(k,C):I,L=O.length,U=dd(V)?V:o?.[V||"keyframes"];if(L<=2&&U){let ee=100;if(L===2&&eN(O)){const R=O[1]-O[0];ee=Math.abs(R)}const ne={...H};P!==void 0&&(ne.duration=fn(P));const J=Iy(ne,ee,U);M=J.ease,P=J.duration}P??(P=i);const G=d+$;D.length===1&&D[0]===0&&(D[1]=1);const B=D.length-O.length;if(B>0&&Dy(D,B),O.length===1&&O.unshift(null),z){on(z<GD,"Repeat count too high, must be less than 20"),P=HD(P,z);const ee=[...O],ne=[...D];M=Array.isArray(M)?[...M]:[M];const J=[...M];for(let R=0;R<z;R++){O.push(...ee);for(let q=0;q<ee.length;q++)D.push(ne[q]+(R+1)),M.push(q===0?"linear":fy(J,q-1))}UD(D,z)}const Z=G+P;qD(E,O,M,D,G,Z),y=Math.max($+P,y),p=Math.max(Z,p)};if(Ot(g)){const T=e0(g,s);x(h,v,t0("default",T))}else{const T=Qx(g,h,r,l),w=T.length;for(let E=0;E<w;E++){h=h,v=v;const k=T[E],C=e0(k,s);for(const O in h)x(h[O],QD(v,O),t0(O,C),E,w)}}u=d,d+=y}return s.forEach((f,b)=>{for(const g in f){const h=f[g];h.sort(YD);const v=[],y=[],x=[];for(let w=0;w<h.length;w++){const{at:E,value:k,easing:C}=h[w];v.push(k),y.push(Do(0,p,E)),x.push(C||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(KD)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(b)||a.set(b,{keyframes:{},transition:{}});const T=a.get(b);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:x,times:y,...n}}}),a}function e0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function t0(e,t){return t[e]||(t[e]=[]),t[e]}function XD(e){return Array.isArray(e)?e:[e]}function QD(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const JD=e=>typeof e=="number",eN=e=>e.every(JD);function tN(e,t){return e in t}class nN extends Wx{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(tN(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function rN(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=bd(e)&&!db(e)?new Gx(t):new Yx(t);n.mount(e),Ji.set(e,n)}function oN(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new nN(t);n.mount(e),Ji.set(e,n)}function iN(e,t){return Ot(e)||typeof e=="number"||typeof e=="string"&&!Ud(t)}function n0(e,t,n,r){const o=[];if(iN(e,t))o.push(dx(e,Ud(t)&&t.default||t,n&&(n.default||n)));else{const i=Qx(e,t,r),a=i.length;on(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?rN:oN;Ji.has(l)||c(l);const u=Ji.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Md(u,{...t,transition:d},{}))}}return o}function aN(e,t,n){const r=[];return ZD(e,t,n,{spring:Bi}).forEach(({keyframes:i,transition:a},s)=>{r.push(...n0(s,i,a))}),r}function sN(e){return Array.isArray(e)&&e.some(Array.isArray)}function lN(e){function t(n,r,o){let i=[];sN(n)?i=aN(n,r,e):i=n0(n,r,o,e);const a=new __(i);return e&&e.animations.push(a),a}return t}function cN(){const e=xn(()=>({current:null,animations:[]})),t=xn(()=>lN(e));return zD(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class uN{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const dN=()=>new uN;function fN(){return xn(dN)}const r0=S.createContext(null);function pN(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=ut(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?sI(e,o,o+i):e}function hN({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=xn(()=>We[t]),l=[],c=S.useRef(!1);on(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(b=>d===b.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(gN)},updateOrder:(d,p,f)=>{if(c.current)return;const b=pN(l,d,p,f);l!==b&&(c.current=!0,r(b.map(mN).filter(g=>o.indexOf(g)!==-1)))}};return S.useEffect(()=>{c.current=!1}),m.jsx(s,{...i,ref:a,ignoreStrict:!0,children:m.jsx(r0.Provider,{value:u,children:e})})}const o0=S.forwardRef(hN);function mN(e){return e.value}function gN(e,t){return e.layout.min-t.layout.min}function i0(e,t=0){return Ot(e)?e:qo(t)}function vN({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=xn(()=>We[r]),c=S.useContext(r0),u={x:i0(t.x),y:i0(t.y)},d=RD([u.x,u.y],([g,h])=>g||h?1:"unset");on(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:b}=c;return m.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&b(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const a0=S.forwardRef(vN);function yN(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function bN(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:yN(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=$u(r)(l/c)*c}return t+l}}var $s={exports:{}},Yd={},js={exports:{}},Kd={};/**
|
|
183
191
|
* @license React
|
|
184
192
|
* use-sync-external-store-shim.production.js
|
|
185
193
|
*
|
|
@@ -187,7 +195,7 @@
|
|
|
187
195
|
*
|
|
188
196
|
* This source code is licensed under the MIT license found in the
|
|
189
197
|
* LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/var
|
|
198
|
+
*/var s0;function xN(){if(s0)return Kd;s0=1;var e=S;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),b=r({inst:{value:f,getSnapshot:p}}),g=b[0].inst,h=b[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&h({inst:g})},[d,f,p]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Kd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Kd}var Gd={};/**
|
|
191
199
|
* @license React
|
|
192
200
|
* use-sync-external-store-shim.development.js
|
|
193
201
|
*
|
|
@@ -195,7 +203,7 @@
|
|
|
195
203
|
*
|
|
196
204
|
* This source code is licensed under the MIT license found in the
|
|
197
205
|
* LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/var
|
|
206
|
+
*/var l0;function wN(){return l0||(l0=1,process.env.NODE_ENV!=="production"&&function(){function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}function t(f,b){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=b();if(!d){var h=b();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:b}});var v=h[0].inst,y=h[1];return l(function(){v.value=g,v.getSnapshot=b,n(v)&&y({inst:v})},[f,g,b]),s(function(){return n(v)&&y({inst:v}),f(function(){n(v)&&y({inst:v})})},[f]),c(g),g}function n(f){var b=f.getSnapshot;f=f.value;try{var g=b();return!i(f,g)}catch{return!0}}function r(f,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Gd.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Gd}var c0;function u0(){return c0||(c0=1,process.env.NODE_ENV==="production"?js.exports=xN():js.exports=wN()),js.exports}/**
|
|
199
207
|
* @license React
|
|
200
208
|
* use-sync-external-store-shim/with-selector.production.js
|
|
201
209
|
*
|
|
@@ -203,7 +211,7 @@
|
|
|
203
211
|
*
|
|
204
212
|
* This source code is licensed under the MIT license found in the
|
|
205
213
|
* LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/var
|
|
214
|
+
*/var d0;function SN(){if(d0)return Yd;d0=1;var e=S,t=u0();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Yd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=p(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Yd}var Zd={};/**
|
|
207
215
|
* @license React
|
|
208
216
|
* use-sync-external-store-shim/with-selector.development.js
|
|
209
217
|
*
|
|
@@ -211,37 +219,29 @@
|
|
|
211
219
|
*
|
|
212
220
|
* This source code is licensed under the MIT license found in the
|
|
213
221
|
* LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/var sb;function $M(){return sb||(sb=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=ib(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;id.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=p(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),id}var lb;function jM(){return lb||(lb=1,process.env.NODE_ENV==="production"?rs.exports=VM():rs.exports=$M()),rs.exports}jM();var Lo=function(){return Lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lo.apply(this,arguments)};function Ui(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function cb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Fo=function(e){var t=S.useRef(e??{});return S.useEffect(function(){return void(t.current=e)},[e]),t},zM=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},BM=function(e){return Object.entries(e)},ub=function(e){return e instanceof Promise},db=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Lo(Lo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},RM=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,cb([],Ui(a),!1)),u=function(d,p){return n(function(f){return db(d,f,i,p)})};return ub(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},HM=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,cb([],Ui(a),!1)),c=function(u){return n(function(d){return db(u,d,i,o.current)})};return ub(l)?l.then(function(u){return c(u)}):c(l)}},ad=function(e,t,n){var r,o,i,a=Ui(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Fo(s),u=Fo((r=n?.props)!==null&&r!==void 0?r:{}),d=Fo(t),p=Fo((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),f=Fo((i=n?.interceptor)!==null&&i!==void 0?i:[]),b=S.useRef(e),g=zM(s),h=Fo(g),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=Ui(S.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:b.current,previousState:function(){return h.current}});return BM(w).reduce(function(E,k){var C,O=Ui(k,2),I=O[0],D=O[1];return Lo(Lo({},E),(C={},C[I]=n?.debug?RM(I,D,l,T,v,f.current):HM(I,D,l,T,v,f.current),C))},{})}),1),x=y[0];return[s,x,u.current]};const WM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function qM(e,t){return S.useRef(WM(e,t)).current}const is={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},pr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(pr(a,t,n,s))},[]),fb=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:fb(a,t,n,s)}},{}),pb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},as=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},UM={default:e=>as(e,{result:pb.default}),dark:e=>as(e,{result:pb.dark})},Vo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},YM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),sd=(e,t)=>{const n=pr(e.colors,Vo(t?.colors)),r=pr(e.spacing,Vo(t?.spacing)),o=pr(e.rounded,Vo(t?.rounded)),i=pr(e.shadow,Vo(t?.rounded)),a=pr(e.zIndex,Vo(t?.zIndex??YM)),s=e.custom?pr(e.custom,Vo(t?.customTokens)):[];return n.concat(r,o,s,a,i)},KM=(e,t)=>as(sd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),GM=(e,t)=>sd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),ZM=(e,t)=>as(sd(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ss={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>m.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},ls={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},$o=S.createContext({tweaks:ls,parser:is.hsla,map:ss,locale:void 0}),ld=e=>{const t=S.useContext($o);if(e)return e;if(t)return t.locale||e};function hb(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const Et=()=>{const e=S.useContext($o);return e?e.map:ss},jo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},mb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},cd=(e,t)=>{const n=mb(t,gb.basic,e)||mb(t,gb.extend,e);return n===void 0||n===e?void 0:n},hr=()=>typeof window>"u",ud=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),vb=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},XM=e=>!e,dd=()=>{},yb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},fd=()=>{const e=S.useContext($o);return e?e.tweaks:ls};function cs(){return typeof window<"u"}function mr(e){return pd(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vn(e){var t;return(t=(pd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pd(e){return cs()?e instanceof Node||e instanceof Ut(e).Node:!1}function it(e){return cs()?e instanceof Element||e instanceof Ut(e).Element:!1}function kt(e){return cs()?e instanceof HTMLElement||e instanceof Ut(e).HTMLElement:!1}function us(e){return!cs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot}const QM=new Set(["inline","contents"]);function Yi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!QM.has(o)}const JM=new Set(["table","td","th"]);function eD(e){return JM.has(mr(e))}const tD=[":popover-open",":modal"];function ds(e){return tD.some(t=>{try{return e.matches(t)}catch{return!1}})}const nD=["transform","translate","scale","rotate","perspective"],rD=["transform","translate","scale","rotate","perspective","filter"],oD=["paint","layout","strict","content"];function hd(e){const t=fs(),n=it(e)?nn(e):e;return nD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rD.some(r=>(n.willChange||"").includes(r))||oD.some(r=>(n.contain||"").includes(r))}function iD(e){let t=tr(e);for(;kt(t)&&!er(t);){if(hd(t))return t;if(ds(t))return null;t=tr(t)}return null}function fs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const aD=new Set(["html","body","#document"]);function er(e){return aD.has(mr(e))}function nn(e){return Ut(e).getComputedStyle(e)}function ps(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tr(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||us(e)&&e.host||Vn(e);return us(t)?t.host:t}function bb(e){const t=tr(e);return er(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Yi(t)?t:bb(t)}function gr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=bb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ut(o);if(i){const s=md(a);return t.concat(a,a.visualViewport||[],Yi(o)?o:[],s&&n?gr(s):[])}return t.concat(o,gr(o,[],n))}function md(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const sD=["top","right","bottom","left"],xb=["start","end"],wb=sD.reduce((e,t)=>e.concat(t,t+"-"+xb[0],t+"-"+xb[1]),[]),vr=Math.min,rn=Math.max,hs=Math.round,zo=Math.floor,$n=e=>({x:e,y:e}),lD={left:"right",right:"left",bottom:"top",top:"bottom"},cD={start:"end",end:"start"};function gd(e,t,n){return rn(e,vr(t,n))}function Yr(e,t){return typeof e=="function"?e(t):e}function jn(e){return e.split("-")[0]}function Sn(e){return e.split("-")[1]}function Sb(e){return e==="x"?"y":"x"}function vd(e){return e==="y"?"height":"width"}const uD=new Set(["top","bottom"]);function nr(e){return uD.has(jn(e))?"y":"x"}function yd(e){return Sb(nr(e))}function Tb(e,t,n){n===void 0&&(n=!1);const r=Sn(e),o=yd(e),i=vd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=gs(a)),[a,gs(a)]}function dD(e){const t=gs(e);return[ms(e),t,ms(t)]}function ms(e){return e.replace(/start|end/g,t=>cD[t])}const Eb=["left","right"],kb=["right","left"],fD=["top","bottom"],pD=["bottom","top"];function hD(e,t,n){switch(e){case"top":case"bottom":return n?t?kb:Eb:t?Eb:kb;case"left":case"right":return t?fD:pD;default:return[]}}function mD(e,t,n,r){const o=Sn(e);let i=hD(jn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(ms)))),i}function gs(e){return e.replace(/left|right|bottom|top/g,t=>lD[t])}function gD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cb(e){return typeof e!="number"?gD(e):{top:e,right:e,bottom:e,left:e}}function vs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
215
|
-
* tabbable 6.2.0
|
|
216
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
217
|
-
*/var vD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ys=vD.join(","),Pb=typeof Element>"u",Bo=Pb?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,bs=!Pb&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},xs=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},yD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Ab=function(t,n,r){if(xs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ys));return n&&Bo.call(t,ys)&&o.unshift(t),o=o.filter(r),o},Ib=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!xs(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Bo.call(a,ys);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!xs(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},_b=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ob=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yD(t))&&!_b(t)?0:t.tabIndex},bD=function(t,n){var r=Ob(t);return r<0&&n&&!_b(t)?0:r},xD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Mb=function(t){return t.tagName==="INPUT"},wD=function(t){return Mb(t)&&t.type==="hidden"},SD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},TD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},ED=function(t){if(!t.name)return!0;var n=t.form||bs(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=TD(o,t.form);return!i||i===t},kD=function(t){return Mb(t)&&t.type==="radio"},CD=function(t){return kD(t)&&!ED(t)},PD=function(t){var n,r=t&&bs(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=bs(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Db=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},AD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Bo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Bo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=bs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Db(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(PD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Db(t);return!1},ID=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Bo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},bd=function(t,n){return!(n.disabled||xs(n)||wD(n)||AD(n,t)||SD(n)||ID(n))},xd=function(t,n){return!(CD(n)||Ob(n)<0||!bd(t,n))},_D=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},OD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=bD(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(xD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ws=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ib([t],n.includeContainer,{filter:xd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:_D}):r=Ab(t,n.includeContainer,xd.bind(null,n)),OD(r)},MD=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ib([t],n.includeContainer,{filter:bd.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Ab(t,n.includeContainer,bd.bind(null,n)),r},Nb=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Bo.call(t,ys)===!1?!1:xd(n,t)};function wd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Lb(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Fb(){return/apple/i.test(navigator.vendor)}function Sd(){const e=/android/i;return e.test(wd())||e.test(Lb())}function DD(){return wd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Vb(){return Lb().includes("jsdom/")}const $b="data-floating-ui-focusable",ND="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Td="ArrowLeft",Ed="ArrowRight",LD="ArrowUp",FD="ArrowDown";function zn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Nt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&us(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Bn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function kd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function VD(e){return e.matches("html,body")}function $t(e){return e?.ownerDocument||document}function Cd(e){return kt(e)&&e.matches(ND)}function Pd(e){return e?e.getAttribute("role")==="combobox"&&Cd(e):!1}function $D(e){if(!e||Vb())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ss(e){return e?e.hasAttribute($b)?e:e.querySelector("["+$b+"]")||e:null}function Kr(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Kr(e,o.id,n)])}function jD(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Kr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function jb(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function jt(e){e.preventDefault(),e.stopPropagation()}function zD(e){return"nativeEvent"in e}function zb(e){return e.mozInputSource===0&&e.isTrusted?!0:Sd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Bb(e){return Vb()?!1:!Sd()&&e.width===0&&e.height===0||Sd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var BD=typeof document<"u",RD=function(){},Ge=BD?S.useLayoutEffect:RD;const HD={..._};function Lt(e){const t=_.useRef(e);return Ge(()=>{t.current=e}),t}const WD=HD.useInsertionEffect||(e=>e());function gt(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return WD(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Ts(e,t,n){return Math.floor(e/t)!==n}function Ki(e,t){return t<0||t>=e.current.length}function Ad(e,t){return Ht(e,{disabledIndices:t})}function Rb(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&Es(e,a,o));return a}function qD(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,p=u;if(n.key===LD){if(d&&jt(n),u===-1)p=c;else if(p=Ht(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||p<0)){const f=u%a,b=c%a,g=c-(b-f);b===f?p=c:p=b>f?g:g-a}Ki(e,p)&&(p=u)}if(n.key===FD&&(d&&jt(n),u===-1?p=l:(p=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(p=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Ki(e,p)&&(p=u)),r==="both"){const f=zo(u/a);n.key===(i?Td:Ed)&&(d&&jt(n),u%a!==a-1?(p=Ht(e,{startingIndex:u,disabledIndices:s}),o&&Ts(p,a,f)&&(p=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(p=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),Ts(p,a,f)&&(p=u)),n.key===(i?Ed:Td)&&(d&&jt(n),u%a!==0?(p=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Ts(p,a,f)&&(p=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(p=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Ts(p,a,f)&&(p=u));const b=zo(c/a)===f;Ki(e,p)&&(o&&b?p=n.key===(i?Ed:Td)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):p=u)}return p}function UD(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function YD(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function KD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Es(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Gi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Hb(e,t){const n=ws(e,Gi()),r=n.length;if(r===0)return;const o=zn($t(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Wb(e){return Hb($t(e).body,1)||e}function qb(e){return Hb($t(e).body,-1)||e}function Zi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nt(n,r)}function GD(e){ws(e,Gi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ub(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Yb(e,t,n){let{reference:r,floating:o}=e;const i=nr(t),a=yd(t),s=vd(a),l=jn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Sn(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const ZD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Yb(c,r,l),p=r,f={},b=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[h]:{...f[h],...T}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Yb(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function ks(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Yr(t,e),b=Cb(f),h=s[p?d==="floating"?"reference":"floating":d],v=vs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=vs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+b.top)/T.y,bottom:(w.bottom-v.bottom+b.bottom)/T.y,left:(v.left-w.left+b.left)/T.x,right:(w.right-v.right+b.right)/T.x}}const XD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Yr(e,t)||{};if(c==null)return{};const d=Cb(u),p={x:n,y:r},f=yd(o),b=vd(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[b]+i.reference[f]-p[f]-i.floating[b],w=p[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=E?E[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=s.floating[x]||i.floating[b]);const C=T/2-w/2,O=k/2-g[b]/2-1,I=vr(d[v],O),D=vr(d[y],O),V=I,z=k-g[b]-D,A=k/2-g[b]/2+C,N=gd(V,A,z),H=!l.arrow&&Sn(o)!=null&&A!==N&&i.reference[b]/2-(A<V?I:D)-g[b]/2<0,M=H?A<V?A-V:A-z:0;return{[f]:p[f]+M,data:{[f]:N,centerOffset:A-N-M,...H&&{alignmentOffset:M}},reset:H}}});function QD(e,t,n){return(e?[...n.filter(o=>Sn(o)===e),...n.filter(o=>Sn(o)!==e)]:n.filter(o=>jn(o)===o)).filter(o=>e?Sn(o)===e||(t?ms(o)!==o:!1):!0)}const JD=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=wb,autoAlignment:f=!0,...b}=Yr(e,t),g=d!==void 0||p===wb?QD(d||null,f,p):p,h=await ks(t,b),v=((n=a.autoPlacement)==null?void 0:n.index)||0,y=g[v];if(y==null)return{};const x=Tb(y,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==y)return{reset:{placement:g[0]}};const T=[h[jn(y)],h[x[0]],h[x[1]]],w=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:T}],E=g[v+1];if(E)return{data:{index:v+1,overflows:w},reset:{placement:E}};const k=w.map(I=>{const D=Sn(I.placement);return[I.placement,D&&u?I.overflows.slice(0,2).reduce((V,z)=>V+z,0):I.overflows[0],I.overflows]}).sort((I,D)=>I[1]-D[1]),O=((o=k.filter(I=>I[2].slice(0,Sn(I[0])?2:3).every(D=>D<=0))[0])==null?void 0:o[0])||k[0][0];return O!==s?{data:{index:v+1,overflows:w},reset:{placement:O}}:{}}}},eN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...h}=Yr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=jn(o),y=nr(s),x=jn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[gs(s)]:dD(s)),E=b!=="none";!p&&E&&w.push(...mD(s,g,b,T));const k=[s,...w],C=await ks(t,h),O=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(C[v]),d){const A=Tb(o,a,T);O.push(C[A[0]],C[A[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(A=>A<=0)){var D,V;const A=(((D=i.flip)==null?void 0:D.index)||0)+1,N=k[A];if(N&&(!(d==="alignment"?y!==nr(N):!1)||I.every(P=>nr(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:A,overflows:I},reset:{placement:N}};let H=(V=I.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:V.placement;if(!H)switch(f){case"bestFit":{var z;const M=(z=I.filter(P=>{if(E){const $=nr(P.placement);return $===y||$==="y"}return!0}).map(P=>[P.placement,P.overflows.filter($=>$>0).reduce(($,L)=>$+L,0)]).sort((P,$)=>P[1]-$[1])[0])==null?void 0:z[0];M&&(H=M);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}},tN=new Set(["left","top"]);async function nN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=jn(n),s=Sn(n),l=nr(n)==="y",c=tN.has(a)?-1:1,u=i&&l?-1:1,d=Yr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const rN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await nN(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},oN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=Yr(e,t),c={x:n,y:r},u=await ks(t,l),d=nr(jn(o)),p=Sb(d);let f=c[p],b=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],x=f-u[v];f=gd(y,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+u[h],x=b-u[v];b=gd(y,b,x)}const g=s.fn({...t,[p]:f,[d]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[d]:a}}}}}},iN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Yr(e,t),u=await ks(t,c),d=jn(o),p=Sn(o),f=nr(o)==="y",{width:b,height:g}=i.floating;let h,v;d==="top"||d==="bottom"?(h=d,v=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,h=p==="end"?"top":"bottom");const y=g-u.top-u.bottom,x=b-u.left-u.right,T=vr(g-u[h],y),w=vr(b-u[v],x),E=!t.middlewareData.shift;let k=T,C=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),E&&!p){const I=rn(u.left,0),D=rn(u.right,0),V=rn(u.top,0),z=rn(u.bottom,0);f?C=b-2*(I!==0||D!==0?I+D:rn(u.left,u.right)):k=g-2*(V!==0||z!==0?V+z:rn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:k});const O=await a.getDimensions(s.floating);return b!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}};function Kb(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=hs(n)!==i||hs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Id(e){return it(e)?e:e.contextElement}function Ho(e){const t=Id(e);if(!kt(t))return $n(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Kb(t);let a=(i?hs(n.width):n.width)/r,s=(i?hs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const aN=$n(0);function Gb(e){const t=Ut(e);return!fs()||!t.visualViewport?aN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ut(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Id(e);let a=$n(1);t&&(r?it(r)&&(a=Ho(r)):a=Ho(e));const s=sN(i,n,r)?Gb(i):$n(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Ut(i),f=r&&it(r)?Ut(r):r;let b=p,g=md(b);for(;g&&r&&f!==b;){const h=Ho(g),v=g.getBoundingClientRect(),y=nn(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,b=Ut(g),g=md(b)}}return vs({width:u,height:d,x:l,y:c})}function _d(e,t){const n=ps(e).scrollLeft;return t?t.left+n:Gr(Vn(e)).left+n}function Zb(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:_d(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function lN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Vn(r),s=t?ds(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=$n(1);const u=$n(0),d=kt(r);if((d||!d&&!i)&&((mr(r)!=="body"||Yi(a))&&(l=ps(r)),kt(r))){const f=Gr(r);c=Ho(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=a&&!d&&!i?Zb(a,l,!0):$n(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function cN(e){return Array.from(e.getClientRects())}function uN(e){const t=Vn(e),n=ps(e),r=e.ownerDocument.body,o=rn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=rn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+_d(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=rn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function dN(e,t){const n=Ut(e),r=Vn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=fs();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}const fN=new Set(["absolute","fixed"]);function pN(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?Ho(e):$n(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Xb(e,t,n){let r;if(t==="viewport")r=dN(e,n);else if(t==="document")r=uN(Vn(e));else if(it(t))r=pN(t,n);else{const o=Gb(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vs(r)}function Qb(e,t){const n=tr(e);return n===t||!it(n)||er(n)?!1:nn(n).position==="fixed"||Qb(n,t)}function hN(e,t){const n=t.get(e);if(n)return n;let r=gr(e,[],!1).filter(s=>it(s)&&mr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?tr(e):e;for(;it(a)&&!er(a);){const s=nn(a),l=hd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&fN.has(o.position)||Yi(a)&&!l&&Qb(e,a))?r=r.filter(u=>u!==a):o=s,a=tr(a)}return t.set(e,r),r}function mN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ds(t)?[]:hN(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Xb(t,u,o);return c.top=rn(d.top,c.top),c.right=vr(d.right,c.right),c.bottom=vr(d.bottom,c.bottom),c.left=rn(d.left,c.left),c},Xb(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gN(e){const{width:t,height:n}=Kb(e);return{width:t,height:n}}function vN(e,t,n){const r=kt(t),o=Vn(t),i=n==="fixed",a=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=$n(0);function c(){l.x=_d(o)}if(r||!r&&!i)if((mr(t)!=="body"||Yi(o))&&(s=ps(t)),r){const f=Gr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Zb(o,s):$n(0),d=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:d,y:p,width:a.width,height:a.height}}function Od(e){return nn(e).position==="static"}function Jb(e,t){if(!kt(e)||nn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vn(e)===n&&(n=n.ownerDocument.body),n}function ex(e,t){const n=Ut(e);if(ds(e))return n;if(!kt(e)){let o=tr(e);for(;o&&!er(o);){if(it(o)&&!Od(o))return o;o=tr(o)}return n}let r=Jb(e,t);for(;r&&eD(r)&&Od(r);)r=Jb(r,t);return r&&er(r)&&Od(r)&&!hd(r)?n:r||iD(e)||n}const yN=async function(e){const t=this.getOffsetParent||ex,n=this.getDimensions,r=await n(e.floating);return{reference:vN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bN(e){return nn(e).direction==="rtl"}const xN={convertOffsetParentRelativeRectToViewportRelativeRect:lN,getDocumentElement:Vn,getClippingRect:mN,getOffsetParent:ex,getElementRects:yN,getClientRects:cN,getDimensions:gN,getScale:Ho,isElement:it,isRTL:bN};function tx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wN(e,t){let n=null,r;const o=Vn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const b=zo(d),g=zo(o.clientWidth-(u+p)),h=zo(o.clientHeight-(d+f)),v=zo(u),x={rootMargin:-b+"px "+-g+"px "+-h+"px "+-v+"px",threshold:rn(0,vr(1,l))||1};let T=!0;function w(E){const k=E[0].intersectionRatio;if(k!==l){if(!T)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!tx(c,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(w,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(e)}return a(!0),i}function Wo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Id(e),u=o||i?[...c?gr(c):[],...gr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?wN(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let b,g=l?Gr(e):null;l&&h();function h(){const v=Gr(e);g&&!tx(g,v)&&n(),g=v,b=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const SN=rN,TN=JD,EN=oN,kN=eN,CN=iN,nx=XD,PN=(e,t,n)=>{const r=new Map,o={platform:xN,...n},i={...o.platform,_c:r};return ZD(e,t,{...o,platform:i})};var AN=typeof document<"u",IN=function(){},Cs=AN?S.useLayoutEffect:IN;function Ps(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ps(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ps(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function rx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ox(e,t){const n=rx(e);return Math.round(t*n)/n}function Md(e){const t=_.useRef(e);return Cs(()=>{t.current=e}),t}function _N(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=_.useState(r);Ps(p,r)||f(r);const[b,g]=_.useState(null),[h,v]=_.useState(null),y=_.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),x=_.useCallback(P=>{P!==k.current&&(k.current=P,v(P))},[]),T=i||b,w=a||h,E=_.useRef(null),k=_.useRef(null),C=_.useRef(u),O=l!=null,I=Md(l),D=Md(o),V=Md(c),z=_.useCallback(()=>{if(!E.current||!k.current)return;const P={placement:t,strategy:n,middleware:p};D.current&&(P.platform=D.current),PN(E.current,k.current,P).then($=>{const L={...$,isPositioned:V.current!==!1};A.current&&!Ps(C.current,L)&&(C.current=L,gi.flushSync(()=>{d(L)}))})},[p,t,n,D,V]);Cs(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const A=_.useRef(!1);Cs(()=>(A.current=!0,()=>{A.current=!1}),[]),Cs(()=>{if(T&&(E.current=T),w&&(k.current=w),T&&w){if(I.current)return I.current(T,w,z);z()}},[T,w,z,I,O]);const N=_.useMemo(()=>({reference:E,floating:k,setReference:y,setFloating:x}),[y,x]),H=_.useMemo(()=>({reference:T,floating:w}),[T,w]),M=_.useMemo(()=>{const P={position:n,left:0,top:0};if(!H.floating)return P;const $=ox(H.floating,u.x),L=ox(H.floating,u.y);return s?{...P,transform:"translate("+$+"px, "+L+"px)",...rx(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:L}},[n,s,H.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:z,refs:N,elements:H,floatingStyles:M}),[u,z,N,H,M])}const ON=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nx({element:r.current,padding:o}).fn(n):{}:r?nx({element:r,padding:o}).fn(n):{}}}},Xi=(e,t)=>({...SN(e),options:[e,t]}),Dd=(e,t)=>({...EN(e),options:[e,t]}),Nd=(e,t)=>({...kN(e),options:[e,t]}),ix=(e,t)=>({...CN(e),options:[e,t]}),MN=(e,t)=>({...TN(e),options:[e,t]}),ax=(e,t)=>({...ON(e),options:[e,t]});function DN(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const sx=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function NN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=_.useState(()=>new Set),a=_.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=_.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=_.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(DN).forEach((d,p)=>{c.set(d,p)}),c},[o]);return m.jsx(sx.Provider,{value:_.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function lx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=_.useContext(sx),[s,l]=_.useState(null),c=_.useRef(null),u=_.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d?.textContent)!=null?p:null}},[s,i,a,t]);return Ge(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ge(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),_.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const LN="data-floating-ui-focusable",cx="active",ux="selected",Qi="ArrowLeft",Ji="ArrowRight",dx="ArrowUp",As="ArrowDown",FN={..._};let fx=!1,VN=0;const px=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+VN++;function $N(){const[e,t]=_.useState(()=>fx?px():void 0);return Ge(()=>{e==null&&t(px())},[]),_.useEffect(()=>{fx=!0},[]),e}const ea=FN.useId||$N;let ta;process.env.NODE_ENV!=="production"&&(ta=new Set);function Is(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.warn(o)}}function jN(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.error(o)}}const hx=_.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:p,d:f,style:{transform:b,...g}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||Is("The `ref` prop is required for `FloatingArrow`."));const v=ea(),[y,x]=_.useState(!1);if(Ge(()=>{if(!o)return;nn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,w]=r.split("-"),E=T==="top"||T==="bottom";let k=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(k=null);const C=u*2,O=C/2,I=s/2*(c/-8+1),D=l/2*c/4,V=!!f,z=k&&w==="end"?"bottom":"top";let A=k&&w==="end"?"right":"left";k&&y&&(A=w==="end"?"left":"right");const N=i?.x!=null?k||i.x:"",H=i?.y!=null?k||i.y:"",M=f||"M0,0"+(" H"+s)+(" L"+(s-I)+","+(l-D))+(" Q"+s/2+","+l+" "+I+","+(l-D))+" Z",P={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[T];return m.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:V?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[A]:N,[z]:H,[T]:E||V?"100%":"calc(100% - "+C/2+"px)",transform:[P,b].filter($=>!!$).join(" "),...g},children:[C>0&&m.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:p,strokeWidth:C+(f?0:1),d:M}),m.jsx("path",{stroke:C&&!f?h.fill:"none",d:M}),m.jsx("clipPath",{id:v,children:m.jsx("rect",{x:-O,y:O*(V?-1:1),width:s+C,height:s})})]})});function mx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const gx=_.createContext(null),vx=_.createContext(null),yr=()=>{var e;return((e=_.useContext(gx))==null?void 0:e.id)||null},br=()=>_.useContext(vx);function zN(e){const t=ea(),n=br(),o=yr();return Ge(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function BN(e){const{children:t,id:n}=e,r=yr();return m.jsx(gx.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function RN(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(a=>{n.current=[...n.current,a]},[]),o=_.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=_.useState(()=>mx());return m.jsx(vx.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function Zr(e){return"data-floating-ui-"+e}function zt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const yx=Zr("safe-polygon");function Ld(e,t,n){if(n&&!Ro(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Fd(e){return typeof e=="function"?e():e}function bx(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=br(),b=yr(),g=Lt(c),h=Lt(l),v=Lt(n),y=Lt(d),x=_.useRef(),T=_.useRef(-1),w=_.useRef(),E=_.useRef(-1),k=_.useRef(!0),C=_.useRef(!1),O=_.useRef(()=>{}),I=_.useRef(!1),D=gt(()=>{var M;const P=(M=o.current.openEvent)==null?void 0:M.type;return P?.includes("mouse")&&P!=="mousedown"});_.useEffect(()=>{if(!s)return;function M(P){let{open:$}=P;$||(zt(T),zt(E),k.current=!0,I.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),_.useEffect(()=>{if(!s||!g.current||!n)return;function M($){D()&&r(!1,$,"hover")}const P=$t(a.floating).documentElement;return P.addEventListener("mouseleave",M),()=>{P.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,D]);const V=_.useCallback(function(M,P,$){P===void 0&&(P=!0),$===void 0&&($="hover");const L=Ld(h.current,"close",x.current);L&&!w.current?(zt(T),T.current=window.setTimeout(()=>r(!1,M,$),L)):P&&(zt(T),r(!1,M,$))},[h,r]),z=gt(()=>{O.current(),w.current=void 0}),A=gt(()=>{if(C.current){const M=$t(a.floating).body;M.style.pointerEvents="",M.removeAttribute(yx),C.current=!1}}),N=gt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);_.useEffect(()=>{if(!s)return;function M(G){if(zt(T),k.current=!1,u&&!Ro(x.current)||Fd(y.current)>0&&!Ld(h.current,"open"))return;const B=Ld(h.current,"open",x.current);B?T.current=window.setTimeout(()=>{v.current||r(!0,G,"hover")},B):n||r(!0,G,"hover")}function P(G){if(N()){A();return}O.current();const B=$t(a.floating);if(zt(E),I.current=!1,g.current&&o.current.floatingContext){n||zt(T),w.current=g.current({...o.current.floatingContext,tree:f,x:G.clientX,y:G.clientY,onClose(){A(),z(),N()||V(G,!0,"safe-polygon")}});const ee=w.current;B.addEventListener("mousemove",ee),O.current=()=>{B.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Nt(a.floating,G.relatedTarget):!0)&&V(G)}function $(G){N()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:G.clientX,y:G.clientY,onClose(){A(),z(),N()||V(G)}})(G))}function L(){zt(T)}function U(G){N()||V(G,!1)}if(it(a.domReference)){const G=a.domReference,B=a.floating;return n&&G.addEventListener("mouseleave",$),p&&G.addEventListener("mousemove",M,{once:!0}),G.addEventListener("mouseenter",M),G.addEventListener("mouseleave",P),B&&(B.addEventListener("mouseleave",$),B.addEventListener("mouseenter",L),B.addEventListener("mouseleave",U)),()=>{n&&G.removeEventListener("mouseleave",$),p&&G.removeEventListener("mousemove",M),G.removeEventListener("mouseenter",M),G.removeEventListener("mouseleave",P),B&&(B.removeEventListener("mouseleave",$),B.removeEventListener("mouseenter",L),B.removeEventListener("mouseleave",U))}}},[a,s,e,u,p,V,z,A,r,n,v,f,h,g,o,N,y]),Ge(()=>{var M;if(s&&n&&(M=g.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&D()){C.current=!0;const $=a.floating;if(it(a.domReference)&&$){var P;const L=$t(a.floating).body;L.setAttribute(yx,"");const U=a.domReference,G=f==null||(P=f.nodesRef.current.find(B=>B.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return G&&(G.style.pointerEvents=""),L.style.pointerEvents="none",U.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{L.style.pointerEvents="",U.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,n,b,a,f,g,D]),Ge(()=>{n||(x.current=void 0,I.current=!1,z(),A())},[n,z,A]),_.useEffect(()=>()=>{z(),zt(T),zt(E),A()},[s,a.domReference,z,A]);const H=_.useMemo(()=>{function M(P){x.current=P.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(P){const{nativeEvent:$}=P;function L(){!k.current&&!v.current&&r(!0,$,"hover")}u&&!Ro(x.current)||n||Fd(y.current)===0||I.current&&P.movementX**2+P.movementY**2<2||(zt(E),x.current==="touch"?L():(I.current=!0,E.current=window.setTimeout(L,Fd(y.current))))}}},[u,r,n,v,y]);return _.useMemo(()=>s?{reference:H}:{},[s,H])}let xx=0;function Xr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(xx);const i=()=>e?.focus({preventScroll:n});o?i():xx=requestAnimationFrame(i)}function Vd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&us(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function HN(e){return"composedPath"in e?e.composedPath()[0]:e.target}function WN(e){return e?.ownerDocument||document}const qo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function wx(e){return e==="inert"?qo.inert:e==="aria-hidden"?qo["aria-hidden"]:qo.none}let _s=new WeakSet,Os={},$d=0;const qN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Sx=e=>e&&(e.host||Sx(e.parentNode)),UN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Sx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function YN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=UN(t,e),s=new Set,l=new Set(a),c=[];Os[o]||(Os[o]=new WeakMap);const u=Os[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(mr(b)!=="script")if(s.has(b))p(b);else{const g=i?b.getAttribute(i):null,h=g!==null&&g!=="false",v=wx(i),y=(v.get(b)||0)+1,x=(u.get(b)||0)+1;v.set(b,y),u.set(b,x),c.push(b),y===1&&h&&_s.add(b),x===1&&b.setAttribute(o,""),!h&&i&&b.setAttribute(i,i==="inert"?"":"true")}})}return $d++,()=>{c.forEach(f=>{const b=wx(i),h=(b.get(f)||0)-1,v=(u.get(f)||0)-1;b.set(f,h),u.set(f,v),h||(!_s.has(f)&&i&&f.removeAttribute(i),_s.delete(f)),v||f.removeAttribute(o)}),$d--,$d||(qo.inert=new WeakMap,qo["aria-hidden"]=new WeakMap,qo.none=new WeakMap,_s=new WeakSet,Os={})}}function Tx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=WN(e[0]).body;return YN(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Ms={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ds=_.forwardRef(function(t,n){const[r,o]=_.useState();Ge(()=>{Fb()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Zr("focus-guard")]:"",style:Ms};return m.jsx("span",{...t,...i})}),Ex=_.createContext(null),kx=Zr("portal");function KN(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ea(),o=Cx(),[i,a]=_.useState(null),s=_.useRef(null);return Ge(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ge(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(kx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ge(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!pd(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(kx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function xr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=KN({id:n,root:r}),[a,s]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=a?.modal,f=a?.open,b=!!a&&!a.modal&&a.open&&o&&!!(r||i);return _.useEffect(()=>{if(!i||!o||p)return;function g(h){i&&Zi(h)&&(h.type==="focusin"?Ub:GD)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,p]),_.useEffect(()=>{i&&(f||Ub(i))},[f,i]),m.jsxs(Ex.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[b&&i&&m.jsx(Ds,{"data-type":"outside",ref:l,onFocus:g=>{if(Zi(g,i)){var h;(h=u.current)==null||h.focus()}else{const v=a?a.domReference:null,y=qb(v);y?.focus()}}}),b&&i&&m.jsx("span",{"aria-owns":i.id,style:Ms}),i&&gi.createPortal(t,i),b&&i&&m.jsx(Ds,{"data-type":"outside",ref:c,onFocus:g=>{if(Zi(g,i)){var h;(h=d.current)==null||h.focus()}else{const v=a?a.domReference:null,y=Wb(v);y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Cx=()=>_.useContext(Ex);function Px(e){return _.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const GN=20;let wr=[];function jd(){wr=wr.filter(e=>e.isConnected)}function ZN(e){jd(),e&&mr(e)!=="body"&&(wr.push(e),wr.length>GN&&(wr=wr.slice(-20)))}function Ax(){return jd(),wr[wr.length-1]}function XN(e){const t=Gi();return Nb(e,t)?e:ws(e,t)[0]||e}function Ix(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Gi(),i=MD(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Nb(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const QN=_.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Ms})});function Qr(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:p=!1,getInsideElements:f=()=>[]}=e,{open:b,onOpenChange:g,events:h,dataRef:v,elements:{domReference:y,floating:x}}=t,T=gt(()=>{var j;return(j=v.current.floatingContext)==null?void 0:j.nodeId}),w=gt(f),E=typeof a=="number"&&a<0,k=Pd(y)&&E,C=qN(),O=C?i:!0,I=!O||C&&p,D=Lt(o),V=Lt(a),z=Lt(s),A=br(),N=Cx(),H=_.useRef(null),M=_.useRef(null),P=_.useRef(!1),$=_.useRef(!1),L=_.useRef(-1),U=_.useRef(-1),G=N!=null,B=Ss(x),Z=gt(function(j){return j===void 0&&(j=B),j?ws(j,Gi()):[]}),ee=gt(j=>{const se=Z(j);return D.current.map(le=>y&&le==="reference"?y:B&&le==="floating"?B:se).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function j(le){if(le.key==="Tab"){Nt(B,zn($t(B)))&&Z().length===0&&!k&&jt(le);const he=ee(),xe=Bn(le);D.current[0]==="reference"&&xe===y&&(jt(le),le.shiftKey?Xr(he[he.length-1]):Xr(he[1])),D.current[1]==="floating"&&xe===B&&le.shiftKey&&(jt(le),Xr(he[0]))}}const se=$t(B);return se.addEventListener("keydown",j),()=>{se.removeEventListener("keydown",j)}},[r,y,B,c,D,k,Z,ee]),_.useEffect(()=>{if(r||!x)return;function j(se){const le=Bn(se),xe=Z().indexOf(le);xe!==-1&&(L.current=xe)}return x.addEventListener("focusin",j),()=>{x.removeEventListener("focusin",j)}},[r,x,Z]),_.useEffect(()=>{if(r||!d)return;function j(){$.current=!0,setTimeout(()=>{$.current=!1})}function se(xe){const de=xe.relatedTarget,Pe=xe.currentTarget,Oe=Bn(xe);queueMicrotask(()=>{const Se=T(),Be=!(Nt(y,de)||Nt(x,de)||Nt(de,x)||Nt(N?.portalNode,de)||de!=null&&de.hasAttribute(Zr("focus-guard"))||A&&(Kr(A.nodesRef.current,Se).find(ue=>{var Y,F;return Nt((Y=ue.context)==null?void 0:Y.elements.floating,de)||Nt((F=ue.context)==null?void 0:F.elements.domReference,de)})||jb(A.nodesRef.current,Se).find(ue=>{var Y,F,Q;return[(Y=ue.context)==null?void 0:Y.elements.floating,Ss((F=ue.context)==null?void 0:F.elements.floating)].includes(de)||((Q=ue.context)==null?void 0:Q.elements.domReference)===de})));if(Pe===y&&B&&Ix(B,D),l&&Pe!==y&&!(Oe!=null&&Oe.isConnected)&&zn($t(B))===$t(B).body){kt(B)&&B.focus();const ue=L.current,Y=Z(),F=Y[ue]||Y[Y.length-1]||B;kt(F)&&F.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(k||!c)&&de&&Be&&!$.current&&de!==Ax()&&(P.current=!0,g(!1,xe,"focus-out"))})}const le=!!(!A&&N);function he(){zt(U),v.current.insideReactTree=!0,U.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&kt(y))return y.addEventListener("focusout",se),y.addEventListener("pointerdown",j),x.addEventListener("focusout",se),le&&x.addEventListener("focusout",he,!0),()=>{y.removeEventListener("focusout",se),y.removeEventListener("pointerdown",j),x.removeEventListener("focusout",se),le&&x.removeEventListener("focusout",he,!0)}},[r,y,x,B,c,A,N,g,d,l,Z,k,T,D,v]);const te=_.useRef(null),J=_.useRef(null),R=Px([te,N?.beforeInsideRef]),q=Px([J,N?.afterInsideRef]);_.useEffect(()=>{var j,se;if(r||!x)return;const le=Array.from((N==null||(j=N.portalNode)==null?void 0:j.querySelectorAll("["+Zr("portal")+"]"))||[]),xe=(se=(A?jb(A.nodesRef.current,T()):[]).find(Oe=>{var Se;return Pd(((Se=Oe.context)==null?void 0:Se.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,de=[x,xe,...le,...w(),H.current,M.current,te.current,J.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,D.current.includes("reference")||k?y:null].filter(Oe=>Oe!=null),Pe=c||k?Tx(de,!I,I):Tx(de);return()=>{Pe()}},[r,y,x,c,D,N,k,O,I,A,T,w]),Ge(()=>{if(r||!kt(B))return;const j=$t(B),se=zn(j);queueMicrotask(()=>{const le=ee(B),he=V.current,xe=(typeof he=="number"?le[he]:he.current)||B,de=Nt(B,se);!E&&!de&&b&&Xr(xe,{preventScroll:xe===B})})},[r,b,B,E,ee,V]),Ge(()=>{if(r||!B)return;const j=$t(B),se=zn(j);ZN(se);function le(de){let{reason:Pe,event:Oe,nested:Se}=de;if(["hover","safe-polygon"].includes(Pe)&&Oe.type==="mouseleave"&&(P.current=!0),Pe==="outside-press")if(Se)P.current=!1;else if(zb(Oe)||Bb(Oe))P.current=!1;else{let Be=!1;document.createElement("div").focus({get preventScroll(){return Be=!0,!1}}),Be?P.current=!1:P.current=!0}}h.on("openchange",le);const he=j.createElement("span");he.setAttribute("tabindex","-1"),he.setAttribute("aria-hidden","true"),Object.assign(he.style,Ms),G&&y&&y.insertAdjacentElement("afterend",he);function xe(){if(typeof z.current=="boolean"){const de=y||Ax();return de&&de.isConnected?de:he}return z.current.current||he}return()=>{h.off("openchange",le);const de=zn(j),Pe=Nt(x,de)||A&&Kr(A.nodesRef.current,T(),!1).some(Se=>{var Be;return Nt((Be=Se.context)==null?void 0:Be.elements.floating,de)}),Oe=xe();queueMicrotask(()=>{const Se=XN(Oe);z.current&&!P.current&&kt(Se)&&(!(Se!==de&&de!==j.body)||Pe)&&Se.focus({preventScroll:!0}),he.remove()})}},[r,x,B,z,v,h,A,G,y,T]),_.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(jd)}),[r]),Ge(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:b,onOpenChange:g,domReference:y}),()=>{N.setFocusManagerState(null)}},[r,N,c,b,g,d,y]),Ge(()=>{r||B&&Ix(B,D)},[r,B,D]);function X(j){return r||!u||!c?null:m.jsx(QN,{ref:j==="start"?H:M,onClick:se=>g(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const oe=!r&&O&&(c?!k:!0)&&(G||c);return m.jsxs(m.Fragment,{children:[oe&&m.jsx(Ds,{"data-type":"inside",ref:R,onFocus:j=>{if(c){const le=ee();Xr(o[0]==="reference"?le[0]:le[le.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(P.current=!1,Zi(j,N.portalNode)){const le=Wb(y);le?.focus()}else{var se;(se=N.beforeOutsideRef.current)==null||se.focus()}}}),!k&&X("start"),n,X("end"),oe&&m.jsx(Ds,{"data-type":"inside",ref:q,onFocus:j=>{if(c)Xr(ee()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(P.current=!0),Zi(j,N.portalNode)){const le=qb(y);le?.focus()}else{var se;(se=N.afterOutsideRef.current)==null||se.focus()}}})]})}let Ns=0;const _x="--floating-ui-scrollbar-width";function JN(){const e=wd(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(_x,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(_x),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Ox=()=>{};const zd=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ge(()=>{if(r)return Ns++,Ns===1&&(Ox=JN()),()=>{Ns--,Ns===0&&Ox()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Mx(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function e2(e){return kt(e.target)&&e.target.tagName==="A"}function Dx(e){return Cd(e)}function Uo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,p=_.useRef(),f=_.useRef(!1),b=_.useMemo(()=>({onPointerDown(g){p.current=g.pointerType},onMouseDown(g){const h=p.current;g.button===0&&s!=="click"&&(Ro(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){const h=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}Ro(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){p.current=void 0,!(g.defaultPrevented||!u||Mx(g))&&(g.key===" "&&!Dx(i)&&(g.preventDefault(),f.current=!0),!e2(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||Mx(g)||Dx(i)||g.key===" "&&f.current&&(f.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return _.useMemo(()=>a?{reference:b}:{},[a,b])}function t2(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function Nx(e){return e!=null&&e.clientX!=null}function n2(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=_.useRef(!1),p=_.useRef(null),[f,b]=_.useState(),[g,h]=_.useState([]),v=gt((E,k)=>{d.current||r.current.openEvent&&!Nx(r.current.openEvent)||a.setPositionReference(t2(i,{x:E,y:k,axis:l,dataRef:r,pointerType:f}))}),y=gt(E=>{c!=null||u!=null||(n?p.current||h([]):v(E.clientX,E.clientY))}),x=Ro(f)?o:n,T=_.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const E=Ut(o);function k(C){const O=Bn(C);Nt(o,O)?(E.removeEventListener("mousemove",k),p.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||Nx(r.current.openEvent)){E.addEventListener("mousemove",k);const C=()=>{E.removeEventListener("mousemove",k),p.current=null};return p.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);_.useEffect(()=>T(),[T,g]),_.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),_.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ge(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=_.useMemo(()=>{function E(k){let{pointerType:C}=k;b(C)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return _.useMemo(()=>s?{reference:w}:{},[s,w])}const r2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},o2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Lx=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Sr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:b}=t,g=br(),h=gt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=_.useRef(!1),{escapeKey:x,outsidePress:T}=Lx(f),{escapeKey:w,outsidePress:E}=Lx(b),k=_.useRef(!1),C=gt(A=>{var N;if(!n||!a||!s||A.key!=="Escape"||k.current)return;const H=(N=i.current.floatingContext)==null?void 0:N.nodeId,M=g?Kr(g.nodesRef.current,H):[];if(!x&&(A.stopPropagation(),M.length>0)){let P=!0;if(M.forEach($=>{var L;if((L=$.context)!=null&&L.open&&!$.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,zD(A)?A.nativeEvent:A,"escape-key")}),O=gt(A=>{var N;const H=()=>{var M;C(A),(M=Bn(A))==null||M.removeEventListener("keydown",H)};(N=Bn(A))==null||N.addEventListener("keydown",H)}),I=gt(A=>{var N;const H=i.current.insideReactTree;i.current.insideReactTree=!1;const M=y.current;if(y.current=!1,c==="click"&&M||H||typeof v=="function"&&!v(A))return;const P=Bn(A),$="["+Zr("inert")+"]",L=$t(o.floating).querySelectorAll($);let U=it(P)?P:null;for(;U&&!er(U);){const ee=tr(U);if(er(ee)||!it(ee))break;U=ee}if(L.length&&it(P)&&!VD(P)&&!Nt(P,o.floating)&&Array.from(L).every(ee=>!Nt(U,ee)))return;if(kt(P)&&z){const ee=er(P),te=nn(P),J=/auto|scroll/,R=ee||J.test(te.overflowX),q=ee||J.test(te.overflowY),X=R&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,oe=q&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,j=te.direction==="rtl",se=oe&&(j?A.offsetX<=P.offsetWidth-P.clientWidth:A.offsetX>P.clientWidth),le=X&&A.offsetY>P.clientHeight;if(se||le)return}const G=(N=i.current.floatingContext)==null?void 0:N.nodeId,B=g&&Kr(g.nodesRef.current,G).some(ee=>{var te;return kd(A,(te=ee.context)==null?void 0:te.elements.floating)});if(kd(A,o.floating)||kd(A,o.domReference)||B)return;const Z=g?Kr(g.nodesRef.current,G):[];if(Z.length>0){let ee=!0;if(Z.forEach(te=>{var J;if((J=te.context)!=null&&J.open&&!te.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,A,"outside-press")}),D=gt(A=>{var N;const H=()=>{var M;I(A),(M=Bn(A))==null||M.removeEventListener(c,H)};(N=Bn(A))==null||N.addEventListener(c,H)});_.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let A=-1;function N(L){r(!1,L,"ancestor-scroll")}function H(){window.clearTimeout(A),k.current=!0}function M(){A=window.setTimeout(()=>{k.current=!1},fs()?5:0)}const P=$t(o.floating);s&&(P.addEventListener("keydown",w?O:C,w),P.addEventListener("compositionstart",H),P.addEventListener("compositionend",M)),v&&P.addEventListener(c,E?D:I,E);let $=[];return p&&(it(o.domReference)&&($=gr(o.domReference)),it(o.floating)&&($=$.concat(gr(o.floating))),!it(o.reference)&&o.reference&&o.reference.contextElement&&($=$.concat(gr(o.reference.contextElement)))),$=$.filter(L=>{var U;return L!==((U=P.defaultView)==null?void 0:U.visualViewport)}),$.forEach(L=>{L.addEventListener("scroll",N,{passive:!0})}),()=>{s&&(P.removeEventListener("keydown",w?O:C,w),P.removeEventListener("compositionstart",H),P.removeEventListener("compositionend",M)),v&&P.removeEventListener(c,E?D:I,E),$.forEach(L=>{L.removeEventListener("scroll",N)}),window.clearTimeout(A)}},[i,o,s,v,c,n,r,p,a,x,T,C,w,O,I,E,D]),_.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const V=_.useMemo(()=>({onKeyDown:C,...u&&{[r2[d]]:A=>{r(!1,A.nativeEvent,"reference-press")},...d!=="click"&&{onClick(A){r(!1,A.nativeEvent,"reference-press")}}}}),[C,r,u,d]),z=_.useMemo(()=>({onKeyDown:C,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[o2[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return _.useMemo(()=>a?{reference:V,floating:z}:{},[a,V,z])}function i2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ea(),i=_.useRef({}),[a]=_.useState(()=>mx()),s=yr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!it(f)&&jN("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=_.useState(r.reference),u=gt((f,b,g)=>{i.current.openEvent=f?b:void 0,a.emit("openchange",{open:f,event:b,reason:g,nested:s}),n?.(f,b,g)}),d=_.useMemo(()=>({setPositionReference:c}),[]),p=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function rr(e){e===void 0&&(e={});const{nodeId:t}=e,n=i2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=_.useState(null),[s,l]=_.useState(null),u=o?.domReference||i,d=_.useRef(null),p=br();Ge(()=>{u&&(d.current=u)},[u]);const f=_N({...e,elements:{...o,...s&&{reference:s}}}),b=_.useCallback(x=>{const T=it(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=_.useCallback(x=>{(it(x)||x===null)&&(d.current=x,a(x)),(it(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!it(x))&&f.refs.setReference(x)},[f.refs]),h=_.useMemo(()=>({...f.refs,setReference:g,setPositionReference:b,domReference:d}),[f.refs,g,b]),v=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=_.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Ge(()=>{r.dataRef.current.floatingContext=y;const x=p?.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),_.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function Bd(){return DD()&&Fb()}function a2(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=_.useRef(!1),u=_.useRef(-1),d=_.useRef(!0);_.useEffect(()=>{if(!s)return;const f=Ut(a.domReference);function b(){!n&&kt(a.domReference)&&a.domReference===zn($t(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function h(){d.current=!1}return f.addEventListener("blur",b),Bd()&&(f.addEventListener("keydown",g,!0),f.addEventListener("pointerdown",h,!0)),()=>{f.removeEventListener("blur",b),Bd()&&(f.removeEventListener("keydown",g,!0),f.removeEventListener("pointerdown",h,!0))}},[a.domReference,n,s]),_.useEffect(()=>{if(!s)return;function f(b){let{reason:g}=b;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),_.useEffect(()=>()=>{zt(u)},[]);const p=_.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const b=Bn(f.nativeEvent);if(l&&it(b)){if(Bd()&&!f.relatedTarget){if(!d.current&&!Cd(b))return}else if(!$D(b))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const b=f.relatedTarget,g=f.nativeEvent,h=it(b)&&b.hasAttribute(Zr("focus-guard"))&&b.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=zn(a.domReference?a.domReference.ownerDocument:document);!b&&y===a.domReference||Nt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||Nt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return _.useMemo(()=>s?{reference:p}:{},[s,p])}function Rd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[cx]:a,[ux]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[LN]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[cx,ux].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,b=new Array(f),g=0;g<f;g++)b[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...b)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function or(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=_.useCallback(s=>Rd(s,e,"reference"),t),i=_.useCallback(s=>Rd(s,e,"floating"),n),a=_.useCallback(s=>Rd(s,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const s2="Escape";function Ls(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Fs(e,t){return Ls(t,e===dx||e===As,e===Qi||e===Ji)}function Hd(e,t,n){return Ls(t,e===As,n?e===Qi:e===Ji)||e==="Enter"||e===" "||e===""}function Fx(e,t,n){return Ls(t,n?e===Qi:e===Ji,e===As)}function Vx(e,t,n,r){const o=n?e===Ji:e===Qi,i=e===dx;return t==="both"||t==="horizontal"&&r&&r>1?e===s2:Ls(t,o,i)}function Vs(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:p=!1,nested:f=!1,rtl:b=!1,virtual:g=!1,focusItemOnOpen:h="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:k=!0,virtualItemRef:C,itemSizes:O,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(p||Is("`useListNavigation` looping must be enabled to allow escaping."),g||Is("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&E>1&&Is("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=Ss(o.floating),V=Lt(D),z=yr(),A=br();Ge(()=>{e.dataRef.current.orientation=T},[e,T]);const N=gt(()=>{l(P.current===-1?null:P.current)}),H=Pd(o.domReference),M=_.useRef(h),P=_.useRef(u??-1),$=_.useRef(null),L=_.useRef(!0),U=_.useRef(N),G=_.useRef(!!o.floating),B=_.useRef(n),Z=_.useRef(!1),ee=_.useRef(!1),te=Lt(x),J=Lt(n),R=Lt(k),q=Lt(u),[X,oe]=_.useState(),[j,se]=_.useState(),le=gt(()=>{function ue(ce){if(g){var we;(we=ce.id)!=null&&we.endsWith("-fui-option")&&(ce.id=i+"-"+Math.random().toString(16).slice(2,10)),oe(ce.id),A?.events.emit("virtualfocus",ce),C&&(C.current=ce)}else Xr(ce,{sync:Z.current,preventScroll:!0})}const Y=a.current[P.current],F=ee.current;Y&&ue(Y),(Z.current?ce=>ce():requestAnimationFrame)(()=>{const ce=a.current[P.current]||Y;if(!ce)return;Y||ue(ce);const we=R.current;we&&xe&&(F||!L.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Ge(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ee.current=!0,P.current=u,N()):G.current&&(P.current=-1,U.current()))},[c,n,o.floating,u,N]),Ge(()=>{if(c&&n&&o.floating)if(s==null){if(Z.current=!1,q.current!=null)return;if(G.current&&(P.current=-1,le()),(!B.current||!G.current)&&M.current&&($.current!=null||M.current===!0&&$.current==null)){let ue=0;const Y=()=>{a.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Y),ue++):(P.current=$.current==null||Hd($.current,T,b)||f?Ad(a,te.current):Rb(a,te.current),$.current=null,N())};Y()}}else Ki(a,s)||(P.current=s,le(),ee.current=!1)},[c,n,o.floating,s,q,f,a,T,b,N,le,te]),Ge(()=>{var ue;if(!c||o.floating||!A||g||!G.current)return;const Y=A.nodesRef.current,F=(ue=Y.find(we=>we.id===z))==null||(ue=ue.context)==null?void 0:ue.elements.floating,Q=zn($t(o.floating)),ce=Y.some(we=>we.context&&Nt(we.context.elements.floating,Q));F&&!ce&&L.current&&F.focus({preventScroll:!0})},[c,o.floating,A,z,g]),Ge(()=>{if(!c||!A||!g||z)return;function ue(Y){se(Y.id),C&&(C.current=Y)}return A.events.on("virtualfocus",ue),()=>{A.events.off("virtualfocus",ue)}},[c,A,g,z,C]),Ge(()=>{U.current=N,B.current=n,G.current=!!o.floating}),Ge(()=>{n||($.current=null,M.current=h)},[n,h]);const he=s!=null,xe=_.useMemo(()=>{function ue(F){if(!J.current)return;const Q=a.current.indexOf(F);Q!==-1&&P.current!==Q&&(P.current=Q,N())}return{onFocus(F){let{currentTarget:Q}=F;Z.current=!0,ue(Q)},onClick:F=>{let{currentTarget:Q}=F;return Q.focus({preventScroll:!0})},onMouseMove(F){let{currentTarget:Q}=F;Z.current=!0,ee.current=!1,v&&ue(Q)},onPointerLeave(F){let{pointerType:Q}=F;if(!(!L.current||Q==="touch")&&(Z.current=!0,!!v&&(P.current=-1,N(),!g))){var ce;(ce=V.current)==null||ce.focus({preventScroll:!0})}}}},[J,V,v,a,N,g]),de=_.useCallback(()=>{var ue;return w??(A==null||(ue=A.nodesRef.current.find(Y=>Y.id===z))==null||(ue=ue.context)==null||(ue=ue.dataRef)==null?void 0:ue.current.orientation)},[z,A,w]),Pe=gt(ue=>{if(L.current=!1,Z.current=!0,ue.which===229||!J.current&&ue.currentTarget===V.current)return;if(f&&Vx(ue.key,T,b,E)){Fs(ue.key,de())||jt(ue),r(!1,ue.nativeEvent,"list-navigation"),kt(o.domReference)&&(g?A?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const Y=P.current,F=Ad(a,x),Q=Rb(a,x);if(H||(ue.key==="Home"&&(jt(ue),P.current=F,N()),ue.key==="End"&&(jt(ue),P.current=Q,N())),E>1){const ce=O||Array.from({length:a.current.length},()=>({width:1,height:1})),we=UD(ce,E,I),Le=we.findIndex(xt=>xt!=null&&!Es(a,xt,x)),Ze=we.reduce((xt,Kt,Kn)=>Kt!=null&&!Es(a,Kt,x)?Kn:xt,-1),Ft=we[qD({current:we.map(xt=>xt!=null?a.current[xt]:null)},{event:ue,orientation:T,loop:p,rtl:b,cols:E,disabledIndices:KD([...(typeof x!="function"?x:null)||a.current.map((xt,Kt)=>Es(a,Kt,x)?Kt:void 0),void 0],we),minIndex:Le,maxIndex:Ze,prevIndex:YD(P.current>Q?F:P.current,ce,we,E,ue.key===As?"bl":ue.key===(b?Qi:Ji)?"tr":"tl"),stopEvent:!0})];if(Ft!=null&&(P.current=Ft,N()),T==="both")return}if(Fs(ue.key,T)){if(jt(ue),n&&!g&&zn(ue.currentTarget.ownerDocument)===ue.currentTarget){P.current=Hd(ue.key,T,b)?F:Q,N();return}Hd(ue.key,T,b)?p?P.current=Y>=Q?d&&Y!==a.current.length?-1:F:Ht(a,{startingIndex:Y,disabledIndices:x}):P.current=Math.min(Q,Ht(a,{startingIndex:Y,disabledIndices:x})):p?P.current=Y<=F?d&&Y!==-1?a.current.length:Q:Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x}):P.current=Math.max(F,Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x})),Ki(a,P.current)&&(P.current=-1),N()}}),Oe=_.useMemo(()=>g&&n&&he&&{"aria-activedescendant":j||X},[g,n,he,j,X]),Se=_.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...H?{}:Oe,onKeyDown:Pe,onPointerMove(){L.current=!0}}),[Oe,Pe,T,H]),Be=_.useMemo(()=>{function ue(F){h==="auto"&&zb(F.nativeEvent)&&(M.current=!0)}function Y(F){M.current=h,h==="auto"&&Bb(F.nativeEvent)&&(M.current=!0)}return{...Oe,onKeyDown(F){L.current=!1;const Q=F.key.startsWith("Arrow"),ce=["Home","End"].includes(F.key),we=Q||ce,Le=Fx(F.key,T,b),Ze=Vx(F.key,T,b,E),Ft=Fx(F.key,de(),b),xt=Fs(F.key,T),Kt=(f?Ft:xt)||F.key==="Enter"||F.key.trim()==="";if(g&&n){const W=A?.nodesRef.current.find(Fe=>Fe.parentId==null),K=A&&W?jD(A.nodesRef.current,W.id):null;if(we&&K&&C){const Fe=new KeyboardEvent("keydown",{key:F.key,bubbles:!0});if(Le||Ze){var Kn,An;const tt=((Kn=K.context)==null?void 0:Kn.elements.domReference)===F.currentTarget,ot=Ze&&!tt?(An=K.context)==null?void 0:An.elements.domReference:Le?a.current.find(Me=>Me?.id===X):null;ot&&(jt(F),ot.dispatchEvent(Fe),se(void 0))}if((xt||ce)&&K.context&&K.context.open&&K.parentId&&F.currentTarget!==K.context.elements.domReference){var In;jt(F),(In=K.context.elements.domReference)==null||In.dispatchEvent(Fe);return}}return Pe(F)}if(!(!n&&!y&&Q)){if(Kt){const W=Fs(F.key,de());$.current=f&&W?null:F.key}if(f){Ft&&(jt(F),n?(P.current=Ad(a,te.current),N()):r(!0,F.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(P.current=u),jt(F),!n&&y?r(!0,F.nativeEvent,"list-navigation"):Pe(F),n&&N())}},onFocus(){n&&!g&&(P.current=-1,N())},onPointerDown:Y,onPointerEnter:Y,onMouseDown:ue,onClick:ue}},[X,Oe,E,Pe,te,h,a,f,N,r,n,y,T,de,b,u,A,g,C]);return _.useMemo(()=>c?{reference:Be,floating:Se,item:xe}:{},[c,Be,Se,xe])}const l2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Tr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=ea(),u=((n=i.domReference)==null?void 0:n.id)||c,d=_.useMemo(()=>{var y;return((y=Ss(i.floating))==null?void 0:y.id)||a},[i.floating,a]),p=(r=l2.get(l))!=null?r:l,b=yr()!=null,g=_.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:u},...p==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,o,u,l]),h=_.useMemo(()=>{const y={id:d,...p&&{role:p}};return p==="tooltip"||l==="label"?y:{...y,...p==="menu"&&{"aria-labelledby":u}}},[p,d,u,l]),v=_.useCallback(y=>{let{active:x,selected:T}=y;const w={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...w,"aria-selected":T}}return{}},[d,l]);return _.useMemo(()=>s?{reference:g,floating:h,item:v}:{},[s,g,h,v])}const $x=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Yo(e,t){return typeof e=="function"?e(t):e}function c2(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function u2(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=_.useState("unmounted"),c=c2(n,a);return!c&&s==="close"&&l("unmounted"),Ge(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{gi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function jx(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=_.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,b]=_.useState(()=>({...Yo(i,c),...Yo(n,c)})),{isMounted:g,status:h}=u2(e,{duration:a}),v=Lt(n),y=Lt(r),x=Lt(o),T=Lt(i);return Ge(()=>{const w=Yo(v.current,c),E=Yo(x.current,c),k=Yo(T.current,c),C=Yo(y.current,c)||Object.keys(w).reduce((O,I)=>(O[I]="",O),{});if(h==="initial"&&b(O=>({transitionProperty:O.transitionProperty,...k,...w})),h==="open"&&b({transitionProperty:Object.keys(C).map($x).join(","),transitionDuration:d+"ms",...k,...C}),h==="close"){const O=E||w;b({transitionProperty:Object.keys(O).map($x).join(","),transitionDuration:p+"ms",...k,...O})}},[p,x,v,y,T,d,h,c]),{isMounted:g,styles:f}}function d2(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,b=_.useRef(-1),g=_.useRef(""),h=_.useRef((n=f??a)!=null?n:-1),v=_.useRef(null),y=gt(s),x=gt(l),T=Lt(u),w=Lt(p);Ge(()=>{r&&(zt(b),v.current=null,g.current="")},[r]),Ge(()=>{if(r&&g.current===""){var I;h.current=(I=f??a)!=null?I:-1}},[r,f,a]);const E=gt(I=>{I?o.current.typing||(o.current.typing=I,x(I)):o.current.typing&&(o.current.typing=I,x(I))}),k=gt(I=>{function D(H,M,P){const $=T.current?T.current(M,P):M.find(L=>L?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return $?H.indexOf($):-1}const V=i.current;if(g.current.length>0&&g.current[0]!==" "&&(D(V,V,g.current)===-1?E(!1):I.key===" "&&jt(I)),V==null||w.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(jt(I),E(!0)),V.every(H=>{var M,P;return H?((M=H[0])==null?void 0:M.toLocaleLowerCase())!==((P=H[1])==null?void 0:P.toLocaleLowerCase()):!0})&&g.current===I.key&&(g.current="",h.current=v.current),g.current+=I.key,zt(b),b.current=window.setTimeout(()=>{g.current="",h.current=v.current,E(!1)},d);const A=h.current,N=D(V,[...V.slice((A||0)+1),...V.slice(0,(A||0)+1)],g.current);N!==-1?(y(N),v.current=N):I.key!==" "&&(g.current="",E(!1))}),C=_.useMemo(()=>({onKeyDown:k}),[k]),O=_.useMemo(()=>({onKeyDown:k,onKeyUp(I){I.key===" "&&E(!1)}}),[k,E]);return _.useMemo(()=>c?{reference:C,floating:O}:{},[c,C,O])}function zx(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...zx(e,o.id,n)])}function Bx(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function f2(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Rx(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,p){const f=performance.now(),b=f-l;if(a===null||s===null||b===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/b;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:b,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){zt(o),h()}if(zt(o),!g.domReference||!g.floating||b==null||p==null||f==null)return;const{clientX:E,clientY:k}=T,C=[E,k],O=HN(T),I=T.type==="mouseleave",D=Vd(g.floating,O),V=Vd(g.domReference,O),z=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),N=b.split("-")[0],H=p>A.right-A.width/2,M=f>A.bottom-A.height/2,P=f2(C,z),$=A.width>z.width,L=A.height>z.height,U=($?z:A).left,G=($?z:A).right,B=(L?z:A).top,Z=(L?z:A).bottom;if(D&&(i=!0,!I))return;if(V&&(i=!1),V&&!I){i=!0;return}if(I&&it(T.relatedTarget)&&Vd(g.floating,T.relatedTarget)||y&&zx(y.nodesRef.current,v).length)return;if(N==="top"&&f>=z.bottom-1||N==="bottom"&&f<=z.top+1||N==="left"&&p>=z.right-1||N==="right"&&p<=z.left+1)return w();let ee=[];switch(N){case"top":ee=[[U,z.top+1],[U,A.bottom-1],[G,A.bottom-1],[G,z.top+1]];break;case"bottom":ee=[[U,A.top+1],[U,z.bottom-1],[G,z.bottom-1],[G,A.top+1]];break;case"left":ee=[[A.right-1,Z],[A.right-1,B],[z.left+1,B],[z.left+1,Z]];break;case"right":ee=[[z.right-1,Z],[z.right-1,B],[A.left+1,B],[A.left+1,Z]];break}function te(J){let[R,q]=J;switch(N){case"top":{const X=[$?R+t/2:H?R+t*4:R-t*4,q+t+1],oe=[$?R-t/2:H?R+t*4:R-t*4,q+t+1],j=[[A.left,H||$?A.bottom-t:A.top],[A.right,H?$?A.bottom-t:A.top:A.bottom-t]];return[X,oe,...j]}case"bottom":{const X=[$?R+t/2:H?R+t*4:R-t*4,q-t],oe=[$?R-t/2:H?R+t*4:R-t*4,q-t],j=[[A.left,H||$?A.top+t:A.bottom],[A.right,H?$?A.top+t:A.bottom:A.top+t]];return[X,oe,...j]}case"left":{const X=[R+t+1,L?q+t/2:M?q+t*4:q-t*4],oe=[R+t+1,L?q-t/2:M?q+t*4:q-t*4];return[...[[M||L?A.right-t:A.left,A.top],[M?L?A.right-t:A.left:A.right-t,A.bottom]],X,oe]}case"right":{const X=[R-t,L?q+t/2:M?q+t*4:q-t*4],oe=[R-t,L?q-t/2:M?q+t*4:q-t*4],j=[[M||L?A.left+t:A.right,A.top],[M?L?A.left+t:A.right:A.left+t,A.bottom]];return[X,oe,...j]}}}if(!Bx([E,k],ee)){if(i&&!P)return w();if(!I&&r){const J=c(T.clientX,T.clientY);if(J!==null&&J<.1)return w()}Bx([E,k],te([p,f]))?!i&&r&&(o.current=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const Hx=200,p2=500,Wd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=dd,followCursor:d=!1,...p},f){const[b,g]=S.useState(n??!1),h=S.useRef(null),v=t||"span",y=A=>{g(A),u?.(A)},{refs:x,floatingStyles:T,context:w}=rr({placement:i,open:b,whileElementsMounted:Wo,onOpenChange:n?void 0:y,middleware:[Dd(),Xi(5),MN(),ax({padding:5,element:h}),Nd({fallbackAxisSideDirection:"start"})]}),E=Sr(w,{enabled:l}),k=Tr(w,{role:"tooltip",enabled:l}),C=a2(w,{enabled:l?a:!1}),O=Uo(w,{enabled:l?c:!1}),I=n2(w,{enabled:!!l&&!!d}),D=bx(w,{move:!0,delay:{open:Hx},enabled:l?s:!1,handleClose:c?Rx():null}),{getReferenceProps:V,getFloatingProps:z}=or([k,E,I,a?C:void 0,s?D:void 0,c?O:void 0]);return S.useEffect(()=>g(n===void 0?!1:n),[n]),m.jsxs(S.Fragment,{children:[m.jsx(v,{...V(p),ref:Zn(x.setReference,f),children:r}),b&&m.jsx(xr,{children:m.jsxs(en,{...z(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(hx,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),Wx=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:Te("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?m.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?m.jsx(Wd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:m.jsx("span",{className:"cursor-help",children:m.jsx(Ru,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:m.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?m.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[m.jsx(vy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(YI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),na=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:b,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const E=fd(),k=T!==void 0?T:E.input.iconFeedback,C=d??f,O=Et(),I=e??O.inputOptionalLabel;return m.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Te("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[m.jsx(Wx,{info:s,hideLeft:v,reportStatus:k,title:b,placeholder:h,children:I||n?m.jsxs(S.Fragment,{children:[y?null:m.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:I}),n?m.jsx(S.Fragment,{children:n}):null]}):null}),m.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),m.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),m.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),qx=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:b="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,E=x.id??x.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const C=k.current,O=yi(k.current),I=r?.(C),D=V=>{const z=V;if(z.key==="Enter"&&C.enterKeyHint==="next"){const A=C.getAttribute("data-next");if(A){const N=document.getElementById(A);if(N)return N.focus(),void z.preventDefault()}}};return C.addEventListener("keydown",D),()=>{I?.(),O(),C.removeEventListener("keydown",D)}},[]),m.jsx(na,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Te(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:m.jsx(w,{...n,...x,id:E,name:E,type:b,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Zn(T,k),className:Te("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),Ko=qx(tb,"input",{type:"text"}),h2=/^(?<hour>\d\d):(?<min>\d\d)$/,m2={type:"spring",bounce:.3,duration:.6},Ux=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Yx={enter:Ux(1),exit:Ux(-1),middle:{x:"0%",opacity:1}},Kx={exit:{visibility:"hidden"}},g2=e=>{const t=Nn(Iy(e));return Ay({start:t,end:Mo(t,{days:41})})},Gx=(e,t)=>e.toLocaleDateString(t,{month:"long"}),v2=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Iy(new Date(1970,o,1).setMonth(o)),a=Gx(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),qd={ArrowLeft:(e,t)=>t==="days"?Ri(e,{days:1}):Ri(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Mo(e,{days:1}):Mo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ri(e,{weeks:1}):Ri(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Mo(e,{weeks:1}):Mo(e,{years:1})},Zx=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},Jr=e=>e.getFullYear().toString().padStart(4,"0"),y2=(e,t,n)=>e===void 0||n===void 0?!1:pO(t,e)&&hO(t,n),b2=e=>{const t=Et();return m.jsx(We.tbody,{layout:!0,variants:Yx,custom:e.direction,onKeyDown:e.onKeyDown,className:Te(e.styles?.week),children:e.zip.map((n,r)=>{const o=je.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return m.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?qr(e.date).toISOString():void 0),l=fM(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=dM(i,e.stateDate),d=!u||c,p=e.rangeMode?y2(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:Te("relative",je.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[m.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Te(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,p&&e.markRange?"size-10 border border-dashed border-card-border":"",je.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?m.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:m.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?m.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:m.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?m.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},x2=()=>qr(new Date),Xx=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:p="date",datetimeTitle:f,...b})=>{const g=S.useRef(jo()),h=Et(),v=ld(o),y=S.useRef(null),{date:x,range:T}=b,w=x||new Date,E=S.useRef(null),[k,C]=ad({date:w,isAnimating:!1,year:Jr(w),direction:void 0,range:{from:T?.from,to:T?.to},months:v2(g.current,w,v),selectMode:l?"from":void 0,week:Ay({start:Nn(w),end:x_(w)})},M=>({onChangeYear:P=>({year:P}),onExitComplete:()=>(Zx(E.current||null,y,M.state().date,200),E.current=null,{isAnimating:!1}),date:P=>{const $=P(M.state().date);return{date:$,year:Jr($)}},nextMonth:P=>{P&&(E.current=P.currentTarget);const $=M.state();if($.isAnimating)return $;const L=Mo($.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Jr(L)}},previousMonth:P=>{P&&(E.current=P.currentTarget);const $=M.state();if($.isAnimating)return $;const L=Ri($.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Jr(L)}},onSelectDate:P=>{const $=M.state(),L=P.currentTarget.dataset.range==="true",U=P.currentTarget.dataset.date||"",G=new Date(U);return{date:G,year:Jr(G),selectMode:$.selectMode===void 0?void 0:$.selectMode==="from"?"to":"from",range:L?{from:$.selectMode==="from"?G:$.range.from,to:$.selectMode==="to"?G:$.range.to}:$.range}},onChangeMonth:P=>{const $=P.target.value,U=Array.from(P.target.options).find(B=>B.value===$),G=M.state();if(U){const B=U.dataset.index||"",Z=new Date(M.state().date);return Z.setMonth(+B),{...G,date:Z,year:Jr(Z)}}return G},onKeyDown:P=>{const $=P.key,L=M.state();if($ in qd){($==="ArrowUp"||$==="ArrowDown")&&P.preventDefault();const U=M.state().date,G=je.keyof(qd,$)?qd[$](U,P.shiftKey?"month":"days"):null;if(G!==null)return Zx(P.target,y,G),{...L,date:G,year:Jr(G)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,P,$)=>(($.method==="onChangeMonth"||$.method==="previousMonth"||$.method==="nextMonth")&&$.props.onChangeMonth?.(M.date),M),(M,P,$)=>($.method==="onChangeYear"&&$.props.onChangeYear?.(M.date),M),(M,P,$)=>{const L=$.method==="onSelectDate"||$.method==="setToday"||$.method==="onKeyDown";return l&&L&&t?(c?.(M.range),M):(L&&t&&c?.(M.date),M)}]}),O=g2(k.date),I=vb(O,7),D=k.date.toISOString(),V=Gx(k.date,v);S.useEffect(()=>{t||c?.(k.date)},[D,t]);const z=qM(M=>C.date(P=>gM(new Date(P),+M)),1200),A=M=>{const P=M.currentTarget.value;C.onChangeYear(P),s?.(new Date(P)),z(P)},N=hb((M,P)=>(M.preventDefault(),P==="right"?C.previousMonth():C.nextMonth()),10),H=()=>{const M=x2();C.date(()=>M),c?.(M)};return m.jsx(pu,{transition:m2,children:m.jsxs("div",{ref:y,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:Te("relative overflow-hidden",je.function(u?.calendar)?u?.calendar(O):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(wn,{initial:!1,mode:"popLayout",custom:k.direction,onExitComplete:C.onExitComplete,children:m.jsxs(We.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(We.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Kx,onClick:C.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(UI,{className:"h-4 w-4"})}),m.jsx(We.span,{layout:!0,variants:Yx,custom:k.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:m.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[m.jsx("select",{value:V,onChange:C.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${V.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:k.months}),m.jsx(tb,{mask:"int",maxLength:4,placeholder:"YYYY",value:k.year,onChange:A,style:{width:`${k.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(We.button,{layout:!0,type:"button","data-focustrap":"next",variants:Kx,onClick:C.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(Bu,{className:"h-4 w-4"})}),m.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),m.jsxs(We.table,{className:"mt-2 table min-w-full table-auto border-0",children:[m.jsx("thead",{children:m.jsx("tr",{children:k.week.map(M=>m.jsx("th",{role:"columnheader",className:Te("py-2 text-sm font-medium capitalize",je.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),m.jsx(b2,{zip:I,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:k.date,labelRange:n,stateRange:k.range,RenderOnDay:e,direction:k.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},V)})}),p==="datetime"?m.jsx("section",{className:"grid items-center my-4",children:m.jsx(Ko,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Gu(x,"HH:mm"):void 0,title:f||h.calendarDatetimeTitle,onChange:M=>{const P=M.target.value,$=h2.exec(P);if(!$)return;const L=$.groups.hour,U=$.groups.min,G=mM(k.date,{hours:Number(L),minutes:Number(U),seconds:0});C.date(()=>G),c?.(G)}})}):null,m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:H,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Ud=m.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),ra=e=>m.jsx(en,{...e,as:e.as||"span",className:Te("block rounded h-8 w-32 animate-pulse bg-muted",e.className)}),$s=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>m.jsxs(en,{...s,as:r||"div","data-component":"card",className:Te("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4 pb-5",i),children:[e?m.jsx("header",{"data-component":"card-title",className:Te("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",a),children:e}):o,m.jsx("div",{"data-component":"card-body",className:Te("min-w-full px-4 lg:px-8",s.className),children:t?m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(ra,{className:"w-full"}),m.jsx(ra,{className:"w-8/12"}),m.jsx(ra,{className:"w-10/12"}),m.jsx(ra,{className:"w-1/2"})]}):n})]});$s.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return m.jsxs(i,{...o,title:je.string(o.title)?o.title:void 0,className:Te("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[m.jsx(a,{className:"font-semibold",children:o.title}),r?m.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const w2=e=>{const t=e.interactive??!0,n=e.Icon??Ru;return m.jsx($s,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0 lg:px-0",children:m.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[m.jsx("div",{className:Te("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:m.jsx(n,{size:48})}),m.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[m.jsx("p",{className:"text-lg",children:e.title}),e.loading?m.jsx(ra,{className:"h-10"}):m.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},Qx=e=>{const t=e.Icon??xy,n=Et();return m.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[m.jsx(t,{size:64,className:"text-disabled"}),m.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})};function Jx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Jx(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Jx(e[o],null)}}}}function on(...e){return _.useCallback(e0(...e),e)}function js(e){const t=S2(e),n=_.forwardRef((r,o)=>{const{children:i,...a}=r,s=_.Children.toArray(i),l=s.find(E2);if(l){const c=l.props.children,u=s.map(d=>d===l?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:d);return m.jsx(t,{...a,ref:o,children:_.isValidElement(c)?_.cloneElement(c,void 0,u):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var t0=js("Slot");function S2(e){const t=_.forwardRef((n,r)=>{const{children:o,...i}=n;if(_.isValidElement(o)){const a=C2(o),s=k2(i,o.props);return o.type!==_.Fragment&&(s.ref=r?e0(r,a):a),_.cloneElement(o,s)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var T2=Symbol("radix.slottable");function E2(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===T2}function k2(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function C2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var P2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bt=P2.reduce((e,t)=>{const n=js(`Primitive.${t}`),r=_.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function n0(e,t){e&&gi.flushSync(()=>e.dispatchEvent(t))}var A2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),I2="VisuallyHidden",Yd=_.forwardRef((e,t)=>m.jsx(Bt.span,{...e,ref:t,style:{...A2,...e.style}}));Yd.displayName=I2;function zs(e,t=[]){let n=[];function r(i,a){const s=_.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:p,children:f,...b}=d,g=p?.[e]?.[l]||s,h=_.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){const f=p?.[e]?.[l]||s,b=_.useContext(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>_.createContext(a));return function(s){const l=s?.[e]||i;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,_2(o,...t)]}function _2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function r0(e){const t=e+"CollectionProvider",[n,r]=zs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=S.useRef(null),x=S.useRef(new Map).current;return m.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=js(s),c=S.forwardRef((g,h)=>{const{scope:v,children:y}=g,x=i(s,v),T=on(h,x.collectionRef);return m.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=js(u),f=S.forwardRef((g,h)=>{const{scope:v,children:y,...x}=g,T=S.useRef(null),w=on(h,T),E=i(u,v);return S.useEffect(()=>(E.itemMap.set(T,{ref:T,...x}),()=>void E.itemMap.delete(T))),m.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function b(g){const h=i(e+"CollectionConsumer",g);return S.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},b,r]}function Ot(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Go=globalThis?.document?_.useLayoutEffect:()=>{},O2=_[" useInsertionEffect ".trim().toString()]||Go;function o0({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=M2({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=_.useRef(e!==void 0);_.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=_.useCallback(u=>{if(s){const d=D2(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function M2({defaultProp:e,onChange:t}){const[n,r]=_.useState(e),o=_.useRef(n),i=_.useRef(t);return O2(()=>{i.current=t},[t]),_.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function D2(e){return typeof e=="function"}function N2(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var i0=e=>{const{present:t,children:n}=e,r=L2(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=on(r.ref,F2(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};i0.displayName="Presence";function L2(e){const[t,n]=_.useState(),r=_.useRef(null),o=_.useRef(e),i=_.useRef("none"),a=e?"mounted":"unmounted",[s,l]=N2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Bs(r.current);i.current=s==="mounted"?c:"none"},[s]),Go(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=Bs(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Go(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=Bs(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=Bs(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:_.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Bs(e){return e?.animationName||"none"}function F2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var V2=_.createContext(void 0);function $2(e){const t=_.useContext(V2);return e||t||"ltr"}function eo(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>t.current?.(...n),[])}function j2(e,t=globalThis?.document){const n=eo(e);_.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var z2="DismissableLayer",Kd="dismissableLayer.update",B2="dismissableLayer.pointerDownOutside",R2="dismissableLayer.focusOutside",a0,s0=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l0=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=_.useContext(s0),[u,d]=_.useState(null),p=u?.ownerDocument??globalThis?.document,[,f]=_.useState({}),b=on(t,k=>d(k)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=W2(k=>{const C=k.target,O=[...c.branches].some(I=>I.contains(C));!T||O||(o?.(k),a?.(k),k.defaultPrevented||s?.())},p),E=q2(k=>{const C=k.target;[...c.branches].some(I=>I.contains(C))||(i?.(k),a?.(k),k.defaultPrevented||s?.())},p);return j2(k=>{y===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},p),_.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(a0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),u0(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=a0)}},[u,p,n,c]),_.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),u0())},[u,c]),_.useEffect(()=>{const k=()=>f({});return document.addEventListener(Kd,k),()=>document.removeEventListener(Kd,k)},[]),m.jsx(Bt.div,{...l,ref:b,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:Ot(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ot(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ot(e.onPointerDownCapture,w.onPointerDownCapture)})});l0.displayName=z2;var H2="DismissableLayerBranch",c0=_.forwardRef((e,t)=>{const n=_.useContext(s0),r=_.useRef(null),o=on(t,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(Bt.div,{...e,ref:o})});c0.displayName=H2;function W2(e,t=globalThis?.document){const n=eo(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){d0(B2,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function q2(e,t=globalThis?.document){const n=eo(e),r=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!r.current&&d0(R2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function u0(){const e=new CustomEvent(Kd);document.dispatchEvent(e)}function d0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?n0(o,i):o.dispatchEvent(i)}var U2=l0,Y2=c0,K2="Portal",f0=_.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=_.useState(!1);Go(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?uo.createPortal(m.jsx(Bt.div,{...r,ref:t}),a):null});f0.displayName=K2;function to(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function G2(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Z2(e){const[t,n]=_.useState(void 0);return Go(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function p0(e,[t,n]){return Math.min(n,Math.max(t,e))}var Gd="Progress",Zd=100,[X2,GR]=zs(Gd),[Q2,J2]=X2(Gd),h0=_.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=eL,...a}=e;(o||o===0)&&!y0(o)&&console.error(tL(`${o}`,"Progress"));const s=y0(o)?o:Zd;r!==null&&!b0(r,s)&&console.error(nL(`${r}`,"Progress"));const l=b0(r,s)?r:null,c=Rs(l)?i(l,s):void 0;return m.jsx(Q2,{scope:n,value:l,max:s,children:m.jsx(Bt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Rs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":v0(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});h0.displayName=Gd;var m0="ProgressIndicator",g0=_.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=J2(m0,n);return m.jsx(Bt.div,{"data-state":v0(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});g0.displayName=m0;function eL(e,t){return`${Math.round(e/t*100)}%`}function v0(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Rs(e){return typeof e=="number"}function y0(e){return Rs(e)&&!isNaN(e)&&e>0}function b0(e,t){return Rs(e)&&!isNaN(e)&&e<=t&&e>=0}function tL(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Zd}\`.`}function nL(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
218
|
-
- a positive number
|
|
219
|
-
- less than the value passed to \`max\` (or ${Zd} if no \`max\` prop is set)
|
|
220
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
221
|
-
|
|
222
|
-
Defaulting to \`null\`.`}var rL=h0,oL=g0,x0=["PageUp","PageDown"],w0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],S0={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Zo="Slider",[Xd,iL,aL]=r0(Zo),[T0,ZR]=zs(Zo,[aL]),[sL,Hs]=T0(Zo),E0=_.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:b,...g}=e,h=_.useRef(new Set),v=_.useRef(0),x=a==="horizontal"?lL:cL,[T=[],w]=o0({prop:u,defaultProp:c,onChange:D=>{[...h.current][v.current]?.focus(),d(D)}}),E=_.useRef(T);function k(D){const V=hL(T,D);I(D,V)}function C(D){I(D,v.current)}function O(){const D=E.current[v.current];T[v.current]!==D&&p(T)}function I(D,V,{commit:z}={commit:!1}){const A=yL(i),N=bL(Math.round((D-r)/i)*i+r,A),H=p0(N,[r,o]);w((M=[])=>{const P=fL(M,H,V);if(vL(P,l*i)){v.current=P.indexOf(H);const $=String(P)!==String(M);return $&&z&&p(P),$?P:M}else return M})}return m.jsx(sL,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:b,children:m.jsx(Xd.Provider,{scope:e.__scopeSlider,children:m.jsx(Xd.Slot,{scope:e.__scopeSlider,children:m.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Ot(g.onPointerDown,()=>{s||(E.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:k,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:O,onHomeKeyDown:()=>!s&&I(r,0,{commit:!0}),onEndKeyDown:()=>!s&&I(o,T.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:V})=>{if(!s){const N=x0.includes(D.key)||D.shiftKey&&w0.includes(D.key)?10:1,H=v.current,M=T[H],P=i*N*V;I(M+P,H,{commit:!0})}}})})})})});E0.displayName=Zo;var[k0,C0]=T0(Zo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lL=_.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=_.useState(null),f=on(t,x=>p(x)),b=_.useRef(void 0),g=$2(o),h=g==="ltr",v=h&&!i||!h&&i;function y(x){const T=b.current||d.getBoundingClientRect(),w=[0,T.width],k=ef(w,v?[n,r]:[r,n]);return b.current=T,k(x-T.left)}return m.jsx(k0,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:m.jsx(P0,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a?.(T)},onSlideMove:x=>{const T=y(x.clientX);s?.(T)},onSlideEnd:()=>{b.current=void 0,l?.()},onStepKeyDown:x=>{const w=S0[v?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:w?-1:1})}})})}),cL=_.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=_.useRef(null),d=on(t,u),p=_.useRef(void 0),f=!o;function b(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=ef(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return m.jsx(k0,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:m.jsx(P0,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=b(g.clientY);i?.(h)},onSlideMove:g=>{const h=b(g.clientY);a?.(h)},onSlideEnd:()=>{p.current=void 0,s?.()},onStepKeyDown:g=>{const v=S0[f?"from-bottom":"from-top"].includes(g.key);l?.({event:g,direction:v?-1:1})}})})}),P0=_.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Hs(Zo,n);return m.jsx(Bt.span,{...c,ref:t,onKeyDown:Ot(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):x0.concat(w0).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ot(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Ot(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ot(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),A0="SliderTrack",I0=_.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Hs(A0,n);return m.jsx(Bt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});I0.displayName=A0;var Qd="SliderRange",_0=_.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Hs(Qd,n),i=C0(Qd,n),a=_.useRef(null),s=on(t,a),l=o.values.length,c=o.values.map(p=>D0(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return m.jsx(Bt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});_0.displayName=Qd;var Jd="SliderThumb",O0=_.forwardRef((e,t)=>{const n=iL(e.__scopeSlider),[r,o]=_.useState(null),i=on(t,s=>o(s)),a=_.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return m.jsx(uL,{...e,ref:i,index:a})}),uL=_.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Hs(Jd,n),s=C0(Jd,n),[l,c]=_.useState(null),u=on(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=Z2(l),f=a.values[r],b=f===void 0?0:D0(f,a.min,a.max),g=pL(r,a.values.length),h=p?.[s.size],v=h?mL(h,b,s.direction):0;return _.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${v}px)`},children:[m.jsx(Xd.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(Bt.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Ot(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&m.jsx(M0,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});O0.displayName=Jd;var dL="RadioBubbleInput",M0=_.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=_.useRef(null),i=on(o,r),a=G2(t);return _.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),m.jsx(Bt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});M0.displayName=dL;function fL(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function D0(e,t,n){const i=100/(n-t)*(e-t);return p0(i,[0,100])}function pL(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function hL(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function mL(e,t,n){const r=e/2,i=ef([0,50],[0,r]);return(r-i(t)*n)*n}function gL(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function vL(e,t){if(t>0){const n=gL(e);return Math.min(...n)>=t}return!0}function ef(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yL(e){return(String(e).split(".")[1]||"").length}function bL(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var xL=E0,wL=I0,SL=_0,TL=O0,tf="ToastProvider",[nf,EL,kL]=r0("Toast"),[N0,XR]=zs("Toast",[kL]),[CL,Ws]=N0(tf),L0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=_.useState(null),[c,u]=_.useState(0),d=_.useRef(!1),p=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${tf}\`. Expected non-empty \`string\`.`),m.jsx(nf.Provider,{scope:t,children:m.jsx(CL,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:_.useCallback(()=>u(f=>f+1),[]),onToastRemove:_.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};L0.displayName=tf;var F0="ToastViewport",PL=["F8"],rf="toast.viewportPause",of="toast.viewportResume",V0=_.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PL,label:o="Notifications ({hotkey})",...i}=e,a=Ws(F0,n),s=EL(n),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=on(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;_.useEffect(()=>{const h=v=>{r.length!==0&&r.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),_.useEffect(()=>{const h=l.current,v=d.current;if(b&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(rf);v.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(of);v.dispatchEvent(E),a.isClosePausedRef.current=!1}},T=E=>{!h.contains(E.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,a.isClosePausedRef]);const g=_.useCallback(({tabbingDirection:h})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...BL(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return _.useEffect(()=>{const h=d.current;if(h){const v=y=>{const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const w=document.activeElement,E=y.shiftKey;if(y.target===h&&E){c.current?.focus();return}const O=g({tabbingDirection:E?"backwards":"forwards"}),I=O.findIndex(D=>D===w);lf(O.slice(I+1))?y.preventDefault():E?c.current?.focus():u.current?.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),m.jsxs(Y2,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&m.jsx(af,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});lf(h)}}),m.jsx(nf.Slot,{scope:n,children:m.jsx(Bt.ol,{tabIndex:-1,...i,ref:p})}),b&&m.jsx(af,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});lf(h)}})]})});V0.displayName=F0;var $0="ToastFocusProxy",af=_.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ws($0,n);return m.jsx(Yd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});af.displayName=$0;var oa="Toast",AL="toast.swipeStart",IL="toast.swipeMove",_L="toast.swipeCancel",OL="toast.swipeEnd",j0=_.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=o0({prop:r,defaultProp:o??!0,onChange:i,caller:oa});return m.jsx(i0,{present:n||s,children:m.jsx(NL,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:eo(e.onPause),onResume:eo(e.onResume),onSwipeStart:Ot(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ot(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ot(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ot(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});j0.displayName=oa;var[ML,DL]=N0(oa,{onClose(){}}),NL=_.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...b}=e,g=Ws(oa,n),[h,v]=_.useState(null),y=on(t,A=>v(A)),x=_.useRef(null),T=_.useRef(null),w=o||g.duration,E=_.useRef(0),k=_.useRef(w),C=_.useRef(0),{onToastAdd:O,onToastRemove:I}=g,D=eo(()=>{h?.contains(document.activeElement)&&g.viewport?.focus(),a()}),V=_.useCallback(A=>{!A||A===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(D,A))},[D]);_.useEffect(()=>{const A=g.viewport;if(A){const N=()=>{V(k.current),c?.()},H=()=>{const M=new Date().getTime()-E.current;k.current=k.current-M,window.clearTimeout(C.current),l?.()};return A.addEventListener(rf,H),A.addEventListener(of,N),()=>{A.removeEventListener(rf,H),A.removeEventListener(of,N)}}},[g.viewport,w,l,c,V]),_.useEffect(()=>{i&&!g.isClosePausedRef.current&&V(w)},[i,w,g.isClosePausedRef,V]),_.useEffect(()=>(O(),()=>I()),[O,I]);const z=_.useMemo(()=>h?q0(h):null,[h]);return g.viewport?m.jsxs(m.Fragment,{children:[z&&m.jsx(LL,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),m.jsx(ML,{scope:n,onClose:D,children:gi.createPortal(m.jsx(nf.ItemSlot,{scope:n,children:m.jsx(U2,{asChild:!0,onEscapeKeyDown:Ot(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||D(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(Bt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ot(e.onKeyDown,A=>{A.key==="Escape"&&(s?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:Ot(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Ot(e.onPointerMove,A=>{if(!x.current)return;const N=A.clientX-x.current.x,H=A.clientY-x.current.y,M=!!T.current,P=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,L=P?$(0,N):0,U=P?0:$(0,H),G=A.pointerType==="touch"?10:2,B={x:L,y:U},Z={originalEvent:A,delta:B};M?(T.current=B,qs(IL,d,Z,{discrete:!1})):U0(B,g.swipeDirection,G)?(T.current=B,qs(AL,u,Z,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(N)>G||Math.abs(H)>G)&&(x.current=null)}),onPointerUp:Ot(e.onPointerUp,A=>{const N=T.current,H=A.target;if(H.hasPointerCapture(A.pointerId)&&H.releasePointerCapture(A.pointerId),T.current=null,x.current=null,N){const M=A.currentTarget,P={originalEvent:A,delta:N};U0(N,g.swipeDirection,g.swipeThreshold)?qs(OL,f,P,{discrete:!0}):qs(_L,p,P,{discrete:!0}),M.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),LL=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ws(oa,t),[i,a]=_.useState(!1),[s,l]=_.useState(!1);return jL(()=>a(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:m.jsx(f0,{asChild:!0,children:m.jsx(Yd,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},FL="ToastTitle",z0=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(Bt.div,{...r,ref:t})});z0.displayName=FL;var VL="ToastDescription",B0=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(Bt.div,{...r,ref:t})});B0.displayName=VL;var R0="ToastAction",$L=_.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(W0,{altText:n,asChild:!0,children:m.jsx(sf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${R0}\`. Expected non-empty \`string\`.`),null)});$L.displayName=R0;var H0="ToastClose",sf=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=DL(H0,n);return m.jsx(W0,{asChild:!0,children:m.jsx(Bt.button,{type:"button",...r,ref:t,onClick:Ot(e.onClick,o.onClose)})})});sf.displayName=H0;var W0=_.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(Bt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function q0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),zL(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...q0(r))}}),t}function qs(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?n0(o,i):o.dispatchEvent(i)}var U0=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function jL(e=()=>{}){const t=eo(e);Go(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function zL(e){return e.nodeType===e.ELEMENT_NODE}function BL(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lf(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var RL=L0,HL=V0,WL=j0,qL=z0,UL=B0,YL=sf;const KL=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},GL=fo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border"}},defaultVariants:{theme:"default"}}),Y0=S.createContext(()=>{throw new Error("Not implemented")}),ZL=()=>S.useContext(Y0),K0={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},XL=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=GL({theme:t.theme||"default"});return m.jsx(WL,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:m.jsx(We.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:K0[t.reversedIndex]||K0.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:m.jsxs("div",{className:a,children:[m.jsxs("div",{className:"flex flex-col p-4",children:[t.title?m.jsx(qL,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,m.jsx(UL,{className:"select-text truncate",children:t.text})]}),r?m.jsx(YL,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:m.jsx(Oo,{className:"size-5"})}):null]})})})});function QL({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=KL(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const b=[...f,{...u,id:d,text:c}];return b.length>t?b.slice(b.length-t,b.length+1):b}),{clear:s,close:()=>a(f=>f.filter(b=>b.id!==d))}},[t]);return m.jsxs(RL,{duration:n,swipeThreshold:150,children:[m.jsx(Y0.Provider,{value:l,children:e}),m.jsx(We.ol,{children:m.jsx(wn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(b=>b.id!==c.id));return S.createElement(XL,{...c,hover:o,index:u,key:c.id,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),m.jsx(HL,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const JL=e=>m.jsxs(rL,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:Te("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(oL,{style:{transform:je.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Te("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),je.number(e.percent)?m.jsx("p",{className:Te("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),eF=e=>m.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[m.jsxs("header",{className:"flex items-start gap-4 p-6",children:[m.jsx("div",{className:Te("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:m.jsx("div",{children:m.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("header",{children:m.jsx("h3",{className:"text-base leading-none",children:e.title})}),m.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?m.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),G0=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},Z0={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},X0=S.createContext(""),tF=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",cf=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!tF(a))return a}return n==="backward"?cf(e,e.length-1,"backward"):cf(e,-1,"forward")},Q0=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=cf(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},J0={[Z0.ArrowLeft]:(e,t)=>Q0(t,"backward"),[Z0.ArrowRight]:(e,t)=>Q0(t,"forward")},nF=e=>{const[t,n]=G0(e.active),r=S.useRef(null),o=lr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(je.keyof(J0,c)){const u=J0[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(X0.Provider,{value:t,children:m.jsx($s,{className:e.className,container:Te("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[m.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return m.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Te("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:m.jsx(en,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},rF=()=>S.useContext(X0),oF=e=>{const t=rF();return m.jsx(S.Fragment,{children:e.id===t?e.children:null})},Us=e=>m.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[m.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),m.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Us.Icon=function(t){return m.jsx("header",{...t,className:Te("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Us.Body=function(t){return m.jsx(en,{...t,className:Te("min-w-0 flex-1",t.className),children:t.children})},Us.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(en,{...t,type:"button"})})};const iF=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),aF=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(xr,{children:m.jsx(pu,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(wn,{presenceAffectsLayout:!0,children:[e?m.jsx(We.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?m.jsx(zd,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(Qr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(We.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[m.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:m.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:m.jsx(Oo,{})})}),m.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[m.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),sF=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=rr({open:t!==null,transform:!0,onOpenChange:p=>p?void 0:n(null)}),a=Uo(o),s=Tr(o,{role:"dialog"}),l=Sr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=or([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return m.jsxs(S.Fragment,{children:[m.jsx(aF,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((p,f)=>{const b=p.props,g=`${r}-${f}`,h=()=>n({...b,id:g}),v=b.leading;return m.jsx(We.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(We.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(S.Fragment,{children:[b.avatar?m.jsx("div",{children:m.jsx("div",{className:"relative px-1",children:m.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:b.avatar})})}):null,m.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:m.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[m.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[m.jsx("h3",{children:b.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:b.description})]}),v?m.jsx(v,{open:h}):null]})})]})})})},g)})})]})},lF=e=>m.jsx(S.Fragment,{children:e.children}),cF=/Mac|iPod|iPhone|iPad/,Ys=()=>cF.test(navigator.userAgent),uF=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ys()?"Meta":"Control":n==="Hyper"?Ys()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),ew=e=>e.map(t=>t.trim()).join("+");class dF{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=ew(uF(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=ew(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class Tn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Tn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new Tn(this);return t?t(n):n}static from(t,n){return new Tn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Tn.from(t,n).values())}toArray(){return Array.from(this.values())}}const fF=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},tw=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},nw={basic:/[,[\]]+?/,extend:/[,[\].]+?/},rw=(e,t)=>{const n=tw(t,nw.basic,e);return n!==void 0&&n!==e?n:tw(t,nw.extend,e)},ow=e=>e.replace(/[^0-9]/g,""),Ks=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),iw=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?ow(e).includes(ow(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?fF(e,t)!==null:!1,pF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>iw(e,o,n,r)):iw(e,t,n,r),uf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:je.array(i.value)?i.value.map(Ks):Ks(`${i.value}`)}));return e.forEach(i=>{const a=rw(i,t);o.forEach(s=>{const l=rw(i,s.key);if(!l)return;const c=Ks(`${s.value}`.toLocaleLowerCase()).trim(),u=Ks(`${l}`.toLocaleLowerCase()).trim();if(pF(u,c,s.score,s.match))return void r.set(a,i);je.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},hF=e=>(e=e.trim(),e==="Alt"?Ys()?m.jsx(e_,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Ys()?m.jsx(KI,{"aria-label":"Command",size:14}):"Ctrl":e),mF=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return m.jsxs(S.Fragment,{children:[m.jsx("kbd",{"aria-label":n,children:hF(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},gF=(e,t)=>hr()?t:window.matchMedia(e).matches,vF=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(gF(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},yF=t0,mn="500ms",bF={exit:{x:["0%","-30%"],opacity:0,animationDuration:mn},enter:{x:["-30%","0%"],opacity:1,animationDuration:mn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:mn}},xF={enter:{x:"0%",opacity:1,animationDuration:mn},exit:{x:["0%","30%"],opacity:0,animationDuration:mn},initial:{x:["30%","0%"],opacity:.8,animationDuration:mn}},df={drawer:e=>e==="left"?bF:xF,sheet:{enter:{opacity:1,y:"0%",animationDuration:mn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:mn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:mn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:mn},enter:{opacity:1,scale:[1.05,1],animationDuration:mn},initial:{opacity:.5,scale:.95,animationDuration:mn,transition:{duration:.5,ease:"easeInOut"}}}},wF=fo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),ff={top:0,left:0,right:0,bottom:0},Gs=e=>e*.6,SF=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),p=window.outerHeight,f=Gs(p);return d>=f?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return m.jsx(We.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:ff,whileDrag:{cursor:"grabbing"},className:Te("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?m.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Zs={drawer:"right",sheet:"none",dialog:"none"},TF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Zs.drawer:Zs[o]:t?Zs[o]:Zs.sheet},EF=[],pf=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:b=void 0,overlayClassName:g="",type:h="dialog",position:v,overlayClickClose:y=!1,role:x="dialog",interactions:T=EF,...w},E)=>{const k=S.useRef(null),C=S.useRef(null),O=S.useId(),I=S.useId(),D=vF("(min-width: 64rem)"),V=h!=="dialog",z=TF(D,f,h,v),A=D||f?df[h]:df.sheet,N=typeof A=="function"?A(z):A,H=D||f?h:"sheet",M=rr({open:e,onOpenChange:a}),P=Uo(M.context,{}),$=Tr(M.context,{role:x}),L=Sr(M.context,{escapeKey:!0,outsidePress:y}),U=or([P,$,L].concat(T)),G=o,B=_o(void 0);S.useEffect(()=>B.set(void 0),[H]);const Z=()=>a(!1);S.useImperativeHandle(E,()=>({context:M.context,floating:C.current}),[M.context,C]);const ee=(X,oe)=>{const se=M.refs.floating.current.getBoundingClientRect(),le=B.get()||se.height,he=Math.abs(le-oe.delta.y),xe=window.outerHeight,de=Gs(xe);return he>=de?B.set(he):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>B.set(void 0),350))},te=(X,oe)=>{const j=M.refs.floating.current;if(oe.delta.y<0&&oe.offset.y<0){j.scrollTo({top:j.scrollTop+Math.abs(oe.offset.y),behavior:"smooth"});return}const se=j.getBoundingClientRect(),le=B.get()||se.height,he=Math.abs(le-oe.delta.y),xe=window.outerHeight,de=Gs(xe);return he>=de?B.set(he):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>B.set(void 0),350))},J=H==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:ff,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:ee,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},R=_o(void 0),q=_o(void 0);return m.jsxs(S.Fragment,{children:[o?m.jsx(S.Fragment,{children:r?m.jsx(yF,{ref:M.refs.setReference,...U.getReferenceProps({layoutId:b}),children:G}):m.jsx(We.button,{ref:M.refs.setReference,...U.getReferenceProps(),layoutId:b,type:"button",children:G})}):null,m.jsx(xr,{preserveTabOrder:!0,children:m.jsx(wn,{presenceAffectsLayout:!0,propagate:!0,mode:"wait",initial:!1,children:e?m.jsx(zd,{lockScroll:!0,className:Te("inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70",H==="drawer"?"":"flex items-start justify-center p-10",g),children:m.jsx(pu,{reducedMotion:d?"user":"always",children:m.jsx(Qr,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M.context,children:m.jsxs(We.div,{...w,...t?{"aria-labelledby":O,"aria-describedby":I}:{"aria-label":s},...U.getFloatingProps({"aria-modal":e,ref:Zn(M.refs.setFloating,C),className:Te(wF({position:z,type:H}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:b,variants:N,"data-component":"modal",style:H==="drawer"?{width:B}:{height:B},children:[V&&u?m.jsx(SF,{onChange:a,value:B,sheet:H==="sheet",position:z,parent:M.refs.floating}):null,t?m.jsx(We.header,{...J,className:"relative w-full isolate",children:t?m.jsx("h2",{id:O,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,m.jsx(We.section,{ref:k,"data-component":"modal-body",dragConstraints:ff,drag:D?"y":void 0,onDrag:H==="sheet"&&D?te:void 0,className:Te("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:()=>{q.set(void 0),R.set(void 0)},onTouchStart:X=>{const oe=X.changedTouches[0];R.set(oe.pageY),q.set(oe.pageY)},onTouchMove:X=>{const oe=X.changedTouches[0],j=oe.pageY,se=R.get();if(se<j&&k.current?.scrollTop===0){const xe=M.refs.floating.current.getBoundingClientRect(),de=B.get()||xe.height,Pe=(se-j)/10,Oe=de+Pe,Se=window.outerHeight,Be=Gs(Se);Oe<Be&&a?.(!1),B.set(Oe)}q.set(oe.pageY)},children:i}),n?m.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?m.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:m.jsx("button",{type:"button",onClick:Z,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:m.jsx(Oo,{})})}):null]})})})}):null},O)})]})}),kF=e=>m.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Tc(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),CF=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:m.jsx(kF,{text:e.text,item:o})}):o.type!=="shortcut"?m.jsx(S.Fragment,{}):m.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Te("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[m.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,m.jsx("span",{children:Tc(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx(mF,{value:o.shortcut}):null]})}),PF=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:je.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=je.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=uf(o,"title",n),a=r.filter(s=>je.function(s.enabled)?s.enabled({text:t}):!1);return Tn.unique(i.concat(a),s=>s.title)},AF=[0,0,0,0,0],IF=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=Et(),[o,i]=S.useState(""),a=lr(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=rr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Wo}),p=Vs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:y=>u(x=>je.number(y)?y:e.open?x??0:null)}),{getItemProps:f}=or([p]),b=e.commands.flatMap(y=>y.type==="group"?[y,...y.items]:[y]),g=PF(b,o),h=o===""?b:[{type:"group",title:"Results",items:[]},...g.filter(y=>y.type!=="group")];S.useEffect(()=>{const y=new dF;return y.add(t,()=>e.onChangeVisibility?.(!0)),b.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&y.add(x.shortcut,T=>x.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),y.register()},[t]);const v=e.Icon??wy;return m.jsx(S.Fragment,{children:m.jsxs(pf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[m.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[m.jsx("div",{className:"flex size-10 items-center justify-center",children:m.jsx(v,{Default:wy,text:o,size:16})}),m.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:y=>i(y.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:y=>{if((y.key==="ArrowDown"||y.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),y.key==="Enter"){if(c!==null&&h[c]){y.preventDefault();const x=h[c],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}if(h.length===1){y.preventDefault();const x=h[0],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}}}})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),AF.map((y,x)=>m.jsx("li",{className:Te("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Ud},`${s}-${x}-skeleton-index`))]}):m.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((y,x)=>S.createElement(CF,{...f({onMouseEnter:()=>u(x),ref(T){n.current[x]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),y.type==="shortcut"&&y.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:y,text:o,active:c===x,key:`${s}-${y.type}-${x}`})),h.length===1?m.jsx("div",{className:Te("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&je.number(c)?m.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?m.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},Xo=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Xi(10),Nd({fallbackAxisSideDirection:"end"}),Dd(),ax({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=rr({open:n,middleware:i,transform:!0,whileElementsMounted:Wo,onOpenChange:(b,g)=>{const h=g?.relatedTarget;h&&h.dataset.floating==="true"&&!b||(r(b),e.onChange?.(b))}}),c=Uo(l),u=Sr(l),d=Tr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=or([c,u,d]);return m.jsxs(S.Fragment,{children:[m.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(xr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(Qr,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[m.jsx(hx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),m.jsx("header",{className:"mb-2",children:m.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},_F=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=rr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Uo(s,{enabled:e.disabled??!0}),u=Tr(s,{role:"tooltip"}),d=Sr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=or([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(Ca,{...f(e),as:We.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(We.span,{layoutId:o,children:e.trigger})}),m.jsx(wn,{children:i?m.jsx(xr,{root:t,children:m.jsx(Qr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(We.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},aw=(e="")=>Te("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),hf=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),sw=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[p,f]=S.useState(!1),[b,g]=S.useState(null),h=S.useRef([]),v=S.useRef([]),y=S.useContext(hf),x=yr(),T=br(),w=zN(),E=lx(),k=x!==null,{floatingStyles:C,refs:O,context:I}=rr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Wo,placement:k?"right":"bottom-start",middleware:[Xi({mainAxis:k?0:4,alignmentAxis:k?-4:0}),Nd(),Dd()]}),D=Tr(I,{role:"menu"}),V=Sr(I,{bubbles:!0}),z=bx(I,{move:!1,enabled:n,delay:{open:Hx},handleClose:Rx({blockPointerEvents:!0,requireIntent:!1})}),A=Uo(I,{toggle:!k,event:"mousedown",ignoreMouse:k,keyboardHandlers:!0}),N=Vs(I,{loop:!0,activeIndex:b,nested:k,listRef:h,onNavigate:g}),H=d2(I,{activeIndex:b,listRef:v,resetMs:p2,onMatch:u?g:void 0}),{getReferenceProps:M,getFloatingProps:P,getItemProps:$}=or([z,A,D,V,N,H]);S.useEffect(()=>{if(!T)return;const U=()=>d(!1),G=B=>{B.nodeId!==w&&B.parentId===x&&d(!1)};return T.events.on("click",U),T.events.on("menuopen",G),()=>{T.events.off("click",U),T.events.off("menuopen",G)}},[T,w,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:w})},[T,u,w,x]);const L=o?l.className:Te(aw(l.className));return m.jsxs(BN,{id:w,children:[m.jsx(S.Fragment,{children:l.asChild?m.jsx(t0,{...M(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:s,className:L,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Zn(O.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Zn(O.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0,...M(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:[s,k&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(Bu,{size:14})]})]})}),m.jsx(hf.Provider,{value:{activeIndex:b,setActiveIndex:g,getItemProps:$,setHasFocusInside:f,isOpen:u},children:m.jsx(NN,{elementsRef:h,labelsRef:v,children:u&&m.jsx(xr,{children:m.jsx(Qr,{context:I,modal:!1,initialFocus:k?-1:0,returnFocus:o?i:!k,children:m.jsx(t,{...P(),ref:O.setFloating,style:{...l.style,...C},className:Te("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),OF=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(hf),s=lx({label:n?null:e}),l=br(),c=s.index===a.activeIndex;return m.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Zn(s.ref,i),className:aw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?m.jsx(t,{size:16}):null]})}),MF=S.forwardRef((e,t)=>yr()===null?m.jsx(RN,{children:m.jsx(sw,{...e,isParent:!0,ref:t})}):m.jsx(sw,{...e,isParent:!1,ref:t})),DF=e=>m.jsx(We.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Xs=0,Er=1,Qo=2,lw=4;function cw(e){return()=>e}function NF(e){e()}function ia(e,t){return n=>e(t(n))}function uw(e,t){return()=>e(t)}function LF(e,t){return n=>e(t,n)}function mf(e){return e!==void 0}function FF(...e){return()=>{e.map(NF)}}function Jo(){}function Qs(e,t){return t(e),e}function VF(e,t){return t(e)}function dt(...e){return e}function Qe(e,t){return e(Er,t)}function De(e,t){e(Xs,t)}function gf(e){e(Qo)}function Ct(e){return e(lw)}function be(e,t){return Qe(e,LF(t,Xs))}function En(e,t){const n=e(Er,r=>{n(),t(r)});return n}function dw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function fw(e,t){return e===t}function ft(e=fw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ia(t,e)}function Rn(e){return t=>()=>{t(e)}}function re(e,...t){const n=$F(...t);return(r,o)=>{switch(r){case Qo:gf(e);return;case Er:return Qe(e,n(o))}}}function Hn(e,t){return n=>r=>{n(t=e(t,r))}}function no(e){return t=>n=>{e>0?e--:t(n)}}function ir(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function $e(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function $F(...e){return t=>e.reduceRight(VF,t)}function jF(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Er:return i?n===i?void 0:(r(),n=i,t=Qe(e,i),t):(r(),Jo);case Qo:r(),n=null;return}}}function ae(e){let t=e;const n=Re();return(r,o)=>{switch(r){case Xs:t=o;break;case Er:{o(t);break}case lw:return t}return n(r,o)}}function Wt(e,t){return Qs(ae(t),n=>be(e,n))}function Re(){const e=[];return(t,n)=>{switch(t){case Xs:e.slice().forEach(r=>{r(n)});return;case Qo:e.splice(0,e.length);return;case Er:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function an(e){return Qs(Re(),t=>be(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:zF(),singleton:n}}const zF=()=>Symbol();function BF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=Re(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case Qo:{gf(t);return}case Er:return r===o&&a(n),Qe(t,a)}}}function ke(e,t=fw){return re(e,ft(t))}function vf(...e){return function(t,n){switch(t){case Qo:return;case Er:return FF(...e.map(r=>Qe(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const RF={0:"debug",3:"error",1:"log",2:"warn"},HF=()=>typeof globalThis>"u"?window:globalThis,kr=Ue(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=HF().VIRTUOSO_LOG_LEVEL)!=null?o:Ct(e);r>=i&&console[RF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Wn(e,t,n){return yf(e,t,n).callbackRef}function yf(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function pw(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=WF(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let b;f&&(b=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?b.innerWidth:b.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i?.(s?hw("column-gap",getComputedStyle(u).columnGap,o):hw("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return yf(c,n,l)}function WF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},Jt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function hw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function bf(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),b=c.top-f.top;p=f.height-Math.max(0,b),d=b+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=yf(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const Yt=Ue(()=>{const e=Re(),t=Re(),n=ae(0),r=Re(),o=ae(0),i=Re(),a=Re(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Re(),p=Re(),f=ae(!1),b=ae(!1),g=ae(!1);return be(re(e,pe(({scrollTop:h})=>h)),t),be(re(e,pe(({scrollHeight:h})=>h)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:b,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),aa={lvl:0};function mw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function at(e){return e===aa}function sa(e,t){if(!at(e))return t===e.k?e.v:t<e.k?sa(e.l,t):sa(e.r,t)}function kn(e,t,n="k"){if(at(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=kn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return kn(e.l,t,n)}function sn(e,t,n){return at(e)?yw(t,n,1):t===e.k?Mt(e,{k:t,v:n}):t<e.k?bw(Mt(e,{l:sn(e.l,t,n)})):bw(Mt(e,{r:sn(e.r,t,n)}))}function ei(){return aa}function Js(e,t,n){if(at(e))return[];const r=kn(e,t)[0];return qF(wf(e,r,n))}function xf(e,t){if(at(e))return aa;const{k:n,l:r,r:o}=e;if(t===n){if(at(r))return o;if(at(o))return r;{const[i,a]=vw(r);return el(Mt(e,{k:i,l:gw(r),v:a}))}}else return t<n?el(Mt(e,{l:xf(r,t)})):el(Mt(e,{r:xf(o,t)}))}function ro(e){return at(e)?[]:[...ro(e.l),{k:e.k,v:e.v},...ro(e.r)]}function wf(e,t,n){if(at(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(wf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(wf(i,t,n))),s}function el(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Sf(t))return xw(Mt(e,{lvl:n-1}));if(!at(t)&&!at(t.r))return Mt(t.r,{l:Mt(t,{r:t.r.l}),lvl:n,r:Mt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Sf(e))return Tf(Mt(e,{lvl:n-1}));if(!at(r)&&!at(r.l)){const o=r.l,i=Sf(o)?r.lvl-1:r.lvl;return Mt(o,{l:Mt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Tf(Mt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Mt(e,t){return yw(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function gw(e){return at(e.r)?e.l:el(Mt(e,{r:gw(e.r)}))}function Sf(e){return at(e)||e.lvl>e.r.lvl}function vw(e){return at(e.r)?[e.k,e.v]:vw(e.r)}function yw(e,t,n,r=aa,o=aa){return{k:e,l:r,lvl:n,r:o,v:t}}function bw(e){return Tf(xw(e))}function xw(e){const{l:t}=e;return!at(t)&&t.lvl===e.lvl?Mt(t,{r:Mt(e,{l:t.r})}):e}function Tf(e){const{lvl:t,r:n}=e;return!at(n)&&!at(n.r)&&n.lvl===t&&n.r.lvl===t?Mt(n,{l:Mt(e,{r:n.l}),lvl:t+1}):e}function qF(e){return mw(e,({k:t,v:n})=>({index:t,value:n}))}function ww(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function la(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Ef=Ue(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function Sw(e,t,n){return e[tl(e,t,n)]}function tl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function UF(e,t,n,r){const o=tl(e,t,r),i=tl(e,n,r,o);return e.slice(o,i+1)}function Cn(e,t){return Math.round(e.getBoundingClientRect()[t])}function nl(e){return!at(e.groupOffsetTree)}function kf({index:e},t){return t===e?0:t<e?-1:1}function YF(){return{groupIndices:[],groupOffsetTree:ei(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ei()}}function KF(e,t){let n=at(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),at(e)){e=sn(e,0,i);continue}const s=Js(e,a-1,o+1);if(s.some(tV(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=xf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=sn(e,o+1,p));c&&(e=sn(e,a,i))}return[e,n]}function GF(e){return typeof e.groupIndex<"u"}function ZF({offset:e},t){return t===e?0:t<e?-1:1}function ca(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Sw(t,e,kf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Tw(e,t){if(!nl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ew(e,t,n){if(GF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Tw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function XF(e,t,n,r=0){return r>0&&(t=Math.max(t,Sw(e,r,kf).offset)),mw(UF(e,t,n,ZF),eV)}function QF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&at(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((b,g)=>sn(sn(b,g,p),g+1,f),a)}else[a,s]=KF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Cf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>sn(p,f,ca(f,d,o)),ei()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function JF(e){return ro(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function kw(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Cf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=tl(o,t-1,kf),s=o[l].offset;const c=kn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===kn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Js(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function eV(e){return{index:e.index,value:e}}function tV(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const nV={offsetHeight:"height",offsetWidth:"width"},qn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=Re(),r=Re(),o=Wt(r,0),i=Re(),a=Re(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,E)=>Cn(w,nV[E])),p=ae(void 0),f=ae(0),b=YF(),g=Wt(re(n,$e(l,e,f),Hn(QF,b),ft()),b),h=Wt(re(l,ft(),Hn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);be(re(l,Ce(w=>w.length>0),$e(g,f),pe(([w,E,k])=>{const C=w.reduce((O,I,D)=>sn(O,I,ca(I,E.offsetTree,k)||D),ei());return{...E,groupIndices:w,groupOffsetTree:C}})),g),be(re(r,$e(g),Ce(([w,{lastIndex:E}])=>w<E),pe(([w,{lastIndex:E,lastSize:k}])=>[{endIndex:E,size:k,startIndex:w}])),n),be(c,u);const v=Wt(re(c,pe(w=>w===void 0)),!0);be(re(u,Ce(w=>w!==void 0&&at(Ct(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=an(re(n,$e(g),Hn(({sizes:w},[E,k])=>({changed:k!==w,sizes:k}),{changed:!1,sizes:b}),pe(w=>w.changed)));Qe(re(s,Hn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:E}=Ct(g);if(w>0)De(t,!0),De(i,w+kw(w,E));else if(w<0){const k=Ct(h);k.length>0&&(w-=kw(-w,k)),De(a,w)}}),Qe(re(s,$e(e)),([w,E])=>{w<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Jt.ERROR)});const x=an(i);be(re(i,$e(g),pe(([w,E])=>{const k=E.groupIndices.length>0,C=[],O=E.lastSize;if(k){const I=sa(E.sizeTree,0);let D=0,V=0;for(;D<w;){const A=E.groupIndices[V],N=E.groupIndices.length===V+1?1/0:E.groupIndices[V+1]-A-1;C.push({endIndex:A,size:I,startIndex:A}),C.push({endIndex:A+1+N-1,size:O,startIndex:A+1}),V++,D+=N+1}const z=ro(E.sizeTree);return D!==w&&z.shift(),z.reduce((A,{k:N,v:H})=>{let M=A.ranges;return A.prevSize!==0&&(M=[...A.ranges,{endIndex:N+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:N+w,prevSize:H,ranges:M}},{prevIndex:w,prevSize:0,ranges:C}).ranges}return ro(E.sizeTree).reduce((I,{k:D,v:V})=>({prevIndex:D+w,prevSize:V,ranges:[...I.ranges,{endIndex:D+w-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:O,ranges:[]}).ranges})),n);const T=an(re(a,$e(g,f),pe(([w,{offsetTree:E},k])=>{const C=-w;return ca(C,E,k)})));return be(re(a,$e(g,f),pe(([w,E,k])=>{if(E.groupIndices.length>0){if(at(E.sizeTree))return E;let C=ei();const O=Ct(h);let I=0,D=0,V=0;for(;I<-w;){V=O[D];const z=O[D+1]-V-1;D++,I+=z+1}if(C=ro(E.sizeTree).reduce((z,{k:A,v:N})=>sn(z,Math.max(0,A+w),N),C),I!==-w){const z=sa(E.sizeTree,V);C=sn(C,0,z);const A=kn(E.sizeTree,-w+1)[1];C=sn(C,1,A)}return{...E,sizeTree:C,...Cf(E.offsetTree,0,C,k)}}else{const C=ro(E.sizeTree).reduce((O,{k:I,v:D})=>sn(O,Math.max(0,I+w),D),ei());return{...E,sizeTree:C,...Cf(E.offsetTree,0,C,k)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(kr,Ef),{singleton:!0});function rV(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Cw=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Re(),a=Re(),s=an(re(i,pe(rV)));return be(re(s,pe(l=>l.totalCount)),n),be(re(s,pe(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>nl(c)),pe(([l,c,u])=>kn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ft(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(qn,Yt)),Cr=Ue(([{log:e}])=>{const t=ae(!1),n=an(re(t,Ce(r=>r),ft()));return Qe(t,r=>{r&&Ct(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},dt(kr),{singleton:!0}),oV=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Pw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!oV)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ua=Ue(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Re(),b=Re(),g=ae(0);let h=null,v=null,y=null;function x(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),De(l,!1)}return be(re(f,$e(n,d,r,g,s,a,p),$e(e,i,o),pe(([[T,w,E,k,C,O,I,D],V,z,A])=>{const N=Pw(T),{align:H,behavior:M,offset:P}=N,$=k-1,L=Ew(N,w,$);let U=ca(L,w.offsetTree,V)+O;H==="end"?(U+=z+kn(w.sizeTree,L)[1]-E+A,L===$&&(U+=I)):H==="center"?U+=(z+kn(w.sizeTree,L)[1]-E+A)/2:U-=C,P&&(U+=P);const G=B=>{x(),B?(D("retrying to scroll to",{location:T},Jt.DEBUG),De(f,T)):(De(b,!0),D("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),M==="smooth"){let B=!1;y=Qe(t,Z=>{B=B||Z}),h=En(u,()=>{G(B)})}else h=En(re(t,iV(150)),G);return v=setTimeout(()=>{x()},1200),De(l,!0),D("scrolling from index to",{behavior:M,index:L,top:U},Jt.DEBUG),{behavior:M,top:U}})),c),{scrollTargetReached:b,scrollToIndex:f,topListHeight:g}},dt(qn,Yt,kr),{singleton:!0});function iV(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Pf(e,t){e==0?t():requestAnimationFrame(()=>{Pf(e-1,t)})}function Af(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const da=Ue(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return be(re(a,$e(l),Ce(([u,d])=>!!d),Rn(!1)),s),be(re(a,$e(l),Ce(([u,d])=>!!d),Rn(!1)),c),Qe(re(At(t,a),$e(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,b])=>u&&(!at(p)||mf(f))&&!d&&!b),$e(l)),([,u])=>{En(o,()=>{De(c,!0)}),Pf(4,()=>{En(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(qn,Yt,ua,Cr),{singleton:!0});function Aw(e,t){return Math.abs(e-t)<1.01}const fa="up",pa="down",aV="none",sV={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},lV=0,ha=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=Re(),c=Re(),u=ae(4),d=ae(lV),p=Wt(re(vf(re(ke(o),no(1),Rn(!0)),re(ke(o),no(1),Rn(!1),dw(100))),ft()),!1),f=Wt(re(vf(re(n,Rn(!0)),re(n,Rn(!1),dw(200))),ft()),!1);be(re(At(ke(o),ke(d)),pe(([y,x])=>y<=x),ft()),s),be(re(s,ir(50)),c);const b=an(re(At(r,ke(i),ke(t),ke(e),ke(u)),Hn((y,[{scrollHeight:x,scrollTop:T},w,E,k,C])=>{const O=T+w-x>-C,I={scrollHeight:x,scrollTop:T,viewportHeight:w};if(O){let V,z;return T>y.state.scrollTop?(V="SCROLLED_DOWN",z=y.state.scrollTop-T):(V="SIZE_DECREASED",z=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:z,state:I}}let D;return I.scrollHeight>y.state.scrollHeight?D="SIZE_INCREASED":w<y.state.viewportHeight?D="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?D="SCROLLING_UPWARDS":D="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:D,state:I}},sV),ft((y,x)=>y&&y.atBottom===x.atBottom))),g=Wt(re(r,Hn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(Aw(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const E=x-(T+w)<1;return y.scrollTop!==T&&E?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),pe(y=>y.jump)),0);be(re(b,pe(y=>y.atBottom)),a),be(re(a,ir(50)),l);const h=ae(pa);be(re(r,pe(({scrollTop:y})=>y),ft(),Hn((y,x)=>Ct(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?fa:pa,prevScrollTop:x},{direction:pa,prevScrollTop:0}),pe(y=>y.direction)),h),be(re(r,ir(50),Rn(aV)),h);const v=ae(0);return be(re(p,Ce(y=>!y),Rn(0)),v),be(re(o,ir(100),$e(p),Ce(([y,x])=>!!x),Hn(([y,x],[T])=>[x,T],[0,0]),pe(([y,x])=>x-y)),v),{atBottomState:b,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},dt(Yt)),rl="top",ol="bottom",Iw="none";function _w(e,t,n){return typeof e=="number"?n===fa&&t===rl||n===pa&&t===ol?e:0:n===fa?t===rl?e.main:e.reverse:t===ol?e.main:e.reverse}function Ow(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const If=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Re(),a=ae(0),s=ae(0),l=ae(0),c=Wt(re(At(ke(r),ke(o),ke(n),ke(i,la),ke(l),ke(a),ke(t),ke(e),ke(s)),pe(([u,d,p,[f,b],g,h,v,y,x])=>{const T=u-y,w=h+v,E=Math.max(p-T,0);let k=Iw;const C=Ow(x,rl),O=Ow(x,ol);return f-=y,f+=p+v,b+=p+v,b-=y,f>u+w-C&&(k=fa),b<u-E+d+O&&(k=pa),k!==Iw?[Math.max(T-p-_w(g,rl,k)-C,0),T-E-v+d+_w(g,ol,k)+O]:null}),Ce(u=>u!=null),ft(la)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Yt),{singleton:!0});function cV(e,t,n){if(nl(t)){const r=Tw(e,t);return[{index:kn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const _f={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function il(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,b=p-u;return{bottom:u,firstItemIndex:i,items:Dw(e,o,i),offsetBottom:b,offsetTop:c,top:f,topItems:Dw(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Mw(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=Af(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return il(c,[],s,o,n,r)}function Dw(e,t,n){if(e.length===0)return[];if(!nl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Js(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const oo=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:b}])=>{const g=ae([]),h=ae(0),v=Re();be(i.topItemsIndexes,g);const y=Wt(re(At(f,b,ke(l,la),ke(o),ke(r),ke(c),u,ke(g),ke(t),ke(n),e),Ce(([E,k,,C,,,,,,,O])=>{const I=O&&O.length!==C;return E&&!k&&!I}),pe(([,,[E,k],C,O,I,D,V,z,A,N])=>{const H=O,{offsetTree:M,sizeTree:P}=H,$=Ct(h);if(C===0)return{..._f,totalCount:C};if(E===0&&k===0)return $===0?{..._f,totalCount:C}:Mw($,I,O,z,A,N||[]);if(at(P))return $>0?null:il(cV(Af(I,C),H,N),[],C,A,H,z);const L=[];if(V.length>0){const ee=V[0],te=V[V.length-1];let J=0;for(const R of Js(P,ee,te)){const q=R.value,X=Math.max(R.start,ee),oe=Math.min(R.end,te);for(let j=X;j<=oe;j++)L.push({data:N?.[j],index:j,offset:J,size:q}),J+=q}}if(!D)return il([],L,C,A,H,z);const U=V.length>0?V[V.length-1]+1:0,G=XF(M,E,k,U);if(G.length===0)return null;const B=C-1,Z=Qs([],ee=>{for(const te of G){const J=te.value;let R=J.offset,q=te.start;const X=J.size;if(J.offset<E){q+=Math.floor((E-J.offset+A)/(X+A));const j=q-te.start;R+=j*X+j*A}q<U&&(R+=(U-q)*X,q=U);const oe=Math.min(te.end,B);for(let j=q;j<=oe&&!(R>=k);j++)ee.push({data:N?.[j],index:j,offset:R,size:X}),R+=X+A}});return il(Z,L,C,A,H,z)}),Ce(E=>E!==null),ft()),_f);be(re(e,Ce(mf),pe(E=>E?.length)),o),be(re(y,pe(E=>E.topListHeight)),d),be(d,s),be(re(y,pe(E=>[E.top,E.bottom])),a),be(re(y,pe(E=>E.items)),v);const x=an(re(y,Ce(({items:E})=>E.length>0),$e(o,e),Ce(([{items:E},k])=>E[E.length-1].originalIndex===k-1),pe(([,E,k])=>[E-1,k]),ft(la),pe(([E])=>E))),T=an(re(y,ir(200),Ce(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),pe(({items:E})=>E[0].index),ft())),w=an(re(y,Ce(({items:E})=>E.length>0),pe(({items:E})=>{let k=0,C=E.length-1;for(;E[k].type==="group"&&k<C;)k++;for(;E[C].type==="group"&&C>k;)C--;return{endIndex:E[C].index,startIndex:E[k].index}}),ft(ww)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},dt(qn,Cw,If,da,ua,ha,Cr,Ef),{singleton:!0}),Nw=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Re(),a=Wt(re(At(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Yt,oo),{singleton:!0}),uV=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Wt(re(At(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),ir(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Yt,Nw),{singleton:!0}),Lw=Ue(()=>({context:ae(null)})),dV=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,Fw=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Re();return be(re(u,$e(t,l,n,i,o,r,s),$e(e),pe(([[d,p,f,b,g,h,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:E=dV,done:k,...C}=d,O=Ew(d,p,b-1),I=ca(O,p.offsetTree,x)+g+h,D=I+kn(p.sizeTree,O)[1],V=y+h,z=y+f-v,A=E({itemBottom:D,itemTop:I,locationParams:{align:T,behavior:w,...C},viewportBottom:z,viewportTop:V});return A?k&&En(re(a,Ce(N=>!N),no(Ct(a)?1:2)),k):k&&k(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(qn,Yt,ua,oo,kr),{singleton:!0});function Vw(e){return e?e==="smooth"?"smooth":"auto":!1}const fV=(e,t)=>typeof e=="function"?Vw(e(t)):t&&Vw(e),pV=Ue(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:p},{scrollIntoView:f}])=>{const b=ae(!1),g=Re();let h=null;function v(w){De(a,{align:"end",behavior:w,index:"LAST"})}Qe(re(At(re(ke(t),no(1)),l),$e(ke(b),i,s,d),pe(([[w,E],k,C,O,I])=>{let D=E&&O,V="auto";return D&&(V=fV(k,C||I),D=D&&!!V),{followOutputBehavior:V,shouldFollow:D,totalCount:w}}),Ce(({shouldFollow:w})=>w)),({followOutputBehavior:w,totalCount:E})=>{h&&(h(),h=null),Ct(n)?requestAnimationFrame(()=>{Ct(u)("following output to ",{totalCount:E},Jt.DEBUG),v(w)}):h=En(e,()=>{Ct(u)("following output to ",{totalCount:E},Jt.DEBUG),v(w),h=null})});function y(w){const E=En(o,k=>{w&&!k.atBottom&&k.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Ct(u)("scrolling to bottom due to increased size",{},Jt.DEBUG),v("auto"))});setTimeout(E,100)}Qe(re(At(ke(b),t,c),Ce(([w,,E])=>w&&E),Hn(({value:w},[,E])=>({refreshed:w===E,value:E}),{refreshed:!1,value:0}),Ce(({refreshed:w})=>w),$e(b,t)),([,w])=>{Ct(s)&&y(w!==!1)}),Qe(g,()=>{y(Ct(b)!==!1)}),Qe(At(ke(b),o),([w,E])=>{w&&!E.atBottom&&E.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ae(null),T=Re();return be(vf(re(ke(r),pe(w=>{var E;return(E=w?.length)!=null?E:0})),re(ke(t))),T),Qe(re(At(re(T,no(1)),l),$e(ke(x),s,d,p),pe(([[w,E],k,C,O,I])=>E&&C&&k?.({context:I,totalCount:w,scrollingInProgress:O})),Ce(w=>!!w),ir(0)),w=>{h&&(h(),h=null),Ct(n)?requestAnimationFrame(()=>{Ct(u)("scrolling into view",{}),De(f,w)}):h=En(e,()=>{Ct(u)("scrolling into view",{}),De(f,w),h=null})}),{autoscrollToBottom:g,followOutput:b,scrollIntoViewOnChange:x}},dt(qn,ha,ua,da,Cr,kr,Yt,Lw,Fw)),hV=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,$e(i),Ce(([,l])=>l!==0),$e(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Mw(l,c,u,d,p,f))),a),{}),dt(qn,da,oo,Cr),{singleton:!0}),mV=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Qe(re(e,$e(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{En(re(n,no(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},dt(Cr,Yt,oo),{singleton:!0}),$w=Ue(([{scrollVelocity:e}])=>{const t=ae(!1),n=Re(),r=ae(!1);return be(re(e,$e(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),ft()),t),Qe(re(At(t,e,n),$e(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(ha),{singleton:!0}),Of=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=Re(),r=Re(),o=Re(),i=ae(!1),a=ae(void 0);return be(re(At(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,$e(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Yt)),gV=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Re(),u=ae(void 0),d=ae(null),p=ae(null);return be(s,d),be(l,p),Qe(re(c,$e(t,r,a,d,p,n)),([f,b,g,h,v,y,x])=>{const T=JF(b.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),be(re(u,Ce(mf),pe(vV)),o),be(re(i,$e(u),Ce(([,f])=>f!==void 0),ft(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(qn,Yt,da,Cr,Of));function vV(e){return{align:"start",index:0,offset:e.scrollTop}}const yV=Ue(([{topItemsIndexes:e}])=>{const t=ae(0);return be(re(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(oo));function jw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const bV=jw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),xV=Ue(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:b}])=>{const g=an(re(l,$e(a),Hn(([,v,y,x],[{bottom:T,items:w,offsetBottom:E,totalCount:k},C])=>{const O=T+E;let I=0;return y===k&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(I=O-x,I!==0&&(I+=C))),[I,w,k,O]},[0,[],0,0]),Ce(([v])=>v!==0),$e(r,s,n,o,f,b),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===fa),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Jt.DEBUG),v))));function h(v){v>0?(De(t,{behavior:"auto",top:-v}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-v}))}return Qe(re(g,$e(e,i)),([v,y,x])=>{x&&bV()?De(e,y-v):h(-v)}),Qe(re(At(Wt(i,!1),e,b),Ce(([v,y,x])=>!v&&!x&&y!==0),pe(([v,y])=>y),ir(1)),h),be(re(d,pe(v=>({top:-v}))),t),Qe(re(c,$e(p,u),pe(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function E(k){return k*(x+w)}if(y.length===0)return E(v);{let k=0;const C=sa(T,0);let O=0,I=0;for(;O<v;){O++,k+=C;let D=y.length===I+1?1/0:y[I+1]-y[I]-1;O+D>v&&(k-=C,D=v-O+1),O+=D,k+=E(D),I++}return k}})),v=>{De(e,v),requestAnimationFrame(()=>{De(t,{top:v}),requestAnimationFrame(()=>{De(e,0),De(b,!1)})})}),{deviation:e}},dt(Yt,ha,oo,qn,kr,Ef)),wV=Ue(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),dt(If,hV,Cr,$w,Nw,mV,uV,Of,Fw,kr,Lw)),zw=Ue(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:b},g,h,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},E,{topItemCount:k},{groupCounts:C},O])=>(be(T.rangeChanged,O.scrollSeekRangeChanged),be(re(O.windowViewportRect,pe(I=>I.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:C,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:b,sizeRanges:s,topItemCount:k,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...O,...g,sizes:l,...h}),dt(qn,da,Yt,gV,pV,oo,ua,xV,yV,Cw,wV));function SV(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const al=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Mf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(h,v){h.propsReady&&De(h.propsReady,!1);for(const y of r){const x=h[t.required[y]];De(x,v[y])}for(const y of o)if(y in v){const x=h[t.optional[y]];De(x,v[y])}h.propsReady&&De(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=x=>{const T=h[t.methods[y]];De(T,x)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=jF(h[t.events[y]]),v),{})}const d=S.forwardRef((h,v)=>{const{children:y,...x}=h,[T]=S.useState(()=>Qs(BF(e),k=>{l(k,x)})),[w]=S.useState(uw(u,T));al(()=>{for(const k of a)k in x&&Qe(w[k],x[k]);return()=>{Object.values(w).map(gf)}},[x,w,T]),al(()=>{l(T,x)}),S.useImperativeHandle(v,cw(c(T)));const E=n;return m.jsx(s.Provider,{value:T,children:n?m.jsx(E,{...SV([...r,...o,...a],x),children:y}):y})}),p=h=>{const v=S.useContext(s);return S.useCallback(y=>{De(v[h],y)},[v,h])},f=h=>{const v=S.useContext(s)[h],y=S.useCallback(x=>Qe(v,x),[v]);return S.useSyncExternalStore(y,()=>Ct(v),()=>Ct(v))},b=h=>{const v=S.useContext(s)[h],[y,x]=S.useState(uw(Ct,v));return al(()=>Qe(v,T=>{T!==y&&x(cw(T))}),[v,y]),y},g=S.version.startsWith("18")?f:b;return{Component:d,useEmitter:(h,v)=>{const y=S.useContext(s)[h];al(()=>Qe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const sl=S.createContext(void 0),Bw=S.createContext(void 0),Rw=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Df(e){return"self"in e}function TV(e){return"body"in e}function Hw(e,t,n,r=Jo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(p=>{let f,b,g;const h=p.target;if(TV(h)||Df(h)){const y=Df(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,b=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,b=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:b})};p.suppressFlushSync?v():uo.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-b)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const b=p.behavior==="smooth";let g,h,v;Df(f)?(h=Math.max(Cn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=Cn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),Aw(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),b&&t(!0);return}b?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const Nf="-webkit-sticky",Ww="sticky",Lf=jw(()=>{if(typeof document>"u")return Ww;const e=document.createElement("div");return e.style.position=Nf,e.style.position===Nf?Nf:Ww});function Ff(e){return e}const EV=Ue(()=>{const e=ae(s=>`Item ${s}`),t=ae(s=>`Group ${s}`),n=ae({}),r=ae(Ff),o=ae("div"),i=ae(Jo),a=(s,l=null)=>Wt(re(n,pe(c=>c[s]),ft()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),kV=Ue(([e,t])=>({...e,...t}),dt(zw,EV)),CV=({height:e})=>m.jsx("div",{style:{height:e}}),PV={overflowAnchor:"none",position:Lf(),zIndex:1},qw={overflowAnchor:"none"},AV={...qw,display:"inline-block",height:"100%"},Uw=S.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=gn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=gn("windowScrollContainerState"),a=gn("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),b=gn("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=pw(n,p,d,e?Jo:s,f,b,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=S.useState(0);jf("deviation",A=>{v!==A&&y(A)});const x=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||CV,w=Ae("ListComponent"),E=Ae("ItemComponent"),k=Ae("GroupComponent"),C=Ae("computeItemKey"),O=Ae("isSeeking"),I=Ae("groupIndices").length>0,D=Ae("alignToBottom"),V=Ae("initialItemFinalLocationReached"),z=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:D?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:D?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...lt(x,c)}):m.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:z,children:(e?t.topItems:t.items).map(A=>{const N=A.originalIndex,H=C(N+t.firstItemIndex,A.data,c);return O?S.createElement(T,{...lt(T,c),height:A.size,index:A.index,key:H,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?S.createElement(k,{...lt(k,c),"data-index":N,"data-item-index":A.index,"data-known-size":A.size,key:H,style:PV},u(A.index,c)):S.createElement(E,{...lt(E,c),...Yw(E,A.data),"data-index":N,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:H,style:g?AV:qw},I?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),IV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},_V={outline:"none",overflowX:"auto",position:"relative"},ti=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),OV={position:Lf(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function Yw(e,t){return{item:typeof e=="string"?void 0:t}}const MV=S.memo(function(){const e=Ae("HeaderComponent"),t=gn("headerHeight"),n=Ae("HeaderFooterTag"),r=Wn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),DV=S.memo(function(){const e=Ae("FooterComponent"),t=gn("footerHeight"),n=Ae("HeaderFooterTag"),r=Wn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null});function Vf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:b}=Hw(a,l,s,c,void 0,d);return e("scrollTo",b),e("scrollBy",p),m.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?_V:IV,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function $f({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=S.useRef(null),b=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=Hw(a,l,s,b,d);return Rw(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),m.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,p),children:r})})}const NV=({children:e})=>{const t=S.useContext(sl),n=gn("viewportHeight"),r=gn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=S.useMemo(()=>ia(n,l=>Cn(l,i?"width":"height")),[n,i]),s=Wn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:ti(o),children:e})},LV=({children:e})=>{const t=S.useContext(sl),n=gn("windowViewportRect"),r=gn("fixedItemHeight"),o=Ae("customScrollParent"),i=bf(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),m.jsx("div",{"data-viewport-type":"window",ref:i,style:ti(a),children:e})},FV=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...OV,marginTop:`${n}px`},o=Ae("context");return m.jsx(t,{style:r,...lt(t,o),children:e})},VV=S.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?zV:jV,a=r||t?LV:NV;return m.jsxs(i,{...e,...lt(i,o),children:[n&&m.jsx(FV,{children:m.jsx(Uw,{showTopList:!0})}),m.jsxs(a,{children:[m.jsx(MV,{}),m.jsx(Uw,{}),m.jsx(DV,{})]})]})}),{Component:$V,useEmitter:jf,useEmitterValue:Ae,usePublisher:gn}=Mf(kV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},VV),jV=Vf({useEmitter:jf,useEmitterValue:Ae,usePublisher:gn}),zV=$f({useEmitter:jf,useEmitterValue:Ae,usePublisher:gn}),zf=$V,BV=Ue(()=>{const e=ae(c=>m.jsxs("td",{children:["Item $",c]})),t=ae(null),n=ae(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ae(null),o=ae(null),i=ae({}),a=ae(Ff),s=ae(Jo),l=(c,u=null)=>Wt(re(i,pe(d=>d[c]),ft()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),RV=Ue(([e,t])=>({...e,...t}),dt(zw,BV)),HV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),WV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),qV={overflowAnchor:"none"},Kw={position:Lf(),zIndex:2,overflowAnchor:"none"},Gw=S.memo(function({showTopList:e=!1}){const t=Ne("listState"),n=Ne("computeItemKey"),r=Ne("firstItemIndex"),o=Ne("context"),i=Ne("isSeeking"),a=Ne("fixedHeaderHeight"),s=Ne("groupIndices").length>0,l=Ne("itemContent"),c=Ne("groupContent"),u=Ne("ScrollSeekPlaceholder")||HV,d=Ne("GroupComponent"),p=Ne("TableRowComponent"),f=(e?t.topItems:[]).reduce((g,h,v)=>(v===0?g.push(h.size):g.push(g[v-1]+h.size),g),[]),b=(e?t.topItems:t.items).map(g=>{const h=g.originalIndex,v=n(h+r,g.data,o),y=e?h===0?0:f[h-1]:0;return i?S.createElement(u,{...lt(u,o),height:g.size,index:g.index,key:v,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...lt(d,o),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,key:v,style:{...Kw,top:a}},c(g.index,o)):S.createElement(p,{...lt(p,o),...Yw(p,g.data),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:v,style:e?{...Kw,top:a+y}:qV},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:b})}),UV=S.memo(function(){const e=Ne("listState"),t=Ne("topItemsIndexes").length>0,n=Pn("sizeRanges"),r=Ne("useWindowScroll"),o=Ne("customScrollParent"),i=Pn("windowScrollContainerState"),a=Pn("scrollContainerState"),s=o||r?i:a,l=Ne("trackItemSizes"),c=Ne("itemSize"),u=Ne("log"),{callbackRef:d,ref:p}=pw(n,c,l,s,u,void 0,o,!1,Ne("skipAnimationFrameInResizeObserver")),[f,b]=S.useState(0);Bf("deviation",I=>{f!==I&&(p.current.style.marginTop=`${I}px`,b(I))});const g=Ne("EmptyPlaceholder"),h=Ne("FillerRow")||WV,v=Ne("TableBodyComponent"),y=Ne("paddingTopAddition"),x=Ne("statefulTotalCount"),T=Ne("context");if(x===0&&g)return m.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((I,D)=>I+D.size,0),E=e.offsetTop+y+f-w,k=e.offsetBottom,C=E>0?m.jsx(h,{context:T,height:E},"padding-top"):null,O=k>0?m.jsx(h,{context:T,height:k},"padding-bottom"):null;return m.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[C,t&&m.jsx(Gw,{showTopList:!0}),m.jsx(Gw,{}),O]})}),YV=({children:e})=>{const t=S.useContext(sl),n=Pn("viewportHeight"),r=Pn("fixedItemHeight"),o=Wn(S.useMemo(()=>ia(n,i=>Cn(i,"height")),[n]),!0,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:ti(!1),children:e})},KV=({children:e})=>{const t=S.useContext(sl),n=Pn("windowViewportRect"),r=Pn("fixedItemHeight"),o=Ne("customScrollParent"),i=bf(n,o,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),m.jsx("div",{"data-viewport-type":"window",ref:i,style:ti(!1),children:e})},GV=S.memo(function(e){const t=Ne("useWindowScroll"),n=Ne("customScrollParent"),r=Pn("fixedHeaderHeight"),o=Pn("fixedFooterHeight"),i=Ne("fixedHeaderContent"),a=Ne("fixedFooterContent"),s=Ne("context"),l=Wn(S.useMemo(()=>ia(r,v=>Cn(v,"height")),[r]),!0,Ne("skipAnimationFrameInResizeObserver")),c=Wn(S.useMemo(()=>ia(o,v=>Cn(v,"height")),[o]),!0,Ne("skipAnimationFrameInResizeObserver")),u=n||t?QV:XV,d=n||t?KV:YV,p=Ne("TableComponent"),f=Ne("TableHeadComponent"),b=Ne("TableFooterComponent"),g=i?m.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,h=a?m.jsx(b,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(b,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...lt(u,s),children:m.jsx(d,{children:m.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(p,s),children:[g,m.jsx(UV,{},"TableBody"),h]})})})}),{Component:ZV,useEmitter:Bf,useEmitterValue:Ne,usePublisher:Pn}=Mf(RV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},GV),XV=Vf({useEmitter:Bf,useEmitterValue:Ne,usePublisher:Pn}),QV=$f({useEmitter:Bf,useEmitterValue:Ne,usePublisher:Pn}),JV=ZV,Zw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},e$={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Xw,floor:ll,max:ma,min:Rf,round:Qw}=Math;function Jw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function t$(e){return{...e$,items:e}}function cl(e,t){return e&&e.width===t.width&&e.height===t.height}function n$(e,t){return e&&e.column===t.column&&e.row===t.row}const r$=Ue(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:b,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const E=ae(0),k=ae(0),C=ae(Zw),O=ae({height:0,width:0}),I=ae({height:0,width:0}),D=Re(),V=Re(),z=ae(0),A=ae(null),N=ae({column:0,row:0}),H=Re(),M=Re(),P=ae(!1),$=ae(0),L=ae(!0),U=ae(!1),G=ae(!1);Qe(re(b,$e($),Ce(([R,q])=>!!q)),()=>{De(L,!1)}),Qe(re(At(b,L,I,O,$,U),Ce(([R,q,X,oe,,j])=>R&&!q&&X.height!==0&&oe.height!==0&&!j)),([,,,,R])=>{De(U,!0),Pf(1,()=>{De(D,R)}),En(re(c),()=>{De(t,[0,0]),De(L,!0)})}),be(re(M,Ce(R=>R!=null&&R.scrollTop>0),Rn(0)),k),Qe(re(b,$e(M),Ce(([,R])=>R!=null)),([,R])=>{R&&(De(O,R.viewport),De(I,R.item),De(N,R.gap),R.scrollTop>0&&(De(P,!0),En(re(c,no(1)),q=>{De(P,!1)}),De(l,{top:R.scrollTop})))}),be(re(O,pe(({height:R})=>R)),d),be(re(At(ke(O,cl),ke(I,cl),ke(N,(R,q)=>R&&R.column===q.column&&R.row===q.row),ke(c)),pe(([R,q,X,oe])=>({gap:X,item:q,scrollTop:oe,viewport:R}))),H),be(re(At(ke(E),r,ke(N,n$),ke(I,cl),ke(O,cl),ke(A),ke(k),ke(P),ke(L),ke($)),Ce(([,,,,,,,R])=>!R),pe(([R,[q,X],oe,j,se,le,he,,xe,de])=>{const{column:Pe,row:Oe}=oe,{height:Se,width:Be}=j,{width:ue}=se;if(he===0&&(R===0||ue===0))return Zw;if(Be===0){const xt=Af(de,R),Kt=xt+Math.max(he-1,0);return t$(Jw(xt,Kt,le))}const Y=e1(ue,Be,Pe);let F,Q;xe?q===0&&X===0&&he>0?(F=0,Q=he-1):(F=Y*ll((q+Oe)/(Se+Oe)),Q=Y*Xw((X+Oe)/(Se+Oe))-1,Q=Rf(R-1,ma(Q,Y-1)),F=Rf(Q,ma(0,F))):(F=0,Q=-1);const ce=Jw(F,Q,le),{bottom:we,top:Le}=t1(se,oe,j,ce),Ze=Xw(R/Y),Ft=Ze*Se+(Ze-1)*Oe-we;return{bottom:we,itemHeight:Se,items:ce,itemWidth:Be,offsetBottom:Ft,offsetTop:Le,top:Le}})),C),be(re(A,Ce(R=>R!==null),pe(R=>R.length)),E),be(re(At(O,I,C,N),Ce(([R,q,{items:X}])=>X.length>0&&q.height!==0&&R.height!==0),pe(([R,q,{items:X},oe])=>{const{bottom:j,top:se}=t1(R,oe,q,X);return[se,j]}),ft(la)),t);const B=ae(!1);be(re(c,$e(B),pe(([R,q])=>q||R!==0)),B);const Z=an(re(At(C,E),Ce(([{items:R}])=>R.length>0),$e(B),Ce(([[R,q],X])=>{const oe=R.items[R.items.length-1].index===q-1;return(X||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===q)&&oe}),pe(([[,R]])=>R-1),ft())),ee=an(re(ke(C),Ce(({items:R})=>R.length>0&&R[0].index===0),Rn(0),ft())),te=an(re(ke(C),$e(P),Ce(([{items:R},q])=>R.length>0&&!q),pe(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),ft(ww),ir(0)));be(te,f.scrollSeekRangeChanged),be(re(D,$e(O,I,E,N),pe(([R,q,X,oe,j])=>{const se=Pw(R),{align:le,behavior:he,offset:xe}=se;let de=se.index;de==="LAST"&&(de=oe-1),de=ma(0,de,Rf(oe-1,de));let Pe=Hf(q,j,X,de);return le==="end"?Pe=Qw(Pe-q.height+X.height):le==="center"&&(Pe=Qw(Pe-q.height/2+X.height/2)),xe&&(Pe+=xe),{behavior:he,top:Pe}})),l);const J=Wt(re(C,pe(R=>R.offsetBottom+R.bottom)),0);return be(re(T,pe(R=>({height:R.visibleHeight,width:R.visibleWidth}))),O),{customScrollParent:h,data:A,deviation:z,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:I,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:D,scrollTop:c,smoothScrollTargetReached:u,totalCount:E,useWindowScroll:v,viewportDimensions:O,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:C,horizontalDirection:G,initialTopMostItemIndex:$,totalListHeight:J,...p,endReached:Z,propsReady:g,rangeChanged:te,startReached:ee,stateChanged:H,stateRestoreInProgress:P,...w}},dt(If,Yt,ha,$w,Cr,Of,kr));function e1(e,t,n){return ma(1,ll((e+n)/(ll(t)+n)))}function t1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Hf(e,t,n,r[0].index);return{bottom:Hf(e,t,n,r[r.length-1].index)+o,top:i}}function Hf(e,t,n,r){const o=e1(e.width,n.width,t.column),i=ll(r/o),a=i*n.height+ma(0,i-1)*t.row;return a>0?a+t.row:a}const o$=Ue(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(Ff),a=ae("div"),s=ae(Jo),l=(d,p=null)=>Wt(re(t,pe(f=>f[d]),ft()),p),c=ae(!1),u=ae(!1);return be(ke(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),i$=Ue(([e,t])=>({...e,...t}),dt(r$,o$)),a$=S.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),o=pt("computeItemKey"),i=pt("isSeeking"),a=vn("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),c=pt("ScrollSeekPlaceholder"),u=pt("context"),d=vn("itemDimensions"),p=vn("gap"),f=pt("log"),b=pt("stateRestoreInProgress"),g=vn("reportReadyState"),h=Wn(S.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:r1("column-gap",getComputedStyle(v).columnGap,f),row:r1("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return Rw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),b?null:m.jsx(l,{className:t,ref:h,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?m.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):S.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),s$=S.memo(function(){const e=pt("HeaderComponent"),t=vn("headerHeight"),n=pt("headerFooterTag"),r=Wn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),l$=S.memo(function(){const e=pt("FooterComponent"),t=vn("footerHeight"),n=pt("headerFooterTag"),r=Wn(S.useMemo(()=>i=>{t(Cn(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),c$=({children:e})=>{const t=S.useContext(Bw),n=vn("itemDimensions"),r=vn("viewportDimensions"),o=Wn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),m.jsx("div",{ref:o,style:ti(!1),children:e})},u$=({children:e})=>{const t=S.useContext(Bw),n=vn("windowViewportRect"),r=vn("itemDimensions"),o=pt("customScrollParent"),i=bf(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),m.jsx("div",{ref:i,style:ti(!1),children:e})},d$=S.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?p$:f$,o=n||t?u$:c$,i=pt("context");return m.jsx(r,{...e,...lt(r,i),children:m.jsxs(o,{children:[m.jsx(s$,{}),m.jsx(a$,{}),m.jsx(l$,{})]})})}),{useEmitter:n1,useEmitterValue:pt,usePublisher:vn}=Mf(i$,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},d$),f$=Vf({useEmitter:n1,useEmitterValue:pt,usePublisher:vn}),p$=$f({useEmitter:n1,useEmitterValue:pt,usePublisher:vn});function r1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const o1=()=>window.matchMedia("@media (pointer: coarse)"),h$=()=>{const e=S.useRef(hr()?null:o1()),[t,n]=S.useState(hr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?o1():e.current).addEventListener("change",o=>n(o.matches))},[]),t},i1=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=h$(),o=S.useRef(hr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||yb())return;document.documentElement.style.padding=rm(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(FT(c.style.height)):null,p=je.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},m$=e=>m.jsx(S.Fragment,{children:e.children}),g$={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},v$=[],y$=S.forwardRef(function(t,n){return m.jsx(We.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:m.jsx(wn,{children:t.children})})}),b$=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(We.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),x$={List:y$,Item:b$},ni=44,w$=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:b=!1,...g},h)=>{const v=S.useRef(null),y=S.useRef(null),x=S.useRef(null),T=g.value??g.defaultValue??"",w=Et(),[E,k]=S.useState(()=>Math.min(320,ni*o.length)),[C,O]=S.useState(!1),[I,D]=S.useState(""),[V,z]=S.useState(T),[A,N]=S.useState(()=>o.find(Y=>Y.value===T)?.label??T),[H,M]=S.useState(null),P=S.useRef(v$),$=i1(C,"block-only"),L=b&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,U=()=>uo.flushSync(()=>O(!0)),G=I?uf(L,"value",[{key:"value",value:I},{key:"label",value:I}]):L,B=()=>{O(!1),k(0)},Z=G.filter(Y=>Y.hidden!==!0),ee=b?void 0:`^(${o.map(Y=>`${ud(Y.value)}${Y.label?"|"+ud(Y.label):""}`).join("|")})$`,{x:te,y:J,strategy:R,refs:q,context:X}=rr({open:C,transform:!0,onOpenChange:O,placement:"bottom-start",whileElementsMounted:Wo,middleware:[Xi(4),ix({padding:10,elementContext:"reference",apply(Y){const Q=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=bi(q.reference.current,window.innerHeight),we=Math.min(Q<ni?ce:Q,ce,Y.availableHeight),Le=Z.length===0?ni:Math.min(we,ce,Q),Ze=`${y.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),oe=jx(X,g$),{getReferenceProps:j,getFloatingProps:se,getItemProps:le}=or([Tr(X,{role:"listbox"}),Sr(X),Vs(X,{cols:0,listRef:P,loop:!0,virtual:!0,allowEscape:!0,activeIndex:H,selectedIndex:H,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(g.value){const Y=o.find(F=>F.value===g.value);Y&&(N(Y.label??Y.value),z(g.value))}},[g.value,o.length]),S.useEffect(()=>{if(!C)return k(0);const Y=q.reference;if(Y.current===null)return;const F=bi(Y.current,window.innerHeight);setTimeout(()=>k(Math.min(F,Z.length*ni)),100)},[I,C,q.reference,Z.length]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return yi(Y)},[]);const he=(Y,F)=>{z(Y.value);const Q=q.reference.current;if(!Q)return;Q?.setAttribute("data-value",Y.value),Q.value=Y.value;const ce=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ce),g.onChange&&g.onChange(ce),N(Y.label??""),B(),D(""),M(F)},xe=Y=>{const F=Y.target.value;return D(F),!C&&F===""?O(!0):(Y.target.name=g.name||"",F?O(!0):g.onChange?.(Y))},de=()=>{U(),D(""),q.reference.current?.focus()},Pe=()=>{M(Y=>Y===null?0:Y),U(),D("")},Oe=()=>{q.reference.current?.setAttribute("data-value",""),D(""),z(""),N(""),nm(q.reference.current),B()},Se=g.id||g.name,Be=`${Se}-shadow`,ue=Z.length===0;return m.jsxs(na,{...g,left:e,error:t,ref:y,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:Be,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:de,children:[m.jsx(zu,{size:20}),m.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),V?m.jsx("button",{type:"button",onClick:Oe,className:"p-2 transition-colors link:text-danger md:p-1",children:m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[m.jsx("input",{"data-shadow":"true",...j({...g,onFocus:Pe,pattern:ee,onChange:xe,id:Be,name:Be,ref:q.setReference,onClick:Y=>Y.currentTarget.focus(),onKeyDown(Y){if(Y.key==="Escape")return Y.currentTarget.blur(),B();if(C){if(Y.key==="ArrowDown"){let F=je.number(H)?H+1:0;return F>Z.length-1&&(F=0),x.current?.scrollIntoView({index:F}),M(F)}if(Y.key==="ArrowUp"){let F=je.number(H)?H-1:Z.length-1;return F<0&&(F=Z.length-1),x.current?.scrollIntoView({index:F}),M(F)}if(Y.key==="Enter"){if(H!==null&&Z[H])return Y.preventDefault(),he(Z[H],H);if(Z.length===1)return Y.preventDefault(),he(Z[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Se,"data-target":Se,required:f,value:C?I:o.length===0?"":A||V,"aria-autocomplete":"list",autoComplete:"off",className:Te("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),m.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:h,required:f,defaultValue:g.value||V||void 0}),m.jsx(xr,{preserveTabOrder:!0,children:C?m.jsx(Qr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(We.div,{...se({ref:Zn($,q.setFloating),style:{...oe.styles,left:te,top:J??0,position:R}}),initial:!1,"data-floating":"true",animate:{height:ue?"auto":E},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!C)return k(0);const F=q.floating.current.querySelectorAll("li").item(0),Q=(F?F.getBoundingClientRect().height:ni)*Z.length;return uo.flushSync(()=>k(Q+10))},children:[ue?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,m.jsx(zf,{overscan:40,ref:x,hidden:ue,data:Z,style:{height:E-10},defaultItemHeight:ni,components:x$,scrollerRef:Y=>void(v.current=Y),className:"max-h-[calc(100%-2px)] overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(Y,F)=>{const Q=F.Render??m$,ce=V===F.value||V===F.label,we=H===Y,Le=F.label??F.value;return m.jsx("button",{"data-value":F.value,...le({ref:Ze=>void(P.current[Y]=Ze),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":F.disabled,onClick:()=>he(F,Y),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ce?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(Q,{...g,label:F.label,value:F.value,children:Le})})}})]})}):null})]})}),Wf=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return m.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Te("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[m.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Te("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,m.jsx("span",{"data-name":"checkbox-label",className:Te("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),a1=new Date(1970,11,31),qf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},s1={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},S$={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Uf=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},T$={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},E$={day:"numeric",month:"numeric",year:"numeric"},k$=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,type:a,...s},l)=>{const c=ld(t),u=S.useId(),d=Et(),p=S.useMemo(()=>new Intl.DateTimeFormat(c,a==="datetime"?T$:E$),[c,a]),[f,b]=S.useState(e||void 0),[g,h]=S.useState(!1),v=Uf(p,a1).flatMap(I=>je.keyof(qf,I.type)?qf[I.type](I.value):[]),y=S.useMemo(()=>Uf(p,a1).reduce((I,D)=>I+(je.keyof(s1,D.type)?s1[D.type](D.value):""),""),[p]),x=e?.toISOString(),[T,w]=S.useState(f?Uf(p,f).reduce((I,D)=>I+(je.keyof(qf,D.type)?S$[D.type](f,D.value):""),""):""),E=I=>{const D=I.target.value;if(w(D),v.length===D.length&&v.every((z,A)=>{const N=D.charAt(A);return typeof z=="string"?N===z:z.test(N)})){const z=cM(D,y,new Date),A=a==="datetime"?z:qr(z);return b(A),r?.(A)}return b(void 0),r?.(void 0)};S.useEffect(()=>{Za(e)&&(b(e),w(Gu(e,y)))},[x,y]);const k=I=>(b(I),r?.(I),i&&h(!1),w(I?Gu(I,y):"")),C=Za(f),O=C?f.toISOString():void 0;return m.jsx(Ko,{...s,mask:v,value:T,id:void 0,name:void 0,"data-value":O,formNoValidate:!g,"data-target":s.name,"data-component":"date-picker",onChange:E,required:s.required??!0,error:g?void 0:s.error,placeholder:s.placeholder||d.datepickerPlaceholder(y),right:m.jsxs(S.Fragment,{children:[m.jsx("input",{"data-origin":s.name,defaultValue:O,form:s.form,hidden:!0,id:s.name,name:s.name,ref:l,type:"date"}),m.jsx(Xo,{open:g,onChange:h,buttonProps:{"aria-describedby":u},trigger:m.jsxs("span",{"aria-labelledby":u,children:[m.jsx("span",{id:u,className:"sr-only",children:d.datePickerCalendarButtonLabel}),m.jsx(qI,{})]}),children:m.jsx(Xx,{...s,type:a,locale:c,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:C?f:void 0})})]})})}),C$=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],P$=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],A$=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],I$=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],l1=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},c1=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},_$=e=>typeof e=="number"?Math.log(e):c1(e)*Math.log(10),O$=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t};function M$(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?I$:A$:t.binary?P$:C$,r=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=l1(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?_$(e)/Math.log(1024):c1(e)/3),n.length-1);e=O$(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));const l=l1(Number(e),t.locale,a),c=n[s];return i+l+r+c}var ul={exports:{}},dl={exports:{}},Je={};/** @license React v16.13.1
|
|
222
|
+
*/var f0;function TN(){return f0||(f0=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=u0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Zd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=p(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Zd}var p0;function EN(){return p0||(p0=1,process.env.NODE_ENV==="production"?$s.exports=SN():$s.exports=TN()),$s.exports}EN();var Uo=function(){return Uo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Uo.apply(this,arguments)};function ea(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function h0(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Yo=function(e){var t=S.useRef(e??{});return S.useEffect(function(){return void(t.current=e)},[e]),t},kN=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},CN=function(e){return Object.entries(e)},m0=function(e){return e instanceof Promise},g0=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Uo(Uo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},PN=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,h0([],ea(a),!1)),u=function(d,p){return n(function(f){return g0(d,f,i,p)})};return m0(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},AN=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,h0([],ea(a),!1)),c=function(u){return n(function(d){return g0(u,d,i,o.current)})};return m0(l)?l.then(function(u){return c(u)}):c(l)}},Xd=function(e,t,n){var r,o,i,a=ea(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Yo(s),u=Yo((r=n?.props)!==null&&r!==void 0?r:{}),d=Yo(t),p=Yo((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),f=Yo((i=n?.interceptor)!==null&&i!==void 0?i:[]),b=S.useRef(e),g=kN(s),h=Yo(g),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=ea(S.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:b.current,previousState:function(){return h.current}});return CN(w).reduce(function(E,k){var C,O=ea(k,2),I=O[0],D=O[1];return Uo(Uo({},E),(C={},C[I]=n?.debug?PN(I,D,l,T,v,f.current):AN(I,D,l,T,v,f.current),C))},{})}),1),x=y[0];return[s,x,u.current]},IN=Object.defineProperty,v0=Object.getOwnPropertySymbols,_N=Object.prototype.hasOwnProperty,ON=Object.prototype.propertyIsEnumerable,y0=(e,t,n)=>t in e?IN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MN=(e,t)=>{for(var n in t||(t={}))_N.call(t,n)&&y0(e,n,t[n]);if(v0)for(var n of v0(t))ON.call(t,n)&&y0(e,n,t[n]);return e},Qd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},DN=(e,t,n,r)=>Bs(Qd,e,t,n,r),Ko=e=>typeof e=="object",Tr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Ko(e)&&!Ko(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Tr(e[r],t[r]))},NN=(e,t)=>(Ko(e)||Array.isArray(e))&&t?e[t]:e,LN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,zs=e=>/[0-9.]+/.test(e),b0=e=>["string","number"].includes(typeof e),x0=e=>e==null||e?.length===0||e==="",w0={eq:Tr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:x0,notEmpty:e=>!x0(e),in:(e,t)=>Qd(t,n=>Tr(e,n)),notIn:(e,t)=>S0(t,n=>!Tr(e,n))},FN=e=>{if(e in w0)return w0[e];throw new Error("Linq - Symbol not found")},Go=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Bs=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=FN(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},VN=(e,t,n,r)=>Bs(Go,e,t,n,r),S0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},$N=(e,t,n,r)=>Bs(S0,e,t,n,r),T0=e=>{if(e===null)return null;const t=MN({},e);return Object.keys(t).forEach(n=>t[n]=Ko(e[n])?T0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},E0=(e,t)=>{if(Ko(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Tr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Tr(t,r))return!0}return!1},jN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},zN=e=>Go(e,(t,n,r)=>Ko(t)?n===r.findIndex(o=>Tr(o,t)):n===r.indexOf(t)),BN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},k0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},RN=(e,t)=>k0(e,n=>n[t]),C0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},HN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},WN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return zs(e)&&zs(t)?r.map(a=>Number.parseInt(a)):r},Jd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&zs(e)&&zs(t)){const o=[],[i,a]=HN(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return WN(e,t,r)},qN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Jd(r,o,1):Jd(r,i,Number.parseInt(o,10))}return b0(e)&&b0(t)?Jd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},ef=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},P0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},UN=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},YN=(e,t,n,r)=>Bs(UN,e,t,n,r),A0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(LN(t))},I0=(e=>(e.Asc="asc",e.Desc="desc",e))(I0||{}),KN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),GN=(e,t)=>e.sort(KN(t)),ZN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Go(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},XN=class $p{constructor(t=[]){this.array=t}static Range(...t){return qN(...t)}static New(t){return new $p(t)}Where(t,n,r){return this.array=VN(this.array,t,n,r),this}Some(t,n,r){return DN(this.array,t,n,r)}All(t,n,r){return $N(this.array,t,n,r)}Reverse(){return this.array=P0(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=YN(this.array,t,n,r),this}Distinct(){return this.array=zN(this.array),this}First(t){return t===void 0?this.array[0]:BN(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?ef((n,r)=>n+r,0,this.array):ef((n,r)=>n+NN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return RN(this.array,t)}GroupWith(t){return k0(this.array,t)}Except(t){return Go(this.array,n=>!E0(t,n))}Intersect(t){return Go(this.array,n=>E0(t,n))}OrderBy(t,n){let r;return r=t?A0(this.array,t):this.array.toSorted(),this.array=n==="desc"?P0(r):r,this}Includes(t){return Qd(this.array,n=>Tr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return ef(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(C0(this.array,n=>[t,n]))}Zip(t,n){return C0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Go(this.array,t).length}Get(t){return this.array[t]}Clone(){return new $p(T0(this.array))}ToObject(t){return jN(this.array,t)}Sort(t){return Array.isArray(t)?GN(this.array,t):A0(this.array,t)}Unique(t){return ZN(this.array,t)}},_0=XN;const Rs=0,Er=1,Zo=2,O0=4;function M0(e){return()=>e}function QN(e){e()}function ta(e,t){return n=>e(t(n))}function D0(e,t){return()=>e(t)}function JN(e,t){return n=>e(t,n)}function tf(e){return e!==void 0}function e2(...e){return()=>{e.map(QN)}}function Xo(){}function Hs(e,t){return t(e),e}function t2(e,t){return t(e)}function dt(...e){return e}function Qe(e,t){return e(Er,t)}function De(e,t){e(Rs,t)}function nf(e){e(Zo)}function Et(e){return e(O0)}function be(e,t){return Qe(e,JN(t,Rs))}function Tn(e,t){const n=e(Er,r=>{n(),t(r)});return n}function N0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function L0(e,t){return e===t}function ft(e=L0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ta(t,e)}function jn(e){return t=>()=>{t(e)}}function re(e,...t){const n=n2(...t);return(r,o)=>{switch(r){case Zo:nf(e);return;case Er:return Qe(e,n(o))}}}function zn(e,t){return n=>r=>{n(t=e(t,r))}}function Jr(e){return t=>n=>{e>0?e--:t(n)}}function ir(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function $e(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function n2(...e){return t=>e.reduceRight(t2,t)}function r2(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Er:return i?n===i?void 0:(r(),n=i,t=Qe(e,i),t):(r(),Xo);case Zo:r(),n=null;return}}}function ae(e){let t=e;const n=Re();return(r,o)=>{switch(r){case Rs:t=o;break;case Er:{o(t);break}case O0:return t}return n(r,o)}}function Wt(e,t){return Hs(ae(t),n=>be(e,n))}function Re(){const e=[];return(t,n)=>{switch(t){case Rs:e.slice().forEach(r=>{r(n)});return;case Zo:e.splice(0,e.length);return;case Er:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function an(e){return Hs(Re(),t=>be(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:o2(),singleton:n}}const o2=()=>Symbol();function i2(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=Re(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case Zo:{nf(t);return}case Er:return r===o&&a(n),Qe(t,a)}}}function ke(e,t=L0){return re(e,ft(t))}function rf(...e){return function(t,n){switch(t){case Zo:return;case Er:return e2(...e.map(r=>Qe(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const a2={0:"debug",3:"error",1:"log",2:"warn"},s2=()=>typeof globalThis>"u"?window:globalThis,kr=qe(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=s2().VIRTUOSO_LOG_LEVEL)!=null?o:Et(e);r>=i&&console[a2[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Bn(e,t,n){return of(e,t,n).callbackRef}function of(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function F0(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=l2(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let b;f&&(b=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?b.innerWidth:b.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i?.(s?V0("column-gap",getComputedStyle(u).columnGap,o):V0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return of(c,n,l)}function l2(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},Jt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function V0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function af(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),b=c.top-f.top;p=f.height-Math.max(0,b),d=b+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=of(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const Yt=qe(()=>{const e=Re(),t=Re(),n=ae(0),r=Re(),o=ae(0),i=Re(),a=Re(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Re(),p=Re(),f=ae(!1),b=ae(!1),g=ae(!1);return be(re(e,pe(({scrollTop:h})=>h)),t),be(re(e,pe(({scrollHeight:h})=>h)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:b,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),na={lvl:0};function $0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function at(e){return e===na}function ra(e,t){if(!at(e))return t===e.k?e.v:t<e.k?ra(e.l,t):ra(e.r,t)}function En(e,t,n="k"){if(at(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=En(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return En(e.l,t,n)}function sn(e,t,n){return at(e)?B0(t,n,1):t===e.k?Mt(e,{k:t,v:n}):t<e.k?R0(Mt(e,{l:sn(e.l,t,n)})):R0(Mt(e,{r:sn(e.r,t,n)}))}function Qo(){return na}function Ws(e,t,n){if(at(e))return[];const r=En(e,t)[0];return c2(lf(e,r,n))}function sf(e,t){if(at(e))return na;const{k:n,l:r,r:o}=e;if(t===n){if(at(r))return o;if(at(o))return r;{const[i,a]=z0(r);return qs(Mt(e,{k:i,l:j0(r),v:a}))}}else return t<n?qs(Mt(e,{l:sf(r,t)})):qs(Mt(e,{r:sf(o,t)}))}function eo(e){return at(e)?[]:[...eo(e.l),{k:e.k,v:e.v},...eo(e.r)]}function lf(e,t,n){if(at(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(lf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(lf(i,t,n))),s}function qs(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cf(t))return H0(Mt(e,{lvl:n-1}));if(!at(t)&&!at(t.r))return Mt(t.r,{l:Mt(t,{r:t.r.l}),lvl:n,r:Mt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(cf(e))return uf(Mt(e,{lvl:n-1}));if(!at(r)&&!at(r.l)){const o=r.l,i=cf(o)?r.lvl-1:r.lvl;return Mt(o,{l:Mt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:uf(Mt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Mt(e,t){return B0(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function j0(e){return at(e.r)?e.l:qs(Mt(e,{r:j0(e.r)}))}function cf(e){return at(e)||e.lvl>e.r.lvl}function z0(e){return at(e.r)?[e.k,e.v]:z0(e.r)}function B0(e,t,n,r=na,o=na){return{k:e,l:r,lvl:n,r:o,v:t}}function R0(e){return uf(H0(e))}function H0(e){const{l:t}=e;return!at(t)&&t.lvl===e.lvl?Mt(t,{r:Mt(e,{l:t.r})}):e}function uf(e){const{lvl:t,r:n}=e;return!at(n)&&!at(n.r)&&n.lvl===t&&n.r.lvl===t?Mt(n,{l:Mt(e,{r:n.l}),lvl:t+1}):e}function c2(e){return $0(e,({k:t,v:n})=>({index:t,value:n}))}function W0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function oa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const df=qe(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function q0(e,t,n){return e[Us(e,t,n)]}function Us(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function u2(e,t,n,r){const o=Us(e,t,r),i=Us(e,n,r,o);return e.slice(o,i+1)}function kn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ys(e){return!at(e.groupOffsetTree)}function ff({index:e},t){return t===e?0:t<e?-1:1}function d2(){return{groupIndices:[],groupOffsetTree:Qo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Qo()}}function f2(e,t){let n=at(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),at(e)){e=sn(e,0,i);continue}const s=Ws(e,a-1,o+1);if(s.some(b2(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=sf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=sn(e,o+1,p));c&&(e=sn(e,a,i))}return[e,n]}function p2(e){return typeof e.groupIndex<"u"}function h2({offset:e},t){return t===e?0:t<e?-1:1}function ia(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=q0(t,e,ff),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function U0(e,t){if(!Ys(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Y0(e,t,n){if(p2(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=U0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function m2(e,t,n,r=0){return r>0&&(t=Math.max(t,q0(e,r,ff).offset)),$0(u2(e,t,n,h2),y2)}function g2(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&at(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((b,g)=>sn(sn(b,g,p),g+1,f),a)}else[a,s]=f2(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=pf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>sn(p,f,ia(f,d,o)),Qo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function v2(e){return eo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function K0(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function pf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Us(o,t-1,ff),s=o[l].offset;const c=En(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===En(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ws(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function y2(e){return{index:e.index,value:e}}function b2(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const x2={offsetHeight:"height",offsetWidth:"width"},Rn=qe(([{log:e},{recalcInProgress:t}])=>{const n=Re(),r=Re(),o=Wt(r,0),i=Re(),a=Re(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,E)=>kn(w,x2[E])),p=ae(void 0),f=ae(0),b=d2(),g=Wt(re(n,$e(l,e,f),zn(g2,b),ft()),b),h=Wt(re(l,ft(),zn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);be(re(l,Ce(w=>w.length>0),$e(g,f),pe(([w,E,k])=>{const C=w.reduce((O,I,D)=>sn(O,I,ia(I,E.offsetTree,k)||D),Qo());return{...E,groupIndices:w,groupOffsetTree:C}})),g),be(re(r,$e(g),Ce(([w,{lastIndex:E}])=>w<E),pe(([w,{lastIndex:E,lastSize:k}])=>[{endIndex:E,size:k,startIndex:w}])),n),be(c,u);const v=Wt(re(c,pe(w=>w===void 0)),!0);be(re(u,Ce(w=>w!==void 0&&at(Et(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=an(re(n,$e(g),zn(({sizes:w},[E,k])=>({changed:k!==w,sizes:k}),{changed:!1,sizes:b}),pe(w=>w.changed)));Qe(re(s,zn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:E}=Et(g);if(w>0)De(t,!0),De(i,w+K0(w,E));else if(w<0){const k=Et(h);k.length>0&&(w-=K0(-w,k)),De(a,w)}}),Qe(re(s,$e(e)),([w,E])=>{w<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Jt.ERROR)});const x=an(i);be(re(i,$e(g),pe(([w,E])=>{const k=E.groupIndices.length>0,C=[],O=E.lastSize;if(k){const I=ra(E.sizeTree,0);let D=0,V=0;for(;D<w;){const A=E.groupIndices[V],N=E.groupIndices.length===V+1?1/0:E.groupIndices[V+1]-A-1;C.push({endIndex:A,size:I,startIndex:A}),C.push({endIndex:A+1+N-1,size:O,startIndex:A+1}),V++,D+=N+1}const z=eo(E.sizeTree);return D!==w&&z.shift(),z.reduce((A,{k:N,v:H})=>{let M=A.ranges;return A.prevSize!==0&&(M=[...A.ranges,{endIndex:N+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:N+w,prevSize:H,ranges:M}},{prevIndex:w,prevSize:0,ranges:C}).ranges}return eo(E.sizeTree).reduce((I,{k:D,v:V})=>({prevIndex:D+w,prevSize:V,ranges:[...I.ranges,{endIndex:D+w-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:O,ranges:[]}).ranges})),n);const T=an(re(a,$e(g,f),pe(([w,{offsetTree:E},k])=>{const C=-w;return ia(C,E,k)})));return be(re(a,$e(g,f),pe(([w,E,k])=>{if(E.groupIndices.length>0){if(at(E.sizeTree))return E;let C=Qo();const O=Et(h);let I=0,D=0,V=0;for(;I<-w;){V=O[D];const z=O[D+1]-V-1;D++,I+=z+1}if(C=eo(E.sizeTree).reduce((z,{k:A,v:N})=>sn(z,Math.max(0,A+w),N),C),I!==-w){const z=ra(E.sizeTree,V);C=sn(C,0,z);const A=En(E.sizeTree,-w+1)[1];C=sn(C,1,A)}return{...E,sizeTree:C,...pf(E.offsetTree,0,C,k)}}else{const C=eo(E.sizeTree).reduce((O,{k:I,v:D})=>sn(O,Math.max(0,I+w),D),Qo());return{...E,sizeTree:C,...pf(E.offsetTree,0,C,k)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(kr,df),{singleton:!0});function w2(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const G0=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Re(),a=Re(),s=an(re(i,pe(w2)));return be(re(s,pe(l=>l.totalCount)),n),be(re(s,pe(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>Ys(c)),pe(([l,c,u])=>En(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ft(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Rn,Yt)),Cr=qe(([{log:e}])=>{const t=ae(!1),n=an(re(t,Ce(r=>r),ft()));return Qe(t,r=>{r&&Et(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},dt(kr),{singleton:!0}),S2=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Z0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!S2)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const aa=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Re(),b=Re(),g=ae(0);let h=null,v=null,y=null;function x(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),De(l,!1)}return be(re(f,$e(n,d,r,g,s,a,p),$e(e,i,o),pe(([[T,w,E,k,C,O,I,D],V,z,A])=>{const N=Z0(T),{align:H,behavior:M,offset:P}=N,$=k-1,L=Y0(N,w,$);let U=ia(L,w.offsetTree,V)+O;H==="end"?(U+=z+En(w.sizeTree,L)[1]-E+A,L===$&&(U+=I)):H==="center"?U+=(z+En(w.sizeTree,L)[1]-E+A)/2:U-=C,P&&(U+=P);const G=B=>{x(),B?(D("retrying to scroll to",{location:T},Jt.DEBUG),De(f,T)):(De(b,!0),D("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),M==="smooth"){let B=!1;y=Qe(t,Z=>{B=B||Z}),h=Tn(u,()=>{G(B)})}else h=Tn(re(t,T2(150)),G);return v=setTimeout(()=>{x()},1200),De(l,!0),D("scrolling from index to",{behavior:M,index:L,top:U},Jt.DEBUG),{behavior:M,top:U}})),c),{scrollTargetReached:b,scrollToIndex:f,topListHeight:g}},dt(Rn,Yt,kr),{singleton:!0});function T2(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function hf(e,t){e==0?t():requestAnimationFrame(()=>{hf(e-1,t)})}function mf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const sa=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return be(re(a,$e(l),Ce(([u,d])=>!!d),jn(!1)),s),be(re(a,$e(l),Ce(([u,d])=>!!d),jn(!1)),c),Qe(re(At(t,a),$e(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,b])=>u&&(!at(p)||tf(f))&&!d&&!b),$e(l)),([,u])=>{Tn(o,()=>{De(c,!0)}),hf(4,()=>{Tn(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Rn,Yt,aa,Cr),{singleton:!0});function X0(e,t){return Math.abs(e-t)<1.01}const la="up",ca="down",E2="none",k2={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},C2=0,ua=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=Re(),c=Re(),u=ae(4),d=ae(C2),p=Wt(re(rf(re(ke(o),Jr(1),jn(!0)),re(ke(o),Jr(1),jn(!1),N0(100))),ft()),!1),f=Wt(re(rf(re(n,jn(!0)),re(n,jn(!1),N0(200))),ft()),!1);be(re(At(ke(o),ke(d)),pe(([y,x])=>y<=x),ft()),s),be(re(s,ir(50)),c);const b=an(re(At(r,ke(i),ke(t),ke(e),ke(u)),zn((y,[{scrollHeight:x,scrollTop:T},w,E,k,C])=>{const O=T+w-x>-C,I={scrollHeight:x,scrollTop:T,viewportHeight:w};if(O){let V,z;return T>y.state.scrollTop?(V="SCROLLED_DOWN",z=y.state.scrollTop-T):(V="SIZE_DECREASED",z=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:z,state:I}}let D;return I.scrollHeight>y.state.scrollHeight?D="SIZE_INCREASED":w<y.state.viewportHeight?D="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?D="SCROLLING_UPWARDS":D="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:D,state:I}},k2),ft((y,x)=>y&&y.atBottom===x.atBottom))),g=Wt(re(r,zn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(X0(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const E=x-(T+w)<1;return y.scrollTop!==T&&E?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),pe(y=>y.jump)),0);be(re(b,pe(y=>y.atBottom)),a),be(re(a,ir(50)),l);const h=ae(ca);be(re(r,pe(({scrollTop:y})=>y),ft(),zn((y,x)=>Et(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?la:ca,prevScrollTop:x},{direction:ca,prevScrollTop:0}),pe(y=>y.direction)),h),be(re(r,ir(50),jn(E2)),h);const v=ae(0);return be(re(p,Ce(y=>!y),jn(0)),v),be(re(o,ir(100),$e(p),Ce(([y,x])=>!!x),zn(([y,x],[T])=>[x,T],[0,0]),pe(([y,x])=>x-y)),v),{atBottomState:b,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},dt(Yt)),Ks="top",Gs="bottom",Q0="none";function J0(e,t,n){return typeof e=="number"?n===la&&t===Ks||n===ca&&t===Gs?e:0:n===la?t===Ks?e.main:e.reverse:t===Gs?e.main:e.reverse}function ew(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const gf=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Re(),a=ae(0),s=ae(0),l=ae(0),c=Wt(re(At(ke(r),ke(o),ke(n),ke(i,oa),ke(l),ke(a),ke(t),ke(e),ke(s)),pe(([u,d,p,[f,b],g,h,v,y,x])=>{const T=u-y,w=h+v,E=Math.max(p-T,0);let k=Q0;const C=ew(x,Ks),O=ew(x,Gs);return f-=y,f+=p+v,b+=p+v,b-=y,f>u+w-C&&(k=la),b<u-E+d+O&&(k=ca),k!==Q0?[Math.max(T-p-J0(g,Ks,k)-C,0),T-E-v+d+J0(g,Gs,k)+O]:null}),Ce(u=>u!=null),ft(oa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Yt),{singleton:!0});function P2(e,t,n){if(Ys(t)){const r=U0(e,t);return[{index:En(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const vf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Zs(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,b=p-u;return{bottom:u,firstItemIndex:i,items:nw(e,o,i),offsetBottom:b,offsetTop:c,top:f,topItems:nw(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function tw(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=mf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Zs(c,[],s,o,n,r)}function nw(e,t,n){if(e.length===0)return[];if(!Ys(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Ws(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const to=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:b}])=>{const g=ae([]),h=ae(0),v=Re();be(i.topItemsIndexes,g);const y=Wt(re(At(f,b,ke(l,oa),ke(o),ke(r),ke(c),u,ke(g),ke(t),ke(n),e),Ce(([E,k,,C,,,,,,,O])=>{const I=O&&O.length!==C;return E&&!k&&!I}),pe(([,,[E,k],C,O,I,D,V,z,A,N])=>{const H=O,{offsetTree:M,sizeTree:P}=H,$=Et(h);if(C===0)return{...vf,totalCount:C};if(E===0&&k===0)return $===0?{...vf,totalCount:C}:tw($,I,O,z,A,N||[]);if(at(P))return $>0?null:Zs(P2(mf(I,C),H,N),[],C,A,H,z);const L=[];if(V.length>0){const ee=V[0],ne=V[V.length-1];let J=0;for(const R of Ws(P,ee,ne)){const q=R.value,X=Math.max(R.start,ee),oe=Math.min(R.end,ne);for(let j=X;j<=oe;j++)L.push({data:N?.[j],index:j,offset:J,size:q}),J+=q}}if(!D)return Zs([],L,C,A,H,z);const U=V.length>0?V[V.length-1]+1:0,G=m2(M,E,k,U);if(G.length===0)return null;const B=C-1,Z=Hs([],ee=>{for(const ne of G){const J=ne.value;let R=J.offset,q=ne.start;const X=J.size;if(J.offset<E){q+=Math.floor((E-J.offset+A)/(X+A));const j=q-ne.start;R+=j*X+j*A}q<U&&(R+=(U-q)*X,q=U);const oe=Math.min(ne.end,B);for(let j=q;j<=oe&&!(R>=k);j++)ee.push({data:N?.[j],index:j,offset:R,size:X}),R+=X+A}});return Zs(Z,L,C,A,H,z)}),Ce(E=>E!==null),ft()),vf);be(re(e,Ce(tf),pe(E=>E?.length)),o),be(re(y,pe(E=>E.topListHeight)),d),be(d,s),be(re(y,pe(E=>[E.top,E.bottom])),a),be(re(y,pe(E=>E.items)),v);const x=an(re(y,Ce(({items:E})=>E.length>0),$e(o,e),Ce(([{items:E},k])=>E[E.length-1].originalIndex===k-1),pe(([,E,k])=>[E-1,k]),ft(oa),pe(([E])=>E))),T=an(re(y,ir(200),Ce(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),pe(({items:E})=>E[0].index),ft())),w=an(re(y,Ce(({items:E})=>E.length>0),pe(({items:E})=>{let k=0,C=E.length-1;for(;E[k].type==="group"&&k<C;)k++;for(;E[C].type==="group"&&C>k;)C--;return{endIndex:E[C].index,startIndex:E[k].index}}),ft(W0)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},dt(Rn,G0,gf,sa,aa,ua,Cr,df),{singleton:!0}),rw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Re(),a=Wt(re(At(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Yt,to),{singleton:!0}),A2=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Wt(re(At(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),ir(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Yt,rw),{singleton:!0}),ow=qe(()=>({context:ae(null)})),I2=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,iw=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Re();return be(re(u,$e(t,l,n,i,o,r,s),$e(e),pe(([[d,p,f,b,g,h,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:E=I2,done:k,...C}=d,O=Y0(d,p,b-1),I=ia(O,p.offsetTree,x)+g+h,D=I+En(p.sizeTree,O)[1],V=y+h,z=y+f-v,A=E({itemBottom:D,itemTop:I,locationParams:{align:T,behavior:w,...C},viewportBottom:z,viewportTop:V});return A?k&&Tn(re(a,Ce(N=>!N),Jr(Et(a)?1:2)),k):k&&k(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(Rn,Yt,aa,to,kr),{singleton:!0});function aw(e){return e?e==="smooth"?"smooth":"auto":!1}const _2=(e,t)=>typeof e=="function"?aw(e(t)):t&&aw(e),O2=qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:p},{scrollIntoView:f}])=>{const b=ae(!1),g=Re();let h=null;function v(w){De(a,{align:"end",behavior:w,index:"LAST"})}Qe(re(At(re(ke(t),Jr(1)),l),$e(ke(b),i,s,d),pe(([[w,E],k,C,O,I])=>{let D=E&&O,V="auto";return D&&(V=_2(k,C||I),D=D&&!!V),{followOutputBehavior:V,shouldFollow:D,totalCount:w}}),Ce(({shouldFollow:w})=>w)),({followOutputBehavior:w,totalCount:E})=>{h&&(h(),h=null),Et(n)?requestAnimationFrame(()=>{Et(u)("following output to ",{totalCount:E},Jt.DEBUG),v(w)}):h=Tn(e,()=>{Et(u)("following output to ",{totalCount:E},Jt.DEBUG),v(w),h=null})});function y(w){const E=Tn(o,k=>{w&&!k.atBottom&&k.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Et(u)("scrolling to bottom due to increased size",{},Jt.DEBUG),v("auto"))});setTimeout(E,100)}Qe(re(At(ke(b),t,c),Ce(([w,,E])=>w&&E),zn(({value:w},[,E])=>({refreshed:w===E,value:E}),{refreshed:!1,value:0}),Ce(({refreshed:w})=>w),$e(b,t)),([,w])=>{Et(s)&&y(w!==!1)}),Qe(g,()=>{y(Et(b)!==!1)}),Qe(At(ke(b),o),([w,E])=>{w&&!E.atBottom&&E.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ae(null),T=Re();return be(rf(re(ke(r),pe(w=>{var E;return(E=w?.length)!=null?E:0})),re(ke(t))),T),Qe(re(At(re(T,Jr(1)),l),$e(ke(x),s,d,p),pe(([[w,E],k,C,O,I])=>E&&C&&k?.({context:I,totalCount:w,scrollingInProgress:O})),Ce(w=>!!w),ir(0)),w=>{h&&(h(),h=null),Et(n)?requestAnimationFrame(()=>{Et(u)("scrolling into view",{}),De(f,w)}):h=Tn(e,()=>{Et(u)("scrolling into view",{}),De(f,w),h=null})}),{autoscrollToBottom:g,followOutput:b,scrollIntoViewOnChange:x}},dt(Rn,ua,aa,sa,Cr,kr,Yt,ow,iw)),M2=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,$e(i),Ce(([,l])=>l!==0),$e(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>tw(l,c,u,d,p,f))),a),{}),dt(Rn,sa,to,Cr),{singleton:!0}),D2=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Qe(re(e,$e(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Tn(re(n,Jr(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},dt(Cr,Yt,to),{singleton:!0}),sw=qe(([{scrollVelocity:e}])=>{const t=ae(!1),n=Re(),r=ae(!1);return be(re(e,$e(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),ft()),t),Qe(re(At(t,e,n),$e(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(ua),{singleton:!0}),yf=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Re(),r=Re(),o=Re(),i=ae(!1),a=ae(void 0);return be(re(At(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,$e(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Yt)),N2=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Re(),u=ae(void 0),d=ae(null),p=ae(null);return be(s,d),be(l,p),Qe(re(c,$e(t,r,a,d,p,n)),([f,b,g,h,v,y,x])=>{const T=v2(b.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),be(re(u,Ce(tf),pe(L2)),o),be(re(i,$e(u),Ce(([,f])=>f!==void 0),ft(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Rn,Yt,sa,Cr,yf));function L2(e){return{align:"start",index:0,offset:e.scrollTop}}const F2=qe(([{topItemsIndexes:e}])=>{const t=ae(0);return be(re(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(to));function lw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const V2=lw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),$2=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:b}])=>{const g=an(re(l,$e(a),zn(([,v,y,x],[{bottom:T,items:w,offsetBottom:E,totalCount:k},C])=>{const O=T+E;let I=0;return y===k&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(I=O-x,I!==0&&(I+=C))),[I,w,k,O]},[0,[],0,0]),Ce(([v])=>v!==0),$e(r,s,n,o,f,b),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===la),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Jt.DEBUG),v))));function h(v){v>0?(De(t,{behavior:"auto",top:-v}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-v}))}return Qe(re(g,$e(e,i)),([v,y,x])=>{x&&V2()?De(e,y-v):h(-v)}),Qe(re(At(Wt(i,!1),e,b),Ce(([v,y,x])=>!v&&!x&&y!==0),pe(([v,y])=>y),ir(1)),h),be(re(d,pe(v=>({top:-v}))),t),Qe(re(c,$e(p,u),pe(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function E(k){return k*(x+w)}if(y.length===0)return E(v);{let k=0;const C=ra(T,0);let O=0,I=0;for(;O<v;){O++,k+=C;let D=y.length===I+1?1/0:y[I+1]-y[I]-1;O+D>v&&(k-=C,D=v-O+1),O+=D,k+=E(D),I++}return k}})),v=>{De(e,v),requestAnimationFrame(()=>{De(t,{top:v}),requestAnimationFrame(()=>{De(e,0),De(b,!1)})})}),{deviation:e}},dt(Yt,ua,to,Rn,kr,df)),j2=qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),dt(gf,M2,Cr,sw,rw,D2,A2,yf,iw,kr,ow)),cw=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:b},g,h,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},E,{topItemCount:k},{groupCounts:C},O])=>(be(T.rangeChanged,O.scrollSeekRangeChanged),be(re(O.windowViewportRect,pe(I=>I.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:C,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:b,sizeRanges:s,topItemCount:k,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...O,...g,sizes:l,...h}),dt(Rn,sa,Yt,N2,O2,to,aa,$2,F2,G0,j2));function z2(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const Xs=typeof document<"u"?S.useLayoutEffect:S.useEffect;function bf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(h,v){h.propsReady&&De(h.propsReady,!1);for(const y of r){const x=h[t.required[y]];De(x,v[y])}for(const y of o)if(y in v){const x=h[t.optional[y]];De(x,v[y])}h.propsReady&&De(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=x=>{const T=h[t.methods[y]];De(T,x)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=r2(h[t.events[y]]),v),{})}const d=S.forwardRef((h,v)=>{const{children:y,...x}=h,[T]=S.useState(()=>Hs(i2(e),k=>{l(k,x)})),[w]=S.useState(D0(u,T));Xs(()=>{for(const k of a)k in x&&Qe(w[k],x[k]);return()=>{Object.values(w).map(nf)}},[x,w,T]),Xs(()=>{l(T,x)}),S.useImperativeHandle(v,M0(c(T)));const E=n;return m.jsx(s.Provider,{value:T,children:n?m.jsx(E,{...z2([...r,...o,...a],x),children:y}):y})}),p=h=>{const v=S.useContext(s);return S.useCallback(y=>{De(v[h],y)},[v,h])},f=h=>{const v=S.useContext(s)[h],y=S.useCallback(x=>Qe(v,x),[v]);return S.useSyncExternalStore(y,()=>Et(v),()=>Et(v))},b=h=>{const v=S.useContext(s)[h],[y,x]=S.useState(D0(Et,v));return Xs(()=>Qe(v,T=>{T!==y&&x(M0(T))}),[v,y]),y},g=S.version.startsWith("18")?f:b;return{Component:d,useEmitter:(h,v)=>{const y=S.useContext(s)[h];Xs(()=>Qe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const Qs=S.createContext(void 0),uw=S.createContext(void 0),dw=typeof document<"u"?S.useLayoutEffect:S.useEffect;function xf(e){return"self"in e}function B2(e){return"body"in e}function fw(e,t,n,r=Xo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(p=>{let f,b,g;const h=p.target;if(B2(h)||xf(h)){const y=xf(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,b=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,b=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:b})};p.suppressFlushSync?v():uo.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-b)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const b=p.behavior==="smooth";let g,h,v;xf(f)?(h=Math.max(kn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=kn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),X0(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),b&&t(!0);return}b?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const wf="-webkit-sticky",pw="sticky",Sf=lw(()=>{if(typeof document>"u")return pw;const e=document.createElement("div");return e.style.position=wf,e.style.position===wf?wf:pw});function Tf(e){return e}const R2=qe(()=>{const e=ae(s=>`Item ${s}`),t=ae(s=>`Group ${s}`),n=ae({}),r=ae(Tf),o=ae("div"),i=ae(Xo),a=(s,l=null)=>Wt(re(n,pe(c=>c[s]),ft()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),H2=qe(([e,t])=>({...e,...t}),dt(cw,R2)),W2=({height:e})=>m.jsx("div",{style:{height:e}}),q2={overflowAnchor:"none",position:Sf(),zIndex:1},hw={overflowAnchor:"none"},U2={...hw,display:"inline-block",height:"100%"},mw=S.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=mn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=mn("windowScrollContainerState"),a=mn("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),b=mn("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=F0(n,p,d,e?Xo:s,f,b,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=S.useState(0);Cf("deviation",A=>{v!==A&&y(A)});const x=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||W2,w=Ae("ListComponent"),E=Ae("ItemComponent"),k=Ae("GroupComponent"),C=Ae("computeItemKey"),O=Ae("isSeeking"),I=Ae("groupIndices").length>0,D=Ae("alignToBottom"),V=Ae("initialItemFinalLocationReached"),z=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:D?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:D?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...lt(x,c)}):m.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:z,children:(e?t.topItems:t.items).map(A=>{const N=A.originalIndex,H=C(N+t.firstItemIndex,A.data,c);return O?S.createElement(T,{...lt(T,c),height:A.size,index:A.index,key:H,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?S.createElement(k,{...lt(k,c),"data-index":N,"data-item-index":A.index,"data-known-size":A.size,key:H,style:q2},u(A.index,c)):S.createElement(E,{...lt(E,c),...gw(E,A.data),"data-index":N,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:H,style:g?U2:hw},I?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),Y2={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},K2={outline:"none",overflowX:"auto",position:"relative"},Jo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),G2={position:Sf(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function gw(e,t){return{item:typeof e=="string"?void 0:t}}const Z2=S.memo(function(){const e=Ae("HeaderComponent"),t=mn("headerHeight"),n=Ae("HeaderFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),X2=S.memo(function(){const e=Ae("FooterComponent"),t=mn("footerHeight"),n=Ae("HeaderFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null});function Ef({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:b}=fw(a,l,s,c,void 0,d);return e("scrollTo",b),e("scrollBy",p),m.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?K2:Y2,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function kf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=S.useRef(null),b=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=fw(a,l,s,b,d);return dw(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),m.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,p),children:r})})}const Q2=({children:e})=>{const t=S.useContext(Qs),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=S.useMemo(()=>ta(n,l=>kn(l,i?"width":"height")),[n,i]),s=Bn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:Jo(o),children:e})},J2=({children:e})=>{const t=S.useContext(Qs),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=Ae("customScrollParent"),i=af(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),m.jsx("div",{"data-viewport-type":"window",ref:i,style:Jo(a),children:e})},eL=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...G2,marginTop:`${n}px`},o=Ae("context");return m.jsx(t,{style:r,...lt(t,o),children:e})},tL=S.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?oL:rL,a=r||t?J2:Q2;return m.jsxs(i,{...e,...lt(i,o),children:[n&&m.jsx(eL,{children:m.jsx(mw,{showTopList:!0})}),m.jsxs(a,{children:[m.jsx(Z2,{}),m.jsx(mw,{}),m.jsx(X2,{})]})]})}),{Component:nL,useEmitter:Cf,useEmitterValue:Ae,usePublisher:mn}=bf(H2,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},tL),rL=Ef({useEmitter:Cf,useEmitterValue:Ae,usePublisher:mn}),oL=kf({useEmitter:Cf,useEmitterValue:Ae,usePublisher:mn}),Pf=nL,iL=qe(()=>{const e=ae(c=>m.jsxs("td",{children:["Item $",c]})),t=ae(null),n=ae(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ae(null),o=ae(null),i=ae({}),a=ae(Tf),s=ae(Xo),l=(c,u=null)=>Wt(re(i,pe(d=>d[c]),ft()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),aL=qe(([e,t])=>({...e,...t}),dt(cw,iL)),sL=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),lL=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),cL={overflowAnchor:"none"},vw={position:Sf(),zIndex:2,overflowAnchor:"none"},yw=S.memo(function({showTopList:e=!1}){const t=Ne("listState"),n=Ne("computeItemKey"),r=Ne("firstItemIndex"),o=Ne("context"),i=Ne("isSeeking"),a=Ne("fixedHeaderHeight"),s=Ne("groupIndices").length>0,l=Ne("itemContent"),c=Ne("groupContent"),u=Ne("ScrollSeekPlaceholder")||sL,d=Ne("GroupComponent"),p=Ne("TableRowComponent"),f=(e?t.topItems:[]).reduce((g,h,v)=>(v===0?g.push(h.size):g.push(g[v-1]+h.size),g),[]),b=(e?t.topItems:t.items).map(g=>{const h=g.originalIndex,v=n(h+r,g.data,o),y=e?h===0?0:f[h-1]:0;return i?S.createElement(u,{...lt(u,o),height:g.size,index:g.index,key:v,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...lt(d,o),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,key:v,style:{...vw,top:a}},c(g.index,o)):S.createElement(p,{...lt(p,o),...gw(p,g.data),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:v,style:e?{...vw,top:a+y}:cL},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:b})}),uL=S.memo(function(){const e=Ne("listState"),t=Ne("topItemsIndexes").length>0,n=Cn("sizeRanges"),r=Ne("useWindowScroll"),o=Ne("customScrollParent"),i=Cn("windowScrollContainerState"),a=Cn("scrollContainerState"),s=o||r?i:a,l=Ne("trackItemSizes"),c=Ne("itemSize"),u=Ne("log"),{callbackRef:d,ref:p}=F0(n,c,l,s,u,void 0,o,!1,Ne("skipAnimationFrameInResizeObserver")),[f,b]=S.useState(0);Af("deviation",I=>{f!==I&&(p.current.style.marginTop=`${I}px`,b(I))});const g=Ne("EmptyPlaceholder"),h=Ne("FillerRow")||lL,v=Ne("TableBodyComponent"),y=Ne("paddingTopAddition"),x=Ne("statefulTotalCount"),T=Ne("context");if(x===0&&g)return m.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((I,D)=>I+D.size,0),E=e.offsetTop+y+f-w,k=e.offsetBottom,C=E>0?m.jsx(h,{context:T,height:E},"padding-top"):null,O=k>0?m.jsx(h,{context:T,height:k},"padding-bottom"):null;return m.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[C,t&&m.jsx(yw,{showTopList:!0}),m.jsx(yw,{}),O]})}),dL=({children:e})=>{const t=S.useContext(Qs),n=Cn("viewportHeight"),r=Cn("fixedItemHeight"),o=Bn(S.useMemo(()=>ta(n,i=>kn(i,"height")),[n]),!0,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:Jo(!1),children:e})},fL=({children:e})=>{const t=S.useContext(Qs),n=Cn("windowViewportRect"),r=Cn("fixedItemHeight"),o=Ne("customScrollParent"),i=af(n,o,Ne("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),m.jsx("div",{"data-viewport-type":"window",ref:i,style:Jo(!1),children:e})},pL=S.memo(function(e){const t=Ne("useWindowScroll"),n=Ne("customScrollParent"),r=Cn("fixedHeaderHeight"),o=Cn("fixedFooterHeight"),i=Ne("fixedHeaderContent"),a=Ne("fixedFooterContent"),s=Ne("context"),l=Bn(S.useMemo(()=>ta(r,v=>kn(v,"height")),[r]),!0,Ne("skipAnimationFrameInResizeObserver")),c=Bn(S.useMemo(()=>ta(o,v=>kn(v,"height")),[o]),!0,Ne("skipAnimationFrameInResizeObserver")),u=n||t?gL:mL,d=n||t?fL:dL,p=Ne("TableComponent"),f=Ne("TableHeadComponent"),b=Ne("TableFooterComponent"),g=i?m.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,h=a?m.jsx(b,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(b,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...lt(u,s),children:m.jsx(d,{children:m.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(p,s),children:[g,m.jsx(uL,{},"TableBody"),h]})})})}),{Component:hL,useEmitter:Af,useEmitterValue:Ne,usePublisher:Cn}=bf(aL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},pL),mL=Ef({useEmitter:Af,useEmitterValue:Ne,usePublisher:Cn}),gL=kf({useEmitter:Af,useEmitterValue:Ne,usePublisher:Cn}),vL=hL,bw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},yL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:xw,floor:Js,max:da,min:If,round:ww}=Math;function Sw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function bL(e){return{...yL,items:e}}function el(e,t){return e&&e.width===t.width&&e.height===t.height}function xL(e,t){return e&&e.column===t.column&&e.row===t.row}const wL=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:b,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const E=ae(0),k=ae(0),C=ae(bw),O=ae({height:0,width:0}),I=ae({height:0,width:0}),D=Re(),V=Re(),z=ae(0),A=ae(null),N=ae({column:0,row:0}),H=Re(),M=Re(),P=ae(!1),$=ae(0),L=ae(!0),U=ae(!1),G=ae(!1);Qe(re(b,$e($),Ce(([R,q])=>!!q)),()=>{De(L,!1)}),Qe(re(At(b,L,I,O,$,U),Ce(([R,q,X,oe,,j])=>R&&!q&&X.height!==0&&oe.height!==0&&!j)),([,,,,R])=>{De(U,!0),hf(1,()=>{De(D,R)}),Tn(re(c),()=>{De(t,[0,0]),De(L,!0)})}),be(re(M,Ce(R=>R!=null&&R.scrollTop>0),jn(0)),k),Qe(re(b,$e(M),Ce(([,R])=>R!=null)),([,R])=>{R&&(De(O,R.viewport),De(I,R.item),De(N,R.gap),R.scrollTop>0&&(De(P,!0),Tn(re(c,Jr(1)),q=>{De(P,!1)}),De(l,{top:R.scrollTop})))}),be(re(O,pe(({height:R})=>R)),d),be(re(At(ke(O,el),ke(I,el),ke(N,(R,q)=>R&&R.column===q.column&&R.row===q.row),ke(c)),pe(([R,q,X,oe])=>({gap:X,item:q,scrollTop:oe,viewport:R}))),H),be(re(At(ke(E),r,ke(N,xL),ke(I,el),ke(O,el),ke(A),ke(k),ke(P),ke(L),ke($)),Ce(([,,,,,,,R])=>!R),pe(([R,[q,X],oe,j,se,le,he,,xe,de])=>{const{column:Pe,row:Oe}=oe,{height:Te,width:Be}=j,{width:ue}=se;if(he===0&&(R===0||ue===0))return bw;if(Be===0){const xt=mf(de,R),Kt=xt+Math.max(he-1,0);return bL(Sw(xt,Kt,le))}const Y=Tw(ue,Be,Pe);let F,Q;xe?q===0&&X===0&&he>0?(F=0,Q=he-1):(F=Y*Js((q+Oe)/(Te+Oe)),Q=Y*xw((X+Oe)/(Te+Oe))-1,Q=If(R-1,da(Q,Y-1)),F=If(Q,da(0,F))):(F=0,Q=-1);const ce=Sw(F,Q,le),{bottom:we,top:Le}=Ew(se,oe,j,ce),Ze=xw(R/Y),Ft=Ze*Te+(Ze-1)*Oe-we;return{bottom:we,itemHeight:Te,items:ce,itemWidth:Be,offsetBottom:Ft,offsetTop:Le,top:Le}})),C),be(re(A,Ce(R=>R!==null),pe(R=>R.length)),E),be(re(At(O,I,C,N),Ce(([R,q,{items:X}])=>X.length>0&&q.height!==0&&R.height!==0),pe(([R,q,{items:X},oe])=>{const{bottom:j,top:se}=Ew(R,oe,q,X);return[se,j]}),ft(oa)),t);const B=ae(!1);be(re(c,$e(B),pe(([R,q])=>q||R!==0)),B);const Z=an(re(At(C,E),Ce(([{items:R}])=>R.length>0),$e(B),Ce(([[R,q],X])=>{const oe=R.items[R.items.length-1].index===q-1;return(X||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===q)&&oe}),pe(([[,R]])=>R-1),ft())),ee=an(re(ke(C),Ce(({items:R})=>R.length>0&&R[0].index===0),jn(0),ft())),ne=an(re(ke(C),$e(P),Ce(([{items:R},q])=>R.length>0&&!q),pe(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),ft(W0),ir(0)));be(ne,f.scrollSeekRangeChanged),be(re(D,$e(O,I,E,N),pe(([R,q,X,oe,j])=>{const se=Z0(R),{align:le,behavior:he,offset:xe}=se;let de=se.index;de==="LAST"&&(de=oe-1),de=da(0,de,If(oe-1,de));let Pe=_f(q,j,X,de);return le==="end"?Pe=ww(Pe-q.height+X.height):le==="center"&&(Pe=ww(Pe-q.height/2+X.height/2)),xe&&(Pe+=xe),{behavior:he,top:Pe}})),l);const J=Wt(re(C,pe(R=>R.offsetBottom+R.bottom)),0);return be(re(T,pe(R=>({height:R.visibleHeight,width:R.visibleWidth}))),O),{customScrollParent:h,data:A,deviation:z,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:I,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:D,scrollTop:c,smoothScrollTargetReached:u,totalCount:E,useWindowScroll:v,viewportDimensions:O,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:C,horizontalDirection:G,initialTopMostItemIndex:$,totalListHeight:J,...p,endReached:Z,propsReady:g,rangeChanged:ne,startReached:ee,stateChanged:H,stateRestoreInProgress:P,...w}},dt(gf,Yt,ua,sw,Cr,yf,kr));function Tw(e,t,n){return da(1,Js((e+n)/(Js(t)+n)))}function Ew(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=_f(e,t,n,r[0].index);return{bottom:_f(e,t,n,r[r.length-1].index)+o,top:i}}function _f(e,t,n,r){const o=Tw(e.width,n.width,t.column),i=Js(r/o),a=i*n.height+da(0,i-1)*t.row;return a>0?a+t.row:a}const SL=qe(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(Tf),a=ae("div"),s=ae(Xo),l=(d,p=null)=>Wt(re(t,pe(f=>f[d]),ft()),p),c=ae(!1),u=ae(!1);return be(ke(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),TL=qe(([e,t])=>({...e,...t}),dt(wL,SL)),EL=S.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),o=pt("computeItemKey"),i=pt("isSeeking"),a=gn("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),c=pt("ScrollSeekPlaceholder"),u=pt("context"),d=gn("itemDimensions"),p=gn("gap"),f=pt("log"),b=pt("stateRestoreInProgress"),g=gn("reportReadyState"),h=Bn(S.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:Cw("column-gap",getComputedStyle(v).columnGap,f),row:Cw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return dw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),b?null:m.jsx(l,{className:t,ref:h,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?m.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):S.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),kL=S.memo(function(){const e=pt("HeaderComponent"),t=gn("headerHeight"),n=pt("headerFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),CL=S.memo(function(){const e=pt("FooterComponent"),t=gn("footerHeight"),n=pt("headerFooterTag"),r=Bn(S.useMemo(()=>i=>{t(kn(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),PL=({children:e})=>{const t=S.useContext(uw),n=gn("itemDimensions"),r=gn("viewportDimensions"),o=Bn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),m.jsx("div",{ref:o,style:Jo(!1),children:e})},AL=({children:e})=>{const t=S.useContext(uw),n=gn("windowViewportRect"),r=gn("itemDimensions"),o=pt("customScrollParent"),i=af(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),m.jsx("div",{ref:i,style:Jo(!1),children:e})},IL=S.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?OL:_L,o=n||t?AL:PL,i=pt("context");return m.jsx(r,{...e,...lt(r,i),children:m.jsxs(o,{children:[m.jsx(kL,{}),m.jsx(EL,{}),m.jsx(CL,{})]})})}),{useEmitter:kw,useEmitterValue:pt,usePublisher:gn}=bf(TL,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},IL),_L=Ef({useEmitter:kw,useEmitterValue:pt,usePublisher:gn}),OL=kf({useEmitter:kw,useEmitterValue:pt,usePublisher:gn});function Cw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Pw=e=>{const t=e.Icon??Sm,n=St();return m.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[m.jsx(t,{size:64,className:"text-disabled"}),m.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Of=m.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),fa=e=>m.jsx(en,{...e,as:e.as||"span",className:Se("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function ML(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const DL=e=>{const t=S.useId(),n=St(),r=S.useMemo(()=>ML(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return m.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[m.jsx("p",{children:m.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?m.jsxs(S.Fragment,{children:[m.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),m.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>m.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),m.jsx("nav",{children:m.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?m.jsx("li",{children:m.jsx(en,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:m.jsx(S.Fragment,{children:typeof i=="string"?m.jsx("li",{children:"..."}):m.jsx("li",{children:m.jsx(en,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?m.jsx("li",{children:m.jsx(en,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},NL=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),m.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:m.jsx("div",{ref:n,className:"block isolate",children:e.children})})},LL=(e,t,n)=>{const r=n.cols,o=n.loading;return m.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=fu(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?m.jsx(NL,{children:m.jsx(p,{col:i,row:t,rowIndex:e})}):null,m.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),m.jsx("span",{className:"relative",children:o?Of:c?m.jsx(S.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(S.Fragment,{children:je.nil(l)?"":l})}))})})},ei=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Pi(10),nu({fallbackAxisSideDirection:"end"}),tu(),pg({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=er({open:n,middleware:i,transform:!0,whileElementsMounted:Eo,onOpenChange:(b,g)=>{const h=g?.relatedTarget;h&&h.dataset.floating==="true"&&!b||(r(b),e.onChange?.(b))}}),c=Co(l),u=gr(l),d=vr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=tr([c,u,d]);return m.jsxs(S.Fragment,{children:[m.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(hr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(Rr,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[m.jsx(wg,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),m.jsx("header",{className:"mb-2",children:m.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Mf={},Aw;function FL(){return Aw||(Aw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,E)=>{const k=E.parse(y);return k===""?w:w.concat(k)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=x=>{h().removeItem(x);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),v.forEach(w=>w(h()))}}},b=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=b,e.createStorage=f}(Mf)),Mf}var pa=FL();const Df=e=>e.headerLabel??e.thead??e.id,Nf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ti=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ti||{});const Lf=e=>e.type==="number"?e.valueAsNumber:e.value,VL=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},$L={},jL=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},zL=(e,t,n=$L)=>{const r=yr()?null:pa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Xd({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:jL(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return yr()||pa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},BL=e=>{const t=br(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},RL=()=>yr()?void 0:document.querySelector('[data-component="modal-body"]'),HL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),WL=(e,t)=>e.toSorted(HL(t)),Iw=(e,t,n)=>({label:t,id:Ao(),type:n,value:e.id}),qL=e=>{const t=St(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Iw(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return m.jsx(S.Fragment,{children:m.jsx(ei,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(ym,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:m.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>m.jsxs("li",{className:"flex flex-nowrap gap-3",children:[m.jsx(Hr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(Hr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),m.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:m.jsx(Ma,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[m.jsx(Oc,{size:14})," ",t.tableSortAddButton]})})]})})})},UL=e=>{const t=St(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=Iw(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Df(e.col);return m.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[m.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?m.jsx(YE,{size:14}):null,n==="desc"?m.jsx(UE,{size:14}):null,n==="undefined"?m.jsx(ym,{size:14}):null]})},_w=S.createContext({}),YL=_w.Provider,KL=()=>S.useContext(_w),Ff=(e,t,n,r={})=>{const o=e.id,i=e.type??ti.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Ao(),operation:l,label:Df(e),name:o,type:i,value:"",...r}},Vf=()=>{const e=St(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[ti.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ti.Boolean]:[t.is,t.isNot],[ti.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},GL=e=>{const t=St(),n=Vf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Ff(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(b=>u===b.id);return Ff(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=Lf(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return m.jsx(S.Fragment,{children:m.jsx(ei,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(rk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:m.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return m.jsxs("li",{className:"flex flex-nowrap gap-3",children:[m.jsx(Hr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(Hr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(Io,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),m.jsx("div",{className:"flex justify-center items-center mt-5",children:m.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:m.jsx(Ma,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[m.jsx(Oc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},ZL=({filter:e,onDelete:t,set:n})=>{const r=St(),o=Vf(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=Lf(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return m.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[m.jsx(Hr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(Io,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),m.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:m.jsx(Ma,{className:"text-danger",size:14})})]})},XL={top:0,left:0,right:0,bottom:-1},QL=e=>{const t=Nc(),n=St(),r=e.filters.filter(g=>g.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Vf(),l=o?ik:ak,c=S.useRef(null),u=g=>{const h=g.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==h))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const h=new AbortController;return g.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),p=e.sorters.find(g=>e.header.id===g.value),f=p?.type?p.type===I0.Asc?"ascending":"descending":"none",b=Df(e.header);return m.jsxs(a0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[m.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:m.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?m.jsx(ei,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",b]}),m.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:m.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",m.jsx("span",{className:"font-medium",children:b})]}),children:m.jsxs("ul",{className:"font-medium",children:[r.length===0?null:m.jsx(S.Fragment,{children:r.map(g=>m.jsx("li",{className:"my-1",children:m.jsx(ZL,{onDelete:u,filter:g,set:e.setFilters})},`thead-filter-${g.id}`))}),m.jsx("li",{children:m.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(g=>g.concat(Ff(e.header,s.options,s.operations))),children:[m.jsx(Oc,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,m.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?m.jsx(UL,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(We.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:XL,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:g=>void g.currentTarget.focus(),onKeyDown:g=>{if(g.key==="ArrowLeft"||g.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,y=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+y)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(g,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,y=h.delta.x;c.current.style.width=`${Math.abs(v+y)}px`}})]})},JL=e=>{const[t,n]=BL(e.setCols);return m.jsx(o0,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(Sn,{children:e.headers.map((r,o)=>m.jsx(QL,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},eF=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:m.jsx(Sn,{children:n.children})})),tF=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),nF=S.forwardRef(({context:e,...t},n)=>{const r=KL(),o={...t?.style,top:je.number(r.sticky)?`${r.sticky}px`:void 0};return m.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),rF=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return m.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),oF=S.forwardRef((e,t)=>e.context.loadingMore?m.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:m.jsx("tr",{role:"row",className:"bg-card-background",children:m.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:m.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),iF={TableRow:rF,TableFoot:oF,TableHead:nF,Table:tF,TableBody:eF},aF=[0,0,0,0,0,0,0,0,0,0],sF=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Of:m.jsx(Pw,{})}),lF=()=>m.jsx(S.Fragment,{}),cF=[],Ow=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!0,pagination:c=null,useControl:u=!1,...d})=>{const p=S.useRef(null),[f,b]=S.useState(!1),g=br(a),h=br(d.loadingMore),v=S.useMemo(()=>{if(d.loading)return aF;if(u)return d.rows;const T=new _0(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:T.Where(w.name,w.operation.symbol,w.value)),r.length===0?T.Select():WL(T.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(p.current===null)return()=>{};const T=p.current,w=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&h.current?(g.current?.(),void b(!0)):b(!1));return w.observe(T),()=>w.disconnect()},[h,g]);const y=v.length===0,x={cols:e,Aside:d.Aside,loading:d.loading,getRowProps:d.getRowProps,loadingMore:d.loadingMore};return m.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[m.jsx(vL,{context:x,components:iF,totalCount:v.length,itemContent:y?lF:LL,data:y?cF:v,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(JL,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),y?m.jsx(sF,{loading:d.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"}),c!==null?m.jsx(DL,{...c}):null]})},uF=({item:e,onPointerDown:t})=>{const n=qo(0);return m.jsxs(a0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[m.jsx("button",{type:"button",className:"cursor-grab",children:m.jsx(nk,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},dF=e=>{const t=St(),n=Nf(e.cols),r=fN(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,p=c.options.item(d)?.label||"";i(p);const f=new _0(e.rows).GroupBy(u),b=e.cols.find(g=>g.id===u);e.setGroups(VT(f).map((g,h)=>{const v=f[g];return{...b,groupId:Ao(),groupKey:u,index:h,rows:v,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(S.Fragment,{children:m.jsxs(ei,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(lk,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[m.jsxs("div",{className:"flex flex-nowrap items-center",children:[m.jsx(Hr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(fs,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(Ma,{size:16,className:"text-danger"})})]}),e.groups.length>0?m.jsxs("section",{className:"my-4",children:[m.jsx("header",{children:m.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),m.jsx(cO,{children:m.jsx(o0,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>m.jsx(uF,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},fF=e=>m.jsx("header",{className:"min-w-full mb-1",children:m.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[m.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[m.jsx("span",{children:m.jsx(GL,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(qL,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(dF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[m.jsxs("span",{children:[m.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),m.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[m.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),m.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Lf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),pF=(e,t)=>typeof t=="function"?t(e):t,tl=(e,t,n)=>e===t?void 0:n?.(t),hF=e=>{const t=Nc(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Nf(e.cols),[e.cols]),[i,a]=Xd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:pF(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),tl(l?.filters??[],s.filters??[],e.setFilters),tl(l?.sorters??[],s.sorters??[],e.setSorters),tl(l?.groups??[],s.groups??[],e.setGroups),tl(l?.cols??[],s.cols??[],e.setCols),s)]});return m.jsx(YL,{value:n,children:m.jsxs(Sn,{initial:!1,children:[r?m.jsx(fF,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?m.jsx(Ow,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):m.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>m.jsx("div",{className:"min-w-full",children:m.jsx(Ow,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},nl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>m.jsxs(en,{...s,as:r||"div","data-component":"card",className:Se("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4 pb-5",i),children:[e?m.jsx("header",{"data-component":"card-title",className:Se("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",a),children:e}):o,m.jsx("div",{"data-component":"card-body",className:Se("min-w-full px-4 lg:px-8",s.className),children:t?m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(fa,{className:"w-full"}),m.jsx(fa,{className:"w-8/12"}),m.jsx(fa,{className:"w-10/12"}),m.jsx(fa,{className:"w-1/2"})]}):n})]});nl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return m.jsxs(i,{...o,title:je.string(o.title)?o.title:void 0,className:Se("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[m.jsx(a,{className:"font-semibold",children:o.title}),r?m.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const mF=e=>{const t=e.interactive??!0,n=e.Icon??_c;return m.jsx(nl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0 lg:px-0",children:m.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[m.jsx("div",{className:Se("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:m.jsx(n,{size:48})}),m.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[m.jsx("p",{className:"text-lg",children:e.title}),e.loading?m.jsx(fa,{className:"h-10"}):m.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},gF=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(hr,{children:m.jsx(xd,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(Sn,{presenceAffectsLayout:!0,children:[e?m.jsx(We.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?m.jsx(lu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(Rr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(We.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[m.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:m.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:m.jsx(vo,{})})}),m.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[m.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),vF=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=er({open:t!==null,transform:!0,onOpenChange:p=>p?void 0:n(null)}),a=Co(o),s=vr(o,{role:"dialog"}),l=gr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=tr([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return m.jsxs(S.Fragment,{children:[m.jsx(gF,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((p,f)=>{const b=p.props,g=`${r}-${f}`,h=()=>n({...b,id:g}),v=b.leading;return m.jsx(We.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(We.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(S.Fragment,{children:[b.avatar?m.jsx("div",{children:m.jsx("div",{className:"relative px-1",children:m.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:b.avatar})})}):null,m.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:m.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[m.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[m.jsx("h3",{children:b.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:b.description})]}),v?m.jsx(v,{open:h}):null]})})]})})})},g)})})]})},yF=e=>m.jsx(S.Fragment,{children:e.children}),Mw=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},Dw={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},Nw=S.createContext(""),bF=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",$f=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!bF(a))return a}return n==="backward"?$f(e,e.length-1,"backward"):$f(e,-1,"forward")},Lw=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=$f(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Fw={[Dw.ArrowLeft]:(e,t)=>Lw(t,"backward"),[Dw.ArrowRight]:(e,t)=>Lw(t,"forward")},xF=e=>{const[t,n]=Mw(e.active),r=S.useRef(null),o=br(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(je.keyof(Fw,c)){const u=Fw[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(Nw.Provider,{value:t,children:m.jsx(nl,{className:e.className,container:Se("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[m.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return m.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Se("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:m.jsx(en,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},wF=()=>S.useContext(Nw),SF=e=>{const t=wF();return m.jsx(S.Fragment,{children:e.id===t?e.children:null})},Vw={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},TF={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},$w=e=>m.jsx(We.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Vw,exit:Vw.false,transition:TF,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Se("aria-hidden:pointer-events-none",e.className),children:e.children}),EF=fo("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),kF=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx(Sn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?m.jsx(We.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Se("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx($w,{"data-open":!!i,open:!!i,children:m.jsxs(en,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Se(EF({theme:n}),t),children:[m.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?m.jsx(bm,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(_c,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(sk,{"aria-hidden":"true",size:20}):null,r,m.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?m.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:m.jsx(vo,{size:20})}):null]})})}):null})}),CF=e=>m.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[m.jsxs("header",{className:"flex items-start gap-4 p-6",children:[m.jsx("div",{className:Se("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:m.jsx("div",{children:m.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("header",{children:m.jsx("h3",{className:"text-base leading-none",children:e.title})}),m.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?m.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),jw=(e="")=>Se("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),jf=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),zw=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[p,f]=S.useState(!1),[b,g]=S.useState(null),h=S.useRef([]),v=S.useRef([]),y=S.useContext(jf),x=fr(),T=pr(),w=nP(),E=mg(),k=x!==null,{floatingStyles:C,refs:O,context:I}=er({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Eo,placement:k?"right":"bottom-start",middleware:[Pi({mainAxis:k?0:4,alignmentAxis:k?-4:0}),nu(),tu()]}),D=vr(I,{role:"menu"}),V=gr(I,{bubbles:!0}),z=Cg(I,{move:!1,enabled:n,delay:{open:Zg},handleClose:Gg({blockPointerEvents:!0,requireIntent:!1})}),A=Co(I,{toggle:!k,event:"mousedown",ignoreMouse:k,keyboardHandlers:!0}),N=ds(I,{loop:!0,activeIndex:b,nested:k,listRef:h,onNavigate:g}),H=PP(I,{activeIndex:b,listRef:v,resetMs:IP,onMatch:u?g:void 0}),{getReferenceProps:M,getFloatingProps:P,getItemProps:$}=tr([z,A,D,V,N,H]);S.useEffect(()=>{if(!T)return;const U=()=>d(!1),G=B=>{B.nodeId!==w&&B.parentId===x&&d(!1)};return T.events.on("click",U),T.events.on("menuopen",G),()=>{T.events.off("click",U),T.events.off("menuopen",G)}},[T,w,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:w})},[T,u,w,x]);const L=o?l.className:Se(jw(l.className));return m.jsxs(rP,{id:w,children:[m.jsx(S.Fragment,{children:l.asChild?m.jsx(iv,{...M(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:s,className:L,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Zn(O.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Zn(O.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0,...M(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:[s,k&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(Ic,{size:14})]})]})}),m.jsx(jf.Provider,{value:{activeIndex:b,setActiveIndex:g,getItemProps:$,setHasFocusInside:f,isOpen:u},children:m.jsx(ZC,{elementsRef:h,labelsRef:v,children:u&&m.jsx(hr,{children:m.jsx(Rr,{context:I,modal:!1,initialFocus:k?-1:0,returnFocus:o?i:!k,children:m.jsx(t,{...P(),ref:O.setFloating,style:{...l.style,...C},className:Se("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),PF=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(jf),s=mg({label:n?null:e}),l=pr(),c=s.index===a.activeIndex;return m.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Zn(s.ref,i),className:jw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?m.jsx(t,{size:16}):null]})}),AF=S.forwardRef((e,t)=>fr()===null?m.jsx(oP,{children:m.jsx(zw,{...e,isParent:!0,ref:t})}):m.jsx(zw,{...e,isParent:!1,ref:t})),zf=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return m.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Se("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[m.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Se("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,m.jsx("span",{"data-name":"checkbox-label",className:Se("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),IF=({children:e,className:t="",size:n,...r})=>m.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[m.jsx("input",{...r,type:"radio",className:Se("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),_F=nv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
223
|
+
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),OF=(e,t)=>yr()?t:window.matchMedia(e).matches,MF=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(OF(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},DF=iv,vn="500ms",NF={exit:{x:["0%","-30%"],opacity:0,animationDuration:vn},enter:{x:["-30%","0%"],opacity:1,animationDuration:vn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:vn}},LF={enter:{x:"0%",opacity:1,animationDuration:vn},exit:{x:["0%","30%"],opacity:0,animationDuration:vn},initial:{x:["30%","0%"],opacity:.8,animationDuration:vn}},Bf={drawer:e=>e==="left"?NF:LF,sheet:{enter:{opacity:1,y:"0%",animationDuration:vn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:vn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:vn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn},initial:{opacity:.5,scale:.95,animationDuration:vn,transition:{duration:.5,ease:"easeInOut"}}}},FF=fo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Rf={top:0,left:0,right:0,bottom:0},rl=e=>e*.6,VF=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),p=window.outerHeight,f=rl(p);return d>=f?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return m.jsx(We.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:Rf,whileDrag:{cursor:"grabbing"},className:Se("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?m.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},ol={drawer:"right",sheet:"none",dialog:"none"},$F=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??ol.drawer:ol[o]:t?ol[o]:ol.sheet},jF=[],Hf=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:b=void 0,overlayClassName:g="",type:h="dialog",position:v,overlayClickClose:y=!1,role:x="dialog",interactions:T=jF,...w},E)=>{const k=S.useRef(null),C=S.useRef(null),O=S.useId(),I=S.useId(),D=MF("(min-width: 64rem)"),V=h!=="dialog",z=$F(D,f,h,v),A=D||f?Bf[h]:Bf.sheet,N=typeof A=="function"?A(z):A,H=D||f?h:"sheet",M=er({open:e,onOpenChange:a}),P=Co(M.context,{}),$=vr(M.context,{role:x}),L=gr(M.context,{escapeKey:!0,outsidePress:y}),U=tr([P,$,L].concat(T)),G=o,B=qo(void 0);S.useEffect(()=>B.set(void 0),[H]);const Z=()=>a(!1);S.useImperativeHandle(E,()=>({context:M.context,floating:C.current}),[M.context,C]);const ee=(X,oe)=>{const se=M.refs.floating.current.getBoundingClientRect(),le=B.get()||se.height,he=Math.abs(le-oe.delta.y),xe=window.outerHeight,de=rl(xe);return he>=de?B.set(he):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>B.set(void 0),350))},ne=(X,oe)=>{const j=M.refs.floating.current;if(oe.delta.y<0&&oe.offset.y<0){j.scrollTo({top:j.scrollTop+Math.abs(oe.offset.y),behavior:"smooth"});return}const se=j.getBoundingClientRect(),le=B.get()||se.height,he=Math.abs(le-oe.delta.y),xe=window.outerHeight,de=rl(xe);return he>=de?B.set(he):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>B.set(void 0),350))},J=H==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:Rf,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:ee,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},R=qo(void 0),q=qo(void 0);return m.jsxs(S.Fragment,{children:[o?m.jsx(S.Fragment,{children:r?m.jsx(DF,{ref:M.refs.setReference,...U.getReferenceProps({layoutId:b}),children:G}):m.jsx(We.button,{ref:M.refs.setReference,...U.getReferenceProps(),layoutId:b,type:"button",children:G})}):null,m.jsx(hr,{preserveTabOrder:!0,children:m.jsx(Sn,{presenceAffectsLayout:!0,propagate:!0,mode:"wait",initial:!1,children:e?m.jsx(lu,{lockScroll:!0,className:Se("inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70",H==="drawer"?"":"flex items-start justify-center p-10",g),children:m.jsx(xd,{reducedMotion:d?"user":"always",children:m.jsx(Rr,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M.context,children:m.jsxs(We.div,{...w,...t?{"aria-labelledby":O,"aria-describedby":I}:{"aria-label":s},...U.getFloatingProps({"aria-modal":e,ref:Zn(M.refs.setFloating,C),className:Se(FF({position:z,type:H}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:b,variants:N,"data-component":"modal",style:H==="drawer"?{width:B}:{height:B},children:[V&&u?m.jsx(VF,{onChange:a,value:B,sheet:H==="sheet",position:z,parent:M.refs.floating}):null,t?m.jsx(We.header,{...J,className:"relative w-full isolate",children:t?m.jsx("h2",{id:O,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,m.jsx(We.section,{ref:k,"data-component":"modal-body",dragConstraints:Rf,drag:D?"y":void 0,onDrag:H==="sheet"&&D?ne:void 0,className:Se("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:()=>{q.set(void 0),R.set(void 0)},onTouchStart:X=>{const oe=X.changedTouches[0];R.set(oe.pageY),q.set(oe.pageY)},onTouchMove:X=>{const oe=X.changedTouches[0],j=oe.pageY,se=R.get();if(se<j&&k.current?.scrollTop===0){const xe=M.refs.floating.current.getBoundingClientRect(),de=B.get()||xe.height,Pe=(se-j)/10,Oe=de+Pe,Te=window.outerHeight,Be=rl(Te);Oe<Be&&a?.(!1),B.set(Oe)}q.set(oe.pageY)},children:i}),n?m.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?m.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:m.jsx("button",{type:"button",onClick:Z,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:m.jsx(vo,{})})}):null]})})})}):null},O)})]})}),zF=e=>{const[t,n]=cN();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:bN(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},BF=e=>m.jsx("p",{...e,className:Se("text-base leading-snug",e.className)}),RF=e=>m.jsx("p",{...e,className:Se("mb-kilo text-sm text-secondary",e.className)}),HF=e=>m.jsx("div",{className:Se(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:m.jsxs(S.Fragment,{children:[m.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),m.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),Bw=e=>m.jsxs("div",{children:[m.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),m.jsx("p",{className:"text-secondary typography",children:e.children})]}),WF=e=>m.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[m.jsx("div",{children:m.jsx(Bw,{title:e.title,children:e.description})}),m.jsx("div",{className:"flex gap-kilo items-center",children:e.children})]}),Rw=e=>m.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Se("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),qF=()=>m.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:m.jsx(Rw,{})}),UF=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=er({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Co(s,{enabled:e.disabled??!0}),u=vr(s,{role:"tooltip"}),d=gr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=tr([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(fs,{...f(e),as:We.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(We.span,{layoutId:o,children:e.trigger})}),m.jsx(Sn,{children:i?m.jsx(hr,{root:t,children:m.jsx(Rr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(We.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Hw=6048e5,YF=864e5,KF=6e4,GF=36e5,ZF=1e3,Ww=Symbol.for("constructDateFrom");function nt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ww in e?e[Ww](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ue(e,t){return nt(t||e,e)}function il(e,t,n){const r=Ue(e,n?.in);return isNaN(t)?nt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function qw(e,t,n){const r=Ue(e,n?.in);if(isNaN(t))return nt(e,NaN);if(!t)return r;const o=r.getDate(),i=nt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ni(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Ue(e,n?.in),d=o||r?qw(u,o+r*12):u,p=a||i?il(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return nt(e,+p+g)}let XF={};function no(){return XF}function Hn(e,t){const n=no(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ue(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function ri(e,t){return Hn(e,{...t,weekStartsOn:1})}function Uw(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=nt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=ri(o),a=nt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=ri(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function al(e){const t=Ue(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function sl(e,...t){const n=nt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ro(e,t){const n=Ue(e,t?.in);return n.setHours(0,0,0,0),n}function QF(e,t,n){const[r,o]=sl(n?.in,e,t),i=ro(r),a=ro(o),s=+i-al(i),l=+a-al(a);return Math.round((s-l)/YF)}function JF(e,t){const n=Uw(e,t),r=nt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ri(r)}function eV(e){return nt(e,Date.now())}function tV(e,t,n){const[r,o]=sl(n?.in,e,t);return+ro(r)==+ro(o)}function nV(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ll(e){return!(!nV(e)&&typeof e!="number"||isNaN(+Ue(e)))}function rV(e,t){const[n,r]=sl(e,t.start,t.end);return{start:n,end:r}}function Yw(e,t){const{start:n,end:r}=rV(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(nt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Kw(e,t){const n=Ue(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function oV(e,t){const n=Ue(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function iV(e,t){const n=no(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ue(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const aV={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sV=(e,t,n)=>{let r;const o=aV[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Wf(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lV={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cV={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uV={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dV={date:Wf({formats:lV,defaultWidth:"full"}),time:Wf({formats:cV,defaultWidth:"full"}),dateTime:Wf({formats:uV,defaultWidth:"full"})},fV={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},pV=(e,t,n,r)=>fV[e];function ha(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const hV={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mV={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gV={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vV={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yV={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bV={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xV={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ha({values:hV,defaultWidth:"wide"}),quarter:ha({values:mV,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ha({values:gV,defaultWidth:"wide"}),day:ha({values:vV,defaultWidth:"wide"}),dayPeriod:ha({values:yV,defaultWidth:"wide",formattingValues:bV,defaultFormattingWidth:"wide"})};function ma(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?SV(s,d=>d.test(a)):wV(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function wV(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function SV(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function TV(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const EV=/^(\d+)(th|st|nd|rd)?/i,kV=/\d+/i,CV={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},PV={any:[/^b/i,/^(a|c)/i]},AV={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IV={any:[/1/i,/2/i,/3/i,/4/i]},_V={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},OV={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},MV={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},DV={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},NV={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},LV={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},FV={ordinalNumber:TV({matchPattern:EV,parsePattern:kV,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:CV,defaultMatchWidth:"wide",parsePatterns:PV,defaultParseWidth:"any"}),quarter:ma({matchPatterns:AV,defaultMatchWidth:"wide",parsePatterns:IV,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:_V,defaultMatchWidth:"wide",parsePatterns:OV,defaultParseWidth:"any"}),day:ma({matchPatterns:MV,defaultMatchWidth:"wide",parsePatterns:DV,defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:NV,defaultMatchWidth:"any",parsePatterns:LV,defaultParseWidth:"any"})},Gw={code:"en-US",formatDistance:sV,formatLong:dV,formatRelative:pV,localize:xV,match:FV,options:{weekStartsOn:0,firstWeekContainsDate:1}};function VV(e,t){const n=Ue(e,t?.in);return QF(n,oV(n))+1}function Zw(e,t){const n=Ue(e,t?.in),r=+ri(n)-+JF(n);return Math.round(r/Hw)+1}function qf(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=no(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=nt(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Hn(a,t),l=nt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Hn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function $V(e,t){const n=no(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=qf(e,t),i=nt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Hn(i,t)}function Xw(e,t){const n=Ue(e,t?.in),r=+Hn(n,t)-+$V(n,t);return Math.round(r/Hw)+1}function rt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Pr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return rt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):rt(n+1,2)},d(e,t){return rt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return rt(e.getHours()%12||12,t.length)},H(e,t){return rt(e.getHours(),t.length)},m(e,t){return rt(e.getMinutes(),t.length)},s(e,t){return rt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return rt(o,t.length)}},oi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Pr.y(e,t)},Y:function(e,t,n,r){const o=qf(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return rt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):rt(i,t.length)},R:function(e,t){const n=Uw(e);return rt(n,t.length)},u:function(e,t){const n=e.getFullYear();return rt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Pr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return rt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Xw(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):rt(o,t.length)},I:function(e,t,n){const r=Zw(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):rt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Pr.d(e,t)},D:function(e,t,n){const r=VV(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):rt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return rt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return rt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return rt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=oi.noon:r===0?o=oi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=oi.evening:r>=12?o=oi.afternoon:r>=4?o=oi.morning:o=oi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Pr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Pr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Pr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Pr.s(e,t)},S:function(e,t){return Pr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return e1(r);case"XXXX":case"XX":return oo(r);case"XXXXX":case"XXX":default:return oo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return e1(r);case"xxxx":case"xx":return oo(r);case"xxxxx":case"xxx":default:return oo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Jw(r,":");case"OOOO":default:return"GMT"+oo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Jw(r,":");case"zzzz":default:return"GMT"+oo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return rt(r,t.length)},T:function(e,t,n){return rt(+e,t.length)}};function Jw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+rt(i,2)}function e1(e,t){return e%60===0?(e>0?"-":"+")+rt(Math.abs(e)/60,2):oo(e,t)}function oo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=rt(Math.trunc(r/60),2),i=rt(r%60,2);return n+o+t+i}const t1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},n1=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Uf={p:n1,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return t1(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",t1(r,t)).replace("{{time}}",n1(o,t))}},jV=/^D+$/,zV=/^Y+$/,BV=["D","DD","YY","YYYY"];function r1(e){return jV.test(e)}function o1(e){return zV.test(e)}function Yf(e,t,n){const r=RV(e,t,n);if(console.warn(r),BV.includes(e))throw new RangeError(r)}function RV(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const HV=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WV=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qV=/^'([^]*?)'?$/,UV=/''/g,YV=/[a-zA-Z]/;function Kf(e,t,n){const r=no(),o=r.locale??Gw,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ue(e,n?.in);if(!ll(s))throw new RangeError("Invalid time value");let l=t.match(WV).map(u=>{const d=u[0];if(d==="p"||d==="P"){const p=Uf[d];return p(u,o.formatLong)}return u}).join("").match(HV).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:KV(u)};if(Qw[d])return{isToken:!0,value:u};if(d.match(YV))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(o1(d)||r1(d))&&Yf(d,t,String(e));const p=Qw[d[0]];return p(s,d,o.localize,c)}).join("")}function KV(e){const t=e.match(qV);return t?t[1].replace(UV,"'"):e}function GV(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=nt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function ZV(){return Object.assign({},no())}function XV(e,t){const n=Ue(e,t?.in).getDay();return n===0?7:n}function QV(e,t){return+Ue(e)>+Ue(t)}function JV(e,t){return+Ue(e)<+Ue(t)}function e$(e,t){const n=t$(t)?new t(0):nt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function t$(e){return typeof e=="function"&&e.prototype?.constructor===e}const n$=10;class i1{subPriority=0;validate(t,n){return!0}}class r$ extends i1{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class o$ extends i1{priority=n$;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>nt(n,r))}set(t,n){return n.timestampIsSet?t:nt(t,e$(t,this.context))}}class Ge{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new r$(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class i$ extends Ge{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const kt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Wn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function qn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*GF+i*KF+a*ZF),rest:t.slice(n[0].length)}}function a1(e){return gt(kt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(kt.singleDigit,t);case 2:return gt(kt.twoDigits,t);case 3:return gt(kt.threeDigits,t);case 4:return gt(kt.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function cl(e,t){switch(e){case 1:return gt(kt.singleDigitSigned,t);case 2:return gt(kt.twoDigitsSigned,t);case 3:return gt(kt.threeDigitsSigned,t);case 4:return gt(kt.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Gf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function s1(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function l1(e){return e%400===0||e%4===0&&e%100!==0}class a$ extends Ge{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Ct(bt(4,t),o);case"yo":return Ct(r.ordinalNumber(t,{unit:"year"}),o);default:return Ct(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=s1(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class s$ extends Ge{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ct(bt(4,t),o);case"Yo":return Ct(r.ordinalNumber(t,{unit:"year"}),o);default:return Ct(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=qf(t,o);if(r.isTwoDigitYear){const s=s1(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Hn(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Hn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class l$ extends Ge{priority=130;parse(t,n){return cl(n==="R"?4:n.length,t)}set(t,n,r){const o=nt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),ri(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class c$ extends Ge{priority=130;parse(t,n){return cl(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class u$ extends Ge{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class d$ extends Ge{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class f$ extends Ge{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Ct(gt(kt.month,t),o);case"MM":return Ct(bt(2,t),o);case"Mo":return Ct(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class p$ extends Ge{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Ct(gt(kt.month,t),o);case"LL":return Ct(bt(2,t),o);case"Lo":return Ct(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function h$(e,t,n){const r=Ue(e,n?.in),o=Xw(r,n)-t;return r.setDate(r.getDate()-o*7),Ue(r,n?.in)}class m$ extends Ge{priority=100;parse(t,n,r){switch(n){case"w":return gt(kt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Hn(h$(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function g$(e,t,n){const r=Ue(e,n?.in),o=Zw(r,n)-t;return r.setDate(r.getDate()-o*7),r}class v$ extends Ge{priority=100;parse(t,n,r){switch(n){case"I":return gt(kt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return ri(g$(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const y$=[31,28,31,30,31,30,31,31,30,31,30,31],b$=[31,29,31,30,31,30,31,31,30,31,30,31];class x$ extends Ge{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return gt(kt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=l1(r),i=t.getMonth();return o?n>=1&&n<=b$[i]:n>=1&&n<=y$[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class w$ extends Ge{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return gt(kt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return l1(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Zf(e,t,n){const r=no(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ue(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return il(i,u,n)}class S$ extends Ge{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Zf(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class T$ extends Ge{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Ct(bt(n.length,t),i);case"eo":return Ct(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Zf(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class E$ extends Ge{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Ct(bt(n.length,t),i);case"co":return Ct(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Zf(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function k$(e,t,n){const r=Ue(e,n?.in),o=XV(r,n),i=t-o;return il(r,i,n)}class C$ extends Ge{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Ct(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Ct(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Ct(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Ct(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=k$(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class P$ extends Ge{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Gf(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class A$ extends Ge{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Gf(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class I$ extends Ge{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Gf(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class _$ extends Ge{priority=70;parse(t,n,r){switch(n){case"h":return gt(kt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class O$ extends Ge{priority=70;parse(t,n,r){switch(n){case"H":return gt(kt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class M$ extends Ge{priority=70;parse(t,n,r){switch(n){case"K":return gt(kt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class D$ extends Ge{priority=70;parse(t,n,r){switch(n){case"k":return gt(kt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class N$ extends Ge{priority=60;parse(t,n,r){switch(n){case"m":return gt(kt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class L$ extends Ge{priority=50;parse(t,n,r){switch(n){case"s":return gt(kt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class F$ extends Ge{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Ct(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class V$ extends Ge{priority=10;parse(t,n){switch(n){case"X":return qn(Wn.basicOptionalMinutes,t);case"XX":return qn(Wn.basic,t);case"XXXX":return qn(Wn.basicOptionalSeconds,t);case"XXXXX":return qn(Wn.extendedOptionalSeconds,t);case"XXX":default:return qn(Wn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-al(t)-r)}incompatibleTokens=["t","T","x"]}class $$ extends Ge{priority=10;parse(t,n){switch(n){case"x":return qn(Wn.basicOptionalMinutes,t);case"xx":return qn(Wn.basic,t);case"xxxx":return qn(Wn.basicOptionalSeconds,t);case"xxxxx":return qn(Wn.extendedOptionalSeconds,t);case"xxx":default:return qn(Wn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:nt(t,t.getTime()-al(t)-r)}incompatibleTokens=["t","T","X"]}class j$ extends Ge{priority=40;parse(t){return a1(t)}set(t,n,r){return[nt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class z$ extends Ge{priority=20;parse(t){return a1(t)}set(t,n,r){return[nt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const B$={G:new i$,y:new a$,Y:new s$,R:new l$,u:new c$,Q:new u$,q:new d$,M:new f$,L:new p$,w:new m$,I:new v$,d:new x$,D:new w$,E:new S$,e:new T$,c:new E$,i:new C$,a:new P$,b:new A$,B:new I$,h:new _$,H:new O$,K:new M$,k:new D$,m:new N$,s:new L$,S:new F$,X:new V$,x:new $$,t:new j$,T:new z$},R$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W$=/^'([^]*?)'?$/,q$=/''/g,U$=/\S/,Y$=/[a-zA-Z]/;function K$(e,t,n,r){const o=()=>nt(n,NaN),i=ZV(),a=i.locale??Gw,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Ue(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new o$(r?.in,n)],d=t.match(H$).map(h=>{const v=h[0];if(v in Uf){const y=Uf[v];return y(h,a.formatLong)}return h}).join("").match(R$),p=[];for(let h of d){o1(h)&&Yf(h,t,e),r1(h)&&Yf(h,t,e);const v=h[0],y=B$[v];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=p.find(E=>x.includes(E.token)||E.token===v);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${h}\` at the same time`)}else if(y.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);p.push({token:v,fullToken:h});const T=y.run(e,h,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(Y$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(h==="''"?h="'":v==="'"&&(h=G$(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&U$.test(e))return o();const f=u.map(h=>h.priority).sort((h,v)=>v-h).filter((h,v,y)=>y.indexOf(h)===v).map(h=>u.filter(v=>v.priority===h).sort((v,y)=>y.subPriority-v.subPriority)).map(h=>h[0]);let b=Ue(n,r?.in);if(isNaN(+b))return o();const g={};for(const h of f){if(!h.validate(b,c))return o();const v=h.set(b,g,c);Array.isArray(v)?(b=v[0],Object.assign(g,v[1])):b=v}return b}function G$(e){return e.match(W$)[1].replace(q$,"'")}function Z$(e,t,n){const[r,o]=sl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function X$(e,t){return tV(nt(e,e),eV(e))}function Q$(e,t,n){return il(e,-t,n)}function J$(e,t,n){const r=Ue(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=nt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=GV(a);return r.setMonth(t,Math.min(i,s)),r}function ej(e,t,n){let r=Ue(e,n?.in);return isNaN(+r)?nt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=J$(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function tj(e,t,n){const r=Ue(e,n?.in);return isNaN(+r)?nt(e,NaN):(r.setFullYear(t),r)}function nj(e,t,n){return qw(e,-t,n)}function ga(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=nj(e,o+r*12,n),d=Q$(u,a+i*7,n),p=l+s*60,b=(c+p*60)*1e3;return nt(e,+d-b)}const rj=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function oj(e,t){return S.useRef(rj(e,t)).current}const Xf=e=>{const t=S.useContext(bo);if(e)return e;if(t)return t.locale||e};function c1(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const ij=/^(?<hour>\d\d):(?<min>\d\d)$/,aj={type:"spring",bounce:.3,duration:.6},u1=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),d1={enter:u1(1),exit:u1(-1),middle:{x:"0%",opacity:1}},f1={exit:{visibility:"hidden"}},sj=e=>{const t=Hn(Kw(e));return Yw({start:t,end:ni(t,{days:41})})},p1=(e,t)=>e.toLocaleDateString(t,{month:"long"}),lj=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Kw(new Date(1970,o,1).setMonth(o)),a=p1(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Qf={ArrowLeft:(e,t)=>t==="days"?ga(e,{days:1}):ga(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ni(e,{days:1}):ni(e,{months:1}),ArrowUp:(e,t)=>t==="days"?ga(e,{weeks:1}):ga(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ni(e,{weeks:1}):ni(e,{years:1})},h1=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},io=e=>e.getFullYear().toString().padStart(4,"0"),cj=(e,t,n)=>e===void 0||n===void 0?!1:QV(t,e)&&JV(t,n),uj=e=>{const t=St();return m.jsx(We.tbody,{layout:!0,variants:d1,custom:e.direction,onKeyDown:e.onKeyDown,className:Se(e.styles?.week),children:e.zip.map((n,r)=>{const o=je.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return m.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?ro(e.date).toISOString():void 0),l=X$(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=Z$(i,e.stateDate),d=!u||c,p=e.rangeMode?cj(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:Se("relative",je.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[m.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Se(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,p&&e.markRange?"size-10 border border-dashed border-card-border":"",je.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?m.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:m.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?m.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:m.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?m.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},dj=()=>ro(new Date),m1=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:p="date",datetimeTitle:f,...b})=>{const g=S.useRef(Ao()),h=St(),v=Xf(o),y=S.useRef(null),{date:x,range:T}=b,w=x||new Date,E=S.useRef(null),[k,C]=Xd({date:w,isAnimating:!1,year:io(w),direction:void 0,range:{from:T?.from,to:T?.to},months:lj(g.current,w,v),selectMode:l?"from":void 0,week:Yw({start:Hn(w),end:iV(w)})},M=>({onChangeYear:P=>({year:P}),onExitComplete:()=>(h1(E.current||null,y,M.state().date,200),E.current=null,{isAnimating:!1}),date:P=>{const $=P(M.state().date);return{date:$,year:io($)}},nextMonth:P=>{P&&(E.current=P.currentTarget);const $=M.state();if($.isAnimating)return $;const L=ni($.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:io(L)}},previousMonth:P=>{P&&(E.current=P.currentTarget);const $=M.state();if($.isAnimating)return $;const L=ga($.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:io(L)}},onSelectDate:P=>{const $=M.state(),L=P.currentTarget.dataset.range==="true",U=P.currentTarget.dataset.date||"",G=new Date(U);return{date:G,year:io(G),selectMode:$.selectMode===void 0?void 0:$.selectMode==="from"?"to":"from",range:L?{from:$.selectMode==="from"?G:$.range.from,to:$.selectMode==="to"?G:$.range.to}:$.range}},onChangeMonth:P=>{const $=P.target.value,U=Array.from(P.target.options).find(B=>B.value===$),G=M.state();if(U){const B=U.dataset.index||"",Z=new Date(M.state().date);return Z.setMonth(+B),{...G,date:Z,year:io(Z)}}return G},onKeyDown:P=>{const $=P.key,L=M.state();if($ in Qf){($==="ArrowUp"||$==="ArrowDown")&&P.preventDefault();const U=M.state().date,G=je.keyof(Qf,$)?Qf[$](U,P.shiftKey?"month":"days"):null;if(G!==null)return h1(P.target,y,G),{...L,date:G,year:io(G)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,P,$)=>(($.method==="onChangeMonth"||$.method==="previousMonth"||$.method==="nextMonth")&&$.props.onChangeMonth?.(M.date),M),(M,P,$)=>($.method==="onChangeYear"&&$.props.onChangeYear?.(M.date),M),(M,P,$)=>{const L=$.method==="onSelectDate"||$.method==="setToday"||$.method==="onKeyDown";return l&&L&&t?(c?.(M.range),M):(L&&t&&c?.(M.date),M)}]}),O=sj(k.date),I=Jg(O,7),D=k.date.toISOString(),V=p1(k.date,v);S.useEffect(()=>{t||c?.(k.date)},[D,t]);const z=oj(M=>C.date(P=>tj(new Date(P),+M)),1200),A=M=>{const P=M.currentTarget.value;C.onChangeYear(P),s?.(new Date(P)),z(P)},N=c1((M,P)=>(M.preventDefault(),P==="right"?C.previousMonth():C.nextMonth()),10),H=()=>{const M=dj();C.date(()=>M),c?.(M)};return m.jsx(xd,{transition:aj,children:m.jsxs("div",{ref:y,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:Se("relative overflow-hidden",je.function(u?.calendar)?u?.calendar(O):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(Sn,{initial:!1,mode:"popLayout",custom:k.direction,onExitComplete:C.onExitComplete,children:m.jsxs(We.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(We.button,{layout:!0,type:"button","data-focustrap":"prev",variants:f1,onClick:C.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(ZE,{className:"h-4 w-4"})}),m.jsx(We.span,{layout:!0,variants:d1,custom:k.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:m.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[m.jsx("select",{value:V,onChange:C.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${V.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:k.months}),m.jsx(mm,{mask:"int",maxLength:4,placeholder:"YYYY",value:k.year,onChange:A,style:{width:`${k.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(We.button,{layout:!0,type:"button","data-focustrap":"next",variants:f1,onClick:C.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(Ic,{className:"h-4 w-4"})}),m.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),m.jsxs(We.table,{className:"mt-2 table min-w-full table-auto border-0",children:[m.jsx("thead",{children:m.jsx("tr",{children:k.week.map(M=>m.jsx("th",{role:"columnheader",className:Se("py-2 text-sm font-medium capitalize",je.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),m.jsx(uj,{zip:I,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:k.date,labelRange:n,stateRange:k.range,RenderOnDay:e,direction:k.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},V)})}),p==="datetime"?m.jsx("section",{className:"grid items-center my-4",children:m.jsx(Io,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Kf(x,"HH:mm"):void 0,title:f||h.calendarDatetimeTitle,onChange:M=>{const P=M.target.value,$=ij.exec(P);if(!$)return;const L=$.groups.hour,U=$.groups.min,G=ej(k.date,{hours:Number(L),minutes:Number(U),seconds:0});C.date(()=>G),c?.(G)}})}):null,m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:H,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},fj=e=>m.jsxs(pA,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:Se("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(hA,{style:{transform:je.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Se("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),je.number(e.percent)?m.jsx("p",{className:Se("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),ul=e=>m.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[m.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),m.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});ul.Icon=function(t){return m.jsx("header",{...t,className:Se("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},ul.Body=function(t){return m.jsx(en,{...t,className:Se("min-w-0 flex-1",t.className),children:t.children})},ul.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(en,{...t,type:"button"})})};const pj=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),hj=e=>m.jsx(We.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),g1=new Date(1970,11,31),Jf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},v1={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},mj={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},ep=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},gj={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},vj={day:"numeric",month:"numeric",year:"numeric"},yj=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,type:a,...s},l)=>{const c=Xf(t),u=S.useId(),d=St(),p=S.useMemo(()=>new Intl.DateTimeFormat(c,a==="datetime"?gj:vj),[c,a]),[f,b]=S.useState(e||void 0),[g,h]=S.useState(!1),v=ep(p,g1).flatMap(I=>je.keyof(Jf,I.type)?Jf[I.type](I.value):[]),y=S.useMemo(()=>ep(p,g1).reduce((I,D)=>I+(je.keyof(v1,D.type)?v1[D.type](D.value):""),""),[p]),x=e?.toISOString(),[T,w]=S.useState(f?ep(p,f).reduce((I,D)=>I+(je.keyof(Jf,D.type)?mj[D.type](f,D.value):""),""):""),E=I=>{const D=I.target.value;if(w(D),v.length===D.length&&v.every((z,A)=>{const N=D.charAt(A);return typeof z=="string"?N===z:z.test(N)})){const z=K$(D,y,new Date),A=a==="datetime"?z:ro(z);return b(A),r?.(A)}return b(void 0),r?.(void 0)};S.useEffect(()=>{ll(e)&&(b(e),w(Kf(e,y)))},[x,y]);const k=I=>(b(I),r?.(I),i&&h(!1),w(I?Kf(I,y):"")),C=ll(f),O=C?f.toISOString():void 0;return m.jsx(Io,{...s,mask:v,value:T,id:void 0,name:void 0,"data-value":O,formNoValidate:!g,"data-target":s.name,"data-component":"date-picker",onChange:E,required:s.required??!0,error:g?void 0:s.error,placeholder:s.placeholder||d.datepickerPlaceholder(y),right:m.jsxs(S.Fragment,{children:[m.jsx("input",{"data-origin":s.name,defaultValue:O,form:s.form,hidden:!0,id:s.name,name:s.name,ref:l,type:"date"}),m.jsx(ei,{open:g,onChange:h,buttonProps:{"aria-describedby":u},trigger:m.jsxs("span",{"aria-labelledby":u,children:[m.jsx("span",{id:u,className:"sr-only",children:d.datePickerCalendarButtonLabel}),m.jsx(GE,{})]}),children:m.jsx(m1,{...s,type:a,locale:c,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:C?f:void 0})})]})})}),bj=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],xj=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],wj=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Sj=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],y1=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},b1=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},Tj=e=>typeof e=="number"?Math.log(e):b1(e)*Math.log(10),Ej=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t};function kj(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?Sj:wj:t.binary?xj:bj,r=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=y1(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Tj(e)/Math.log(1024):b1(e)/3),n.length-1);e=Ej(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));const l=y1(Number(e),t.locale,a),c=n[s];return i+l+r+c}var dl={exports:{}},fl={exports:{}},Je={};/** @license React v16.13.1
|
|
223
224
|
* react-is.production.min.js
|
|
224
225
|
*
|
|
225
226
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
226
227
|
*
|
|
227
228
|
* This source code is licensed under the MIT license found in the
|
|
228
229
|
* LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/var
|
|
230
|
+
*/var x1;function Cj(){if(x1)return Je;x1=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case b:case f:case a:return w;default:return E}}case n:return E}}}function T(w){return x(w)===c}return Je.AsyncMode=l,Je.ConcurrentMode=c,Je.ContextConsumer=s,Je.ContextProvider=a,Je.Element=t,Je.ForwardRef=u,Je.Fragment=r,Je.Lazy=b,Je.Memo=f,Je.Portal=n,Je.Profiler=i,Je.StrictMode=o,Je.Suspense=d,Je.isAsyncMode=function(w){return T(w)||x(w)===l},Je.isConcurrentMode=T,Je.isContextConsumer=function(w){return x(w)===s},Je.isContextProvider=function(w){return x(w)===a},Je.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Je.isForwardRef=function(w){return x(w)===u},Je.isFragment=function(w){return x(w)===r},Je.isLazy=function(w){return x(w)===b},Je.isMemo=function(w){return x(w)===f},Je.isPortal=function(w){return x(w)===n},Je.isProfiler=function(w){return x(w)===i},Je.isStrictMode=function(w){return x(w)===o},Je.isSuspense=function(w){return x(w)===d},Je.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===v||w.$$typeof===y||w.$$typeof===g)},Je.typeOf=x,Je}var et={};/** @license React v16.13.1
|
|
230
231
|
* react-is.development.js
|
|
231
232
|
*
|
|
232
233
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
233
234
|
*
|
|
234
235
|
* This source code is licensed under the MIT license found in the
|
|
235
236
|
* LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/var
|
|
237
|
+
*/var w1;function Pj(){return w1||(w1=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===i||j===o||j===d||j===p||typeof j=="object"&&j!==null&&(j.$$typeof===b||j.$$typeof===f||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===h||j.$$typeof===v||j.$$typeof===y||j.$$typeof===g)}function T(j){if(typeof j=="object"&&j!==null){var se=j.$$typeof;switch(se){case t:var le=j.type;switch(le){case l:case c:case r:case i:case o:case d:return le;default:var he=le&&le.$$typeof;switch(he){case s:case u:case b:case f:case a:return he;default:return se}}case n:return se}}}var w=l,E=c,k=s,C=a,O=t,I=u,D=r,V=b,z=f,A=n,N=i,H=o,M=d,P=!1;function $(j){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(j)||T(j)===l}function L(j){return T(j)===c}function U(j){return T(j)===s}function G(j){return T(j)===a}function B(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function Z(j){return T(j)===u}function ee(j){return T(j)===r}function ne(j){return T(j)===b}function J(j){return T(j)===f}function R(j){return T(j)===n}function q(j){return T(j)===i}function X(j){return T(j)===o}function oe(j){return T(j)===d}et.AsyncMode=w,et.ConcurrentMode=E,et.ContextConsumer=k,et.ContextProvider=C,et.Element=O,et.ForwardRef=I,et.Fragment=D,et.Lazy=V,et.Memo=z,et.Portal=A,et.Profiler=N,et.StrictMode=H,et.Suspense=M,et.isAsyncMode=$,et.isConcurrentMode=L,et.isContextConsumer=U,et.isContextProvider=G,et.isElement=B,et.isForwardRef=Z,et.isFragment=ee,et.isLazy=ne,et.isMemo=J,et.isPortal=R,et.isProfiler=q,et.isStrictMode=X,et.isSuspense=oe,et.isValidElementType=x,et.typeOf=T}()),et}var S1;function T1(){return S1||(S1=1,process.env.NODE_ENV==="production"?fl.exports=Cj():fl.exports=Pj()),fl.exports}/*
|
|
237
238
|
object-assign
|
|
238
239
|
(c) Sindre Sorhus
|
|
239
240
|
@license MIT
|
|
240
|
-
*/var
|
|
241
|
-
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var j=oe(J,X,Z,ee,te+"."+X,n);if(j)return j}return null}return h(U)}function A(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(A);if(L===null||s(L))return!0;var U=d(L);if(U){var G=U.call(L),B;if(U!==L.entries){for(;!(B=G.next()).done;)if(!A(B.value))return!1}else for(;!(B=G.next()).done;){var Z=B.value;if(Z&&!A(Z[1]))return!1}}else return!1;return!0;default:return!1}}function N(L,U){return L==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function H(L){var U=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":N(U,L)?"symbol":U}function M(L){if(typeof L>"u"||L===null)return""+L;var U=H(L);if(U==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return U}function P(L){var U=M(L);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function $(L){return!L.constructor||!L.constructor.name?p:L.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Qf}var Jf,x1;function $$(){if(x1)return Jf;x1=1;var e=Gf();function t(){}function n(){}return n.resetWarningCache=t,Jf=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Jf}var w1;function j$(){if(w1)return ul.exports;if(w1=1,process.env.NODE_ENV!=="production"){var e=p1(),t=!0;ul.exports=V$()(e.isElement,t)}else ul.exports=$$()();return ul.exports}var z$=j$();const st=qp(z$),B$=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ri(e,t,n){const r=R$(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&S1(r,"path",i),S1(r,"relativePath",i),r}function R$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=B$.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function S1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const H$=[".DS_Store","Thumbs.db"];function W$(e){return to(this,void 0,void 0,function*(){return fl(e)&&q$(e.dataTransfer)?G$(e.dataTransfer,e.type):U$(e)?Y$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?K$(e):[]})}function q$(e){return fl(e)}function U$(e){return fl(e)&&fl(e.target)}function fl(e){return typeof e=="object"&&e!==null}function Y$(e){return ep(e.target.files).map(t=>ri(t))}function K$(e){return to(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ri(n))})}function G$(e,t){return to(this,void 0,void 0,function*(){if(e.items){const n=ep(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Z$));return T1(E1(r))}return T1(ep(e.files).map(n=>ri(n)))})}function T1(e){return e.filter(t=>H$.indexOf(t.name)===-1)}function ep(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Z$(e){if(typeof e.webkitGetAsEntry!="function")return k1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?C1(t):k1(e,t)}function E1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?E1(n):[n]],[])}function k1(e,t){return to(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,ri(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ri(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function X$(e){return to(this,void 0,void 0,function*(){return e.isDirectory?C1(e):Q$(e)})}function C1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>to(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(X$));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function Q$(e){return to(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ri(r,e.fullPath);t(o)},r=>{n(r)})})})}var pl={},P1;function J$(){return P1||(P1=1,pl.__esModule=!0,pl.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),pl}var ej=J$();const tp=qp(ej);function A1(e){return rj(e)||nj(e)||M1(e)||tj()}function tj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
242
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
243
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
244
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
245
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z1(e,t){if(e){if(typeof e=="string")return op(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return op(e,t)}}function op(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mj(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Dj(e){if(Array.isArray(e))return e}function B1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B1(Object(n),!0).forEach(function(r){ip(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ip(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(e,t){if(e==null)return{};var n=Nj(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var ap=S.forwardRef(function(e,t){var n=e.children,r=gl(e,Tj),o=H1(r),i=o.open,a=gl(o,Ej);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},a),{},{open:i})))});ap.displayName="Dropzone";var R1={disabled:!1,getFilesFromEvent:W$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ap.defaultProps=R1,ap.propTypes={children:st.func,accept:st.objectOf(st.arrayOf(st.string)),multiple:st.bool,preventDropOnDocument:st.bool,noClick:st.bool,noKeyboard:st.bool,noDrag:st.bool,noDragEventsBubbling:st.bool,minSize:st.number,maxSize:st.number,maxFiles:st.number,disabled:st.bool,getFilesFromEvent:st.func,onFileDialogCancel:st.func,onFileDialogOpen:st.func,useFsAccessApi:st.bool,autoFocus:st.bool,onDragEnter:st.func,onDragLeave:st.func,onDragOver:st.func,onDrop:st.func,onDropAccepted:st.func,onDropRejected:st.func,onError:st.func,validator:st.func};var sp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function H1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},R1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,b=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,O=t.validator,I=S.useMemo(function(){return xj(n)},[n]),D=S.useMemo(function(){return bj(n)},[n]),V=S.useMemo(function(){return typeof h=="function"?h:W1},[h]),z=S.useMemo(function(){return typeof g=="function"?g:W1},[g]),A=S.useRef(null),N=S.useRef(null),H=S.useReducer(Lj,sp),M=rp(H,2),P=M[0],$=M[1],L=P.isFocused,U=P.isFileDialogActive,G=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&yj()),B=function(){!G.current&&U&&setTimeout(function(){if(N.current){var Q=N.current.files;Q.length||($({type:"closeDialog"}),z())}},300)};S.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[N,U,z,G]);var Z=S.useRef([]),ee=function(Q){A.current&&A.current.contains(Q.target)||(Q.preventDefault(),Z.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",V1,!1),document.addEventListener("drop",ee,!1)),function(){x&&(document.removeEventListener("dragover",V1),document.removeEventListener("drop",ee))}},[A,x]),S.useEffect(function(){return!r&&y&&A.current&&A.current.focus(),function(){}},[A,y,r]);var te=S.useCallback(function(F){C?C(F):console.error(F)},[C]),J=S.useCallback(function(F){F.preventDefault(),F.persist(),Se(F),Z.current=[].concat(Pj(Z.current),[F.target]),ml(F)&&Promise.resolve(o(F)).then(function(Q){if(!(hl(F)&&!k)){var ce=Q.length,we=ce>0&&hj({files:Q,accept:I,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:O}),Le=ce>0&&!we;$({isDragAccept:we,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(F)}}).catch(function(Q){return te(Q)})},[o,c,te,k,I,a,i,s,l,O]),R=S.useCallback(function(F){F.preventDefault(),F.persist(),Se(F);var Q=ml(F);if(Q&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return Q&&d&&d(F),!1},[d,k]),q=S.useCallback(function(F){F.preventDefault(),F.persist(),Se(F);var Q=Z.current.filter(function(we){return A.current&&A.current.contains(we)}),ce=Q.indexOf(F.target);ce!==-1&&Q.splice(ce,1),Z.current=Q,!(Q.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ml(F)&&u&&u(F))},[A,u,k]),X=S.useCallback(function(F,Q){var ce=[],we=[];F.forEach(function(Le){var Ze=L1(Le,I),Ft=rp(Ze,2),xt=Ft[0],Kt=Ft[1],Kn=F1(Le,a,i),An=rp(Kn,2),In=An[0],W=An[1],K=O?O(Le):null;if(xt&&In&&!K)ce.push(Le);else{var Fe=[Kt,W];K&&(Fe=Fe.concat(K)),we.push({file:Le,errors:Fe.filter(function(tt){return tt})})}}),(!s&&ce.length>1||s&&l>=1&&ce.length>l)&&(ce.forEach(function(Le){we.push({file:Le,errors:[pj]})}),ce.splice(0)),$({acceptedFiles:ce,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),p&&p(ce,we,Q),we.length>0&&b&&b(we,Q),ce.length>0&&f&&f(ce,Q)},[$,s,I,a,i,l,p,f,b,O]),oe=S.useCallback(function(F){F.preventDefault(),F.persist(),Se(F),Z.current=[],ml(F)&&Promise.resolve(o(F)).then(function(Q){hl(F)&&!k||X(Q,F)}).catch(function(Q){return te(Q)}),$({type:"reset"})},[o,X,te,k]),j=S.useCallback(function(){if(G.current){$({type:"openDialog"}),V();var F={multiple:s,types:D};window.showOpenFilePicker(F).then(function(Q){return o(Q)}).then(function(Q){X(Q,null),$({type:"closeDialog"})}).catch(function(Q){wj(Q)?(z(Q),$({type:"closeDialog"})):Sj(Q)?(G.current=!1,N.current?(N.current.value=null,N.current.click()):te(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):te(Q)});return}N.current&&($({type:"openDialog"}),V(),N.current.value=null,N.current.click())},[$,V,z,v,X,te,D,s]),se=S.useCallback(function(F){!A.current||!A.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),j())},[A,j]),le=S.useCallback(function(){$({type:"focus"})},[]),he=S.useCallback(function(){$({type:"blur"})},[]),xe=S.useCallback(function(){T||(vj()?setTimeout(j,0):j())},[T,j]),de=function(Q){return r?null:Q},Pe=function(Q){return w?null:de(Q)},Oe=function(Q){return E?null:de(Q)},Se=function(Q){k&&Q.stopPropagation()},Be=S.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=F.refKey,ce=Q===void 0?"ref":Q,we=F.role,Le=F.onKeyDown,Ze=F.onFocus,Ft=F.onBlur,xt=F.onClick,Kt=F.onDragEnter,Kn=F.onDragOver,An=F.onDragLeave,In=F.onDrop,W=gl(F,kj);return vt(vt(ip({onKeyDown:Pe(Un(Le,se)),onFocus:Pe(Un(Ze,le)),onBlur:Pe(Un(Ft,he)),onClick:de(Un(xt,xe)),onDragEnter:Oe(Un(Kt,J)),onDragOver:Oe(Un(Kn,R)),onDragLeave:Oe(Un(An,q)),onDrop:Oe(Un(In,oe)),role:typeof we=="string"&&we!==""?we:"presentation"},ce,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,se,le,he,xe,J,R,q,oe,w,E,r]),ue=S.useCallback(function(F){F.stopPropagation()},[]),Y=S.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=F.refKey,ce=Q===void 0?"ref":Q,we=F.onChange,Le=F.onClick,Ze=gl(F,Cj),Ft=ip({accept:I,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:de(Un(we,oe)),onClick:de(Un(Le,ue)),tabIndex:-1},ce,N);return vt(vt({},Ft),Ze)}},[N,n,s,oe,r]);return vt(vt({},P),{},{isFocused:L&&!r,getRootProps:Be,getInputProps:Y,rootRef:A,inputRef:N,open:de(j)})}function Lj(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},sp),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},sp);default:return e}}function W1(){}const q1=S.createContext([null,()=>{}]),Fj=()=>S.useContext(q1),Vj=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,$j={csv:Wu,xls:Wu,mov:by,mp4:by,xlsx:Wu,pdf:yy,txt:yy,json:GI,mp3:WI},jj=e=>{const[,t]=Fj(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:Vj(l),size:M$(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},a=$j[e.file.name.split(".").at(-1)]??xy,s=n.type==="img"?m.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):m.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return m.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[m.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),m.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[m.jsx("span",{children:e.file.name}),m.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?m.jsx("div",{className:"flex-1 min-w-full",children:m.jsx(e.File,{file:e.file})}):null]}),m.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:m.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:m.jsx(Oo,{size:16})})})]})},zj=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(jj,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),U1=e=>{const t=Et(),n=e.dragging?ZI:XI;return m.jsxs("div",{className:"flex flex-col justify-center items-center",children:[m.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:m.jsx(n,{className:"text-primary",size:80})}),m.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[m.jsx("p",{children:t.uploadIdle}),m.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},Bj=e=>e.isDragActive?m.jsx(U1,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(zj,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(S.Fragment,{children:e.idle}),Rj=m.jsx(U1,{dragging:!1}),Hj=e=>{const t=e.item.file,n=e.item.type;return m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),m.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?m.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?m.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?m.jsx("figure",{children:m.jsx("audio",{controls:!0,src:e.item.url})}):null]})},Wj=({idle:e=Rj,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Et(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(h=>h.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:b}=H1({onDrop:d});return m.jsxs(q1.Provider,{value:a,children:[m.jsx(pf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(Hj,{item:a[0]}):null}),m.jsxs("div",{...p(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[m.jsx("input",{...f(o),name:o.name,id:o.name}),m.jsx(Bj,{File:n,onDeleteFile:t,isDragActive:b,idle:e,files:c})]})]})},qj=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})},Y1=40,Uj=e=>m.jsx(S.Fragment,{children:e.children}),Yj={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},K1=[],Kj=S.forwardRef(function(t,n){return m.jsx(We.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:m.jsx(wn,{children:t.children})})}),Gj=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(We.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Zj={List:Kj,Item:Gj},Xj=e=>{const t=Et(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),m.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?m.jsxs(Pa,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},Qj=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:b=!1,onChangeOptions:g,...h},v)=>{const y=S.useMemo(()=>new Tn(r.map(Y=>[Y.value,Y])),[r]),x=S.useRef(null),T=S.useRef(null),w=h.value??h.defaultValue??K1,E=Et(),[k,C]=S.useState(0),[O,I]=S.useState(!1),[D,V]=S.useState(""),[z,A]=S.useState(()=>{const Y=new Tn;return w.forEach(F=>{const Q=y.get(F);return Q?Y.set(F,Q):void 0}),Y}),N=S.useMemo(()=>Array.from(z.keys()),[z]),[H,M]=S.useState(()=>{const Y=new Set(w);return r.reduce((F,Q)=>Y.has(Q.value)?[...F,Q.label??Q.value]:F,[])??w}),[P,$]=S.useState(null),L=S.useRef(K1),U=b&&D!==""?[{value:D,label:D,"data-dynamic":"true"},...r]:r,G=D.length===0?U:uf(U,"value",[{key:"value",value:D},{key:"label",value:D}]),B=i1(O,"block-only"),Z=G.filter(Y=>Y.hidden!==!0),ee=Z.length===0,{x:te,y:J,strategy:R,refs:q,context:X}=rr({open:O,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:I,whileElementsMounted:Wo,middleware:[Xi(4),ix({padding:10,elementContext:"reference",apply(Y){const Q=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=bi(q.reference.current,window.innerHeight),we=Math.min(Q<Y1?ce:Q,ce,Y.availableHeight),Le=Z.length===0?Y1:Math.min(we,ce,Q),Ze=`${x.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),oe=jx(X,Yj),{getReferenceProps:j,getFloatingProps:se,getItemProps:le}=or([Tr(X,{role:"listbox"}),Sr(X),Vs(X,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Y=>$(F=>Y??F)})]);S.useEffect(()=>{if(!O)return C(0);const Y=q.reference;if(Y.current===null)return;const F=bi(Y.current,window.innerHeight);setTimeout(()=>C(Math.min(F,Z.length*40)),100)},[D,O,q.reference]),S.useEffect(()=>{h.value&&A(new Tn(h.value.map(Y=>[Y,y.get(Y)])))},[h.value,y]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return yi(Y)},[]);const he=(Y,F)=>{const Q=z.clone(Le=>Le.has(Y.value)?Le.remove(Y.value):Le.set(Y.value,Y));A(Q);const ce=q.reference.current;if(!ce)return;const we=Q.map(Le=>Le.value);ce?.setAttribute("data-value",JSON.stringify(we)),g&&g(we),M(Le=>Le.concat(Y.label??"")),V(""),$(F)},xe=Y=>{const F=Y.target.value;return V(F),!O&&F===""?I(!0):(Y.target.name=h.name||"",F?I(!0):void 0)},de=()=>{I(!0),V(""),q.reference.current?.focus()},Pe=()=>{I(!0),V("")},Oe=()=>{q.reference.current?.setAttribute("data-value","[]"),V(""),I(!1),A(new Tn),g?.([])},Se=h.id||h.name,Be=z.map((Y,F)=>m.jsx(Pa,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),he(Y,F)},children:m.jsx(Oo,{size:14})}),children:Y.label??Y.value},`MultiSelect-${Y.value}-x`)),ue={height:ee?"0":z.size===0?k-49:k-86};return m.jsxs(na,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:de,children:[m.jsx(zu,{size:20}),m.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),z?m.jsx("button",{type:"button",onClick:Oe,className:"transition-colors link:text-danger",children:m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[m.jsxs("ul",{...j({...h,onFocus:Pe,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:q.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:Te("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[N.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),m.jsx(Xj,{label:c,children:Be})]}),m.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:v,required:f,defaultValue:h.value||N||void 0}),m.jsx(xr,{preserveTabOrder:!0,children:O?m.jsx(zd,{lockScroll:!0,children:m.jsx(Qr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...se({ref:q.setFloating,style:{...oe.styles,top:J??0,position:R,left:te,height:k-(N.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[m.jsx("input",{autoFocus:!0,value:D,onChange:xe,title:h.title,placeholder:E.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:Y=>{if(Y.key==="ArrowDown"){let F=P+1;return F>Z.length-1&&(F=0),T.current?.scrollIntoView({index:F}),$(F)}if(Y.key==="ArrowUp"){let F=P-1;return F<0&&(F=Z.length-1),T.current?.scrollIntoView({index:F}),$(F)}if(Y.key==="Escape")return Y.currentTarget.blur(),I(!1);if(Y.key==="Enter"){if(P!==null&&Z[P])return Y.preventDefault(),he(Z[P],P);if(Z.length===1)return Y.preventDefault(),he(Z[0],0)}}}),ee?m.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||E.autocompleteEmpty})}):null,ee?null:m.jsx(We.div,{initial:!1,"data-floating":"true",ref:B,animate:{height:ee?"auto":k},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!O)return C(0);const F=q.floating.current.querySelectorAll("li").item(0),Q=(F?F.getBoundingClientRect().height:40)*Z.length;return uo.flushSync(()=>C(Q+2))},children:m.jsx(zf,{ref:T,hidden:ee,data:Z,components:Zj,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Y,F)=>{const Q=F.Render??Uj,ce=z.has(F.value)||z.has(F.label??""),we=P===Y,Le=F.label??F.value;return m.jsxs("button",{"data-value":F.value,...le({ref:Ze=>void(L.current[Y]=Ze),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":F.disabled,onClick:()=>he(F,Y)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ce||we?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx(Wf,{onChange:dd,checked:ce,"aria-checked":ce,onClick:Ze=>{Ze.stopPropagation(),he(F,Y)}}),m.jsx(Q,{...h,label:F.label,value:F.value,children:Le})]})}})}),m.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:z.size===0?m.jsx(Pa,{theme:"muted",size:"small",children:E.autocompleteEmpty}):Be})]})})}):null})]})}),Jj=({children:e,className:t="",size:n,...r})=>m.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[m.jsx("input",{...r,type:"radio",className:Te("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),ao=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:b,...g},h)=>{const v=Et(),y=S.useRef(null),x=g.id??g.name;S.useImperativeHandle(h,()=>y.current),S.useEffect(()=>{if(y.current===null)return;const w=new AbortController,E=y.current,k=yi(y.current);return E.addEventListener("change",()=>E.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{k(),w.abort()}},[]);const T=()=>y.current?.focus();return m.jsx(na,{info:n,left:f,error:b,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:m.jsxs("label",{htmlFor:x,children:[p,m.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(zu,{size:20}),m.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:m.jsxs("select",{...g,id:x,name:x,required:e,ref:Zn(h,y),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Te("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>S.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})}),ez=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));je.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(je.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(Wd,{title:"",ref:r,as:TL,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},tz=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(jo()),s=r||o||[];return m.jsxs(xL,{...i,defaultValue:r,value:o,className:Te("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(wL,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(SL,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>m.jsx(ez,{tooltip:t??!1},`${a.current}-${c}`))]})},nz=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=lr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},b=u.current;return b.addEventListener("change",f),()=>b?.removeEventListener("change",f)}},[]);const p=()=>{const f=!u.current?.checked;l(f),o?.onCheck?.(f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:Te("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[m.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[m.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:m.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),m.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:m.jsx("span",{className:"font-medium text-foreground",children:e})})]}),m.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),rz=e=>{const[t,n]=CI();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:FI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},oz=qx("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
246
|
-
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),iz=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},az={Item:S.forwardRef(function(t,n){return m.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return m.jsx("ul",{...t,ref:n,className:"space-y-3"})})},sz=e=>{const t=S.useRef(null),n=iz(t);return m.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[m.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[m.jsx("header",{className:"border-b border-card-border pb-2"}),m.jsxs("div",{className:"px-8 space-y-2",children:[m.jsx(Ko,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(zf,{height:n,useWindowScroll:!0,data:e.source,components:az,itemContent:(r,o)=>m.jsx(S.Fragment,{children:m.jsx(Wf,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(Ca,{children:m.jsx(Bu,{})})}),m.jsx("div",{})]})};var lz=Object.defineProperty,G1=Object.getOwnPropertySymbols,cz=Object.prototype.hasOwnProperty,uz=Object.prototype.propertyIsEnumerable,Z1=(e,t,n)=>t in e?lz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dz=(e,t)=>{for(var n in t||(t={}))cz.call(t,n)&&Z1(e,n,t[n]);if(G1)for(var n of G1(t))uz.call(t,n)&&Z1(e,n,t[n]);return e},lp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},fz=(e,t,n,r)=>yl(lp,e,t,n,r),oi=e=>typeof e=="object",Pr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!oi(e)&&!oi(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Pr(e[r],t[r]))},pz=(e,t)=>(oi(e)||Array.isArray(e))&&t?e[t]:e,hz=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,vl=e=>/[0-9.]+/.test(e),X1=e=>["string","number"].includes(typeof e),Q1=e=>e==null||e?.length===0||e==="",J1={eq:Pr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:Q1,notEmpty:e=>!Q1(e),in:(e,t)=>lp(t,n=>Pr(e,n)),notIn:(e,t)=>eS(t,n=>!Pr(e,n))},mz=e=>{if(e in J1)return J1[e];throw new Error("Linq - Symbol not found")},ii=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},yl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=mz(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},gz=(e,t,n,r)=>yl(ii,e,t,n,r),eS=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},vz=(e,t,n,r)=>yl(eS,e,t,n,r),tS=e=>{if(e===null)return null;const t=dz({},e);return Object.keys(t).forEach(n=>t[n]=oi(e[n])?tS(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},nS=(e,t)=>{if(oi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Pr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Pr(t,r))return!0}return!1},yz=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},bz=e=>ii(e,(t,n,r)=>oi(t)?n===r.findIndex(o=>Pr(o,t)):n===r.indexOf(t)),xz=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},rS=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},wz=(e,t)=>rS(e,n=>n[t]),oS=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},Sz=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Tz=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return vl(e)&&vl(t)?r.map(a=>Number.parseInt(a)):r},cp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&vl(e)&&vl(t)){const o=[],[i,a]=Sz(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Tz(e,t,r)},Ez=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cp(r,o,1):cp(r,i,Number.parseInt(o,10))}return X1(e)&&X1(t)?cp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},up=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},iS=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},kz=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},Cz=(e,t,n,r)=>yl(kz,e,t,n,r),aS=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(hz(t))},sS=(e=>(e.Asc="asc",e.Desc="desc",e))(sS||{}),Pz=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),Az=(e,t)=>e.sort(Pz(t)),Iz=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ii(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},_z=class $p{constructor(t=[]){this.array=t}static Range(...t){return Ez(...t)}static New(t){return new $p(t)}Where(t,n,r){return this.array=gz(this.array,t,n,r),this}Some(t,n,r){return fz(this.array,t,n,r)}All(t,n,r){return vz(this.array,t,n,r)}Reverse(){return this.array=iS(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=Cz(this.array,t,n,r),this}Distinct(){return this.array=bz(this.array),this}First(t){return t===void 0?this.array[0]:xz(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?up((n,r)=>n+r,0,this.array):up((n,r)=>n+pz(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return wz(this.array,t)}GroupWith(t){return rS(this.array,t)}Except(t){return ii(this.array,n=>!nS(t,n))}Intersect(t){return ii(this.array,n=>nS(t,n))}OrderBy(t,n){let r;return r=t?aS(this.array,t):this.array.toSorted(),this.array=n==="desc"?iS(r):r,this}Includes(t){return lp(this.array,n=>Pr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return up(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(oS(this.array,n=>[t,n]))}Zip(t,n){return oS(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ii(this.array,t).length}Get(t){return this.array[t]}Clone(){return new $p(tS(this.array))}ToObject(t){return yz(this.array,t)}Sort(t){return Array.isArray(t)?Az(this.array,t):aS(this.array,t)}Unique(t){return Iz(this.array,t)}},lS=_z;function Oz(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const Mz=e=>{const t=S.useId(),n=Et(),r=S.useMemo(()=>Oz(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return m.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[m.jsx("p",{children:m.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?m.jsxs(S.Fragment,{children:[m.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),m.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>m.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),m.jsx("nav",{children:m.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?m.jsx("li",{children:m.jsx(en,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:m.jsx(S.Fragment,{children:typeof i=="string"?m.jsx("li",{children:"..."}):m.jsx("li",{children:m.jsx(en,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?m.jsx("li",{children:m.jsx(en,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},Dz=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),m.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:m.jsx("div",{ref:n,className:"block isolate",children:e.children})})},Nz=(e,t,n)=>{const r=n.cols,o=n.loading;return m.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=cd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?m.jsx(Dz,{children:m.jsx(p,{col:i,row:t,rowIndex:e})}):null,m.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),m.jsx("span",{className:"relative",children:o?Ud:c?m.jsx(S.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(S.Fragment,{children:je.nil(l)?"":l})}))})})};var dp={},cS;function Lz(){return cS||(cS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,E)=>{const k=E.parse(y);return k===""?w:w.concat(k)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=x=>{h().removeItem(x);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),v.forEach(w=>w(h()))}}},b=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=b,e.createStorage=f}(dp)),dp}var va=Lz();const fp=e=>e.headerLabel??e.thead??e.id,pp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ai=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ai||{});const hp=e=>e.type==="number"?e.valueAsNumber:e.value,Fz=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},Vz={},$z=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},jz=(e,t,n=Vz)=>{const r=hr()?null:va.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ad({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:$z(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return hr()||va.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},zz=e=>{const t=lr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Bz=()=>hr()?void 0:document.querySelector('[data-component="modal-body"]'),Rz=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),Hz=(e,t)=>e.toSorted(Rz(t)),uS=(e,t,n)=>({label:t,id:jo(),type:n,value:e.id}),Wz=e=>{const t=Et(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,uS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return m.jsx(S.Fragment,{children:m.jsx(Xo,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(gy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:m.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>m.jsxs("li",{className:"flex flex-nowrap gap-3",children:[m.jsx(ao,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(ao,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),m.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:m.jsx(Ua,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[m.jsx(Hu,{size:14})," ",t.tableSortAddButton]})})]})})})},qz=e=>{const t=Et(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=uS(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=fp(e.col);return m.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[m.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?m.jsx(HI,{size:14}):null,n==="desc"?m.jsx(RI,{size:14}):null,n==="undefined"?m.jsx(gy,{size:14}):null]})},dS=S.createContext({}),Uz=dS.Provider,Yz=()=>S.useContext(dS),mp=(e,t,n,r={})=>{const o=e.id,i=e.type??ai.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:jo(),operation:l,label:fp(e),name:o,type:i,value:"",...r}},gp=()=>{const e=Et(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[ai.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ai.Boolean]:[t.is,t.isNot],[ai.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},Kz=e=>{const t=Et(),n=gp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,mp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(b=>u===b.id);return mp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=hp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return m.jsx(S.Fragment,{children:m.jsx(Xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(JI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:m.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return m.jsxs("li",{className:"flex flex-nowrap gap-3",children:[m.jsx(ao,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(ao,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(Ko,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),m.jsx("div",{className:"flex justify-center items-center mt-5",children:m.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:m.jsx(Ua,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[m.jsx(Hu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Gz=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=gp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=hp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return m.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[m.jsx(ao,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(Ko,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),m.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:m.jsx(Ua,{className:"text-danger",size:14})})]})},Zz={top:0,left:0,right:0,bottom:-1},Xz=e=>{const t=fd(),n=Et(),r=e.filters.filter(g=>g.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=gp(),l=o?t_:n_,c=S.useRef(null),u=g=>{const h=g.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==h))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const h=new AbortController;return g.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),p=e.sorters.find(g=>e.header.id===g.value),f=p?.type?p.type===sS.Asc?"ascending":"descending":"none",b=fp(e.header);return m.jsxs(py,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[m.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:m.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?m.jsx(Xo,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",b]}),m.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:m.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",m.jsx("span",{className:"font-medium",children:b})]}),children:m.jsxs("ul",{className:"font-medium",children:[r.length===0?null:m.jsx(S.Fragment,{children:r.map(g=>m.jsx("li",{className:"my-1",children:m.jsx(Gz,{onDelete:u,filter:g,set:e.setFilters})},`thead-filter-${g.id}`))}),m.jsx("li",{children:m.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(g=>g.concat(mp(e.header,s.options,s.operations))),children:[m.jsx(Hu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,m.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?m.jsx(qz,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(We.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:Zz,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:g=>void g.currentTarget.focus(),onKeyDown:g=>{if(g.key==="ArrowLeft"||g.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,y=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+y)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(g,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,y=h.delta.x;c.current.style.width=`${Math.abs(v+y)}px`}})]})},Qz=e=>{const[t,n]=zz(e.setCols);return m.jsx(dy,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(wn,{children:e.headers.map((r,o)=>m.jsx(Xz,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},Jz=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:m.jsx(wn,{children:n.children})})),eB=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),tB=S.forwardRef(({context:e,...t},n)=>{const r=Yz(),o={...t?.style,top:je.number(r.sticky)?`${r.sticky}px`:void 0};return m.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),nB=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return m.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),rB=S.forwardRef((e,t)=>e.context.loadingMore?m.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:m.jsx("tr",{role:"row",className:"bg-card-background",children:m.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:m.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),oB={TableRow:nB,TableFoot:rB,TableHead:tB,Table:eB,TableBody:Jz},iB=[0,0,0,0,0,0,0,0,0,0],aB=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Ud:m.jsx(Qx,{})}),sB=()=>m.jsx(S.Fragment,{}),lB=[],fS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!0,pagination:c=null,useControl:u=!1,...d})=>{const p=S.useRef(null),[f,b]=S.useState(!1),g=lr(a),h=lr(d.loadingMore),v=S.useMemo(()=>{if(d.loading)return iB;if(u)return d.rows;const T=new lS(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:T.Where(w.name,w.operation.symbol,w.value)),r.length===0?T.Select():Hz(T.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(p.current===null)return()=>{};const T=p.current,w=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&h.current?(g.current?.(),void b(!0)):b(!1));return w.observe(T),()=>w.disconnect()},[h,g]);const y=v.length===0,x={cols:e,Aside:d.Aside,loading:d.loading,getRowProps:d.getRowProps,loadingMore:d.loadingMore};return m.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[m.jsx(JV,{context:x,components:oB,totalCount:v.length,itemContent:y?sB:Nz,data:y?lB:v,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(Qz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),y?m.jsx(aB,{loading:d.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"}),c!==null?m.jsx(Mz,{...c}):null]})},cB=({item:e,onPointerDown:t})=>{const n=_o(0);return m.jsxs(py,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[m.jsx("button",{type:"button",className:"cursor-grab",children:m.jsx(QI,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},uB=e=>{const t=Et(),n=pp(e.cols),r=II(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,p=c.options.item(d)?.label||"";i(p);const f=new lS(e.rows).GroupBy(u),b=e.cols.find(g=>g.id===u);e.setGroups(LT(f).map((g,h)=>{const v=f[g];return{...b,groupId:jo(),groupKey:u,index:h,rows:v,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(S.Fragment,{children:m.jsxs(Xo,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(o_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[m.jsxs("div",{className:"flex flex-nowrap items-center",children:[m.jsx(ao,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(Ca,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(Ua,{size:16,className:"text-danger"})})]}),e.groups.length>0?m.jsxs("section",{className:"my-4",children:[m.jsx("header",{children:m.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),m.jsx(CC,{children:m.jsx(dy,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>m.jsx(cB,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},dB=e=>m.jsx("header",{className:"min-w-full mb-1",children:m.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[m.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[m.jsx("span",{children:m.jsx(Kz,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(Wz,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(uB,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[m.jsxs("span",{children:[m.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),m.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[m.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),m.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=hp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),fB=(e,t)=>typeof t=="function"?t(e):t,bl=(e,t,n)=>e===t?void 0:n?.(t),pB=e=>{const t=fd(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>pp(e.cols),[e.cols]),[i,a]=ad({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:fB(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),bl(l?.filters??[],s.filters??[],e.setFilters),bl(l?.sorters??[],s.sorters??[],e.setSorters),bl(l?.groups??[],s.groups??[],e.setGroups),bl(l?.cols??[],s.cols??[],e.setCols),s)]});return m.jsx(Uz,{value:n,children:m.jsxs(wn,{initial:!1,children:[r?m.jsx(dB,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?m.jsx(fS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):m.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>m.jsx("div",{className:"min-w-full",children:m.jsx(fS,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},hB=["INPUT","SELECT"],pS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{hB.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var vp,hS;function yp(){if(hS)return vp;hS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return vp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},vp}var bp,mS;function gS(){if(mS)return bp;mS=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function h(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,E){if(t.call(v,E)){var k=v[E];k&&typeof k=="object"&&w&&typeof w=="object"?v[E]=h(k,w,x):v.push(w)}else v[E]=w}),v):Object.keys(y).reduce(function(w,E){var k=y[E];return t.call(w,E)?w[E]=h(w[E],k,x):w[E]=k,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(h,v,y){var x=h.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var E=v;if(typeof v=="symbol"?E=Symbol.prototype.toString.call(v):typeof v!="string"&&(E=String(v)),x==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(z){return"%26%23"+parseInt(z.slice(2),16)+"%3B"});for(var k="",C=0;C<E.length;C+=c){for(var O=E.length>=c?E.slice(C,C+c):E,I=[],D=0;D<O.length;++D){var V=O.charCodeAt(D);if(V===45||V===46||V===95||V===126||V>=48&&V<=57||V>=65&&V<=90||V>=97&&V<=122||w===e.RFC1738&&(V===40||V===41)){I[I.length]=O.charAt(D);continue}if(V<128){I[I.length]=r[V];continue}if(V<2048){I[I.length]=r[192|V>>6]+r[128|V&63];continue}if(V<55296||V>=57344){I[I.length]=r[224|V>>12]+r[128|V>>6&63]+r[128|V&63];continue}D+=1,V=65536+((V&1023)<<10|O.charCodeAt(D)&1023),I[I.length]=r[240|V>>18]+r[128|V>>12&63]+r[128|V>>6&63]+r[128|V&63]}k+=I.join("")}return k},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],E=w.obj[w.prop],k=Object.keys(E),C=0;C<k.length;++C){var O=k[C],I=E[O];typeof I=="object"&&I!==null&&x.indexOf(I)===-1&&(y.push({obj:E,prop:O}),x.push(I))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},b=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return bp={arrayToObject:i,assign:s,combine:b,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},bp}var xp,vS;function mB(){if(vS)return xp;vS=1;var e=_T(),t=gS(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,x,T,w,E,k,C,O,I,D,V,z,A,N,H,M){for(var P=h,$=M,L=0,U=!1;($=$.get(p))!==void 0&&!U;){var G=$.get(h);if(L+=1,typeof G<"u"){if(G===L)throw new RangeError("Cyclic object value");U=!0}typeof $.get(p)>"u"&&(L=0)}if(typeof O=="function"?P=O(v,P):P instanceof Date?P=V(P):y==="comma"&&i(P)&&(P=t.maybeMap(P,function(he){return he instanceof Date?V(he):he})),P===null){if(w)return C&&!N?C(v,u.encoder,H,"key",z):v;P=""}if(d(P)||t.isBuffer(P)){if(C){var B=N?v:C(v,u.encoder,H,"key",z);return[A(B)+"="+A(C(P,u.encoder,H,"value",z))]}return[A(v)+"="+A(String(P))]}var Z=[];if(typeof P>"u")return Z;var ee;if(y==="comma"&&i(P))N&&C&&(P=t.maybeMap(P,C)),ee=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(O))ee=O;else{var te=Object.keys(P);ee=I?te.sort(I):te}var J=k?String(v).replace(/\./g,"%2E"):String(v),R=x&&i(P)&&P.length===1?J+"[]":J;if(T&&i(P)&&P.length===0)return R+"[]";for(var q=0;q<ee.length;++q){var X=ee[q],oe=typeof X=="object"&&X&&typeof X.value<"u"?X.value:P[X];if(!(E&&oe===null)){var j=D&&k?String(X).replace(/\./g,"%2E"):String(X),se=i(P)?typeof y=="function"?y(R,j):R:R+(D?"."+j:"["+j+"]");M.set(h,L);var le=e();le.set(p,M),s(Z,g(oe,se,y,x,T,w,E,k,y==="comma"&&N&&i(P)?null:C,O,I,D,V,z,A,N,H,le))}}return Z},b=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var x=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return xp=function(g,h){var v=g,y=b(h),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var E=o[y.arrayFormat],k=E==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var C=e(),O=0;O<x.length;++O){var I=x[O],D=v[I];y.skipNulls&&D===null||s(w,f(D,I,E,k,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}var V=w.join(y.delimiter),z=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?z+="utf8=%26%2310003%3B&":z+="utf8=%E2%9C%93&"),V.length>0?z+V:""},xp}var wp,yS;function gB(){if(yS)return wp;yS=1;var e=gS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,b){return String.fromCharCode(parseInt(b,10))})},i=function(p,f,b){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&b>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,b){var g={__proto__:null},h=b.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=b.parameterLimit===1/0?void 0:b.parameterLimit,y=h.split(b.delimiter,b.throwOnLimitExceeded?v+1:v);if(b.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=b.charset;if(b.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var E=y[T],k=E.indexOf("]="),C=k===-1?E.indexOf("="):k+1,O,I;C===-1?(O=b.decoder(E,r.decoder,w,"key"),I=b.strictNullHandling?null:""):(O=b.decoder(E.slice(0,C),r.decoder,w,"key"),I=e.maybeMap(i(E.slice(C+1),b,n(g[O])?g[O].length:0),function(V){return b.decoder(V,r.decoder,w,"value")})),I&&b.interpretNumericEntities&&w==="iso-8859-1"&&(I=o(String(I))),E.indexOf("[]=")>-1&&(I=n(I)?[I]:I);var D=t.call(g,O);D&&b.duplicates==="combine"?g[O]=e.combine(g[O],I):(!D||b.duplicates==="last")&&(g[O]=I)}return g},c=function(p,f,b,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,b,h),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(y===""||b.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=b.plainObjects?{__proto__:null}:{};var E=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,k=b.decodeDotInKeys?E.replace(/%2E/g,"."):E,C=parseInt(k,10);!b.parseArrays&&k===""?T={0:y}:!isNaN(C)&&w!==k&&String(C)===k&&C>=0&&b.parseArrays&&C<=b.arrayLimit?(T=[],T[C]=y):k!=="__proto__"&&(T[k]=y)}y=T}return y},u=function(f,b,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,E=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(w)}for(var k=0;g.depth>0&&(T=x.exec(v))!==null&&k<g.depth;){if(k+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;E.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+v.slice(T.index)+"]")}return c(E,b,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:b,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return wp=function(p,f){var b=d(f);if(p===""||p===null||typeof p>"u")return b.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,b):p,h=b.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],b,typeof p=="string");h=e.merge(h,T,b)}return b.allowSparse===!0?h:e.compact(h)},wp}var Sp,bS;function vB(){if(bS)return Sp;bS=1;var e=mB(),t=gB(),n=yp();return Sp={formats:n,parse:t,stringify:e},Sp}var yB=vB(),Ye;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var xS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xS||(xS={}));const ve=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},ie=Ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ar extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof ar))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ar.create=e=>new ar(e);const Tp=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let bB=Tp;function xB(){return bB}const wB=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function fe(e,t){const n=xB(),r=wB({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Tp?void 0:Tp].filter(o=>!!o)});e.common.issues.push(r)}class ln{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Ie;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Ie=Object.freeze({status:"aborted"}),ya=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),wS=e=>e.status==="aborted",SS=e=>e.status==="dirty",si=e=>e.status==="valid",xl=e=>typeof Promise<"u"&&e instanceof Promise;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ye||(ye={}));class Ir{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const TS=(e,t)=>{if(si(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ar(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class He{get description(){return this._def.description}_getType(t){return Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ln,ctx:{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(xl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},o=this._parseSync({data:t,path:r.path,parent:r});return TS(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return si(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>si(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(xl(o)?o:Promise.resolve(o));return TS(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ie.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new di({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Or.create(this,this._def)}nullable(){return fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yn.create(this)}promise(){return El.create(this,this._def)}or(t){return Sl.create([this,t],this._def)}and(t){return Tl.create(this,t,this._def)}transform(t){return new di({...ze(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Cp({...ze(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new WB({typeName:_e.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Pp({...ze(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ap.create(this,t)}readonly(){return Ip.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const SB=/^c[^\s-]{8,}$/i,TB=/^[0-9a-z]+$/,EB=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kB=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,CB=/^[a-z0-9_-]{21}$/i,PB=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,AB=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,IB=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_B="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ep;const OB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,MB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,DB=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,NB=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,LB=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,FB=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ES="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",VB=new RegExp(`^${ES}$`);function kS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function $B(e){return new RegExp(`^${kS(e)}$`)}function jB(e){let t=`${ES}T${kS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function zB(e,t){return!!((t==="v4"||!t)&&OB.test(e)||(t==="v6"||!t)&&DB.test(e))}function BB(e,t){if(!PB.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function RB(e,t){return!!((t==="v4"||!t)&&MB.test(e)||(t==="v6"||!t)&&NB.test(e))}class so extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.string,received:i.parsedType}),Ie}const r=new ln;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?fe(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&fe(o,{code:ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")IB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"email",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ep||(Ep=new RegExp(_B,"u")),Ep.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"emoji",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")kB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"uuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")CB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"nanoid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")SB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")TB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cuid2",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")EB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"ulid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),fe(o,{validation:"url",code:ie.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"regex",code:ie.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?jB(i).test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?VB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?$B(i).test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?AB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"duration",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?zB(t.data,i.version)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"ip",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?BB(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"jwt",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?RB(t.data,i.version)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cidr",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?LB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"base64",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?FB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"base64url",code:ie.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ie.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new so({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ye.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ye.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ye.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new so({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new so({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new so({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}so.create=e=>new so({checks:[],typeName:_e.ZodString,coerce:e?.coerce??!1,...ze(e)});function HB(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class li extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.number,received:i.parsedType}),Ie}let r;const o=new ln;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?HB(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ye.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}li.create=e=>new li({checks:[],typeName:_e.ZodNumber,coerce:e?.coerce||!1,...ze(e)});class ba extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ve.bigint)return this._getInvalidInput(t);let r;const o=new ln;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return fe(n,{code:ie.invalid_type,expected:ve.bigint,received:n.parsedType}),Ie}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ba({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ba({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ba.create=e=>new ba({checks:[],typeName:_e.ZodBigInt,coerce:e?.coerce??!1,...ze(e)});class CS extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.boolean,received:r.parsedType}),Ie}return yn(t.data)}}CS.create=e=>new CS({typeName:_e.ZodBoolean,coerce:e?.coerce||!1,...ze(e)});class wl extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.date,received:i.parsedType}),Ie}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_date}),Ie}const r=new ln;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}wl.create=e=>new wl({checks:[],coerce:e?.coerce||!1,typeName:_e.ZodDate,...ze(e)});class PS extends He{_parse(t){if(this._getType(t)!==ve.symbol){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.symbol,received:r.parsedType}),Ie}return yn(t.data)}}PS.create=e=>new PS({typeName:_e.ZodSymbol,...ze(e)});class AS extends He{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.undefined,received:r.parsedType}),Ie}return yn(t.data)}}AS.create=e=>new AS({typeName:_e.ZodUndefined,...ze(e)});class IS extends He{_parse(t){if(this._getType(t)!==ve.null){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.null,received:r.parsedType}),Ie}return yn(t.data)}}IS.create=e=>new IS({typeName:_e.ZodNull,...ze(e)});class _S extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}_S.create=e=>new _S({typeName:_e.ZodAny,...ze(e)});class OS extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}OS.create=e=>new OS({typeName:_e.ZodUnknown,...ze(e)});class _r extends He{_parse(t){const n=this._getOrReturnCtx(t);return fe(n,{code:ie.invalid_type,expected:ve.never,received:n.parsedType}),Ie}}_r.create=e=>new _r({typeName:_e.ZodNever,...ze(e)});class MS extends He{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.void,received:r.parsedType}),Ie}return yn(t.data)}}MS.create=e=>new MS({typeName:_e.ZodVoid,...ze(e)});class Yn extends He{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ve.array)return fe(n,{code:ie.invalid_type,expected:ve.array,received:n.parsedType}),Ie;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(fe(n,{code:a?ie.too_big:ie.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(fe(n,{code:ie.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(fe(n,{code:ie.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Ir(n,a,n.path,s)))).then(a=>ln.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ir(n,a,n.path,s)));return ln.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Yn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Yn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Yn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Yn.create=(e,t)=>new Yn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...ze(t)});function ci(e){if(e instanceof Dt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Or.create(ci(r))}return new Dt({...e._def,shape:()=>t})}else return e instanceof Yn?new Yn({...e._def,type:ci(e.element)}):e instanceof Or?Or.create(ci(e.unwrap())):e instanceof fi?fi.create(ci(e.unwrap())):e instanceof lo?lo.create(e.items.map(t=>ci(t))):e}class Dt extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ye.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ve.object){const c=this._getOrReturnCtx(t);return fe(c,{code:ie.invalid_type,expected:ve.object,received:c.parsedType}),Ie}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _r&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ir(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof _r){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(fe(o,{code:ie.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ir(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>ln.mergeObjectSync(r,c)):ln.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new Dt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ye.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Dt({...this._def,unknownKeys:"strip"})}passthrough(){return new Dt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Dt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Dt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:_e.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Dt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ye.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ye.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}deepPartial(){return ci(this)}partial(t){const n={};for(const r of Ye.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Dt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ye.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Or;)i=i._def.innerType;n[r]=i}return new Dt({...this._def,shape:()=>n})}keyof(){return FS(Ye.objectKeys(this.shape))}}Dt.create=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strip",catchall:_r.create(),typeName:_e.ZodObject,...ze(t)}),Dt.strictCreate=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strict",catchall:_r.create(),typeName:_e.ZodObject,...ze(t)}),Dt.lazycreate=(e,t)=>new Dt({shape:e,unknownKeys:"strip",catchall:_r.create(),typeName:_e.ZodObject,...ze(t)});class Sl extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new ar(s.ctx.common.issues));return fe(n,{code:ie.invalid_union,unionErrors:a}),Ie}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new ar(l));return fe(n,{code:ie.invalid_union,unionErrors:s}),Ie}}get options(){return this._def.options}}Sl.create=(e,t)=>new Sl({options:e,typeName:_e.ZodUnion,...ze(t)});function kp(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===ve.object&&r===ve.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=kp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===ve.array&&r===ve.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=kp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ve.date&&r===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Tl extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(wS(i)||wS(a))return Ie;const s=kp(i.value,a.value);return s.valid?((SS(i)||SS(a))&&n.dirty(),{status:n.value,value:s.data}):(fe(r,{code:ie.invalid_intersection_types}),Ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Tl.create=(e,t,n)=>new Tl({left:e,right:t,typeName:_e.ZodIntersection,...ze(n)});class lo extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.array)return fe(r,{code:ie.invalid_type,expected:ve.array,received:r.parsedType}),Ie;if(r.data.length<this._def.items.length)return fe(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&r.data.length>this._def.items.length&&(fe(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ir(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ln.mergeArray(n,a)):ln.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new lo({...this._def,rest:t})}}lo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lo({items:e,typeName:_e.ZodTuple,rest:null,...ze(t)})};class DS extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.map)return fe(r,{code:ie.invalid_type,expected:ve.map,received:r.parsedType}),Ie;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ir(r,s,r.path,[c,"key"])),value:i._parse(new Ir(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ie;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ie;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}DS.create=(e,t,n)=>new DS({valueType:t,keyType:e,typeName:_e.ZodMap,...ze(n)});class xa extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.set)return fe(r,{code:ie.invalid_type,expected:ve.set,received:r.parsedType}),Ie;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(fe(r,{code:ie.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(fe(r,{code:ie.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ie;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Ir(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new xa({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new xa({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}xa.create=(e,t)=>new xa({valueType:e,minSize:null,maxSize:null,typeName:_e.ZodSet,...ze(t)});class NS extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}NS.create=(e,t)=>new NS({getter:e,typeName:_e.ZodLazy,...ze(t)});class LS extends He{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return fe(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}LS.create=(e,t)=>new LS({value:e,typeName:_e.ZodLiteral,...ze(t)});function FS(e,t){return new ui({values:e,typeName:_e.ZodEnum,...ze(t)})}class ui extends He{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return fe(n,{expected:Ye.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return fe(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Ie}return yn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ui.create(t,{...this._def,...n})}exclude(t,n=this._def){return ui.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ui.create=FS;class VS extends He{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ve.string&&r.parsedType!==ve.number){const o=Ye.objectValues(n);return fe(r,{expected:Ye.joinValues(o),received:r.parsedType,code:ie.invalid_type}),Ie}if(this._cache||(this._cache=new Set(Ye.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ye.objectValues(n);return fe(r,{received:r.data,code:ie.invalid_enum_value,options:o}),Ie}return yn(t.data)}get enum(){return this._def.values}}VS.create=(e,t)=>new VS({values:e,typeName:_e.ZodNativeEnum,...ze(t)});class El extends He{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.promise&&n.common.async===!1)return fe(n,{code:ie.invalid_type,expected:ve.promise,received:n.parsedType}),Ie;const r=n.parsedType===ve.promise?n.data:Promise.resolve(n.data);return yn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}El.create=(e,t)=>new El({type:e,typeName:_e.ZodPromise,...ze(t)});class di extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{fe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Ie;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ie:l.status==="dirty"||n.value==="dirty"?ya(l.value):l});{if(n.value==="aborted")return Ie;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ie:s.status==="dirty"||n.value==="dirty"?ya(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ie:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ie:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!si(a))return Ie;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>si(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Ie);Ye.assertNever(o)}}di.create=(e,t,n)=>new di({schema:e,typeName:_e.ZodEffects,effect:t,...ze(n)}),di.createWithPreprocess=(e,t,n)=>new di({schema:t,effect:{type:"preprocess",transform:e},typeName:_e.ZodEffects,...ze(n)});class Or extends He{_parse(t){return this._getType(t)===ve.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Or.create=(e,t)=>new Or({innerType:e,typeName:_e.ZodOptional,...ze(t)});class fi extends He{_parse(t){return this._getType(t)===ve.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}fi.create=(e,t)=>new fi({innerType:e,typeName:_e.ZodNullable,...ze(t)});class Cp extends He{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Cp.create=(e,t)=>new Cp({innerType:e,typeName:_e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class Pp extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return xl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Pp.create=(e,t)=>new Pp({innerType:e,typeName:_e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class $S extends He{_parse(t){if(this._getType(t)!==ve.nan){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.nan,received:r.parsedType}),Ie}return{status:"valid",value:t.data}}}$S.create=e=>new $S({typeName:_e.ZodNaN,...ze(e)});class WB extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ap extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ie:i.status==="dirty"?(n.dirty(),ya(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ie:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ap({in:t,out:n,typeName:_e.ZodPipeline})}}class Ip extends He{_parse(t){const n=this._def.innerType._parse(t),r=o=>(si(o)&&(o.value=Object.freeze(o.value)),o);return xl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ip.create=(e,t)=>new Ip({innerType:e,typeName:_e.ZodReadonly,...ze(t)});var _e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(_e||(_e={})),_r.create,Yn.create,Sl.create,Tl.create,lo.create,ui.create,El.create,Or.create,fi.create;const qB=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},UB=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},jS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),cn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):jS(t),o=structuredClone(e);return UB(o,r,n),o},YB=(e,t)=>e.localeCompare(t),pi={},zS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return BS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=zS(e._def.innerType);return t==="ZodArray"?n??[]:n}},BS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,zS(n)])),RS=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=RS(i,o):n[r]=o||i)}return n},KB={sort:YB,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},HS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return yB.parse(n.toString(),KB)},Mr=(e,t)=>jS(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Dr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),_p=e=>{const t=e.dataset.target;if(!t)return Dr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Dr(n||e)},GB={state:{},loading:!1,useOnChange:!1},WS=e=>e.dataset.target||e.name,ZB=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=va.LocalStorage.get(t);return qB(n)?n:{}},clear:()=>void va.LocalStorage.delete(t),set:n=>va.LocalStorage.set(t,n)}},XB=(e,t,n=GB)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>je.function(n?.state)?n.state():n?.state??BS(e)??{}),l=S.useCallback(x=>{const T=x.target,w=x.currentTarget;if(T.dataset.optional==="true")return;const k=WS(T),C=_p(T)||(w?Dr(w):""),O=Mr(k,e);if(T.setAttribute("data-initialized","true"),O){const I=O.safeParse(C),D=I.success?void 0:I.error.issues[0]?.message??"";o(V=>cn(V??{},k,D))}},[e]),c=S.useCallback(x=>T=>{const w=T.currentTarget,E=Object.values(i.current).reduce((C,O)=>{const I=O.element,D=O.schema.safeParse(Dr(I));if(I.dataset.ignore==="ignore"||D.success)return C;const V=D.error.issues[0]?.message;I.setAttribute("data-initialized","true");const z=I.dataset.name||I.name||"";return cn(C,z,V)},{}),k=je.empty(E)?null:E;o(k),console.error(k),x?.({form:w,errors:k||{}})},[]),u=(x,T=pi)=>{const w=Mr(x,e),E=k=>{if(!Za(k))return;s(O=>cn(O,x,k.toISOString())),o(O=>cn(O,x,void 0));const C=i.current[x].element;if(C){const O=C.getAttribute("data-origin"),I=document.querySelector(`input[data-target="${O}"]`);I&&I.setCustomValidity("")}T?.onChange?.(k)};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,date:je.string(a[x])?new Date(a[x]):a[x],required:T.required??!w.isOptional(),error:On(r,x),ref:k=>{k!==null&&(i.current[x]={element:k,schema:w})}}},d=(x,T=pi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.value;s(O=>cn(O,x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),value:On(a,x,void 0)??"",required:T.required??!w.isOptional(),ref:k=>k!==null?i.current[x]={element:k,schema:w}:void 0}},p=(x,T=pi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.checked;s(O=>cn(O??{},x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),ref:k=>k!==null?void(i.current[x]={element:k,schema:w}):void 0}},f=(x,T=pi)=>{const w=Mr(x,e),E=k=>{k.persist?.();const C=k.target.value;T?.onChange?.(k),s(O=>cn(O,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),value:On(a,x,void 0)||T?.value||"",type:je.instance(w,li)?"number":T?.type??"text",ref:k=>k===null?void 0:i.current[x]={element:k,schema:w}}},b=(x,T=pi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChangeOptions:k=>{s(C=>cn(C,x,k))},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),value:On(a,x,void 0)||T?.value||[],ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}},g=(x,T=pi)=>{const w=Mr(x,e),E=w._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const O=E?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(I=>cn(I,x,O))},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),type:E?"number":T?.type??"text",value:On(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}};S.useEffect(()=>{const x=Object.values(i.current).map(w=>{const E=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,k=w.schema.safeParse(Dr(E)),C=V=>{const z=WS(V.target);if(!z)return!1;const A=V.target,N=_p(V.target)||(V.relatedTarget?Dr(V.relatedTarget):""),H=w.schema.safeParse(N);if(A.setAttribute("value",N),H.success)return E.setCustomValidity&&E.setCustomValidity(""),o(M=>{if(je.null(M))return null;const P=cn(M,z,void 0);return je.empty(M)||je.nil(M)||je.empty(P)?null:P}),!1;if(E.required){const M=H.error.issues[0]?.message||"";E.setCustomValidity&&E.setCustomValidity(M),o(P=>{if(je.null(P))return null;const $=cn(P,z,M||void 0);return je.empty($)?null:$})}return!1},O=new AbortController,I=E.getAttribute("data-trigger")||"blur";E.addEventListener(I,C,{signal:O.signal});const D=E.dataset.shadow?!1:E.required?!k.success:!1;return{input:w,hasInitialError:D,unsubscribe:()=>O.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const h=x=>T=>{T.preventDefault();const w=T.currentTarget;let E=HS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(D=>{if(D.tagName==="SELECT"){const V=D;E=cn(E,V.name,V.value)}if(D.tagName==="INPUT"){const V=D,z=_p(V)||(V?Dr(V):"");E=cn(E,V.dataset.target||V.name,z)}});const C=RS(E,a),O=e.safeParse(C),I=()=>{pS(w),n.interceptor?.clear()};if(O.success){const D=JSON.stringify(O.data);return w.setAttribute("data-json",D),n.interceptor?.clear(),x?.(T,{form:w,event:T,reset:I,setErrors:o,errors:[],success:!0,data:O.data,json:O.data})}return console.group("useForm error"),console.info(O),console.info(O.error.issues),console.error(O.error),console.groupEnd(),w.reportValidity(),x?.(T,{form:w,json:E,event:T,reset:I,setErrors:o,data:E,success:!1,errors:O.error.issues.map(D=>({message:D.message,path:D.path.map(V=>String(V))}))})},v=x=>cd(a,x)||"",y=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,multiselect:b,disabled:r!==null}},QB=e=>e?JSON.parse(e.getAttribute("data-json")):{},JB=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},qS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},US={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},YS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},eR={name:"dark",zIndex:YS,rounded:qS,spacing:US,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},tR={rounded:qS,spacing:US,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:YS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},nR=eR,rR=tR,oR=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...ls,...e.tweaks},parser:e.parser||is.hsla,map:{...ss,...e.map}}),[e]);return m.jsx($o.Provider,{value:t,children:e.children})},iR=()=>{const e=S.useContext($o);return e?e.parser:is.hsla};ne.Alert=s_,ne.AnimatedList=sF,ne.AnimatedListItem=lF,ne.Autocomplete=w$,ne.Button=Ca,ne.Calendar=Xx,ne.Card=$s,ne.Checkbox=Wf,ne.ColType=ai,ne.Collapse=Ty,ne.CommandPalette=IF,ne.ComponentsProvider=oR,ne.Context=$o,ne.DatePicker=k$,ne.Dict=Tn,ne.Dropdown=Xo,ne.Empty=Qx,ne.Expand=_F,ne.FileUpload=Wj,ne.Form=qj,ne.Input=Ko,ne.InputFeedback=Wx,ne.InputField=na,ne.Menu=MF,ne.MenuItem=OF,ne.Modal=pf,ne.MultiSelect=Qj,ne.Notifications=QL,ne.Polymorph=en,ne.Progress=JL,ne.Radiobox=Jj,ne.RenderOnView=xE,ne.Select=ao,ne.Slider=tz,ne.Stats=eF,ne.StatsCard=w2,ne.Switch=nz,ne.Tab=oF,ne.Table=pB,ne.Tabs=nF,ne.Tag=Pa,ne.TaskList=rz,ne.Textarea=oz,ne.Timeline=iF,ne.TimelineItem=Us,ne.Toolbar=DF,ne.Tooltip=Wd,ne.TransferList=sz,ne.createColumns=Fz,ne.createCssProperties=GM,ne.createDesignTokens=fb,ne.createFormStorage=ZB,ne.createOptionCols=pp,ne.createStyles=UM,ne.createTheme=KM,ne.createTokenStyles=ZM,ne.css=Te,ne.defaultDarkTheme=nR,ne.defaultLightTheme=rR,ne.defaultTranslations=ss,ne.defaultTweaks=ls,ne.dispatchInput=nm,ne.formReset=pS,ne.formToJson=HS,ne.getCoords=vE,ne.getJsonForm=QB,ne.getModalScrollerRef=Bz,ne.getRemainingSize=bi,ne.getSchemaShape=Mr,ne.hasVerticalScroll=rm,ne.initializeInputDataset=yi,ne.isMobile=yb,ne.isReactComponent=gE,ne.isReactFC=Tc,ne.isSsr=hr,ne.mergeRefs=Zn,ne.negate=XM,ne.noop=dd,ne.parsers=is,ne.path=cd,ne.reduceTokens=pr,ne.safeRegex=ud,ne.splitInto=vb,ne.useColorParser=iR,ne.useForm=XB,ne.useLocale=ld,ne.useNotification=ZL,ne.usePrevious=JB,ne.useReactive=G0,ne.useStableRef=lr,ne.useSwipe=hb,ne.useTablePreferences=jz,ne.useTranslations=Et,ne.uuid=jo,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
241
|
+
*/var tp,E1;function Aj(){if(E1)return tp;E1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return tp=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},tp}var np,k1;function rp(){if(k1)return np;k1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return np=e,np}var op,C1;function P1(){return C1||(C1=1,op=Function.call.bind(Object.prototype.hasOwnProperty)),op}var ip,A1;function Ij(){if(A1)return ip;A1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=rp(),n={},r=P1();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ip=o,ip}var ap,I1;function _j(){if(I1)return ap;I1=1;var e=T1(),t=Aj(),n=rp(),r=P1(),o=Ij(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return ap=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var U=L&&(c&&L[c]||L[u]);if(typeof U=="function")return U}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(),arrayOf:x,element:T(),elementType:w(),instanceOf:E,node:I(),objectOf:C,oneOf:k,oneOfType:O,shape:V,exact:z};function b(L,U){return L===U?L!==0||1/L===1/U:L!==L&&U!==U}function g(L,U){this.message=L,this.data=U&&typeof U=="object"?U:{},this.stack=""}g.prototype=Error.prototype;function h(L){if(process.env.NODE_ENV!=="production")var U={},G=0;function B(ee,ne,J,R,q,X,oe){if(R=R||p,X=X||J,oe!==n){if(l){var j=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=R+":"+J;!U[se]&&G<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+R+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),U[se]=!0,G++)}}return ne[J]==null?ee?ne[J]===null?new g("The "+q+" `"+X+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new g("The "+q+" `"+X+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:L(ne,J,R,q,X)}var Z=B.bind(null,!1);return Z.isRequired=B.bind(null,!0),Z}function v(L){function U(G,B,Z,ee,ne,J){var R=G[B],q=H(R);if(q!==L){var X=M(R);return new g("Invalid "+ee+" `"+ne+"` of type "+("`"+X+"` supplied to `"+Z+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return h(U)}function y(){return h(a)}function x(L){function U(G,B,Z,ee,ne){if(typeof L!="function")return new g("Property `"+ne+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var J=G[B];if(!Array.isArray(J)){var R=H(J);return new g("Invalid "+ee+" `"+ne+"` of type "+("`"+R+"` supplied to `"+Z+"`, expected an array."))}for(var q=0;q<J.length;q++){var X=L(J,q,Z,ee,ne+"["+q+"]",n);if(X instanceof Error)return X}return null}return h(U)}function T(){function L(U,G,B,Z,ee){var ne=U[G];if(!s(ne)){var J=H(ne);return new g("Invalid "+Z+" `"+ee+"` of type "+("`"+J+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return h(L)}function w(){function L(U,G,B,Z,ee){var ne=U[G];if(!e.isValidElementType(ne)){var J=H(ne);return new g("Invalid "+Z+" `"+ee+"` of type "+("`"+J+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return h(L)}function E(L){function U(G,B,Z,ee,ne){if(!(G[B]instanceof L)){var J=L.name||p,R=$(G[B]);return new g("Invalid "+ee+" `"+ne+"` of type "+("`"+R+"` supplied to `"+Z+"`, expected ")+("instance of `"+J+"`."))}return null}return h(U)}function k(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function U(G,B,Z,ee,ne){for(var J=G[B],R=0;R<L.length;R++)if(b(J,L[R]))return null;var q=JSON.stringify(L,function(oe,j){var se=M(j);return se==="symbol"?String(j):j});return new g("Invalid "+ee+" `"+ne+"` of value `"+String(J)+"` "+("supplied to `"+Z+"`, expected one of "+q+"."))}return h(U)}function C(L){function U(G,B,Z,ee,ne){if(typeof L!="function")return new g("Property `"+ne+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var J=G[B],R=H(J);if(R!=="object")return new g("Invalid "+ee+" `"+ne+"` of type "+("`"+R+"` supplied to `"+Z+"`, expected an object."));for(var q in J)if(r(J,q)){var X=L(J,q,Z,ee,ne+"."+q,n);if(X instanceof Error)return X}return null}return h(U)}function O(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var U=0;U<L.length;U++){var G=L[U];if(typeof G!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(G)+" at index "+U+"."),a}function B(Z,ee,ne,J,R){for(var q=[],X=0;X<L.length;X++){var oe=L[X],j=oe(Z,ee,ne,J,R,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&q.push(j.data.expectedType)}var se=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+J+" `"+R+"` supplied to "+("`"+ne+"`"+se+"."))}return h(B)}function I(){function L(U,G,B,Z,ee){return A(U[G])?null:new g("Invalid "+Z+" `"+ee+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return h(L)}function D(L,U,G,B,Z){return new g((L||"React class")+": "+U+" type `"+G+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function V(L){function U(G,B,Z,ee,ne){var J=G[B],R=H(J);if(R!=="object")return new g("Invalid "+ee+" `"+ne+"` of type `"+R+"` "+("supplied to `"+Z+"`, expected `object`."));for(var q in L){var X=L[q];if(typeof X!="function")return D(Z,ee,ne,q,M(X));var oe=X(J,q,Z,ee,ne+"."+q,n);if(oe)return oe}return null}return h(U)}function z(L){function U(G,B,Z,ee,ne){var J=G[B],R=H(J);if(R!=="object")return new g("Invalid "+ee+" `"+ne+"` of type `"+R+"` "+("supplied to `"+Z+"`, expected `object`."));var q=t({},G[B],L);for(var X in q){var oe=L[X];if(r(L,X)&&typeof oe!="function")return D(Z,ee,ne,X,M(oe));if(!oe)return new g("Invalid "+ee+" `"+ne+"` key `"+X+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(G[B],null," ")+`
|
|
242
|
+
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var j=oe(J,X,Z,ee,ne+"."+X,n);if(j)return j}return null}return h(U)}function A(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(A);if(L===null||s(L))return!0;var U=d(L);if(U){var G=U.call(L),B;if(U!==L.entries){for(;!(B=G.next()).done;)if(!A(B.value))return!1}else for(;!(B=G.next()).done;){var Z=B.value;if(Z&&!A(Z[1]))return!1}}else return!1;return!0;default:return!1}}function N(L,U){return L==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function H(L){var U=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":N(U,L)?"symbol":U}function M(L){if(typeof L>"u"||L===null)return""+L;var U=H(L);if(U==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return U}function P(L){var U=M(L);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function $(L){return!L.constructor||!L.constructor.name?p:L.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},ap}var sp,_1;function Oj(){if(_1)return sp;_1=1;var e=rp();function t(){}function n(){}return n.resetWarningCache=t,sp=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},sp}var O1;function Mj(){if(O1)return dl.exports;if(O1=1,process.env.NODE_ENV!=="production"){var e=T1(),t=!0;dl.exports=_j()(e.isElement,t)}else dl.exports=Oj()();return dl.exports}var Dj=Mj();const st=qp(Dj),Nj=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ii(e,t,n){const r=Lj(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&M1(r,"path",i),M1(r,"relativePath",i),r}function Lj(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=Nj.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function M1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Fj=[".DS_Store","Thumbs.db"];function Vj(e){return qr(this,void 0,void 0,function*(){return pl(e)&&$j(e.dataTransfer)?Rj(e.dataTransfer,e.type):jj(e)?zj(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Bj(e):[]})}function $j(e){return pl(e)}function jj(e){return pl(e)&&pl(e.target)}function pl(e){return typeof e=="object"&&e!==null}function zj(e){return lp(e.target.files).map(t=>ii(t))}function Bj(e){return qr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ii(n))})}function Rj(e,t){return qr(this,void 0,void 0,function*(){if(e.items){const n=lp(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(Hj));return D1(N1(r))}return D1(lp(e.files).map(n=>ii(n)))})}function D1(e){return e.filter(t=>Fj.indexOf(t.name)===-1)}function lp(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Hj(e){if(typeof e.webkitGetAsEntry!="function")return L1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?F1(t):L1(e,t)}function N1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?N1(n):[n]],[])}function L1(e,t){return qr(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,ii(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ii(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function Wj(e){return qr(this,void 0,void 0,function*(){return e.isDirectory?F1(e):qj(e)})}function F1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>qr(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(Wj));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function qj(e){return qr(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ii(r,e.fullPath);t(o)},r=>{n(r)})})})}var hl={},V1;function Uj(){return V1||(V1=1,hl.__esModule=!0,hl.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),hl}var Yj=Uj();const cp=qp(Yj);function $1(e){return Zj(e)||Gj(e)||R1(e)||Kj()}function Kj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
243
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zj(e){if(Array.isArray(e))return up(e)}function j1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function z1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j1(Object(n),!0).forEach(function(r){B1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t){return Jj(e)||Qj(e,t)||R1(e,t)||Xj()}function Xj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
244
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R1(e,t){if(e){if(typeof e=="string")return up(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return up(e,t)}}function up(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qj(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Jj(e){if(Array.isArray(e))return e}var ez=typeof cp=="function"?cp:cp.default,tz="file-invalid-type",nz="file-too-large",rz="file-too-small",oz="too-many-files",iz=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:tz,message:"File type must be ".concat(r)}},H1=function(t){return{code:nz,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},W1=function(t){return{code:rz,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},az={code:oz,message:"Too many files"};function q1(e,t){var n=e.type==="application/x-moz-file"||ez(e,t);return[n,n?null:iz(t)]}function U1(e,t,n){if(ao(e.size))if(ao(t)&&ao(n)){if(e.size>n)return[!1,H1(n)];if(e.size<t)return[!1,W1(t)]}else{if(ao(t)&&e.size<t)return[!1,W1(t)];if(ao(n)&&e.size>n)return[!1,H1(n)]}return[!0,null]}function ao(e){return e!=null}function sz(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=q1(l,n),u=va(c,1),d=u[0],p=U1(l,r,o),f=va(p,1),b=f[0],g=s?s(l):null;return d&&b&&!g})}function ml(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function gl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Y1(e){e.preventDefault()}function lz(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function cz(e){return e.indexOf("Edge/")!==-1}function uz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return lz(e)||cz(e)}function Un(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!ml(r)&&s&&s.apply(void 0,[r].concat(i)),ml(r)})}}function dz(){return"showOpenFilePicker"in window}function fz(e){if(ao(e)){var t=Object.entries(e).filter(function(n){var r=va(n,2),o=r[0],i=r[1],a=!0;return K1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(G1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=va(r,2),i=o[0],a=o[1];return z1(z1({},n),{},B1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function pz(e){if(ao(e))return Object.entries(e).reduce(function(t,n){var r=va(n,2),o=r[0],i=r[1];return[].concat($1(t),[o],$1(i))},[]).filter(function(t){return K1(t)||G1(t)}).join(",")}function hz(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function mz(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function K1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function G1(e){return/^.*\.[\w]+$/.test(e)}var gz=["children"],vz=["open"],yz=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],bz=["refKey","onChange","onClick"];function xz(e){return Tz(e)||Sz(e)||Z1(e)||wz()}function wz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
245
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tz(e){if(Array.isArray(e))return fp(e)}function dp(e,t){return Cz(e)||kz(e,t)||Z1(e,t)||Ez()}function Ez(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
246
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z1(e,t){if(e){if(typeof e=="string")return fp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fp(e,t)}}function fp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Cz(e){if(Array.isArray(e))return e}function X1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X1(Object(n),!0).forEach(function(r){pp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vl(e,t){if(e==null)return{};var n=Pz(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pz(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var hp=S.forwardRef(function(e,t){var n=e.children,r=vl(e,gz),o=J1(r),i=o.open,a=vl(o,vz);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},a),{},{open:i})))});hp.displayName="Dropzone";var Q1={disabled:!1,getFilesFromEvent:Vj,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};hp.defaultProps=Q1,hp.propTypes={children:st.func,accept:st.objectOf(st.arrayOf(st.string)),multiple:st.bool,preventDropOnDocument:st.bool,noClick:st.bool,noKeyboard:st.bool,noDrag:st.bool,noDragEventsBubbling:st.bool,minSize:st.number,maxSize:st.number,maxFiles:st.number,disabled:st.bool,getFilesFromEvent:st.func,onFileDialogCancel:st.func,onFileDialogOpen:st.func,useFsAccessApi:st.bool,autoFocus:st.bool,onDragEnter:st.func,onDragLeave:st.func,onDragOver:st.func,onDrop:st.func,onDropAccepted:st.func,onDropRejected:st.func,onError:st.func,validator:st.func};var mp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function J1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},Q1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,b=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,O=t.validator,I=S.useMemo(function(){return pz(n)},[n]),D=S.useMemo(function(){return fz(n)},[n]),V=S.useMemo(function(){return typeof h=="function"?h:eS},[h]),z=S.useMemo(function(){return typeof g=="function"?g:eS},[g]),A=S.useRef(null),N=S.useRef(null),H=S.useReducer(Az,mp),M=dp(H,2),P=M[0],$=M[1],L=P.isFocused,U=P.isFileDialogActive,G=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&dz()),B=function(){!G.current&&U&&setTimeout(function(){if(N.current){var Q=N.current.files;Q.length||($({type:"closeDialog"}),z())}},300)};S.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[N,U,z,G]);var Z=S.useRef([]),ee=function(Q){A.current&&A.current.contains(Q.target)||(Q.preventDefault(),Z.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",Y1,!1),document.addEventListener("drop",ee,!1)),function(){x&&(document.removeEventListener("dragover",Y1),document.removeEventListener("drop",ee))}},[A,x]),S.useEffect(function(){return!r&&y&&A.current&&A.current.focus(),function(){}},[A,y,r]);var ne=S.useCallback(function(F){C?C(F):console.error(F)},[C]),J=S.useCallback(function(F){F.preventDefault(),F.persist(),Te(F),Z.current=[].concat(xz(Z.current),[F.target]),gl(F)&&Promise.resolve(o(F)).then(function(Q){if(!(ml(F)&&!k)){var ce=Q.length,we=ce>0&&sz({files:Q,accept:I,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:O}),Le=ce>0&&!we;$({isDragAccept:we,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(F)}}).catch(function(Q){return ne(Q)})},[o,c,ne,k,I,a,i,s,l,O]),R=S.useCallback(function(F){F.preventDefault(),F.persist(),Te(F);var Q=gl(F);if(Q&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return Q&&d&&d(F),!1},[d,k]),q=S.useCallback(function(F){F.preventDefault(),F.persist(),Te(F);var Q=Z.current.filter(function(we){return A.current&&A.current.contains(we)}),ce=Q.indexOf(F.target);ce!==-1&&Q.splice(ce,1),Z.current=Q,!(Q.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),gl(F)&&u&&u(F))},[A,u,k]),X=S.useCallback(function(F,Q){var ce=[],we=[];F.forEach(function(Le){var Ze=q1(Le,I),Ft=dp(Ze,2),xt=Ft[0],Kt=Ft[1],Kn=U1(Le,a,i),An=dp(Kn,2),In=An[0],W=An[1],K=O?O(Le):null;if(xt&&In&&!K)ce.push(Le);else{var Fe=[Kt,W];K&&(Fe=Fe.concat(K)),we.push({file:Le,errors:Fe.filter(function(tt){return tt})})}}),(!s&&ce.length>1||s&&l>=1&&ce.length>l)&&(ce.forEach(function(Le){we.push({file:Le,errors:[az]})}),ce.splice(0)),$({acceptedFiles:ce,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),p&&p(ce,we,Q),we.length>0&&b&&b(we,Q),ce.length>0&&f&&f(ce,Q)},[$,s,I,a,i,l,p,f,b,O]),oe=S.useCallback(function(F){F.preventDefault(),F.persist(),Te(F),Z.current=[],gl(F)&&Promise.resolve(o(F)).then(function(Q){ml(F)&&!k||X(Q,F)}).catch(function(Q){return ne(Q)}),$({type:"reset"})},[o,X,ne,k]),j=S.useCallback(function(){if(G.current){$({type:"openDialog"}),V();var F={multiple:s,types:D};window.showOpenFilePicker(F).then(function(Q){return o(Q)}).then(function(Q){X(Q,null),$({type:"closeDialog"})}).catch(function(Q){hz(Q)?(z(Q),$({type:"closeDialog"})):mz(Q)?(G.current=!1,N.current?(N.current.value=null,N.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(Q)});return}N.current&&($({type:"openDialog"}),V(),N.current.value=null,N.current.click())},[$,V,z,v,X,ne,D,s]),se=S.useCallback(function(F){!A.current||!A.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),j())},[A,j]),le=S.useCallback(function(){$({type:"focus"})},[]),he=S.useCallback(function(){$({type:"blur"})},[]),xe=S.useCallback(function(){T||(uz()?setTimeout(j,0):j())},[T,j]),de=function(Q){return r?null:Q},Pe=function(Q){return w?null:de(Q)},Oe=function(Q){return E?null:de(Q)},Te=function(Q){k&&Q.stopPropagation()},Be=S.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=F.refKey,ce=Q===void 0?"ref":Q,we=F.role,Le=F.onKeyDown,Ze=F.onFocus,Ft=F.onBlur,xt=F.onClick,Kt=F.onDragEnter,Kn=F.onDragOver,An=F.onDragLeave,In=F.onDrop,W=vl(F,yz);return vt(vt(pp({onKeyDown:Pe(Un(Le,se)),onFocus:Pe(Un(Ze,le)),onBlur:Pe(Un(Ft,he)),onClick:de(Un(xt,xe)),onDragEnter:Oe(Un(Kt,J)),onDragOver:Oe(Un(Kn,R)),onDragLeave:Oe(Un(An,q)),onDrop:Oe(Un(In,oe)),role:typeof we=="string"&&we!==""?we:"presentation"},ce,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,se,le,he,xe,J,R,q,oe,w,E,r]),ue=S.useCallback(function(F){F.stopPropagation()},[]),Y=S.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=F.refKey,ce=Q===void 0?"ref":Q,we=F.onChange,Le=F.onClick,Ze=vl(F,bz),Ft=pp({accept:I,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:de(Un(we,oe)),onClick:de(Un(Le,ue)),tabIndex:-1},ce,N);return vt(vt({},Ft),Ze)}},[N,n,s,oe,r]);return vt(vt({},P),{},{isFocused:L&&!r,getRootProps:Be,getInputProps:Y,rootRef:A,inputRef:N,open:de(j)})}function Az(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},mp),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},mp);default:return e}}function eS(){}const tS=S.createContext([null,()=>{}]),Iz=()=>S.useContext(tS),_z=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,Oz={csv:Mc,xls:Mc,mov:wm,mp4:wm,xlsx:Mc,pdf:xm,txt:xm,json:JE,mp3:KE},Mz=e=>{const[,t]=Iz(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:_z(l),size:kj(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},a=Oz[e.file.name.split(".").at(-1)]??Sm,s=n.type==="img"?m.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):m.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return m.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[m.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),m.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[m.jsx("span",{children:e.file.name}),m.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?m.jsx("div",{className:"flex-1 min-w-full",children:m.jsx(e.File,{file:e.file})}):null]}),m.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:m.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:m.jsx(vo,{size:16})})})]})},Dz=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(Mz,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),nS=e=>{const t=St(),n=e.dragging?ek:tk;return m.jsxs("div",{className:"flex flex-col justify-center items-center",children:[m.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:m.jsx(n,{className:"text-primary",size:80})}),m.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[m.jsx("p",{children:t.uploadIdle}),m.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},Nz=e=>e.isDragActive?m.jsx(nS,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(Dz,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(S.Fragment,{children:e.idle}),Lz=m.jsx(nS,{dragging:!1}),Fz=e=>{const t=e.item.file,n=e.item.type;return m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),m.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?m.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?m.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?m.jsx("figure",{children:m.jsx("audio",{controls:!0,src:e.item.url})}):null]})},Vz=({idle:e=Lz,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=St(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(h=>h.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:b}=J1({onDrop:d});return m.jsxs(tS.Provider,{value:a,children:[m.jsx(Hf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(Fz,{item:a[0]}):null}),m.jsxs("div",{...p(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[m.jsx("input",{...f(o),name:o.name,id:o.name}),m.jsx(Nz,{File:n,onDeleteFile:t,isDragActive:b,idle:e,files:c})]})]})},rS=()=>window.matchMedia("@media (pointer: coarse)"),$z=()=>{const e=S.useRef(yr()?null:rS()),[t,n]=S.useState(yr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?rS():e.current).addEventListener("change",o=>n(o.matches))},[]),t},oS=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=$z(),o=S.useRef(yr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||ev())return;document.documentElement.style.padding=rm(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number($T(c.style.height)):null,p=je.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},jz=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},iS=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},aS={basic:/[,[\]]+?/,extend:/[,[\].]+?/},sS=(e,t)=>{const n=iS(t,aS.basic,e);return n!==void 0&&n!==e?n:iS(t,aS.extend,e)},lS=e=>e.replace(/[^0-9]/g,""),yl=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),cS=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?lS(e).includes(lS(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?jz(e,t)!==null:!1,zz=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>cS(e,o,n,r)):cS(e,t,n,r),gp=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:je.array(i.value)?i.value.map(yl):yl(`${i.value}`)}));return e.forEach(i=>{const a=sS(i,t);o.forEach(s=>{const l=sS(i,s.key);if(!l)return;const c=yl(`${s.value}`.toLocaleLowerCase()).trim(),u=yl(`${l}`.toLocaleLowerCase()).trim();if(zz(u,c,s.score,s.match))return void r.set(a,i);je.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},Bz=e=>m.jsx(S.Fragment,{children:e.children}),Rz={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Hz=[],Wz=S.forwardRef(function(t,n){return m.jsx(We.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:m.jsx(Sn,{children:t.children})})}),qz=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(We.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),Uz={List:Wz,Item:qz},ai=44,Yz=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:b=!1,...g},h)=>{const v=S.useRef(null),y=S.useRef(null),x=S.useRef(null),T=g.value??g.defaultValue??"",w=St(),[E,k]=S.useState(()=>Math.min(320,ai*o.length)),[C,O]=S.useState(!1),[I,D]=S.useState(""),[V,z]=S.useState(T),[A,N]=S.useState(()=>o.find(Y=>Y.value===T)?.label??T),[H,M]=S.useState(null),P=S.useRef(Hz),$=oS(C,"block-only"),L=b&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,U=()=>uo.flushSync(()=>O(!0)),G=I?gp(L,"value",[{key:"value",value:I},{key:"label",value:I}]):L,B=()=>{O(!1),k(0)},Z=G.filter(Y=>Y.hidden!==!0),ee=b?void 0:`^(${o.map(Y=>`${pu(Y.value)}${Y.label?"|"+pu(Y.label):""}`).join("|")})$`,{x:ne,y:J,strategy:R,refs:q,context:X}=er({open:C,transform:!0,onOpenChange:O,placement:"bottom-start",whileElementsMounted:Eo,middleware:[Pi(4),fg({padding:10,elementContext:"reference",apply(Y){const Q=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=bi(q.reference.current,window.innerHeight),we=Math.min(Q<ai?ce:Q,ce,Y.availableHeight),Le=Z.length===0?ai:Math.min(we,ce,Q),Ze=`${y.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),oe=Ug(X,Rz),{getReferenceProps:j,getFloatingProps:se,getItemProps:le}=tr([vr(X,{role:"listbox"}),gr(X),ds(X,{cols:0,listRef:P,loop:!0,virtual:!0,allowEscape:!0,activeIndex:H,selectedIndex:H,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(g.value){const Y=o.find(F=>F.value===g.value);Y&&(N(Y.label??Y.value),z(g.value))}},[g.value,o.length]),S.useEffect(()=>{if(!C)return k(0);const Y=q.reference;if(Y.current===null)return;const F=bi(Y.current,window.innerHeight);setTimeout(()=>k(Math.min(F,Z.length*ai)),100)},[I,C,q.reference,Z.length]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return yi(Y)},[]);const he=(Y,F)=>{z(Y.value);const Q=q.reference.current;if(!Q)return;Q?.setAttribute("data-value",Y.value),Q.value=Y.value;const ce=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ce),g.onChange&&g.onChange(ce),N(Y.label??""),B(),D(""),M(F)},xe=Y=>{const F=Y.target.value;return D(F),!C&&F===""?O(!0):(Y.target.name=g.name||"",F?O(!0):g.onChange?.(Y))},de=()=>{U(),D(""),q.reference.current?.focus()},Pe=()=>{M(Y=>Y===null?0:Y),U(),D("")},Oe=()=>{q.reference.current?.setAttribute("data-value",""),D(""),z(""),N(""),nm(q.reference.current),B()},Te=g.id||g.name,Be=`${Te}-shadow`,ue=Z.length===0;return m.jsxs(Mi,{...g,left:e,error:t,ref:y,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:Be,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:de,children:[m.jsx(Ac,{size:20}),m.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),V?m.jsx("button",{type:"button",onClick:Oe,className:"p-2 transition-colors link:text-danger md:p-1",children:m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[m.jsx("input",{"data-shadow":"true",...j({...g,onFocus:Pe,pattern:ee,onChange:xe,id:Be,name:Be,ref:q.setReference,onClick:Y=>Y.currentTarget.focus(),onKeyDown(Y){if(Y.key==="Escape")return Y.currentTarget.blur(),B();if(C){if(Y.key==="ArrowDown"){let F=je.number(H)?H+1:0;return F>Z.length-1&&(F=0),x.current?.scrollIntoView({index:F}),M(F)}if(Y.key==="ArrowUp"){let F=je.number(H)?H-1:Z.length-1;return F<0&&(F=Z.length-1),x.current?.scrollIntoView({index:F}),M(F)}if(Y.key==="Enter"){if(H!==null&&Z[H])return Y.preventDefault(),he(Z[H],H);if(Z.length===1)return Y.preventDefault(),he(Z[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Te,"data-target":Te,required:f,value:C?I:o.length===0?"":A||V,"aria-autocomplete":"list",autoComplete:"off",className:Se("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),m.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:h,required:f,defaultValue:g.value||V||void 0}),m.jsx(hr,{preserveTabOrder:!0,children:C?m.jsx(Rr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(We.div,{...se({ref:Zn($,q.setFloating),style:{...oe.styles,left:ne,top:J??0,position:R}}),initial:!1,"data-floating":"true",animate:{height:ue?"auto":E},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!C)return k(0);const F=q.floating.current.querySelectorAll("li").item(0),Q=(F?F.getBoundingClientRect().height:ai)*Z.length;return uo.flushSync(()=>k(Q+10))},children:[ue?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,m.jsx(Pf,{overscan:40,ref:x,hidden:ue,data:Z,style:{height:E-10},defaultItemHeight:ai,components:Uz,scrollerRef:Y=>void(v.current=Y),className:"max-h-[calc(100%-2px)] overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(Y,F)=>{const Q=F.Render??Bz,ce=V===F.value||V===F.label,we=H===Y,Le=F.label??F.value;return m.jsx("button",{"data-value":F.value,...le({ref:Ze=>void(P.current[Y]=Ze),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":F.disabled,onClick:()=>he(F,Y),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ce?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(Q,{...g,label:F.label,value:F.value,children:Le})})}})]})}):null})]})});class Pn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Pn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new Pn(this);return t?t(n):n}static from(t,n){return new Pn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Pn.from(t,n).values())}toArray(){return Array.from(this.values())}}const uS=40,Kz=e=>m.jsx(S.Fragment,{children:e.children}),Gz={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},dS=[],Zz=S.forwardRef(function(t,n){return m.jsx(We.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:m.jsx(Sn,{children:t.children})})}),Xz=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(We.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Qz={List:Zz,Item:Xz},Jz=e=>{const t=St(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),m.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?m.jsxs(Ca,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},eB=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:b=!1,onChangeOptions:g,...h},v)=>{const y=S.useMemo(()=>new Pn(r.map(Y=>[Y.value,Y])),[r]),x=S.useRef(null),T=S.useRef(null),w=h.value??h.defaultValue??dS,E=St(),[k,C]=S.useState(0),[O,I]=S.useState(!1),[D,V]=S.useState(""),[z,A]=S.useState(()=>{const Y=new Pn;return w.forEach(F=>{const Q=y.get(F);return Q?Y.set(F,Q):void 0}),Y}),N=S.useMemo(()=>Array.from(z.keys()),[z]),[H,M]=S.useState(()=>{const Y=new Set(w);return r.reduce((F,Q)=>Y.has(Q.value)?[...F,Q.label??Q.value]:F,[])??w}),[P,$]=S.useState(null),L=S.useRef(dS),U=b&&D!==""?[{value:D,label:D,"data-dynamic":"true"},...r]:r,G=D.length===0?U:gp(U,"value",[{key:"value",value:D},{key:"label",value:D}]),B=oS(O,"block-only"),Z=G.filter(Y=>Y.hidden!==!0),ee=Z.length===0,{x:ne,y:J,strategy:R,refs:q,context:X}=er({open:O,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:I,whileElementsMounted:Eo,middleware:[Pi(4),fg({padding:10,elementContext:"reference",apply(Y){const Q=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=bi(q.reference.current,window.innerHeight),we=Math.min(Q<uS?ce:Q,ce,Y.availableHeight),Le=Z.length===0?uS:Math.min(we,ce,Q),Ze=`${x.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ze,maxWidth:Ze,height:Le})}})]}),oe=Ug(X,Gz),{getReferenceProps:j,getFloatingProps:se,getItemProps:le}=tr([vr(X,{role:"listbox"}),gr(X),ds(X,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Y=>$(F=>Y??F)})]);S.useEffect(()=>{if(!O)return C(0);const Y=q.reference;if(Y.current===null)return;const F=bi(Y.current,window.innerHeight);setTimeout(()=>C(Math.min(F,Z.length*40)),100)},[D,O,q.reference]),S.useEffect(()=>{h.value&&A(new Pn(h.value.map(Y=>[Y,y.get(Y)])))},[h.value,y]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return yi(Y)},[]);const he=(Y,F)=>{const Q=z.clone(Le=>Le.has(Y.value)?Le.remove(Y.value):Le.set(Y.value,Y));A(Q);const ce=q.reference.current;if(!ce)return;const we=Q.map(Le=>Le.value);ce?.setAttribute("data-value",JSON.stringify(we)),g&&g(we),M(Le=>Le.concat(Y.label??"")),V(""),$(F)},xe=Y=>{const F=Y.target.value;return V(F),!O&&F===""?I(!0):(Y.target.name=h.name||"",F?I(!0):void 0)},de=()=>{I(!0),V(""),q.reference.current?.focus()},Pe=()=>{I(!0),V("")},Oe=()=>{q.reference.current?.setAttribute("data-value","[]"),V(""),I(!1),A(new Pn),g?.([])},Te=h.id||h.name,Be=z.map((Y,F)=>m.jsx(Ca,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),he(Y,F)},children:m.jsx(vo,{size:14})}),children:Y.label??Y.value},`MultiSelect-${Y.value}-x`)),ue={height:ee?"0":z.size===0?k-49:k-86};return m.jsxs(Mi,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:de,children:[m.jsx(Ac,{size:20}),m.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),z?m.jsx("button",{type:"button",onClick:Oe,className:"transition-colors link:text-danger",children:m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[m.jsxs("ul",{...j({...h,onFocus:Pe,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:q.setReference}),tabIndex:0,role:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:Se("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[N.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),m.jsx(Jz,{label:c,children:Be})]}),m.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:v,required:f,defaultValue:h.value||N||void 0}),m.jsx(hr,{preserveTabOrder:!0,children:O?m.jsx(lu,{lockScroll:!0,children:m.jsx(Rr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...se({ref:q.setFloating,style:{...oe.styles,top:J??0,position:R,left:ne,height:k-(N.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[m.jsx("input",{autoFocus:!0,value:D,onChange:xe,title:h.title,placeholder:E.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:Y=>{if(Y.key==="ArrowDown"){let F=P+1;return F>Z.length-1&&(F=0),T.current?.scrollIntoView({index:F}),$(F)}if(Y.key==="ArrowUp"){let F=P-1;return F<0&&(F=Z.length-1),T.current?.scrollIntoView({index:F}),$(F)}if(Y.key==="Escape")return Y.currentTarget.blur(),I(!1);if(Y.key==="Enter"){if(P!==null&&Z[P])return Y.preventDefault(),he(Z[P],P);if(Z.length===1)return Y.preventDefault(),he(Z[0],0)}}}),ee?m.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||E.autocompleteEmpty})}):null,ee?null:m.jsx(We.div,{initial:!1,"data-floating":"true",ref:B,animate:{height:ee?"auto":k},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!O)return C(0);const F=q.floating.current.querySelectorAll("li").item(0),Q=(F?F.getBoundingClientRect().height:40)*Z.length;return uo.flushSync(()=>C(Q+2))},children:m.jsx(Pf,{ref:T,hidden:ee,data:Z,components:Qz,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Y,F)=>{const Q=F.Render??Kz,ce=z.has(F.value)||z.has(F.label??""),we=P===Y,Le=F.label??F.value;return m.jsxs("button",{"data-value":F.value,...le({ref:Ze=>void(L.current[Y]=Ze),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":F.disabled,onClick:()=>he(F,Y)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ce||we?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx(zf,{onChange:hu,checked:ce,"aria-checked":ce,onClick:Ze=>{Ze.stopPropagation(),he(F,Y)}}),m.jsx(Q,{...h,label:F.label,value:F.value,children:Le})]})}})}),m.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:z.size===0?m.jsx(Ca,{theme:"muted",size:"small",children:E.autocompleteEmpty}):Be})]})})}):null})]})}),tB=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},nB={Item:S.forwardRef(function(t,n){return m.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return m.jsx("ul",{...t,ref:n,className:"space-y-3"})})},rB=e=>{const t=S.useRef(null),n=tB(t);return m.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[m.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[m.jsx("header",{className:"border-b border-card-border pb-2"}),m.jsxs("div",{className:"px-8 space-y-2",children:[m.jsx(Io,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(Pf,{height:n,useWindowScroll:!0,data:e.source,components:nB,itemContent:(r,o)=>m.jsx(S.Fragment,{children:m.jsx(zf,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(fs,{children:m.jsx(Ic,{})})}),m.jsx("div",{})]})};function oB(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const iB=({children:e,...t})=>{const n=br(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:oB(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),m.jsx("div",{...t,ref:r,children:o?e:null})},aB=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},sB=fo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border"}},defaultVariants:{theme:"default"}}),fS=S.createContext(()=>{throw new Error("Not implemented")}),lB=()=>S.useContext(fS),pS={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},cB=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=sB({theme:t.theme||"default"});return m.jsx(eI,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:m.jsx(We.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:pS[t.reversedIndex]||pS.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:m.jsxs("div",{className:a,children:[m.jsxs("div",{className:"flex flex-col p-4",children:[t.title?m.jsx(tI,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,m.jsx(nI,{className:"select-text truncate",children:t.text})]}),r?m.jsx(rI,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:m.jsx(vo,{className:"size-5"})}):null]})})})});function uB({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=aB(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const b=[...f,{...u,id:d,text:c}];return b.length>t?b.slice(b.length-t,b.length+1):b}),{clear:s,close:()=>a(f=>f.filter(b=>b.id!==d))}},[t]);return m.jsxs(QA,{duration:n,swipeThreshold:150,children:[m.jsx(fS.Provider,{value:l,children:e}),m.jsx(We.ol,{children:m.jsx(Sn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(b=>b.id!==c.id));return S.createElement(cB,{...c,hover:o,index:u,key:c.id,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),m.jsx(JA,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const dB=/Mac|iPod|iPhone|iPad/,bl=()=>dB.test(navigator.userAgent),fB=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?bl()?"Meta":"Control":n==="Hyper"?bl()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),hS=e=>e.map(t=>t.trim()).join("+");class pB{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=hS(fB(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=hS(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const hB=e=>(e=e.trim(),e==="Alt"?bl()?m.jsx(ok,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?bl()?m.jsx(QE,{"aria-label":"Command",size:14}):"Ctrl":e),mB=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return m.jsxs(S.Fragment,{children:[m.jsx("kbd",{"aria-label":n,children:hB(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},gB=e=>m.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Tc(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),vB=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:m.jsx(gB,{text:e.text,item:o})}):o.type!=="shortcut"?m.jsx(S.Fragment,{}):m.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Se("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[m.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,m.jsx("span",{children:Tc(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx(mB,{value:o.shortcut}):null]})}),yB=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:je.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=je.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=gp(o,"title",n),a=r.filter(s=>je.function(s.enabled)?s.enabled({text:t}):!1);return Pn.unique(i.concat(a),s=>s.title)},bB=[0,0,0,0,0],xB=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=St(),[o,i]=S.useState(""),a=br(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=er({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Eo}),p=ds(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:y=>u(x=>je.number(y)?y:e.open?x??0:null)}),{getItemProps:f}=tr([p]),b=e.commands.flatMap(y=>y.type==="group"?[y,...y.items]:[y]),g=yB(b,o),h=o===""?b:[{type:"group",title:"Results",items:[]},...g.filter(y=>y.type!=="group")];S.useEffect(()=>{const y=new pB;return y.add(t,()=>e.onChangeVisibility?.(!0)),b.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&y.add(x.shortcut,T=>x.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),y.register()},[t]);const v=e.Icon??Tm;return m.jsx(S.Fragment,{children:m.jsxs(Hf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[m.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[m.jsx("div",{className:"flex size-10 items-center justify-center",children:m.jsx(v,{Default:Tm,text:o,size:16})}),m.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:y=>i(y.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:y=>{if((y.key==="ArrowDown"||y.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),y.key==="Enter"){if(c!==null&&h[c]){y.preventDefault();const x=h[c],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}if(h.length===1){y.preventDefault();const x=h[0],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}}}})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),bB.map((y,x)=>m.jsx("li",{className:Se("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Of},`${s}-${x}-skeleton-index`))]}):m.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((y,x)=>S.createElement(vB,{...f({onMouseEnter:()=>u(x),ref(T){n.current[x]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),y.type==="shortcut"&&y.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:y,text:o,active:c===x,key:`${s}-${y.type}-${x}`})),h.length===1?m.jsx("div",{className:Se("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&je.number(c)?m.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?m.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},wB=["INPUT","SELECT"],mS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{wB.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var vp,gS;function yp(){if(gS)return vp;gS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return vp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},vp}var bp,vS;function yS(){if(vS)return bp;vS=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function h(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,E){if(t.call(v,E)){var k=v[E];k&&typeof k=="object"&&w&&typeof w=="object"?v[E]=h(k,w,x):v.push(w)}else v[E]=w}),v):Object.keys(y).reduce(function(w,E){var k=y[E];return t.call(w,E)?w[E]=h(w[E],k,x):w[E]=k,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(h,v,y){var x=h.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var E=v;if(typeof v=="symbol"?E=Symbol.prototype.toString.call(v):typeof v!="string"&&(E=String(v)),x==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(z){return"%26%23"+parseInt(z.slice(2),16)+"%3B"});for(var k="",C=0;C<E.length;C+=c){for(var O=E.length>=c?E.slice(C,C+c):E,I=[],D=0;D<O.length;++D){var V=O.charCodeAt(D);if(V===45||V===46||V===95||V===126||V>=48&&V<=57||V>=65&&V<=90||V>=97&&V<=122||w===e.RFC1738&&(V===40||V===41)){I[I.length]=O.charAt(D);continue}if(V<128){I[I.length]=r[V];continue}if(V<2048){I[I.length]=r[192|V>>6]+r[128|V&63];continue}if(V<55296||V>=57344){I[I.length]=r[224|V>>12]+r[128|V>>6&63]+r[128|V&63];continue}D+=1,V=65536+((V&1023)<<10|O.charCodeAt(D)&1023),I[I.length]=r[240|V>>18]+r[128|V>>12&63]+r[128|V>>6&63]+r[128|V&63]}k+=I.join("")}return k},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],E=w.obj[w.prop],k=Object.keys(E),C=0;C<k.length;++C){var O=k[C],I=E[O];typeof I=="object"&&I!==null&&x.indexOf(I)===-1&&(y.push({obj:E,prop:O}),x.push(I))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},b=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return bp={arrayToObject:i,assign:s,combine:b,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},bp}var xp,bS;function SB(){if(bS)return xp;bS=1;var e=MT(),t=yS(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,x,T,w,E,k,C,O,I,D,V,z,A,N,H,M){for(var P=h,$=M,L=0,U=!1;($=$.get(p))!==void 0&&!U;){var G=$.get(h);if(L+=1,typeof G<"u"){if(G===L)throw new RangeError("Cyclic object value");U=!0}typeof $.get(p)>"u"&&(L=0)}if(typeof O=="function"?P=O(v,P):P instanceof Date?P=V(P):y==="comma"&&i(P)&&(P=t.maybeMap(P,function(he){return he instanceof Date?V(he):he})),P===null){if(w)return C&&!N?C(v,u.encoder,H,"key",z):v;P=""}if(d(P)||t.isBuffer(P)){if(C){var B=N?v:C(v,u.encoder,H,"key",z);return[A(B)+"="+A(C(P,u.encoder,H,"value",z))]}return[A(v)+"="+A(String(P))]}var Z=[];if(typeof P>"u")return Z;var ee;if(y==="comma"&&i(P))N&&C&&(P=t.maybeMap(P,C)),ee=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(O))ee=O;else{var ne=Object.keys(P);ee=I?ne.sort(I):ne}var J=k?String(v).replace(/\./g,"%2E"):String(v),R=x&&i(P)&&P.length===1?J+"[]":J;if(T&&i(P)&&P.length===0)return R+"[]";for(var q=0;q<ee.length;++q){var X=ee[q],oe=typeof X=="object"&&X&&typeof X.value<"u"?X.value:P[X];if(!(E&&oe===null)){var j=D&&k?String(X).replace(/\./g,"%2E"):String(X),se=i(P)?typeof y=="function"?y(R,j):R:R+(D?"."+j:"["+j+"]");M.set(h,L);var le=e();le.set(p,M),s(Z,g(oe,se,y,x,T,w,E,k,y==="comma"&&N&&i(P)?null:C,O,I,D,V,z,A,N,H,le))}}return Z},b=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var x=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return xp=function(g,h){var v=g,y=b(h),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var E=o[y.arrayFormat],k=E==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var C=e(),O=0;O<x.length;++O){var I=x[O],D=v[I];y.skipNulls&&D===null||s(w,f(D,I,E,k,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}var V=w.join(y.delimiter),z=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?z+="utf8=%26%2310003%3B&":z+="utf8=%E2%9C%93&"),V.length>0?z+V:""},xp}var wp,xS;function TB(){if(xS)return wp;xS=1;var e=yS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,b){return String.fromCharCode(parseInt(b,10))})},i=function(p,f,b){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&b>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,b){var g={__proto__:null},h=b.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=b.parameterLimit===1/0?void 0:b.parameterLimit,y=h.split(b.delimiter,b.throwOnLimitExceeded?v+1:v);if(b.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=b.charset;if(b.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var E=y[T],k=E.indexOf("]="),C=k===-1?E.indexOf("="):k+1,O,I;C===-1?(O=b.decoder(E,r.decoder,w,"key"),I=b.strictNullHandling?null:""):(O=b.decoder(E.slice(0,C),r.decoder,w,"key"),I=e.maybeMap(i(E.slice(C+1),b,n(g[O])?g[O].length:0),function(V){return b.decoder(V,r.decoder,w,"value")})),I&&b.interpretNumericEntities&&w==="iso-8859-1"&&(I=o(String(I))),E.indexOf("[]=")>-1&&(I=n(I)?[I]:I);var D=t.call(g,O);D&&b.duplicates==="combine"?g[O]=e.combine(g[O],I):(!D||b.duplicates==="last")&&(g[O]=I)}return g},c=function(p,f,b,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,b,h),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(y===""||b.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=b.plainObjects?{__proto__:null}:{};var E=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,k=b.decodeDotInKeys?E.replace(/%2E/g,"."):E,C=parseInt(k,10);!b.parseArrays&&k===""?T={0:y}:!isNaN(C)&&w!==k&&String(C)===k&&C>=0&&b.parseArrays&&C<=b.arrayLimit?(T=[],T[C]=y):k!=="__proto__"&&(T[k]=y)}y=T}return y},u=function(f,b,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,E=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(w)}for(var k=0;g.depth>0&&(T=x.exec(v))!==null&&k<g.depth;){if(k+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;E.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+v.slice(T.index)+"]")}return c(E,b,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:b,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return wp=function(p,f){var b=d(f);if(p===""||p===null||typeof p>"u")return b.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,b):p,h=b.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],b,typeof p=="string");h=e.merge(h,T,b)}return b.allowSparse===!0?h:e.compact(h)},wp}var Sp,wS;function EB(){if(wS)return Sp;wS=1;var e=SB(),t=TB(),n=yp();return Sp={formats:n,parse:t,stringify:e},Sp}var kB=EB(),Ye;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var SS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(SS||(SS={}));const ve=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},ie=Ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ar extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof ar))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ar.create=e=>new ar(e);const Tp=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let CB=Tp;function PB(){return CB}const AB=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function fe(e,t){const n=PB(),r=AB({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Tp?void 0:Tp].filter(o=>!!o)});e.common.issues.push(r)}class ln{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Ie;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Ie=Object.freeze({status:"aborted"}),ya=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),TS=e=>e.status==="aborted",ES=e=>e.status==="dirty",si=e=>e.status==="valid",xl=e=>typeof Promise<"u"&&e instanceof Promise;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ye||(ye={}));class Ir{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kS=(e,t)=>{if(si(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ar(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class He{get description(){return this._def.description}_getType(t){return Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ln,ctx:{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(xl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},o=this._parseSync({data:t,path:r.path,parent:r});return kS(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return si(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>si(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(xl(o)?o:Promise.resolve(o));return kS(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ie.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new di({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Or.create(this,this._def)}nullable(){return fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yn.create(this)}promise(){return El.create(this,this._def)}or(t){return Sl.create([this,t],this._def)}and(t){return Tl.create(this,t,this._def)}transform(t){return new di({...ze(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Cp({...ze(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new XB({typeName:_e.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Pp({...ze(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ap.create(this,t)}readonly(){return Ip.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const IB=/^c[^\s-]{8,}$/i,_B=/^[0-9a-z]+$/,OB=/^[0-9A-HJKMNP-TV-Z]{26}$/i,MB=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,DB=/^[a-z0-9_-]{21}$/i,NB=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,LB=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,FB=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VB="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ep;const $B=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,zB=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,BB=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RB=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,HB=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,CS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",WB=new RegExp(`^${CS}$`);function PS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function qB(e){return new RegExp(`^${PS(e)}$`)}function UB(e){let t=`${CS}T${PS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function YB(e,t){return!!((t==="v4"||!t)&&$B.test(e)||(t==="v6"||!t)&&zB.test(e))}function KB(e,t){if(!NB.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function GB(e,t){return!!((t==="v4"||!t)&&jB.test(e)||(t==="v6"||!t)&&BB.test(e))}class so extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.string,received:i.parsedType}),Ie}const r=new ln;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?fe(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&fe(o,{code:ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")FB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"email",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ep||(Ep=new RegExp(VB,"u")),Ep.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"emoji",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")MB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"uuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")DB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"nanoid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")IB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")_B.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cuid2",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")OB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"ulid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),fe(o,{validation:"url",code:ie.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"regex",code:ie.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?UB(i).test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?WB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?qB(i).test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?LB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"duration",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?YB(t.data,i.version)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"ip",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?KB(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"jwt",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?GB(t.data,i.version)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"cidr",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?RB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"base64",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?HB.test(t.data)||(o=this._getOrReturnCtx(t,o),fe(o,{validation:"base64url",code:ie.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ie.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new so({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ye.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ye.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ye.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new so({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new so({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new so({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}so.create=e=>new so({checks:[],typeName:_e.ZodString,coerce:e?.coerce??!1,...ze(e)});function ZB(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class li extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.number,received:i.parsedType}),Ie}let r;const o=new ln;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?ZB(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ye.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}li.create=e=>new li({checks:[],typeName:_e.ZodNumber,coerce:e?.coerce||!1,...ze(e)});class ba extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ve.bigint)return this._getInvalidInput(t);let r;const o=new ln;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),fe(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return fe(n,{code:ie.invalid_type,expected:ve.bigint,received:n.parsedType}),Ie}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ba({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ba({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ba.create=e=>new ba({checks:[],typeName:_e.ZodBigInt,coerce:e?.coerce??!1,...ze(e)});class AS extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.boolean,received:r.parsedType}),Ie}return yn(t.data)}}AS.create=e=>new AS({typeName:_e.ZodBoolean,coerce:e?.coerce||!1,...ze(e)});class wl extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_type,expected:ve.date,received:i.parsedType}),Ie}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return fe(i,{code:ie.invalid_date}),Ie}const r=new ln;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),fe(o,{code:ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}wl.create=e=>new wl({checks:[],coerce:e?.coerce||!1,typeName:_e.ZodDate,...ze(e)});class IS extends He{_parse(t){if(this._getType(t)!==ve.symbol){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.symbol,received:r.parsedType}),Ie}return yn(t.data)}}IS.create=e=>new IS({typeName:_e.ZodSymbol,...ze(e)});class _S extends He{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.undefined,received:r.parsedType}),Ie}return yn(t.data)}}_S.create=e=>new _S({typeName:_e.ZodUndefined,...ze(e)});class OS extends He{_parse(t){if(this._getType(t)!==ve.null){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.null,received:r.parsedType}),Ie}return yn(t.data)}}OS.create=e=>new OS({typeName:_e.ZodNull,...ze(e)});class MS extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}MS.create=e=>new MS({typeName:_e.ZodAny,...ze(e)});class DS extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}DS.create=e=>new DS({typeName:_e.ZodUnknown,...ze(e)});class _r extends He{_parse(t){const n=this._getOrReturnCtx(t);return fe(n,{code:ie.invalid_type,expected:ve.never,received:n.parsedType}),Ie}}_r.create=e=>new _r({typeName:_e.ZodNever,...ze(e)});class NS extends He{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.void,received:r.parsedType}),Ie}return yn(t.data)}}NS.create=e=>new NS({typeName:_e.ZodVoid,...ze(e)});class Yn extends He{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ve.array)return fe(n,{code:ie.invalid_type,expected:ve.array,received:n.parsedType}),Ie;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(fe(n,{code:a?ie.too_big:ie.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(fe(n,{code:ie.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(fe(n,{code:ie.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Ir(n,a,n.path,s)))).then(a=>ln.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ir(n,a,n.path,s)));return ln.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Yn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Yn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Yn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Yn.create=(e,t)=>new Yn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...ze(t)});function ci(e){if(e instanceof Dt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Or.create(ci(r))}return new Dt({...e._def,shape:()=>t})}else return e instanceof Yn?new Yn({...e._def,type:ci(e.element)}):e instanceof Or?Or.create(ci(e.unwrap())):e instanceof fi?fi.create(ci(e.unwrap())):e instanceof lo?lo.create(e.items.map(t=>ci(t))):e}class Dt extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ye.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ve.object){const c=this._getOrReturnCtx(t);return fe(c,{code:ie.invalid_type,expected:ve.object,received:c.parsedType}),Ie}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _r&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ir(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof _r){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(fe(o,{code:ie.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ir(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>ln.mergeObjectSync(r,c)):ln.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new Dt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ye.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Dt({...this._def,unknownKeys:"strip"})}passthrough(){return new Dt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Dt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Dt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:_e.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Dt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ye.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ye.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Dt({...this._def,shape:()=>n})}deepPartial(){return ci(this)}partial(t){const n={};for(const r of Ye.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Dt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ye.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Or;)i=i._def.innerType;n[r]=i}return new Dt({...this._def,shape:()=>n})}keyof(){return $S(Ye.objectKeys(this.shape))}}Dt.create=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strip",catchall:_r.create(),typeName:_e.ZodObject,...ze(t)}),Dt.strictCreate=(e,t)=>new Dt({shape:()=>e,unknownKeys:"strict",catchall:_r.create(),typeName:_e.ZodObject,...ze(t)}),Dt.lazycreate=(e,t)=>new Dt({shape:e,unknownKeys:"strip",catchall:_r.create(),typeName:_e.ZodObject,...ze(t)});class Sl extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new ar(s.ctx.common.issues));return fe(n,{code:ie.invalid_union,unionErrors:a}),Ie}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new ar(l));return fe(n,{code:ie.invalid_union,unionErrors:s}),Ie}}get options(){return this._def.options}}Sl.create=(e,t)=>new Sl({options:e,typeName:_e.ZodUnion,...ze(t)});function kp(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===ve.object&&r===ve.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=kp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===ve.array&&r===ve.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=kp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ve.date&&r===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Tl extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(TS(i)||TS(a))return Ie;const s=kp(i.value,a.value);return s.valid?((ES(i)||ES(a))&&n.dirty(),{status:n.value,value:s.data}):(fe(r,{code:ie.invalid_intersection_types}),Ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Tl.create=(e,t,n)=>new Tl({left:e,right:t,typeName:_e.ZodIntersection,...ze(n)});class lo extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.array)return fe(r,{code:ie.invalid_type,expected:ve.array,received:r.parsedType}),Ie;if(r.data.length<this._def.items.length)return fe(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&r.data.length>this._def.items.length&&(fe(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ir(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ln.mergeArray(n,a)):ln.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new lo({...this._def,rest:t})}}lo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lo({items:e,typeName:_e.ZodTuple,rest:null,...ze(t)})};class LS extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.map)return fe(r,{code:ie.invalid_type,expected:ve.map,received:r.parsedType}),Ie;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ir(r,s,r.path,[c,"key"])),value:i._parse(new Ir(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ie;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ie;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}LS.create=(e,t,n)=>new LS({valueType:t,keyType:e,typeName:_e.ZodMap,...ze(n)});class xa extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.set)return fe(r,{code:ie.invalid_type,expected:ve.set,received:r.parsedType}),Ie;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(fe(r,{code:ie.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(fe(r,{code:ie.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ie;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Ir(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new xa({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new xa({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}xa.create=(e,t)=>new xa({valueType:e,minSize:null,maxSize:null,typeName:_e.ZodSet,...ze(t)});class FS extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}FS.create=(e,t)=>new FS({getter:e,typeName:_e.ZodLazy,...ze(t)});class VS extends He{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return fe(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}VS.create=(e,t)=>new VS({value:e,typeName:_e.ZodLiteral,...ze(t)});function $S(e,t){return new ui({values:e,typeName:_e.ZodEnum,...ze(t)})}class ui extends He{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return fe(n,{expected:Ye.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return fe(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Ie}return yn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ui.create(t,{...this._def,...n})}exclude(t,n=this._def){return ui.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ui.create=$S;class jS extends He{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ve.string&&r.parsedType!==ve.number){const o=Ye.objectValues(n);return fe(r,{expected:Ye.joinValues(o),received:r.parsedType,code:ie.invalid_type}),Ie}if(this._cache||(this._cache=new Set(Ye.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ye.objectValues(n);return fe(r,{received:r.data,code:ie.invalid_enum_value,options:o}),Ie}return yn(t.data)}get enum(){return this._def.values}}jS.create=(e,t)=>new jS({values:e,typeName:_e.ZodNativeEnum,...ze(t)});class El extends He{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.promise&&n.common.async===!1)return fe(n,{code:ie.invalid_type,expected:ve.promise,received:n.parsedType}),Ie;const r=n.parsedType===ve.promise?n.data:Promise.resolve(n.data);return yn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}El.create=(e,t)=>new El({type:e,typeName:_e.ZodPromise,...ze(t)});class di extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{fe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Ie;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ie:l.status==="dirty"||n.value==="dirty"?ya(l.value):l});{if(n.value==="aborted")return Ie;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ie:s.status==="dirty"||n.value==="dirty"?ya(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ie:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ie:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!si(a))return Ie;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>si(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Ie);Ye.assertNever(o)}}di.create=(e,t,n)=>new di({schema:e,typeName:_e.ZodEffects,effect:t,...ze(n)}),di.createWithPreprocess=(e,t,n)=>new di({schema:t,effect:{type:"preprocess",transform:e},typeName:_e.ZodEffects,...ze(n)});class Or extends He{_parse(t){return this._getType(t)===ve.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Or.create=(e,t)=>new Or({innerType:e,typeName:_e.ZodOptional,...ze(t)});class fi extends He{_parse(t){return this._getType(t)===ve.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}fi.create=(e,t)=>new fi({innerType:e,typeName:_e.ZodNullable,...ze(t)});class Cp extends He{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Cp.create=(e,t)=>new Cp({innerType:e,typeName:_e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class Pp extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return xl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ar(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Pp.create=(e,t)=>new Pp({innerType:e,typeName:_e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class zS extends He{_parse(t){if(this._getType(t)!==ve.nan){const r=this._getOrReturnCtx(t);return fe(r,{code:ie.invalid_type,expected:ve.nan,received:r.parsedType}),Ie}return{status:"valid",value:t.data}}}zS.create=e=>new zS({typeName:_e.ZodNaN,...ze(e)});class XB extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ap extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ie:i.status==="dirty"?(n.dirty(),ya(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ie:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ap({in:t,out:n,typeName:_e.ZodPipeline})}}class Ip extends He{_parse(t){const n=this._def.innerType._parse(t),r=o=>(si(o)&&(o.value=Object.freeze(o.value)),o);return xl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ip.create=(e,t)=>new Ip({innerType:e,typeName:_e.ZodReadonly,...ze(t)});var _e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(_e||(_e={})),_r.create,Yn.create,Sl.create,Tl.create,lo.create,ui.create,El.create,Or.create,fi.create;const QB=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},JB=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},BS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),cn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):BS(t),o=structuredClone(e);return JB(o,r,n),o},eR=(e,t)=>e.localeCompare(t),pi={},RS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return HS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=RS(e._def.innerType);return t==="ZodArray"?n??[]:n}},HS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,RS(n)])),WS=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=WS(i,o):n[r]=o||i)}return n},tR={sort:eR,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},qS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return kB.parse(n.toString(),tR)},Mr=(e,t)=>BS(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Dr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),_p=e=>{const t=e.dataset.target;if(!t)return Dr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Dr(n||e)},nR={state:{},loading:!1,useOnChange:!1},US=e=>e.dataset.target||e.name,rR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=pa.LocalStorage.get(t);return QB(n)?n:{}},clear:()=>void pa.LocalStorage.delete(t),set:n=>pa.LocalStorage.set(t,n)}},oR=(e,t,n=nR)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>je.function(n?.state)?n.state():n?.state??HS(e)??{}),l=S.useCallback(x=>{const T=x.target,w=x.currentTarget;if(T.dataset.optional==="true")return;const k=US(T),C=_p(T)||(w?Dr(w):""),O=Mr(k,e);if(T.setAttribute("data-initialized","true"),O){const I=O.safeParse(C),D=I.success?void 0:I.error.issues[0]?.message??"";o(V=>cn(V??{},k,D))}},[e]),c=S.useCallback(x=>T=>{const w=T.currentTarget,E=Object.values(i.current).reduce((C,O)=>{const I=O.element,D=O.schema.safeParse(Dr(I));if(I.dataset.ignore==="ignore"||D.success)return C;const V=D.error.issues[0]?.message;I.setAttribute("data-initialized","true");const z=I.dataset.name||I.name||"";return cn(C,z,V)},{}),k=je.empty(E)?null:E;o(k),console.error(k),x?.({form:w,errors:k||{}})},[]),u=(x,T=pi)=>{const w=Mr(x,e),E=k=>{if(!ll(k))return;s(O=>cn(O,x,k.toISOString())),o(O=>cn(O,x,void 0));const C=i.current[x].element;if(C){const O=C.getAttribute("data-origin"),I=document.querySelector(`input[data-target="${O}"]`);I&&I.setCustomValidity("")}T?.onChange?.(k)};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,date:je.string(a[x])?new Date(a[x]):a[x],required:T.required??!w.isOptional(),error:On(r,x),ref:k=>{k!==null&&(i.current[x]={element:k,schema:w})}}},d=(x,T=pi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.value;s(O=>cn(O,x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),value:On(a,x,void 0)??"",required:T.required??!w.isOptional(),ref:k=>k!==null?i.current[x]={element:k,schema:w}:void 0}},p=(x,T=pi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.checked;s(O=>cn(O??{},x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),ref:k=>k!==null?void(i.current[x]={element:k,schema:w}):void 0}},f=(x,T=pi)=>{const w=Mr(x,e),E=k=>{k.persist?.();const C=k.target.value;T?.onChange?.(k),s(O=>cn(O,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),value:On(a,x,void 0)||T?.value||"",type:je.instance(w,li)?"number":T?.type??"text",ref:k=>k===null?void 0:i.current[x]={element:k,schema:w}}},b=(x,T=pi)=>{const w=Mr(x,e);return{...T,name:x,id:x,onChangeOptions:k=>{s(C=>cn(C,x,k))},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),value:On(a,x,void 0)||T?.value||[],ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}},g=(x,T=pi)=>{const w=Mr(x,e),E=w._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const O=E?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(I=>cn(I,x,O))},form:t,loading:n.loading,onInvalid:l,error:On(r,x,void 0),required:T.required??!w.isOptional(),type:E?"number":T?.type??"text",value:On(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}};S.useEffect(()=>{const x=Object.values(i.current).map(w=>{const E=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,k=w.schema.safeParse(Dr(E)),C=V=>{const z=US(V.target);if(!z)return!1;const A=V.target,N=_p(V.target)||(V.relatedTarget?Dr(V.relatedTarget):""),H=w.schema.safeParse(N);if(A.setAttribute("value",N),H.success)return E.setCustomValidity&&E.setCustomValidity(""),o(M=>{if(je.null(M))return null;const P=cn(M,z,void 0);return je.empty(M)||je.nil(M)||je.empty(P)?null:P}),!1;if(E.required){const M=H.error.issues[0]?.message||"";E.setCustomValidity&&E.setCustomValidity(M),o(P=>{if(je.null(P))return null;const $=cn(P,z,M||void 0);return je.empty($)?null:$})}return!1},O=new AbortController,I=E.getAttribute("data-trigger")||"blur";E.addEventListener(I,C,{signal:O.signal});const D=E.dataset.shadow?!1:E.required?!k.success:!1;return{input:w,hasInitialError:D,unsubscribe:()=>O.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const h=x=>T=>{T.preventDefault();const w=T.currentTarget;let E=qS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(D=>{if(D.tagName==="SELECT"){const V=D;E=cn(E,V.name,V.value)}if(D.tagName==="INPUT"){const V=D,z=_p(V)||(V?Dr(V):"");E=cn(E,V.dataset.target||V.name,z)}});const C=WS(E,a),O=e.safeParse(C),I=()=>{mS(w),n.interceptor?.clear()};if(O.success){const D=JSON.stringify(O.data);return w.setAttribute("data-json",D),n.interceptor?.clear(),x?.(T,{form:w,event:T,reset:I,setErrors:o,errors:[],success:!0,data:O.data,json:O.data})}return console.group("useForm error"),console.info(O),console.info(O.error.issues),console.error(O.error),console.groupEnd(),w.reportValidity(),x?.(T,{form:w,json:E,event:T,reset:I,setErrors:o,data:E,success:!1,errors:O.error.issues.map(D=>({message:D.message,path:D.path.map(V=>String(V))}))})},v=x=>fu(a,x)||"",y=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,multiselect:b,disabled:r!==null}},iR=e=>e?JSON.parse(e.getAttribute("data-json")):{},aR=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},YS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},KS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},GS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},sR={name:"dark",zIndex:GS,rounded:YS,spacing:KS,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},lR={rounded:YS,spacing:KS,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:GS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},cR=sR,uR=lR,dR=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...Fa,...e.tweaks},parser:e.parser||Da.hsla,map:{...La,...e.map}}),[e]);return m.jsx(bo.Provider,{value:t,children:e.children})},fR=()=>{const e=S.useContext(bo);return e?e.parser:Da.hsla};te.Alert=kF,te.AnimatedList=vF,te.AnimatedListItem=yF,te.Autocomplete=Yz,te.Button=fs,te.Calendar=m1,te.Card=nl,te.Checkbox=zf,te.ColType=ti,te.Collapse=$w,te.CommandPalette=xB,te.ComponentsProvider=dR,te.Context=bo,te.DatePicker=yj,te.Description=RF,te.Dict=Pn,te.Dropdown=ei,te.Empty=Pw,te.Expand=UF,te.FileUpload=Vz,te.Form=TE,te.Info=HF,te.Input=Io,te.InputFeedback=tv,te.InputField=Mi,te.Loading=qF,te.Menu=AF,te.MenuItem=PF,te.Modal=Hf,te.MultiSelect=eB,te.Notifications=uB,te.PageHeader=WF,te.PageTitle=Bw,te.Paragraph=BF,te.Polymorph=en,te.Progress=fj,te.Radiobox=IF,te.RenderOnView=iB,te.Select=Hr,te.Slider=iI,te.Spinner=Rw,te.Stats=CF,te.StatsCard=mF,te.Switch=aI,te.Tab=SF,te.Table=hF,te.Tabs=xF,te.Tag=Ca,te.TaskList=zF,te.Textarea=_F,te.Timeline=pj,te.TimelineItem=ul,te.Toolbar=hj,te.Tooltip=mu,te.TransferList=rB,te.createColumns=VL,te.createCssProperties=fk,te.createDesignTokens=Em,te.createFormStorage=rR,te.createOptionCols=Nf,te.createStyles=ck,te.createTheme=dk,te.createTokenStyles=pk,te.css=Se,te.defaultDarkTheme=cR,te.defaultLightTheme=uR,te.defaultTranslations=La,te.defaultTweaks=Fa,te.dispatchInput=nm,te.formReset=mS,te.formToJson=qS,te.getCoords=bE,te.getJsonForm=iR,te.getModalScrollerRef=RL,te.getRemainingSize=bi,te.getSchemaShape=Mr,te.hasVerticalScroll=rm,te.initializeInputDataset=yi,te.isMobile=ev,te.isReactComponent=yE,te.isReactFC=Tc,te.isSsr=yr,te.mergeRefs=Zn,te.negate=_P,te.noop=hu,te.parsers=Da,te.path=fu,te.reduceTokens=lr,te.safeRegex=pu,te.splitInto=Jg,te.useColorParser=fR,te.useForm=oR,te.useLocale=Xf,te.useNotification=lB,te.usePrevious=aR,te.useReactive=Mw,te.useStableRef=br,te.useSwipe=c1,te.useTablePreferences=zL,te.useTranslations=St,te.uuid=Ao,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
247
247
|
//# sourceMappingURL=index.umd.js.map
|