@g4rcez/components 2.2.3 → 2.2.4
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 +2 -0
- package/dist/components/display/notifications.d.ts.map +1 -1
- package/dist/components/display/notifications.jsx +64 -36
- package/dist/components/floating/menu.d.ts +2 -2
- package/dist/components/floating/modal.d.ts +22 -4
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.jsx +52 -2
- package/dist/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/hooks/use-components-provider.jsx +4 -1
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5796 -5733
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/src/styles/common.d.ts +2 -14
- package/dist/preset/src/styles/common.d.ts.map +1 -1
- package/dist/preset/src/styles/common.js +1 -0
- package/dist/preset/src/styles/dark.js +1 -1
- package/dist/preset/src/styles/theme.types.d.ts +10 -1
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/styles/common.d.ts +2 -14
- package/dist/styles/common.d.ts.map +1 -1
- package/dist/styles/common.js +1 -0
- package/dist/styles/dark.js +1 -1
- package/dist/styles/theme.types.d.ts +10 -1
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/package.json +4 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(ie,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],T):(ie=typeof globalThis<"u"?globalThis:ie||self,T(ie.components={},ie.React,ie["react/jsx-runtime"],ie.ReactDOM))})(this,(function(ie,T,m,Fi){"use strict";function Bh(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 A=Bh(T),jn=Bh(Fi);function Hh(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=Hh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hh(e))&&(r&&(r+=" "),r+=t);return r}const qh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Uh=Wh,Io=(e,t)=>n=>{var r;if(t?.variants==null)return Uh(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 f=qh(u)||qh(d);return o[c][f]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,f]:c},[]);return Uh(e,a,l,n?.class,n?.className)};var Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function XE(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 vc,Kh;function Ao(){return Kh||(Kh=1,vc=TypeError),vc}const QE=XE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var yc,Zh;function Za(){if(Zh)return yc;Zh=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,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,S=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(U){return U.__proto__}:null);function C(U,Z){if(U===1/0||U===-1/0||U!==U||U&&U>-1e3&&U<1e3||I.call(/e/,Z))return Z;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof U=="number"){var Ge=U<0?-_(-U):_(U);if(Ge!==U){var Ze=String(Ge),Ne=b.call(Z,Ze.length+1);return x.call(Ze,Oe,"$&_")+"."+x.call(x.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(Z,Oe,"$&_")}var L=QE,$=L.custom,B=ae($)?$:null,q={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};yc=function U(Z,Oe,Ge,Ze){var Ne=Oe||{};if(te(Ne,"quoteStyle")&&!te(q,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=te(Ne,"customInspect")?Ne.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mt=Ne.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return ce(Z,Ne);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var it=String(Z);return mt?C(Z,it):it}if(typeof Z=="bigint"){var vn=String(Z)+"n";return mt?C(Z,vn):vn}var Ur=typeof Ne.depth>"u"?5:Ne.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=Ur&&Ur>0&&typeof Z=="object")return ee(Z)?"[Array]":"[Object]";var Gr=ht(Ne,Ge);if(typeof Ze>"u")Ze=[];else if(ve(Ze,Z)>=0)return"[Circular]";function kn(Ni,gc,vH){if(gc&&(Ze=P.call(Ze),Ze.push(gc)),vH){var ZE={depth:Ne.depth};return te(Ne,"quoteStyle")&&(ZE.quoteStyle=Ne.quoteStyle),U(Ni,ZE,Ge+1,Ze)}return U(Ni,Ne,Ge+1,Ze)}if(typeof Z=="function"&&!K(Z)){var Mi=pe(Z),Di=$e(Z,kn);return"[Function"+(Mi?": "+Mi:" (anonymous)")+"]"+(Di.length>0?" { "+k.call(Di,", ")+" }":"")}if(ae(Z)){var qE=O?x.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(Z);return typeof Z=="object"&&!O?Ce(qE):qE}if(ne(Z)){for(var Ka="<"+E.call(String(Z.nodeName)),Fh=Z.attributes||[],mc=0;mc<Fh.length;mc++)Ka+=" "+Fh[mc].name+"="+W(J(Fh[mc].value),"double",Ne);return Ka+=">",Z.childNodes&&Z.childNodes.length&&(Ka+="..."),Ka+="</"+E.call(String(Z.nodeName))+">",Ka}if(ee(Z)){if(Z.length===0)return"[]";var Lh=$e(Z,kn);return Gr&&!pt(Lh)?"["+$t(Lh,Gr)+"]":"[ "+k.call(Lh,", ")+" ]"}if(X(Z)){var Vh=$e(Z,kn);return!("cause"in Error.prototype)&&"cause"in Z&&!z.call(Z,"cause")?"{ ["+String(Z)+"] "+k.call(w.call("[cause]: "+kn(Z.cause),Vh),", ")+" }":Vh.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+k.call(Vh,", ")+" }"}if(typeof Z=="object"&&ot){if(B&&typeof Z[B]=="function"&&L)return L(Z,{depth:Ur-Ge});if(ot!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(Ae(Z)){var UE=[];return r&&r.call(Z,function(Ni,gc){UE.push(kn(gc,Z,!0)+" => "+kn(Ni,Z))}),qe("Map",n.call(Z),UE,Gr)}if(j(Z)){var GE=[];return s&&s.call(Z,function(Ni){GE.push(kn(Ni,Z))}),qe("Set",a.call(Z),GE,Gr)}if(me(Z))return _e("WeakMap");if(R(Z))return _e("WeakSet");if(oe(Z))return _e("WeakRef");if(H(Z))return Ce(kn(Number(Z)));if(Q(Z))return Ce(kn(F.call(Z)));if(se(Z))return Ce(v.call(Z));if(de(Z))return Ce(kn(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Gh<"u"&&Z===Gh)return"{ [object globalThis] }";if(!Y(Z)&&!K(Z)){var $h=$e(Z,kn),YE=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,zh=Z instanceof Object?"":"null prototype",KE=!YE&&D&&Object(Z)===Z&&D in Z?b.call(fe(Z),8,-1):zh?"Object":"",gH=YE||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",jh=gH+(KE||zh?"["+k.call(w.call([],KE||[],zh||[]),": ")+"] ":"");return $h.length===0?jh+"{}":Gr?jh+"{"+$t($h,Gr)+"}":jh+"{ "+k.call($h,", ")+" }"}return String(Z)};function W(U,Z,Oe){var Ge=Oe.quoteStyle||Z,Ze=q[Ge];return Ze+U+Ze}function J(U){return x.call(String(U),/"/g,""")}function re(U){return!D||!(typeof U=="object"&&(D in U||typeof U[D]<"u"))}function ee(U){return fe(U)==="[object Array]"&&re(U)}function Y(U){return fe(U)==="[object Date]"&&re(U)}function K(U){return fe(U)==="[object RegExp]"&&re(U)}function X(U){return fe(U)==="[object Error]"&&re(U)}function de(U){return fe(U)==="[object String]"&&re(U)}function H(U){return fe(U)==="[object Number]"&&re(U)}function se(U){return fe(U)==="[object Boolean]"&&re(U)}function ae(U){if(O)return U&&typeof U=="object"&&U instanceof Symbol;if(typeof U=="symbol")return!0;if(!U||typeof U!="object"||!N)return!1;try{return N.call(U),!0}catch{}return!1}function Q(U){if(!U||typeof U!="object"||!F)return!1;try{return F.call(U),!0}catch{}return!1}var le=Object.prototype.hasOwnProperty||function(U){return U in this};function te(U,Z){return le.call(U,Z)}function fe(U){return g.call(U)}function pe(U){if(U.name)return U.name;var Z=y.call(h.call(U),/^function\s*([\w$]+)/);return Z?Z[1]:null}function ve(U,Z){if(U.indexOf)return U.indexOf(Z);for(var Oe=0,Ge=U.length;Oe<Ge;Oe++)if(U[Oe]===Z)return Oe;return-1}function Ae(U){if(!n||!U||typeof U!="object")return!1;try{n.call(U);try{a.call(U)}catch{return!0}return U instanceof Map}catch{}return!1}function me(U){if(!c||!U||typeof U!="object")return!1;try{c.call(U,c);try{d.call(U,d)}catch{return!0}return U instanceof WeakMap}catch{}return!1}function oe(U){if(!p||!U||typeof U!="object")return!1;try{return p.call(U),!0}catch{}return!1}function j(U){if(!a||!U||typeof U!="object")return!1;try{a.call(U);try{n.call(U)}catch{return!0}return U instanceof Set}catch{}return!1}function R(U){if(!d||!U||typeof U!="object")return!1;try{d.call(U,d);try{c.call(U,c)}catch{return!0}return U instanceof WeakSet}catch{}return!1}function ne(U){return!U||typeof U!="object"?!1:typeof HTMLElement<"u"&&U instanceof HTMLElement?!0:typeof U.nodeName=="string"&&typeof U.getAttribute=="function"}function ce(U,Z){if(U.length>Z.maxStringLength){var Oe=U.length-Z.maxStringLength,Ge="... "+Oe+" more character"+(Oe>1?"s":"");return ce(b.call(U,0,Z.maxStringLength),Z)+Ge}var Ze=G[Z.quoteStyle||"single"];Ze.lastIndex=0;var Ne=x.call(x.call(U,Ze,"\\$1"),/[\x00-\x1f]/g,xe);return W(Ne,"single",Z)}function xe(U){var Z=U.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Oe?"\\"+Oe:"\\x"+(Z<16?"0":"")+S.call(Z.toString(16))}function Ce(U){return"Object("+U+")"}function _e(U){return U+" { ? }"}function qe(U,Z,Oe,Ge){var Ze=Ge?$t(Oe,Ge):k.call(Oe,", ");return U+" ("+Z+") {"+Ze+"}"}function pt(U){for(var Z=0;Z<U.length;Z++)if(ve(U[Z],`
|
|
2
|
-
`)>=0)return!1;return!0}function ht(U,Z){var Oe;if(U.indent===" ")Oe=" ";else if(typeof U.indent=="number"&&U.indent>0)Oe=
|
|
3
|
-
`+Z.prev+Z.base;return Oe+
|
|
4
|
-
`+Z.prev}function $e(U,Z){var Oe=ee(U),Ge=[];if(Oe){Ge.length=U.length;for(var Ze=0;Ze<U.length;Ze++)Ge[Ze]=te(U,Ze)?Z(U[Ze],U):""}var Ne=typeof V=="function"?V(U):[],ot;if(O){ot={};for(var mt=0;mt<Ne.length;mt++)ot["$"+Ne[mt]]=Ne[mt]}for(var it in U)te(U,it)&&(Oe&&String(Number(it))===it&&it<U.length||O&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ge.push(Z(it,U)+": "+Z(U[it],U)):Ge.push(it+": "+Z(U[it],U))));if(typeof V=="function")for(var vn=0;vn<Ne.length;vn++)z.call(U,Ne[vn])&&Ge.push("["+Z(Ne[vn])+"]: "+Z(U[Ne[vn]],U));return Ge}return yc}var bc,Xh;function JE(){if(Xh)return bc;Xh=1;var e=Za(),t=Ao(),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 bc=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,f=a(l,u);return f&&d&&d===f&&(l=void 0),!!f},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},bc}var xc,Qh;function Jh(){return Qh||(Qh=1,xc=Object),xc}var wc,em;function ek(){return em||(em=1,wc=Error),wc}var Sc,tm;function tk(){return tm||(tm=1,Sc=EvalError),Sc}var Tc,nm;function nk(){return nm||(nm=1,Tc=RangeError),Tc}var Ec,rm;function rk(){return rm||(rm=1,Ec=ReferenceError),Ec}var kc,om;function ok(){return om||(om=1,kc=SyntaxError),kc}var Cc,im;function ik(){return im||(im=1,Cc=URIError),Cc}var Ic,am;function ak(){return am||(am=1,Ic=Math.abs),Ic}var Ac,sm;function sk(){return sm||(sm=1,Ac=Math.floor),Ac}var Pc,lm;function lk(){return lm||(lm=1,Pc=Math.max),Pc}var Oc,cm;function ck(){return cm||(cm=1,Oc=Math.min),Oc}var _c,um;function uk(){return um||(um=1,_c=Math.pow),_c}var Mc,dm;function dk(){return dm||(dm=1,Mc=Math.round),Mc}var Dc,fm;function fk(){return fm||(fm=1,Dc=Number.isNaN||function(t){return t!==t}),Dc}var Nc,pm;function pk(){if(pm)return Nc;pm=1;var e=fk();return Nc=function(n){return e(n)||n===0?n:n<0?-1:1},Nc}var Fc,hm;function hk(){return hm||(hm=1,Fc=Object.getOwnPropertyDescriptor),Fc}var Lc,mm;function gm(){if(mm)return Lc;mm=1;var e=hk();if(e)try{e([],"length")}catch{e=null}return Lc=e,Lc}var Vc,vm;function mk(){if(vm)return Vc;vm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Vc=e,Vc}var $c,ym;function gk(){return ym||(ym=1,$c=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}),$c}var zc,bm;function vk(){if(bm)return zc;bm=1;var e=typeof Symbol<"u"&&Symbol,t=gk();return zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},zc}var jc,xm;function wm(){return xm||(xm=1,jc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jc}var Rc,Sm;function Tm(){if(Sm)return Rc;Sm=1;var e=Jh();return Rc=e.getPrototypeOf||null,Rc}var Bc,Em;function yk(){if(Em)return Bc;Em=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 f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=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 Bc=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,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),v=[],g=0;g<p;g++)v[g]="$"+g;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},Bc}var Hc,km;function Xa(){if(km)return Hc;km=1;var e=yk();return Hc=Function.prototype.bind||e,Hc}var Wc,Cm;function qc(){return Cm||(Cm=1,Wc=Function.prototype.call),Wc}var Uc,Im;function Am(){return Im||(Im=1,Uc=Function.prototype.apply),Uc}var Gc,Pm;function bk(){return Pm||(Pm=1,Gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Gc}var Yc,Om;function xk(){if(Om)return Yc;Om=1;var e=Xa(),t=Am(),n=qc(),r=bk();return Yc=r||e.call(n,t),Yc}var Kc,_m;function Mm(){if(_m)return Kc;_m=1;var e=Xa(),t=Ao(),n=qc(),r=xk();return Kc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Kc}var Zc,Dm;function wk(){if(Dm)return Zc;Dm=1;var e=Mm(),t=gm(),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 Zc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Zc}var Xc,Nm;function Sk(){if(Nm)return Xc;Nm=1;var e=wm(),t=Tm(),n=wk();return Xc=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,Xc}var Qc,Fm;function Tk(){if(Fm)return Qc;Fm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Xa();return Qc=n.call(e,t),Qc}var Jc,Lm;function eu(){if(Lm)return Jc;Lm=1;var e,t=Jh(),n=ek(),r=tk(),o=nk(),i=rk(),a=ok(),s=Ao(),l=ik(),c=ak(),u=sk(),d=lk(),f=ck(),p=uk(),v=dk(),g=pk(),h=Function,y=function(K){try{return h('"use strict"; return ('+K+").constructor;")()}catch{}},b=gm(),x=mk(),S=function(){throw new s},E=b?(function(){try{return arguments.callee,S}catch{try{return b(arguments,"callee").get}catch{return S}}})():S,I=vk()(),w=Sk(),k=Tm(),P=wm(),_=Am(),F=qc(),V={},N=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][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%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%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"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":E,"%TypedArray%":N,"%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%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":g,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(K){var D=w(w(K));O["%Error.prototype%"]=D}var z=function K(X){var de;if(X==="%AsyncFunction%")de=y("async function () {}");else if(X==="%GeneratorFunction%")de=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")de=y("async function* () {}");else if(X==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(de=H.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=K("%AsyncGenerator%");se&&w&&(de=w(se.prototype))}return O[X]=de,de},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"]},C=Xa(),L=Tk(),$=C.call(F,Array.prototype.concat),B=C.call(_,Array.prototype.splice),q=C.call(F,String.prototype.replace),G=C.call(F,String.prototype.slice),W=C.call(F,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,ee=function(X){var de=G(X,0,1),H=G(X,-1);if(de==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&de!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return q(X,J,function(ae,Q,le,te){se[se.length]=le?q(te,re,"$1"):Q||ae}),se},Y=function(X,de){var H=X,se;if(L(M,H)&&(se=M[H],H="%"+se[0]+"%"),L(O,H)){var ae=O[H];if(ae===V&&(ae=z(H)),typeof ae>"u"&&!de)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:H,value:ae}}throw new a("intrinsic "+X+" does not exist!")};return Jc=function(X,de){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new s('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=ee(X),se=H.length>0?H[0]:"",ae=Y("%"+se+"%",de),Q=ae.name,le=ae.value,te=!1,fe=ae.alias;fe&&(se=fe[0],B(H,$([0,1],fe)));for(var pe=1,ve=!0;pe<H.length;pe+=1){var Ae=H[pe],me=G(Ae,0,1),oe=G(Ae,-1);if((me==='"'||me==="'"||me==="`"||oe==='"'||oe==="'"||oe==="`")&&me!==oe)throw new a("property names with quotes must have matching quotes");if((Ae==="constructor"||!ve)&&(te=!0),se+="."+Ae,Q="%"+se+"%",L(O,Q))le=O[Q];else if(le!=null){if(!(Ae in le)){if(!de)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(b&&pe+1>=H.length){var j=b(le,Ae);ve=!!j,ve&&"get"in j&&!("originalValue"in j.get)?le=j.get:le=le[Ae]}else ve=L(le,Ae),le=le[Ae];ve&&!te&&(O[Q]=le)}}return le},Jc}var tu,Vm;function $m(){if(Vm)return tu;Vm=1;var e=eu(),t=Mm(),n=t([e("%String.prototype.indexOf%")]);return tu=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},tu}var nu,zm;function jm(){if(zm)return nu;zm=1;var e=eu(),t=$m(),n=Za(),r=Ao(),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 nu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var v=l(d,p);return c(d)===0&&(d=void 0),v}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,v){d||(d=new o),a(d,p,v)}};return f},nu}var ru,Rm;function Ek(){if(Rm)return ru;Rm=1;var e=eu(),t=$m(),n=Za(),r=jm(),o=Ao(),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 ru=i?function(){var d,f,p={assert:function(v){if(!p.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&f)return f.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):f&&f.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!f&&f.has(v)},set:function(v,g){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,g)):r&&(f||(f=r()),f.set(v,g))}};return p}:r,ru}var ou,Bm;function Hm(){if(Bm)return ou;Bm=1;var e=Ao(),t=Za(),n=JE(),r=jm(),o=Ek(),i=o||r||n;return ou=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},ou}var Wm=e=>Array.isArray(e),iu=e=>e===void 0,au=e=>e===null,kk=Function.bind.call(Function.call,Object.prototype.toString),Ck=e=>!!e&&kk(e)==="[object Error]"||e instanceof Error,qm=(e,t)=>e instanceof t,Ik=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Ak=e=>Object.prototype.toString.call(e)==="[object Date]"&&qm(e,Date),Re={array:Wm,date:Ak,empty:e=>au(e)||iu(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:qm,isError:Ck,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>au(e)||iu(e),null:au,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wm(e)&&typeof e=="object",primitive:Ik,string:e=>typeof e=="string",undefined:iu},Pk=e=>Object.keys(e),Rn=(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},Ok=e=>e.replace(/[^0-9]/g,"");const _k=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Mk=(e,t)=>({classGroupId:e,validator:t}),Um=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qa="-",Gm=[],Dk="arbitrary..",Nk=e=>{const t=Lk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Fk(a);const s=a.split(Qa),l=s[0]===""&&s.length>1?1:0;return Ym(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?_k(c,l):l:c||Gm}return n[a]||Gm}}},Ym=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Ym(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Qa):e.slice(t).join(Qa),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},Fk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Dk+r:void 0})(),Lk=e=>{const{theme:t,classGroups:n}=e;return Vk(n,t)},Vk=(e,t)=>{const n=Um();for(const r in e){const o=e[r];su(o,n,r,t)}return n},su=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];$k(a,t,n,r)}},$k=(e,t,n,r)=>{if(typeof e=="string"){zk(e,t,n);return}if(typeof e=="function"){jk(e,t,n,r);return}Rk(e,t,n,r)},zk=(e,t,n)=>{const r=e===""?t:Km(t,e);r.classGroupId=n},jk=(e,t,n,r)=>{if(Bk(e)){su(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Mk(n,e))},Rk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];su(l,Km(t,s),n,r)}},Km=(e,t)=>{let n=e;const r=t.split(Qa),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=Um(),n.nextPart.set(a,s)),n=s}return n},Bk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Hk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},lu="!",Zm=":",Wk=[],Xm=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),qk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const h=o[g];if(a===0&&s===0){if(h===Zm){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){c=g;continue}}h==="["?a++:h==="]"?a--:h==="("?s++:h===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(lu)?(f=d.slice(0,-1),p=!0):d.startsWith(lu)&&(f=d.slice(1),p=!0);const v=c&&c>l?c-l:void 0;return Xm(i,p,f,v)};if(t){const o=t+Zm,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):Xm(Wk,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Uk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},Gk=e=>({cache:Hk(e.cacheSize),parseClassName:qk(e),sortModifiers:Uk(e),...Nk(e)}),Yk=/\s+/,Kk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(Yk);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?v.substring(0,g):v);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+lu:b,S=x+y;if(a.indexOf(S)>-1)continue;a.push(S);const E=o(y,h);for(let I=0;I<E.length;++I){const w=E[I];a.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},Zk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Qm(n))&&(o&&(o+=" "),o+=r);return o},Qm=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qm(e[r]))&&(n&&(n+=" "),n+=t);return n},Xk=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Gk(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=Kk(l,n);return o(l,u),u};return i=a,(...l)=>i(Zk(...l))},Qk=[],zt=e=>{const t=n=>n[e]||Qk;return t.isThemeGetter=!0,t},Jm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jk=/^\d+\/\d+$/,eC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tC=/\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$/,nC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=e=>Jk.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),vr=e=>!!e&&Number.isInteger(Number(e)),cu=e=>e.endsWith("%")&&We(e.slice(0,-1)),ar=e=>eC.test(e),iC=()=>!0,aC=e=>tC.test(e)&&!nC.test(e),tg=()=>!1,sC=e=>rC.test(e),lC=e=>oC.test(e),cC=e=>!we(e)&&!Se(e),uC=e=>Oo(e,ag,tg),we=e=>Jm.test(e),Yr=e=>Oo(e,sg,aC),uu=e=>Oo(e,mC,We),ng=e=>Oo(e,og,tg),dC=e=>Oo(e,ig,lC),Ja=e=>Oo(e,lg,sC),Se=e=>eg.test(e),Li=e=>_o(e,sg),fC=e=>_o(e,gC),rg=e=>_o(e,og),pC=e=>_o(e,ag),hC=e=>_o(e,ig),es=e=>_o(e,lg,!0),Oo=(e,t,n)=>{const r=Jm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_o=(e,t,n=!1)=>{const r=eg.exec(e);return r?r[1]?t(r[1]):n:!1},og=e=>e==="position"||e==="percentage",ig=e=>e==="image"||e==="url",ag=e=>e==="length"||e==="size"||e==="bg-size",sg=e=>e==="length",mC=e=>e==="number",gC=e=>e==="family-name",lg=e=>e==="shadow",vC=Xk(()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),o=zt("tracking"),i=zt("leading"),a=zt("breakpoint"),s=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),d=zt("inset-shadow"),f=zt("text-shadow"),p=zt("drop-shadow"),v=zt("blur"),g=zt("perspective"),h=zt("aspect"),y=zt("ease"),b=zt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),Se,we],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Se,we,l],P=()=>[Po,"full","auto",...k()],_=()=>[vr,"none","subgrid",Se,we],F=()=>["auto",{span:["full",vr,Se,we]},vr,Se,we],V=()=>[vr,"auto",Se,we],N=()=>["auto","min","max","fr",Se,we],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],M=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Se,we],L=()=>[...S(),rg,ng,{position:[Se,we]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",pC,uC,{size:[Se,we]}],q=()=>[cu,Li,Yr],G=()=>["","none","full",c,Se,we],W=()=>["",We,Li,Yr],J=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[We,cu,rg,ng],Y=()=>["","none",v,Se,we],K=()=>["none",We,Se,we],X=()=>["none",We,Se,we],de=()=>[We,Se,we],H=()=>[Po,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[iC],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[cC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",We],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,we,Se,h]}],container:["container"],columns:[{columns:[We,we,Se,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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[vr,"auto",Se,we]}],basis:[{basis:[Po,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Po,"auto","initial","none",we]}],grow:[{grow:["",We,Se,we]}],shrink:[{shrink:["",We,Se,we]}],order:[{order:[vr,"first","last","none",Se,we]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"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":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"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,Li,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Se,uu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cu,we]}],"font-family":[{font:[fC,we,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,Se,we]}],"line-clamp":[{"line-clamp":[We,"none",Se,uu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Se,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Se,Yr]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[We,"auto",Se,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,we]}],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",Se,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vr,Se,we],radial:["",Se,we],conic:[vr,Se,we]},hC,dC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Se,we]}],"outline-w":[{outline:["",We,Li,Yr]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,es,Ja]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,es,Ja]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[We,Yr]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,es,Ja]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[We,Se,we]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"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":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Se,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,we]}],filter:[{filter:["","none",Se,we]}],blur:[{blur:Y()}],brightness:[{brightness:[We,Se,we]}],contrast:[{contrast:[We,Se,we]}],"drop-shadow":[{"drop-shadow":["","none",p,es,Ja]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",We,Se,we]}],"hue-rotate":[{"hue-rotate":[We,Se,we]}],invert:[{invert:["",We,Se,we]}],saturate:[{saturate:[We,Se,we]}],sepia:[{sepia:["",We,Se,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,we]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[We,Se,we]}],"backdrop-contrast":[{"backdrop-contrast":[We,Se,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Se,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Se,we]}],"backdrop-invert":[{"backdrop-invert":["",We,Se,we]}],"backdrop-opacity":[{"backdrop-opacity":[We,Se,we]}],"backdrop-saturate":[{"backdrop-saturate":[We,Se,we]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Se,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Se,we]}],ease:[{ease:["linear","initial",y,Se,we]}],delay:[{delay:[We,Se,we]}],animate:[{animate:["none",b,Se,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Se,we]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[Se,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",Se,we]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Se,we]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[We,Li,Yr,uu]}],stroke:[{stroke:["none",...C()]}],"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"]}}),sr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},yC=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),du=e=>Re.function(e),Pe=(...e)=>vC(Wh(e)),cg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Vi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},ug=e=>e.scrollHeight>e.clientHeight,$i=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},bC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},dg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,a=o.bottom<=r.bottom,s=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&a&&s&&l},ln=T.forwardRef(function(t,n){const r=t.as||"span";return m.jsx(r,{ref:n,...t,as:void 0})}),xC={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"}},wC=Io("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"}}}),SC=Io("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:xC,defaultVariants:{theme:"primary",size:"default"}}),ts=T.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Pe(SC({size:a,theme:o?"loading":i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:wC({theme:n})}):null,r,s.children]})}),TC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})};var Mt=function(){return Mt=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},Mt.apply(this,arguments)};function fu(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 pu(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 zi=function(e){return e.replace(new RegExp(" ","g")," ")},fg=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)},EC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},pg=function(e,t,n){var r=e.length-2,o=EC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},hg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ns=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},kC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},hu=function(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t},CC=function(e){return e==="money"||e==="currency"},IC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Mt(Mt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},rs=function(e,t){var n=fg(hg(e),t.fraction.length),r="".concat(t.currency).concat(pg(n,t.group,t.decimal));return zi(r)},AC=T.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=fu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=T.useRef(null);T.useImperativeHandle(t,function(){return u.current});var d=T.useMemo(function(){var v=IC(r,i,s);return v.currency=zi("".concat(v.currency.trim()," ")),v.literal=zi(v.literal.trim()),v},[r,i]),f=function(v){var g=rs(v.target.value,d),h=ns(g);v.target.value=g,v.target.setAttribute("data-number",h.toString()),l?.(v),h!==0&&(u.current.selectionEnd=g.length)};T.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var g=rs(v,d),h=ns(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});l?.(Mt(Mt({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var p=c.defaultValue?rs(c.defaultValue,d):void 0;return T.createElement("input",Mt({},c,{value:typeof c.value=="string"?rs(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),PC=1,OC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},_C=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Mt(Mt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},os=function(e,t){var n=fg(hg(e),t.fraction.length),r="".concat(pg(n,t.group,t.decimal)," ").concat(t.percentSign);return zi(r)},MC=T.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=fu(e,["locale","mask","onChange","onKeyUp"]),s=T.useRef(null),l=pu(T.useState(function(){var y,b;return(b=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];T.useImperativeHandle(t,function(){return s.current}),T.useEffect(function(){var y,b=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(os(b,d))},[a.value]);var d=T.useMemo(function(){var y=_C(r);return y.percentSign=zi("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-PC,p=function(y){var b,x=s.current;x&&(x.setSelectionRange(f,f),y&&((b=a.onFocus)===null||b===void 0||b.call(a,y)))},v=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,S=b.selectionEnd,E=x!==S,I=f<x;!E&&I&&p()}i?.(y)},g=function(y){var b=os(y.target.value,d),x=ns(b);u(b),y.target.value=b,y.target.setAttribute("data-number",x.toString()),o?.(y)};T.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var b=os(y,d),x=ns(b);u(b),s.current.value=b,s.current.setAttribute("data-number",x.toString());var S=new InputEvent("change",{});o?.(Mt(Mt({},S),{target:s.current,currentTarget:s.current}))}}},[]),T.useEffect(function(){return p()},[c]);var h=a.defaultValue?os(a.defaultValue,d):void 0;return T.createElement("input",Mt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:p,onKeyUp:v,ref:s,type:"text"}))}),ji={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},DC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=is[i];a===void 0?r.push(i.replace(ji.dots,"\\.").replace(ji.openParenthesis,"\\(").replace(ji.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ji.leadingBars,"\\")},Ri=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return mu(o,n);var i=DC(o);return n?"^".concat(i,"$"):i},NC=function(e){return e.replace(ji.escape,"\\$&")},mu=function(e,t){var n=e.map(function(r){return typeof r=="string"?NC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},is={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]/}},FC=/\d/,mg="(dd) 9dddd-dddd",gg="(dd) dddd-dddd",vg="ddd.ddd.ddd-dd",yg="dd.ddd.ddd/dddd-dd",as=function(e){return e.replace(/\D/g,"")},LC=["2",/[0-3]/,":",/[0-5]/,/\d/],VC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:vg,isoDate:"dddd-dd-dd",cnpj:yg,telephone:gg,cellphone:mg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return as(e).length<=11?vg:yg},int:function(e){return e===void 0&&(e=""),FC.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=as(e);return t.length<11?gg:mg},time:function(e){var t=as(e),n=t[0];return n==="2"?LC:VC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Mt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ri(e,"",!0),infinity:n.infinity},n)},Zt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:as}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function bg(e,t,n,r){var o,i;r===void 0&&(r=is);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],f=a[c];if(d===void 0){s+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(s+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return s}var xg=function(e){return e},$C=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ri(e,n,t));return r.test(n)};function zC(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t.current}var jC=T.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,f=e.as,p=fu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=T.useRef(null);T.useImperativeHandle(t,function(){return v.current});var g=hu(s),h=hu(d),y=hu(u),b=T.useRef($C(u,i,p.value||p.defaultValue)),x=f??"input",S=pu(T.useState(""),2),E=S[0],I=S[1],w=zC(E),k=T.useCallback(function(D,z){var M,C,L=(M=D??z)!==null&&M!==void 0?M:"";if(u===void 0)return L;var $=(C=L?.toString())!==null&&C!==void 0?C:"";return bg($,typeof u=="function"?u($):u,a??xg,c??is)},[a,u,c]),P=pu(T.useState(function(){return k(p.value,p.defaultValue)}),2),_=P[0],F=P[1],V=k(p.defaultValue,p.defaultValue),N=T.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(_);return Array.isArray(D)?mu(D,i):Ri(u,_,i)}return typeof u=="string"?Ri(u,_,i):mu(u,i)},[l,_,i,u]);T.useEffect(function(){if(p.value!==void 0){var D=k(p.value,p.defaultValue);F(D),v.current!==null&&(v.current.value=D)}},[p.value,u,a,p.defaultValue]);var O=function(D){var z,M,C,L,$,B=D.currentTarget,q=D.target.value;if(y.current===void 0)return F(q),(z=h.current)===null||z===void 0||z.call(h,q),(M=g.current)===null||M===void 0||M.call(g,D),d?.(q);var G=new RegExp(Ri(y.current,q,i)),W=(C=B.selectionEnd)!==null&&C!==void 0?C:0,J=function(X,de,H){if(X.type!=="number")return X.setSelectionRange(de,H)};if(r&&b.current&&q.length>=_.length)return B.value=_,J(B,W-1,W-1);var re=!1;q.length<w.length&&(b.current=!1,re=!0),G.test(q)&&(b.current=!0);var ee=W,Y=q[ee-1],K=bg(q,typeof y.current=="function"?y.current(q):y.current,a??xg,c??is);for(B.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==Y;)ee+=1;re?J(B,W,W):J(B,ee,ee),D.target.value=K,I(K),(L=h.current)===null||L===void 0||L.call(h,K),($=g.current)===null||$===void 0||$.call(g,D)};return T.createElement(x,Mt({},p,{ref:v,pattern:N,onChange:O,defaultValue:wg(p.defaultValue)?V:void 0,value:wg(p.value)?k(p.value,p.value):p.value}))}),wg=function(e){return typeof e=="string"},Sg=T.forwardRef(function(e,t){return CC(e.mask)?T.createElement(AC,Mt({},e,{mask:void 0,ref:t})):OC(e.mask)?T.createElement(MC,Mt({},e,{mask:void 0,ref:t})):T.createElement(jC,Mt({},e,{ref:t}))}),on=function(e){return function(t){return T.createElement(Sg,Mt({},e,t))}};on(Zt.cellTelephone),on(Zt.cellphone),on(Zt.cep),on(Zt.cnpj),on(Zt.color),on(Zt.cpf),on(Zt.cpfCnpj),on(Zt.creditCard),on(Zt.date),on(Zt.int),on(Zt.isoDate),on(Zt.telephone),on(Zt.time),on(Zt.uuid);var Tg=T.forwardRef(function(t,n){var r=T.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&kC(Zt,t.mask)?Zt[t.mask]:{mask:t.mask}},[t.mask]),o=Mt(Mt({},t),r);return T.createElement(Sg,Mt({},o,{ref:n}))});const RC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Eg=e=>{const t=BC(e);return t.charAt(0).toUpperCase()+t.slice(1)},kg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),HC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var WC={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"};const qC=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>T.createElement("svg",{ref:l,...WC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:kg("lucide",o),...!i&&!HC(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>T.createElement(c,u)),...Array.isArray(i)?i:[i]]));const at=(e,t)=>{const n=T.forwardRef(({className:r,...o},i)=>T.createElement(qC,{ref:i,iconNode:t,className:kg(`lucide-${RC(Eg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Eg(e),n};const UC=at("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"}]]);const GC=at("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"}]]);const Cg=at("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"}]]);const YC=at("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"}]]);const KC=at("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"}]]);const gu=at("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ZC=at("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const vu=at("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Ig=at("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"}]]);const XC=at("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"}]]);const QC=at("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"}]]);const JC=at("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["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"}]]);const Ag=at("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Pg=at("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Og=at("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const eI=at("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"}]]);const tI=at("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"}]]);const yu=at("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"}]]);const nI=at("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"}]]);const bu=at("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const rI=at("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const oI=at("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const xu=at("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const iI=at("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"}]]);const aI=at("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"}]]);const wu=at("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"}]]);const ss=at("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const sI=at("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"}]]);const lI=at("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"}]]);const Mo=at("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ls={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>)`},yr=(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(yr(a,t,n,s))},[]),_g=(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]:_g(a,t,n,s)}},{}),Mg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},cs=(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)},cI={default:e=>cs(e,{result:Mg.default}),dark:e=>cs(e,{result:Mg.dark})},Do=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},uI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Su=(e,t)=>{const n=yr(e.colors,Do(t?.colors)),r=yr(e.spacing,Do(t?.spacing)),o=yr(e.rounded,Do(t?.rounded)),i=yr(e.shadow,Do(t?.rounded)),a=yr(e.zIndex,Do(t?.zIndex??uI)),s=e.custom?yr(e.custom,Do(t?.customTokens)):[];return n.concat(r,o,s,a,i)},dI=(e,t)=>cs(Su(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),fI=(e,t)=>Su(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),pI=(e,t)=>cs(Su(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),us={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",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",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(T.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"},ds={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Kr=T.createContext({parser:ls.hsla,tweaks:ds,floatingRef:void 0,map:us,locale:void 0}),Pt=()=>{const e=T.useContext(Kr);return e?e.map:us},Tu=()=>{const e=T.useContext(Kr);return e?e.tweaks:ds};function fs(){return typeof window<"u"}function br(e){return ps(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(ps(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ps(e){return fs()?e instanceof Node||e instanceof qt(e).Node:!1}function tt(e){return fs()?e instanceof Element||e instanceof qt(e).Element:!1}function Ot(e){return fs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Bi(e){return!fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const hI=new Set(["inline","contents"]);function Hi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hI.has(o)}const mI=new Set(["table","td","th"]);function gI(e){return mI.has(br(e))}const vI=[":popover-open",":modal"];function hs(e){return vI.some(t=>{try{return e.matches(t)}catch{return!1}})}const yI=["transform","translate","scale","rotate","perspective"],bI=["transform","translate","scale","rotate","perspective","filter"],xI=["paint","layout","strict","content"];function Eu(e){const t=ms(),n=tt(e)?cn(e):e;return yI.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)||bI.some(r=>(n.willChange||"").includes(r))||xI.some(r=>(n.contain||"").includes(r))}function wI(e){let t=cr(e);for(;Ot(t)&&!lr(t);){if(Eu(t))return t;if(hs(t))return null;t=cr(t)}return null}function ms(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const SI=new Set(["html","body","#document"]);function lr(e){return SI.has(br(e))}function cn(e){return qt(e).getComputedStyle(e)}function gs(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(br(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||Bn(e);return Bi(t)?t.host:t}function Dg(e){const t=cr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&Hi(t)?t:Dg(t)}function xr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Dg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=ku(a);return t.concat(a,a.visualViewport||[],Hi(o)?o:[],s&&n?xr(s):[])}return t.concat(o,xr(o,[],n))}function ku(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const TI=["top","right","bottom","left"],Ng=["start","end"],Fg=TI.reduce((e,t)=>e.concat(t,t+"-"+Ng[0],t+"-"+Ng[1]),[]),wr=Math.min,un=Math.max,vs=Math.round,No=Math.floor,Hn=e=>({x:e,y:e}),EI={left:"right",right:"left",bottom:"top",top:"bottom"},kI={start:"end",end:"start"};function Cu(e,t,n){return un(e,wr(t,n))}function Zr(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function Cn(e){return e.split("-")[1]}function Lg(e){return e==="x"?"y":"x"}function Iu(e){return e==="y"?"height":"width"}const CI=new Set(["top","bottom"]);function ur(e){return CI.has(Wn(e))?"y":"x"}function Au(e){return Lg(ur(e))}function Vg(e,t,n){n===void 0&&(n=!1);const r=Cn(e),o=Au(e),i=Iu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bs(a)),[a,bs(a)]}function II(e){const t=bs(e);return[ys(e),t,ys(t)]}function ys(e){return e.replace(/start|end/g,t=>kI[t])}const $g=["left","right"],zg=["right","left"],AI=["top","bottom"],PI=["bottom","top"];function OI(e,t,n){switch(e){case"top":case"bottom":return n?t?zg:$g:t?$g:zg;case"left":case"right":return t?AI:PI;default:return[]}}function _I(e,t,n,r){const o=Cn(e);let i=OI(Wn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(ys)))),i}function bs(e){return e.replace(/left|right|bottom|top/g,t=>EI[t])}function MI(e){return{top:0,right:0,bottom:0,left:0,...e}}function jg(e){return typeof e!="number"?MI(e):{top:e,right:e,bottom:e,left:e}}function xs(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}}var DI=["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])"],ws=DI.join(","),Rg=typeof Element>"u",Fo=Rg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!Rg&&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},Ts=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},NI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Bg=function(t,n,r){if(Ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ws));return n&&Fo.call(t,ws)&&o.unshift(t),o=o.filter(r),o},Hg=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ts(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=Fo.call(a,ws);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ts(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Wg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},qg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||NI(t))&&!Wg(t)?0:t.tabIndex},FI=function(t,n){var r=qg(t);return r<0&&n&&!Wg(t)?0:r},LI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ug=function(t){return t.tagName==="INPUT"},VI=function(t){return Ug(t)&&t.type==="hidden"},$I=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},jI=function(t){if(!t.name)return!0;var n=t.form||Ss(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=zI(o,t.form);return!i||i===t},RI=function(t){return Ug(t)&&t.type==="radio"},BI=function(t){return RI(t)&&!jI(t)},HI=function(t){var n,r=t&&Ss(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=Ss(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},Gg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},WI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fo.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=Ss(t);if(l&&!l.shadowRoot&&o(l)===!0)return Gg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(HI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Gg(t);return!1},qI=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 Fo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Pu=function(t,n){return!(n.disabled||Ts(n)||VI(n)||WI(n,t)||$I(n)||qI(n))},Ou=function(t,n){return!(BI(n)||qg(n)<0||!Pu(t,n))},UI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},GI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=FI(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(LI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Es=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Hg([t],n.includeContainer,{filter:Ou.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:UI}):r=Bg(t,n.includeContainer,Ou.bind(null,n)),GI(r)},YI=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Hg([t],n.includeContainer,{filter:Pu.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Bg(t,n.includeContainer,Pu.bind(null,n)),r},Yg=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fo.call(t,ws)===!1?!1:Ou(n,t)};function _u(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Kg(){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 Zg(){return/apple/i.test(navigator.vendor)}function Mu(){const e=/android/i;return e.test(_u())||e.test(Kg())}function KI(){return _u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Xg(){return Kg().includes("jsdom/")}const Qg="data-floating-ui-focusable",ZI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Du="ArrowLeft",Nu="ArrowRight",XI="ArrowUp",QI="ArrowDown";function qn(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 Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fu(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 JI(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function Lu(e){return Ot(e)&&e.matches(ZI)}function Vu(e){return e?e.getAttribute("role")==="combobox"&&Lu(e):!1}function eA(e){if(!e||Xg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ks(e){return e?e.hasAttribute(Qg)?e:e.querySelector("["+Qg+"]")||e:null}function Xr(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,...Xr(e,o.id,n)])}function tA(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Xr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Jg(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 Gt(e){e.preventDefault(),e.stopPropagation()}function nA(e){return"nativeEvent"in e}function ev(e){return e.mozInputSource===0&&e.isTrusted?!0:Mu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function tv(e){return Xg()?!1:!Mu()&&e.width===0&&e.height===0||Mu()&&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 Lo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var rA=typeof document<"u",oA=function(){},nt=rA?T.useLayoutEffect:oA;const iA={...A};function Wt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const aA=iA.useInsertionEffect||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return aA(()=>{t.current=e}),A.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 Cs(e,t,n){return Math.floor(e/t)!==n}function Wi(e,t){return t<0||t>=e.current.length}function $u(e,t){return Xt(e,{disabledIndices:t})}function nv(e,t){return Xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xt(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&&Is(e,a,o));return a}function sA(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,f=u;if(n.key===XI){if(d&&Gt(n),u===-1)f=c;else if(f=Xt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const p=u%a,v=c%a,g=c-(v-p);v===p?f=c:f=v>p?g:g-a}Wi(e,f)&&(f=u)}if(n.key===QI&&(d&&Gt(n),u===-1?f=l:(f=Xt(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Xt(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Wi(e,f)&&(f=u)),r==="both"){const p=No(u/a);n.key===(i?Du:Nu)&&(d&&Gt(n),u%a!==a-1?(f=Xt(e,{startingIndex:u,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s})),Cs(f,a,p)&&(f=u)),n.key===(i?Nu:Du)&&(d&&Gt(n),u%a!==0?(f=Xt(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Cs(f,a,p)&&(f=u));const v=No(c/a)===p;Wi(e,f)&&(o&&v?f=n.key===(i?Nu:Du)?c:Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}):f=u)}return f}function lA(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 f=0;f<l;f++)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function cA(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 uA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Is(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 qi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rv(e,t){const n=Es(e,qi()),r=n.length;if(r===0)return;const o=qn(Ut(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function ov(e){return rv(Ut(e).body,1)||e}function iv(e){return rv(Ut(e).body,-1)||e}function Ui(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function dA(e){Es(e,qi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function av(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 sv(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),a=Au(t),s=Iu(a),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Cn(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const fA=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}=sv(c,r,l),f=r,p={},v=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x:b,y:x,data:S,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=x??d,p={...p,[h]:{...p[h],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=sv(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function As(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:f=!1,padding:p=0}=Zr(t,e),v=jg(p),h=s[f?d==="floating"?"reference":"floating":d],y=xs(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})),b=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)),S=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},E=xs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-E.top+v.top)/S.y,bottom:(E.bottom-y.bottom+v.bottom)/S.y,left:(y.left-E.left+v.left)/S.x,right:(E.right-y.right+v.right)/S.x}}const pA=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}=Zr(e,t)||{};if(c==null)return{};const d=jg(u),f={x:n,y:r},p=Au(o),v=Iu(p),g=await a.getDimensions(c),h=p==="y",y=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[p]-f[p]-i.floating[v],E=f[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(a.isElement==null?void 0:a.isElement(I)))&&(w=s.floating[x]||i.floating[v]);const k=S/2-E/2,P=w/2-g[v]/2-1,_=wr(d[y],P),F=wr(d[b],P),V=_,N=w-g[v]-F,O=w/2-g[v]/2+k,D=Cu(V,O,N),z=!l.arrow&&Cn(o)!=null&&O!==D&&i.reference[v]/2-(O<V?_:F)-g[v]/2<0,M=z?O<V?O-V:O-N:0;return{[p]:f[p]+M,data:{[p]:D,centerOffset:O-D-M,...z&&{alignmentOffset:M}},reset:z}}});function hA(e,t,n){return(e?[...n.filter(o=>Cn(o)===e),...n.filter(o=>Cn(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?Cn(o)===e||(t?ys(o)!==o:!1):!0)}const mA=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:f=Fg,autoAlignment:p=!0,...v}=Zr(e,t),g=d!==void 0||f===Fg?hA(d||null,p,f):f,h=await As(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,b=g[y];if(b==null)return{};const x=Vg(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==b)return{reset:{placement:g[0]}};const S=[h[Wn(b)],h[x[0]],h[x[1]]],E=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:S}],I=g[y+1];if(I)return{data:{index:y+1,overflows:E},reset:{placement:I}};const w=E.map(_=>{const F=Cn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce((V,N)=>V+N,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,Cn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==s?{data:{index:y+1,overflows:E},reset:{placement:P}}:{}}}},gA=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:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=Zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),b=ur(s),x=Wn(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!g?[bs(s)]:II(s)),I=v!=="none";!f&&I&&E.push(..._I(s,g,v,S));const w=[s,...E],k=await As(t,h),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[y]),d){const O=Vg(o,a,S);P.push(k[O[0]],k[O[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(O=>O<=0)){var F,V;const O=(((F=i.flip)==null?void 0:F.index)||0)+1,D=w[O];if(D&&(!(d==="alignment"?b!==ur(D):!1)||_.every(C=>ur(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:O,overflows:_},reset:{placement:D}};let z=(V=_.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:V.placement;if(!z)switch(p){case"bestFit":{var N;const M=(N=_.filter(C=>{if(I){const L=ur(C.placement);return L===b||L==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,$)=>L+$,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:N[0];M&&(z=M);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}},vA=new Set(["left","top"]);async function yA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wn(n),s=Cn(n),l=ur(n)==="y",c=vA.has(a)?-1:1,u=i&&l?-1:1,d=Zr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const bA=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 yA(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}}}}},xA=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:y,y:b}=h;return{x:y,y:b}}},...l}=Zr(e,t),c={x:n,y:r},u=await As(t,l),d=ur(Wn(o)),f=Lg(d);let p=c[f],v=c[d];if(i){const h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[h],x=p-u[y];p=Cu(b,p,x)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[h],x=v-u[y];v=Cu(b,v,x)}const g=s.fn({...t,[f]:p,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:a}}}}}},wA=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}=Zr(e,t),u=await As(t,c),d=Wn(o),f=Cn(o),p=ur(o)==="y",{width:v,height:g}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const b=g-u.top-u.bottom,x=v-u.left-u.right,S=wr(g-u[h],b),E=wr(v-u[y],x),I=!t.middlewareData.shift;let w=S,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const _=un(u.left,0),F=un(u.right,0),V=un(u.top,0),N=un(u.bottom,0);p?k=v-2*(_!==0||F!==0?_+F:un(u.left,u.right)):w=g-2*(V!==0||N!==0?V+N:un(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const P=await a.getDimensions(s.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function lv(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=vs(n)!==i||vs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function zu(e){return tt(e)?e:e.contextElement}function Vo(e){const t=zu(e);if(!Ot(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=lv(t);let a=(i?vs(n.width):n.width)/r,s=(i?vs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const SA=Hn(0);function cv(e){const t=qt(e);return!ms()||!t.visualViewport?SA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let a=Hn(1);t&&(r?tt(r)&&(a=Vo(r)):a=Vo(e));const s=TA(i,n,r)?cv(i):Hn(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 f=qt(i),p=r&&tt(r)?qt(r):r;let v=f,g=ku(v);for(;g&&r&&p!==v;){const h=Vo(g),y=g.getBoundingClientRect(),b=cn(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,S=y.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=S,v=qt(g),g=ku(v)}}return xs({width:u,height:d,x:l,y:c})}function Ps(e,t){const n=gs(e).scrollLeft;return t?t.left+n:Qr(Bn(e)).left+n}function uv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ps(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function EA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Bn(r),s=t?hs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Ot(r);if((d||!d&&!i)&&((br(r)!=="body"||Hi(a))&&(l=gs(r)),Ot(r))){const p=Qr(r);c=Vo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!i?uv(a,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function kA(e){return Array.from(e.getClientRects())}function CA(e){const t=Bn(e),n=gs(e),r=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ps(e);const s=-n.scrollTop;return cn(r).direction==="rtl"&&(a+=un(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const dv=25;function IA(e,t){const n=qt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=ms();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ps(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-p);v<=dv&&(i-=v)}else c<=dv&&(i+=c);return{width:i,height:a,x:s,y:l}}const AA=new Set(["absolute","fixed"]);function PA(e,t){const n=Qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?Vo(e):Hn(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 fv(e,t,n){let r;if(t==="viewport")r=IA(e,n);else if(t==="document")r=CA(Bn(e));else if(tt(t))r=PA(t,n);else{const o=cv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xs(r)}function pv(e,t){const n=cr(e);return n===t||!tt(n)||lr(n)?!1:cn(n).position==="fixed"||pv(n,t)}function OA(e,t){const n=t.get(e);if(n)return n;let r=xr(e,[],!1).filter(s=>tt(s)&&br(s)!=="body"),o=null;const i=cn(e).position==="fixed";let a=i?cr(e):e;for(;tt(a)&&!lr(a);){const s=cn(a),l=Eu(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&AA.has(o.position)||Hi(a)&&!l&&pv(e,a))?r=r.filter(u=>u!==a):o=s,a=cr(a)}return t.set(e,r),r}function _A(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?hs(t)?[]:OA(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=fv(t,u,o);return c.top=un(d.top,c.top),c.right=wr(d.right,c.right),c.bottom=wr(d.bottom,c.bottom),c.left=un(d.left,c.left),c},fv(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function MA(e){const{width:t,height:n}=lv(e);return{width:t,height:n}}function DA(e,t,n){const r=Ot(t),o=Bn(t),i=n==="fixed",a=Qr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Ps(o)}if(r||!r&&!i)if((br(t)!=="body"||Hi(o))&&(s=gs(t)),r){const p=Qr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?uv(o,s):Hn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function ju(e){return cn(e).position==="static"}function hv(e,t){if(!Ot(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function mv(e,t){const n=qt(e);if(hs(e))return n;if(!Ot(e)){let o=cr(e);for(;o&&!lr(o);){if(tt(o)&&!ju(o))return o;o=cr(o)}return n}let r=hv(e,t);for(;r&&gI(r)&&ju(r);)r=hv(r,t);return r&&lr(r)&&ju(r)&&!Eu(r)?n:r||wI(e)||n}const NA=async function(e){const t=this.getOffsetParent||mv,n=this.getDimensions,r=await n(e.floating);return{reference:DA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FA(e){return cn(e).direction==="rtl"}const LA={convertOffsetParentRelativeRectToViewportRelativeRect:EA,getDocumentElement:Bn,getClippingRect:_A,getOffsetParent:mv,getElementRects:NA,getClientRects:kA,getDimensions:MA,getScale:Vo,isElement:tt,isRTL:FA};function gv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VA(e,t){let n=null,r;const o=Bn(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:f,height:p}=c;if(s||t(),!f||!p)return;const v=No(d),g=No(o.clientWidth-(u+f)),h=No(o.clientHeight-(d+p)),y=No(u),x={rootMargin:-v+"px "+-g+"px "+-h+"px "+-y+"px",threshold:un(0,wr(1,l))||1};let S=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!S)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!gv(c,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return a(!0),i}function Jr(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=zu(e),u=o||i?[...c?xr(c):[],...xr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?VA(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?Qr(e):null;l&&h();function h(){const y=Qr(e);g&&!gv(g,y)&&n(),g=y,v=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const $A=bA,zA=mA,jA=xA,RA=gA,BA=wA,vv=pA,HA=(e,t,n)=>{const r=new Map,o={platform:LA,...n},i={...o.platform,_c:r};return fA(e,t,{...o,platform:i})};var WA=typeof document<"u",qA=function(){},Os=WA?T.useLayoutEffect:qA;function _s(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(!_s(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)&&!_s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function yv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bv(e,t){const n=yv(e);return Math.round(t*n)/n}function Ru(e){const t=A.useRef(e);return Os(()=>{t.current=e}),t}function UA(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]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=A.useState(r);_s(f,r)||p(r);const[v,g]=A.useState(null),[h,y]=A.useState(null),b=A.useCallback(C=>{C!==I.current&&(I.current=C,g(C))},[]),x=A.useCallback(C=>{C!==w.current&&(w.current=C,y(C))},[]),S=i||v,E=a||h,I=A.useRef(null),w=A.useRef(null),k=A.useRef(u),P=l!=null,_=Ru(l),F=Ru(o),V=Ru(c),N=A.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};F.current&&(C.platform=F.current),HA(I.current,w.current,C).then(L=>{const $={...L,isPositioned:V.current!==!1};O.current&&!_s(k.current,$)&&(k.current=$,jn.flushSync(()=>{d($)}))})},[f,t,n,F,V]);Os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const O=A.useRef(!1);Os(()=>(O.current=!0,()=>{O.current=!1}),[]),Os(()=>{if(S&&(I.current=S),E&&(w.current=E),S&&E){if(_.current)return _.current(S,E,N);N()}},[S,E,N,_,P]);const D=A.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=A.useMemo(()=>({reference:S,floating:E}),[S,E]),M=A.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const L=bv(z.floating,u.x),$=bv(z.floating,u.y);return s?{...C,transform:"translate("+L+"px, "+$+"px)",...yv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:$}},[n,s,z.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:N,refs:D,elements:z,floatingStyles:M}),[u,N,D,z,M])}const GA=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?vv({element:r.current,padding:o}).fn(n):{}:r?vv({element:r,padding:o}).fn(n):{}}}},$o=(e,t)=>({...$A(e),options:[e,t]}),Ms=(e,t)=>({...jA(e),options:[e,t]}),Ds=(e,t)=>({...RA(e),options:[e,t]}),xv=(e,t)=>({...BA(e),options:[e,t]}),wv=(e,t)=>({...zA(e),options:[e,t]}),Bu=(e,t)=>({...GA(e),options:[e,t]});function YA(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 Sv=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function KA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Set),a=A.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=A.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=A.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(YA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return m.jsx(Sv.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function Tv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(Sv),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var f;const p=t!==void 0;a.current[s]=p?t:(f=d?.textContent)!=null?f:null}},[s,i,a,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const ZA="data-floating-ui-focusable",Ev="active",kv="selected",Gi="ArrowLeft",Yi="ArrowRight",Cv="ArrowUp",Ns="ArrowDown",XA={...A};let Iv=!1,QA=0;const Av=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+QA++;function JA(){const[e,t]=A.useState(()=>Iv?Av():void 0);return nt(()=>{e==null&&t(Av())},[]),A.useEffect(()=>{Iv=!0},[]),e}const Ki=XA.useId||JA;let Zi;process.env.NODE_ENV!=="production"&&(Zi=new Set);function Fs(){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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.warn(o)}}function eP(){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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.error(o)}}const Hu=A.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:f,d:p,style:{transform:v,...g}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||Fs("The `ref` prop is required for `FloatingArrow`."));const y=Ki(),[b,x]=A.useState(!1);if(nt(()=>{if(!o)return;cn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[S,E]=r.split("-"),I=S==="top"||S==="bottom";let w=d;(I&&a!=null&&a.x||!I&&a!=null&&a.y)&&(w=null);const k=u*2,P=k/2,_=s/2*(c/-8+1),F=l/2*c/4,V=!!p,N=w&&E==="end"?"bottom":"top";let O=w&&E==="end"?"right":"left";w&&b&&(O=E==="end"?"left":"right");const D=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",C={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[S];return m.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:V?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[O]:D,[N]:z,[S]:I||V?"100%":"calc(100% - "+k/2+"px)",transform:[C,v].filter(L=>!!L).join(" "),...g},children:[k>0&&m.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:M}),m.jsx("path",{stroke:k&&!p?h.fill:"none",d:M}),m.jsx("clipPath",{id:y,children:m.jsx("rect",{x:-P,y:P*(V?-1:1),width:s+k,height:s})})]})});function Pv(){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 Ov=A.createContext(null),_v=A.createContext(null),Sr=()=>{var e;return((e=A.useContext(Ov))==null?void 0:e.id)||null},Tr=()=>A.useContext(_v);function tP(e){const t=Ki(),n=Tr(),o=Sr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function nP(e){const{children:t,id:n}=e,r=Sr();return m.jsx(Ov.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function rP(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(a=>{n.current=[...n.current,a]},[]),o=A.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=A.useState(()=>Pv());return m.jsx(_v.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function eo(e){return"data-floating-ui-"+e}function Yt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Mv=eo("safe-polygon");function Wu(e,t,n){if(n&&!Lo(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 qu(e){return typeof e=="function"?e():e}function Dv(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:f=!0}=t,p=Tr(),v=Sr(),g=Wt(c),h=Wt(l),y=Wt(n),b=Wt(d),x=A.useRef(),S=A.useRef(-1),E=A.useRef(),I=A.useRef(-1),w=A.useRef(!0),k=A.useRef(!1),P=A.useRef(()=>{}),_=A.useRef(!1),F=kt(()=>{var M;const C=(M=o.current.openEvent)==null?void 0:M.type;return C?.includes("mouse")&&C!=="mousedown"});A.useEffect(()=>{if(!s)return;function M(C){let{open:L}=C;L||(Yt(S),Yt(I),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!g.current||!n)return;function M(L){F()&&r(!1,L,"hover")}const C=Ut(a.floating).documentElement;return C.addEventListener("mouseleave",M),()=>{C.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,F]);const V=A.useCallback(function(M,C,L){C===void 0&&(C=!0),L===void 0&&(L="hover");const $=Wu(h.current,"close",x.current);$&&!E.current?(Yt(S),S.current=window.setTimeout(()=>r(!1,M,L),$)):C&&(Yt(S),r(!1,M,L))},[h,r]),N=kt(()=>{P.current(),E.current=void 0}),O=kt(()=>{if(k.current){const M=Ut(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Mv),k.current=!1}}),D=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function M(q){if(Yt(S),w.current=!1,u&&!Lo(x.current)||qu(b.current)>0&&!Wu(h.current,"open"))return;const G=Wu(h.current,"open",x.current);G?S.current=window.setTimeout(()=>{y.current||r(!0,q,"hover")},G):n||r(!0,q,"hover")}function C(q){if(D()){O();return}P.current();const G=Ut(a.floating);if(Yt(I),_.current=!1,g.current&&o.current.floatingContext){n||Yt(S),E.current=g.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q,!0,"safe-polygon")}});const J=E.current;G.addEventListener("mousemove",J),P.current=()=>{G.removeEventListener("mousemove",J)};return}(x.current!=="touch"||!Ht(a.floating,q.relatedTarget))&&V(q)}function L(q){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q)}})(q))}function $(){Yt(S)}function B(q){D()||V(q,!1)}if(tt(a.domReference)){const q=a.domReference,G=a.floating;return n&&q.addEventListener("mouseleave",L),f&&q.addEventListener("mousemove",M,{once:!0}),q.addEventListener("mouseenter",M),q.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",L),G.addEventListener("mouseenter",$),G.addEventListener("mouseleave",B)),()=>{n&&q.removeEventListener("mouseleave",L),f&&q.removeEventListener("mousemove",M),q.removeEventListener("mouseenter",M),q.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",L),G.removeEventListener("mouseenter",$),G.removeEventListener("mouseleave",B))}}},[a,s,e,u,f,V,N,O,r,n,y,p,h,g,o,D,b]),nt(()=>{var M;if(s&&n&&(M=g.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){k.current=!0;const L=a.floating;if(tt(a.domReference)&&L){var C;const $=Ut(a.floating).body;$.setAttribute(Mv,"");const B=a.domReference,q=p==null||(C=p.nodesRef.current.find(G=>G.id===v))==null||(C=C.context)==null?void 0:C.elements.floating;return q&&(q.style.pointerEvents=""),$.style.pointerEvents="none",B.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{$.style.pointerEvents="",B.style.pointerEvents="",L.style.pointerEvents=""}}}},[s,n,v,a,p,g,F]),nt(()=>{n||(x.current=void 0,_.current=!1,N(),O())},[n,N,O]),A.useEffect(()=>()=>{N(),Yt(S),Yt(I),O()},[s,a.domReference,N,O]);const z=A.useMemo(()=>{function M(C){x.current=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:L}=C;function $(){!w.current&&!y.current&&r(!0,L,"hover")}u&&!Lo(x.current)||n||qu(b.current)===0||_.current&&C.movementX**2+C.movementY**2<2||(Yt(I),x.current==="touch"?$():(_.current=!0,I.current=window.setTimeout($,qu(b.current))))}}},[u,r,n,y,b]);return A.useMemo(()=>s?{reference:z}:{},[s,z])}let Nv=0;function to(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Nv);const i=()=>e?.focus({preventScroll:n});o?i():Nv=requestAnimationFrame(i)}function Uu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function oP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iP(e){return e?.ownerDocument||document}const zo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Fv(e){return e==="inert"?zo.inert:e==="aria-hidden"?zo["aria-hidden"]:zo.none}let Ls=new WeakSet,Vs={},Gu=0;const aP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Lv=e=>e&&(e.host||Lv(e.parentNode)),sP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Lv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function lP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=sP(t,e),s=new Set,l=new Set(a),c=[];Vs[o]||(Vs[o]=new WeakMap);const u=Vs[o];a.forEach(d),f(t),s.clear();function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(br(v)!=="script")if(s.has(v))f(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",y=Fv(i),b=(y.get(v)||0)+1,x=(u.get(v)||0)+1;y.set(v,b),u.set(v,x),c.push(v),b===1&&h&&Ls.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Gu++,()=>{c.forEach(p=>{const v=Fv(i),h=(v.get(p)||0)-1,y=(u.get(p)||0)-1;v.set(p,h),u.set(p,y),h||(!Ls.has(p)&&i&&p.removeAttribute(i),Ls.delete(p)),y||p.removeAttribute(o)}),Gu--,Gu||(zo.inert=new WeakMap,zo["aria-hidden"]=new WeakMap,zo.none=new WeakMap,Ls=new WeakSet,Vs={})}}function Vv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=iP(e[0]).body;return lP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const $s={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},zs=A.forwardRef(function(t,n){const[r,o]=A.useState();nt(()=>{Zg()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[eo("focus-guard")]:"",style:$s};return m.jsx("span",{...t,...i})}),$v=A.createContext(null),zv=eo("portal");function cP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ki(),o=jv(),[i,a]=A.useState(null),s=A.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),nt(()=>{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(zv,""),l.appendChild(c),s.current=c,a(c)},[t,r]),nt(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!ps(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(zv,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function dr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=cP({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=a?.modal,p=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function g(h){i&&Ui(h)&&(h.type==="focusin"?av:dA)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,f]),A.useEffect(()=>{i&&(p||av(i))},[p,i]),m.jsxs($v.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&m.jsx(zs,{"data-type":"outside",ref:l,onFocus:g=>{if(Ui(g,i)){var h;(h=u.current)==null||h.focus()}else{const y=a?a.domReference:null,b=iv(y);b?.focus()}}}),v&&i&&m.jsx("span",{"aria-owns":i.id,style:$s}),i&&jn.createPortal(t,i),v&&i&&m.jsx(zs,{"data-type":"outside",ref:c,onFocus:g=>{if(Ui(g,i)){var h;(h=d.current)==null||h.focus()}else{const y=a?a.domReference:null,b=ov(y);b?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const jv=()=>A.useContext($v);function Rv(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const uP=20;let Er=[];function Yu(){Er=Er.filter(e=>e.isConnected)}function dP(e){Yu(),e&&br(e)!=="body"&&(Er.push(e),Er.length>uP&&(Er=Er.slice(-20)))}function Bv(){return Yu(),Er[Er.length-1]}function fP(e){const t=qi();return Yg(e,t)?e:Es(e,t)[0]||e}function Hv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=qi(),i=YI(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Yg(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 pP=A.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:$s})});function no(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:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:h,dataRef:y,elements:{domReference:b,floating:x}}=t,S=kt(()=>{var H;return(H=y.current.floatingContext)==null?void 0:H.nodeId}),E=kt(p),I=typeof a=="number"&&a<0,w=Vu(b)&&I,k=aP(),P=k?i:!0,_=!P||k&&f,F=Wt(o),V=Wt(a),N=Wt(s),O=Tr(),D=jv(),z=A.useRef(null),M=A.useRef(null),C=A.useRef(!1),L=A.useRef(!1),$=A.useRef(-1),B=A.useRef(-1),q=D!=null,G=ks(x),W=kt(function(H){return H===void 0&&(H=G),H?Es(H,qi()):[]}),J=kt(H=>{const se=W(H);return F.current.map(ae=>b&&ae==="reference"?b:G&&ae==="floating"?G:se).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function H(ae){if(ae.key==="Tab"){Ht(G,qn(Ut(G)))&&W().length===0&&!w&&Gt(ae);const Q=J(),le=Un(ae);F.current[0]==="reference"&&le===b&&(Gt(ae),ae.shiftKey?to(Q[Q.length-1]):to(Q[1])),F.current[1]==="floating"&&le===G&&ae.shiftKey&&(Gt(ae),to(Q[0]))}}const se=Ut(G);return se.addEventListener("keydown",H),()=>{se.removeEventListener("keydown",H)}},[r,b,G,c,F,w,W,J]),A.useEffect(()=>{if(r||!x)return;function H(se){const ae=Un(se),le=W().indexOf(ae);le!==-1&&($.current=le)}return x.addEventListener("focusin",H),()=>{x.removeEventListener("focusin",H)}},[r,x,W]),A.useEffect(()=>{if(r||!d)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function se(le){const te=le.relatedTarget,fe=le.currentTarget,pe=Un(le);queueMicrotask(()=>{const ve=S(),Ae=!(Ht(b,te)||Ht(x,te)||Ht(te,x)||Ht(D?.portalNode,te)||te!=null&&te.hasAttribute(eo("focus-guard"))||O&&(Xr(O.nodesRef.current,ve).find(me=>{var oe,j;return Ht((oe=me.context)==null?void 0:oe.elements.floating,te)||Ht((j=me.context)==null?void 0:j.elements.domReference,te)})||Jg(O.nodesRef.current,ve).find(me=>{var oe,j,R;return[(oe=me.context)==null?void 0:oe.elements.floating,ks((j=me.context)==null?void 0:j.elements.floating)].includes(te)||((R=me.context)==null?void 0:R.elements.domReference)===te})));if(fe===b&&G&&Hv(G,F),l&&fe!==b&&!(pe!=null&&pe.isConnected)&&qn(Ut(G))===Ut(G).body){Ot(G)&&G.focus();const me=$.current,oe=W(),j=oe[me]||oe[oe.length-1]||G;Ot(j)&&j.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&te&&Ae&&!L.current&&te!==Bv()&&(C.current=!0,g(!1,le,"focus-out"))})}const ae=!!(!O&&D);function Q(){Yt(B),y.current.insideReactTree=!0,B.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(x&&Ot(b))return b.addEventListener("focusout",se),b.addEventListener("pointerdown",H),x.addEventListener("focusout",se),ae&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",se),b.removeEventListener("pointerdown",H),x.removeEventListener("focusout",se),ae&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,O,D,g,d,l,W,w,S,F,y]);const re=A.useRef(null),ee=A.useRef(null),Y=Rv([re,D?.beforeInsideRef]),K=Rv([ee,D?.afterInsideRef]);A.useEffect(()=>{var H,se;if(r||!x)return;const ae=Array.from((D==null||(H=D.portalNode)==null?void 0:H.querySelectorAll("["+eo("portal")+"]"))||[]),le=(se=(O?Jg(O.nodesRef.current,S()):[]).find(pe=>{var ve;return Vu(((ve=pe.context)==null?void 0:ve.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,te=[x,le,...ae,...E(),z.current,M.current,re.current,ee.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,F.current.includes("reference")||w?b:null].filter(pe=>pe!=null),fe=c||w?Vv(te,!_,_):Vv(te);return()=>{fe()}},[r,b,x,c,F,D,w,P,_,O,S,E]),nt(()=>{if(r||!Ot(G))return;const H=Ut(G),se=qn(H);queueMicrotask(()=>{const ae=J(G),Q=V.current,le=(typeof Q=="number"?ae[Q]:Q.current)||G,te=Ht(G,se);!I&&!te&&v&&to(le,{preventScroll:le===G})})},[r,v,G,I,J,V]),nt(()=>{if(r||!G)return;const H=Ut(G),se=qn(H);dP(se);function ae(te){let{reason:fe,event:pe,nested:ve}=te;if(["hover","safe-polygon"].includes(fe)&&pe.type==="mouseleave"&&(C.current=!0),fe==="outside-press")if(ve)C.current=!1;else if(ev(pe)||tv(pe))C.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?C.current=!1:C.current=!0}}h.on("openchange",ae);const Q=H.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,$s),q&&b&&b.insertAdjacentElement("afterend",Q);function le(){if(typeof N.current=="boolean"){const te=b||Bv();return te&&te.isConnected?te:Q}return N.current.current||Q}return()=>{h.off("openchange",ae);const te=qn(H),fe=Ht(x,te)||O&&Xr(O.nodesRef.current,S(),!1).some(ve=>{var Ae;return Ht((Ae=ve.context)==null?void 0:Ae.elements.floating,te)}),pe=le();queueMicrotask(()=>{const ve=fP(pe);N.current&&!C.current&&Ot(ve)&&(!(ve!==te&&te!==H.body)||fe)&&ve.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,N,y,h,O,q,b,S]),A.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(Yu)}),[r]),nt(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:b}),()=>{D.setFocusManagerState(null)}},[r,D,c,v,g,d,b]),nt(()=>{r||G&&Hv(G,F)},[r,G,F]);function X(H){return r||!u||!c?null:m.jsx(pP,{ref:H==="start"?z:M,onClick:se=>g(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const de=!r&&P&&(c?!w:!0)&&(q||c);return m.jsxs(m.Fragment,{children:[de&&m.jsx(zs,{"data-type":"inside",ref:Y,onFocus:H=>{if(c){const ae=J();to(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(C.current=!1,Ui(H,D.portalNode)){const ae=ov(b);ae?.focus()}else{var se;(se=D.beforeOutsideRef.current)==null||se.focus()}}}),!w&&X("start"),n,X("end"),de&&m.jsx(zs,{"data-type":"inside",ref:K,onFocus:H=>{if(c)to(J()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(C.current=!0),Ui(H,D.portalNode)){const ae=iv(b);ae?.focus()}else{var se;(se=D.afterOutsideRef.current)==null||se.focus()}}})]})}let js=0;const Wv="--floating-ui-scrollbar-width";function hP(){const e=_u(),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(Wv,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(Wv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let qv=()=>{};const Ku=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return js++,js===1&&(qv=hP()),()=>{js--,js===0&&qv()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Uv(e){return Ot(e.target)&&e.target.tagName==="BUTTON"}function mP(e){return Ot(e.target)&&e.target.tagName==="A"}function Gv(e){return Lu(e)}function jo(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,f=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current;g.button===0&&s!=="click"&&(Lo(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=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Lo(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){f.current=void 0,!(g.defaultPrevented||!u||Uv(g))&&(g.key===" "&&!Gv(i)&&(g.preventDefault(),p.current=!0),!mP(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||Uv(g)||Gv(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:v}:{},[a,v])}function gP(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,f=a.x,p=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=s&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Yv(e){return e!=null&&e.clientX!=null}function vP(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=A.useRef(!1),f=A.useRef(null),[p,v]=A.useState(),[g,h]=A.useState([]),y=kt((I,w)=>{d.current||r.current.openEvent&&!Yv(r.current.openEvent)||a.setPositionReference(gP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||h([]):y(I.clientX,I.clientY))}),x=Lo(p)?o:n,S=A.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const I=qt(o);function w(k){const P=Un(k);Ht(o,P)?(I.removeEventListener("mousemove",w),f.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||Yv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,y]);A.useEffect(()=>S(),[S,g]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),nt(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const E=A.useMemo(()=>{function I(w){let{pointerType:k}=w;v(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return A.useMemo(()=>s?{reference:E}:{},[s,E])}const yP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},bP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Kv=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 kr(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:f=!1,bubbles:p,capture:v}=t,g=Tr(),h=kt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,b=A.useRef(!1),{escapeKey:x,outsidePress:S}=Kv(p),{escapeKey:E,outsidePress:I}=Kv(v),w=A.useRef(!1),k=kt(O=>{var D;if(!n||!a||!s||O.key!=="Escape"||w.current)return;const z=(D=i.current.floatingContext)==null?void 0:D.nodeId,M=g?Xr(g.nodesRef.current,z):[];if(!x&&(O.stopPropagation(),M.length>0)){let C=!0;if(M.forEach(L=>{var $;if(($=L.context)!=null&&$.open&&!L.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,nA(O)?O.nativeEvent:O,"escape-key")}),P=kt(O=>{var D;const z=()=>{var M;k(O),(M=Un(O))==null||M.removeEventListener("keydown",z)};(D=Un(O))==null||D.addEventListener("keydown",z)}),_=kt(O=>{var D;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof y=="function"&&!y(O))return;const C=Un(O),L="["+eo("inert")+"]",$=Ut(o.floating).querySelectorAll(L);let B=tt(C)?C:null;for(;B&&!lr(B);){const J=cr(B);if(lr(J)||!tt(J))break;B=J}if($.length&&tt(C)&&!JI(C)&&!Ht(C,o.floating)&&Array.from($).every(J=>!Ht(B,J)))return;if(Ot(C)&&N){const J=lr(C),re=cn(C),ee=/auto|scroll/,Y=J||ee.test(re.overflowX),K=J||ee.test(re.overflowY),X=Y&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,de=K&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,H=re.direction==="rtl",se=de&&(H?O.offsetX<=C.offsetWidth-C.clientWidth:O.offsetX>C.clientWidth),ae=X&&O.offsetY>C.clientHeight;if(se||ae)return}const q=(D=i.current.floatingContext)==null?void 0:D.nodeId,G=g&&Xr(g.nodesRef.current,q).some(J=>{var re;return Fu(O,(re=J.context)==null?void 0:re.elements.floating)});if(Fu(O,o.floating)||Fu(O,o.domReference)||G)return;const W=g?Xr(g.nodesRef.current,q):[];if(W.length>0){let J=!0;if(W.forEach(re=>{var ee;if((ee=re.context)!=null&&ee.open&&!re.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,O,"outside-press")}),F=kt(O=>{var D;const z=()=>{var M;_(O),(M=Un(O))==null||M.removeEventListener(c,z)};(D=Un(O))==null||D.addEventListener(c,z)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=S;let O=-1;function D($){r(!1,$,"ancestor-scroll")}function z(){window.clearTimeout(O),w.current=!0}function M(){O=window.setTimeout(()=>{w.current=!1},ms()?5:0)}const C=Ut(o.floating);s&&(C.addEventListener("keydown",E?P:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",M)),y&&C.addEventListener(c,I?F:_,I);let L=[];return f&&(tt(o.domReference)&&(L=xr(o.domReference)),tt(o.floating)&&(L=L.concat(xr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(xr(o.reference.contextElement)))),L=L.filter($=>{var B;return $!==((B=C.defaultView)==null?void 0:B.visualViewport)}),L.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{s&&(C.removeEventListener("keydown",E?P:k,E),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",M)),y&&C.removeEventListener(c,I?F:_,I),L.forEach($=>{$.removeEventListener("scroll",D)}),window.clearTimeout(O)}},[i,o,s,y,c,n,r,f,a,x,S,k,E,P,_,I,F]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const V=A.useMemo(()=>({onKeyDown:k,...u&&{[yP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[k,r,u,d]),N=A.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[bP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return A.useMemo(()=>a?{reference:V,floating:N}:{},[a,V,N])}function xP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ki(),i=A.useRef({}),[a]=A.useState(()=>Pv()),s=Sr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&eP("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]=A.useState(r.reference),u=kt((p,v,g)=>{i.current.openEvent=p?v:void 0,a.emit("openchange",{open:p,event:v,reason:g,nested:s}),n?.(p,v,g)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=xP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Tr();nt(()=>{u&&(d.current=u)},[u]);const p=UA({...e,elements:{...o,...s&&{reference:s}}}),v=A.useCallback(x=>{const S=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(S),p.refs.setReference(S)},[p.refs]),g=A.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,a(x)),(tt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!tt(x))&&p.refs.setReference(x)},[p.refs]),h=A.useMemo(()=>({...p.refs,setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=A.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=A.useMemo(()=>({...p,...r,refs:h,elements:y,nodeId:t}),[p,h,y,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(S=>S.id===t);x&&(x.context=b)}),A.useMemo(()=>({...p,context:b,refs:h,elements:y}),[p,h,y,b])}function Zu(){return KI()&&Zg()}function wP(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=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const p=qt(a.domReference);function v(){!n&&Ot(a.domReference)&&a.domReference===qn(Ut(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function h(){d.current=!1}return p.addEventListener("blur",v),Zu()&&(p.addEventListener("keydown",g,!0),p.addEventListener("pointerdown",h,!0)),()=>{p.removeEventListener("blur",v),Zu()&&(p.removeEventListener("keydown",g,!0),p.removeEventListener("pointerdown",h,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function p(v){let{reason:g}=v;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,s]),A.useEffect(()=>()=>{Yt(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const v=Un(p.nativeEvent);if(l&&tt(v)){if(Zu()&&!p.relatedTarget){if(!d.current&&!Lu(v))return}else if(!eA(v))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const v=p.relatedTarget,g=p.nativeEvent,h=tt(v)&&v.hasAttribute(eo("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=qn(a.domReference?a.domReference.ownerDocument:document);!v&&b===a.domReference||Ht((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ht(a.domReference,b)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:f}:{},[s,f])}function Xu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Ev]:a,[kv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[ZA]:""},...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&&[Ev,kv].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 f,p=arguments.length,v=new Array(p),g=0;g<p;g++)v[g]=arguments[g];return(f=r.get(c))==null?void 0:f.map(h=>h(...v)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function Yn(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=A.useCallback(s=>Xu(s,e,"reference"),t),i=A.useCallback(s=>Xu(s,e,"floating"),n),a=A.useCallback(s=>Xu(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const SP="Escape";function Rs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bs(e,t){return Rs(t,e===Cv||e===Ns,e===Gi||e===Yi)}function Qu(e,t,n){return Rs(t,e===Ns,n?e===Gi:e===Yi)||e==="Enter"||e===" "||e===""}function Zv(e,t,n){return Rs(t,n?e===Gi:e===Yi,e===Ns)}function Xv(e,t,n,r){const o=n?e===Yi:e===Gi,i=e===Cv;return t==="both"||t==="horizontal"&&r&&r>1?e===SP:Rs(t,o,i)}function Hs(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:f=!1,nested:p=!1,rtl:v=!1,virtual:g=!1,focusItemOnOpen:h="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Fs("`useListNavigation` looping must be enabled to allow escaping."),g||Fs("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&I>1&&Fs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=ks(o.floating),V=Wt(F),N=Sr(),O=Tr();nt(()=>{e.dataRef.current.orientation=S},[e,S]);const D=kt(()=>{l(C.current===-1?null:C.current)}),z=Vu(o.domReference),M=A.useRef(h),C=A.useRef(u??-1),L=A.useRef(null),$=A.useRef(!0),B=A.useRef(D),q=A.useRef(!!o.floating),G=A.useRef(n),W=A.useRef(!1),J=A.useRef(!1),re=Wt(x),ee=Wt(n),Y=Wt(w),K=Wt(u),[X,de]=A.useState(),[H,se]=A.useState(),ae=kt(()=>{function me(ne){if(g){var ce;(ce=ne.id)!=null&&ce.endsWith("-fui-option")&&(ne.id=i+"-"+Math.random().toString(16).slice(2,10)),de(ne.id),O?.events.emit("virtualfocus",ne),k&&(k.current=ne)}else to(ne,{sync:W.current,preventScroll:!0})}const oe=a.current[C.current],j=J.current;oe&&me(oe),(W.current?ne=>ne():requestAnimationFrame)(()=>{const ne=a.current[C.current]||oe;if(!ne)return;oe||me(ne);const ce=Y.current;ce&&le&&(j||!$.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(J.current=!0,C.current=u,D()):q.current&&(C.current=-1,B.current()))},[c,n,o.floating,u,D]),nt(()=>{if(c&&n&&o.floating)if(s==null){if(W.current=!1,K.current!=null)return;if(q.current&&(C.current=-1,ae()),(!G.current||!q.current)&&M.current&&(L.current!=null||M.current===!0&&L.current==null)){let me=0;const oe=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(oe),me++):(C.current=L.current==null||Qu(L.current,S,v)||p?$u(a,re.current):nv(a,re.current),L.current=null,D())};oe()}}else Wi(a,s)||(C.current=s,ae(),J.current=!1)},[c,n,o.floating,s,K,p,a,S,v,D,ae,re]),nt(()=>{var me;if(!c||o.floating||!O||g||!q.current)return;const oe=O.nodesRef.current,j=(me=oe.find(ce=>ce.id===N))==null||(me=me.context)==null?void 0:me.elements.floating,R=qn(Ut(o.floating)),ne=oe.some(ce=>ce.context&&Ht(ce.context.elements.floating,R));j&&!ne&&$.current&&j.focus({preventScroll:!0})},[c,o.floating,O,N,g]),nt(()=>{if(!c||!O||!g||N)return;function me(oe){se(oe.id),k&&(k.current=oe)}return O.events.on("virtualfocus",me),()=>{O.events.off("virtualfocus",me)}},[c,O,g,N,k]),nt(()=>{B.current=D,G.current=n,q.current=!!o.floating}),nt(()=>{n||(L.current=null,M.current=h)},[n,h]);const Q=s!=null,le=A.useMemo(()=>{function me(j){if(!ee.current)return;const R=a.current.indexOf(j);R!==-1&&C.current!==R&&(C.current=R,D())}return{onFocus(j){let{currentTarget:R}=j;W.current=!0,me(R)},onClick:j=>{let{currentTarget:R}=j;return R.focus({preventScroll:!0})},onMouseMove(j){let{currentTarget:R}=j;W.current=!0,J.current=!1,y&&me(R)},onPointerLeave(j){let{pointerType:R}=j;if(!(!$.current||R==="touch")&&(W.current=!0,!!y&&(C.current=-1,D(),!g))){var ne;(ne=V.current)==null||ne.focus({preventScroll:!0})}}}},[ee,V,y,a,D,g]),te=A.useCallback(()=>{var me;return E??(O==null||(me=O.nodesRef.current.find(oe=>oe.id===N))==null||(me=me.context)==null||(me=me.dataRef)==null?void 0:me.current.orientation)},[N,O,E]),fe=kt(me=>{if($.current=!1,W.current=!0,me.which===229||!ee.current&&me.currentTarget===V.current)return;if(p&&Xv(me.key,S,v,I)){Bs(me.key,te())||Gt(me),r(!1,me.nativeEvent,"list-navigation"),Ot(o.domReference)&&(g?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const oe=C.current,j=$u(a,x),R=nv(a,x);if(z||(me.key==="Home"&&(Gt(me),C.current=j,D()),me.key==="End"&&(Gt(me),C.current=R,D())),I>1){const ne=P||Array.from({length:a.current.length},()=>({width:1,height:1})),ce=lA(ne,I,_),xe=ce.findIndex(qe=>qe!=null&&!Is(a,qe,x)),Ce=ce.reduce((qe,pt,ht)=>pt!=null&&!Is(a,pt,x)?ht:qe,-1),_e=ce[sA({current:ce.map(qe=>qe!=null?a.current[qe]:null)},{event:me,orientation:S,loop:f,rtl:v,cols:I,disabledIndices:uA([...(typeof x!="function"?x:null)||a.current.map((qe,pt)=>Is(a,pt,x)?pt:void 0),void 0],ce),minIndex:xe,maxIndex:Ce,prevIndex:cA(C.current>R?j:C.current,ne,ce,I,me.key===Ns?"bl":me.key===(v?Gi:Yi)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(C.current=_e,D()),S==="both")return}if(Bs(me.key,S)){if(Gt(me),n&&!g&&qn(me.currentTarget.ownerDocument)===me.currentTarget){C.current=Qu(me.key,S,v)?j:R,D();return}Qu(me.key,S,v)?f?C.current=oe>=R?d&&oe!==a.current.length?-1:j:Xt(a,{startingIndex:oe,disabledIndices:x}):C.current=Math.min(R,Xt(a,{startingIndex:oe,disabledIndices:x})):f?C.current=oe<=j?d&&oe!==-1?a.current.length:R:Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:x}):C.current=Math.max(j,Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:x})),Wi(a,C.current)&&(C.current=-1),D()}}),pe=A.useMemo(()=>g&&n&&Q&&{"aria-activedescendant":H||X},[g,n,Q,H,X]),ve=A.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...z?{}:pe,onKeyDown:fe,onPointerMove(){$.current=!0}}),[pe,fe,S,z]),Ae=A.useMemo(()=>{function me(j){h==="auto"&&ev(j.nativeEvent)&&(M.current=!0)}function oe(j){M.current=h,h==="auto"&&tv(j.nativeEvent)&&(M.current=!0)}return{...pe,onKeyDown(j){$.current=!1;const R=j.key.startsWith("Arrow"),ne=["Home","End"].includes(j.key),ce=R||ne,xe=Zv(j.key,S,v),Ce=Xv(j.key,S,v,I),_e=Zv(j.key,te(),v),qe=Bs(j.key,S),pt=(p?_e:qe)||j.key==="Enter"||j.key.trim()==="";if(g&&n){const U=O?.nodesRef.current.find(Oe=>Oe.parentId==null),Z=O&&U?tA(O.nodesRef.current,U.id):null;if(ce&&Z&&k){const Oe=new KeyboardEvent("keydown",{key:j.key,bubbles:!0});if(xe||Ce){var ht,$t;const Ge=((ht=Z.context)==null?void 0:ht.elements.domReference)===j.currentTarget,Ze=Ce&&!Ge?($t=Z.context)==null?void 0:$t.elements.domReference:xe?a.current.find(Ne=>Ne?.id===X):null;Ze&&(Gt(j),Ze.dispatchEvent(Oe),se(void 0))}if((qe||ne)&&Z.context&&Z.context.open&&Z.parentId&&j.currentTarget!==Z.context.elements.domReference){var $e;Gt(j),($e=Z.context.elements.domReference)==null||$e.dispatchEvent(Oe);return}}return fe(j)}if(!(!n&&!b&&R)){if(pt){const U=Bs(j.key,te());L.current=p&&U?null:j.key}if(p){_e&&(Gt(j),n?(C.current=$u(a,re.current),D()):r(!0,j.nativeEvent,"list-navigation"));return}qe&&(u!=null&&(C.current=u),Gt(j),!n&&b?r(!0,j.nativeEvent,"list-navigation"):fe(j),n&&D())}},onFocus(){n&&!g&&(C.current=-1,D())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:me,onClick:me}},[X,pe,I,fe,re,h,a,p,D,r,n,b,S,te,v,u,O,g,k]);return A.useMemo(()=>c?{reference:Ae,floating:ve,item:le}:{},[c,Ae,ve,le])}const TP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fr(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=Ki(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var b;return((b=ks(i.floating))==null?void 0:b.id)||a},[i.floating,a]),f=(r=TP.get(l))!=null?r:l,v=Sr()!=null,g=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,v,o,u,l]),h=A.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=A.useCallback(b=>{let{active:x,selected:S}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":S}}return{}},[d,l]);return A.useMemo(()=>s?{reference:g,floating:h,item:y}:{},[s,g,h,y])}const Qv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ro(e,t){return typeof e=="function"?e(t):e}function EP(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function kP(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]=A.useState("unmounted"),c=EP(n,a);return!c&&s==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{jn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Jv(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=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,f=(u?a:a.close)||0,[p,v]=A.useState(()=>({...Ro(i,c),...Ro(n,c)})),{isMounted:g,status:h}=kP(e,{duration:a}),y=Wt(n),b=Wt(r),x=Wt(o),S=Wt(i);return nt(()=>{const E=Ro(y.current,c),I=Ro(x.current,c),w=Ro(S.current,c),k=Ro(b.current,c)||Object.keys(E).reduce((P,_)=>(P[_]="",P),{});if(h==="initial"&&v(P=>({transitionProperty:P.transitionProperty,...w,...E})),h==="open"&&v({transitionProperty:Object.keys(k).map(Qv).join(","),transitionDuration:d+"ms",...w,...k}),h==="close"){const P=I||E;v({transitionProperty:Object.keys(P).map(Qv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,x,y,b,S,d,h,c]),{isMounted:g,styles:p}}function CP(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:f=[],selectedIndex:p=null}=t,v=A.useRef(-1),g=A.useRef(""),h=A.useRef((n=p??a)!=null?n:-1),y=A.useRef(null),b=kt(s),x=kt(l),S=Wt(u),E=Wt(f);nt(()=>{r&&(Yt(v),y.current=null,g.current="")},[r]),nt(()=>{if(r&&g.current===""){var _;h.current=(_=p??a)!=null?_:-1}},[r,p,a]);const I=kt(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),w=kt(_=>{function F(z,M,C){const L=S.current?S.current(M,C):M.find($=>$?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return L?z.indexOf(L):-1}const V=i.current;if(g.current.length>0&&g.current[0]!==" "&&(F(V,V,g.current)===-1?I(!1):_.key===" "&&Gt(_)),V==null||E.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Gt(_),I(!0)),V.every(z=>{var M,C;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=y.current),g.current+=_.key,Yt(v),v.current=window.setTimeout(()=>{g.current="",h.current=y.current,I(!1)},d);const O=h.current,D=F(V,[...V.slice((O||0)+1),...V.slice(0,(O||0)+1)],g.current);D!==-1?(b(D),y.current=D):_.key!==" "&&(g.current="",I(!1))}),k=A.useMemo(()=>({onKeyDown:w}),[w]),P=A.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&I(!1)}}),[w,I]);return A.useMemo(()=>c?{reference:k,floating:P}:{},[c,k,P])}function ey(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,...ey(e,o.id,n)])}function ty(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 IP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ny(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,f){const p=performance.now(),v=p-l;if(a===null||s===null||v===0)return a=d,s=f,l=p,null;const g=d-a,h=f-s,b=Math.sqrt(g*g+h*h)/v;return a=d,s=f,l=p,b}const u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:h,nodeId:y,tree:b}=d;return function(S){function E(){Yt(o),h()}if(Yt(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;const{clientX:I,clientY:w}=S,k=[I,w],P=oP(S),_=S.type==="mouseleave",F=Uu(g.floating,P),V=Uu(g.domReference,P),N=g.domReference.getBoundingClientRect(),O=g.floating.getBoundingClientRect(),D=v.split("-")[0],z=f>O.right-O.width/2,M=p>O.bottom-O.height/2,C=IP(k,N),L=O.width>N.width,$=O.height>N.height,B=(L?N:O).left,q=(L?N:O).right,G=($?N:O).top,W=($?N:O).bottom;if(F&&(i=!0,!_))return;if(V&&(i=!1),V&&!_){i=!0;return}if(_&&tt(S.relatedTarget)&&Uu(g.floating,S.relatedTarget)||b&&ey(b.nodesRef.current,y).length)return;if(D==="top"&&p>=N.bottom-1||D==="bottom"&&p<=N.top+1||D==="left"&&f>=N.right-1||D==="right"&&f<=N.left+1)return E();let J=[];switch(D){case"top":J=[[B,N.top+1],[B,O.bottom-1],[q,O.bottom-1],[q,N.top+1]];break;case"bottom":J=[[B,O.top+1],[B,N.bottom-1],[q,N.bottom-1],[q,O.top+1]];break;case"left":J=[[O.right-1,W],[O.right-1,G],[N.left+1,G],[N.left+1,W]];break;case"right":J=[[N.right-1,W],[N.right-1,G],[O.left+1,G],[O.left+1,W]];break}function re(ee){let[Y,K]=ee;switch(D){case"top":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K+t+1],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K+t+1],H=[[O.left,z||L?O.bottom-t:O.top],[O.right,z?L?O.bottom-t:O.top:O.bottom-t]];return[X,de,...H]}case"bottom":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K-t],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K-t],H=[[O.left,z||L?O.top+t:O.bottom],[O.right,z?L?O.top+t:O.bottom:O.top+t]];return[X,de,...H]}case"left":{const X=[Y+t+1,$?K+t/2:M?K+t*4:K-t*4],de=[Y+t+1,$?K-t/2:M?K+t*4:K-t*4];return[...[[M||$?O.right-t:O.left,O.top],[M?$?O.right-t:O.left:O.right-t,O.bottom]],X,de]}case"right":{const X=[Y-t,$?K+t/2:M?K+t*4:K-t*4],de=[Y-t,$?K-t/2:M?K+t*4:K-t*4],H=[[M||$?O.left+t:O.right,O.top],[M?$?O.left+t:O.right:O.left+t,O.bottom]];return[X,de,...H]}}}if(!ty([I,w],J)){if(i&&!C)return E();if(!_&&r){const ee=c(S.clientX,S.clientY);if(ee!==null&&ee<.1)return E()}ty([I,w],re([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const ry=200,AP=500,Bo=()=>{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)}`},oy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),iy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ju=(e,t)=>{const n=oy(t,iy.basic,e)||oy(t,iy.extend,e);return n===void 0||n===e?void 0:n},Cr=()=>typeof window>"u",ed=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ay=(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},PP=e=>!e,Ho=()=>{},sy=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},td=T.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=Ho,followCursor:d=!1,...f},p){const[v,g]=T.useState(n??!1),h=T.useRef(null),y=t||"span",b=O=>{g(O),u?.(O)},{refs:x,floatingStyles:S,context:E}=Gn({placement:i,open:v,whileElementsMounted:Jr,onOpenChange:n?void 0:b,middleware:[Ms(),$o(5),wv(),Bu({padding:5,element:h}),Ds({fallbackAxisSideDirection:"start"})]}),I=kr(E,{enabled:l}),w=fr(E,{role:"tooltip",enabled:l}),k=wP(E,{enabled:l?a:!1}),P=jo(E,{enabled:l?c:!1}),_=vP(E,{enabled:!!l&&!!d}),F=Dv(E,{move:!0,delay:{open:ry},enabled:l?s:!1,handleClose:c?ny():null}),{getReferenceProps:V,getFloatingProps:N}=Yn([w,I,_,a?k:void 0,s?F:void 0,c?P:void 0]);return T.useEffect(()=>g(n===void 0?!1:n),[n]),m.jsxs(T.Fragment,{children:[m.jsx(y,{...V(f),ref:sr(x.setReference,p),children:r}),v&&m.jsx(dr,{children:m.jsxs(ln,{...N(),ref:x.setFloating,style:S,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(Hu,{ref:h,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),ly=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[a,e||o?m.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?m.jsx(td,{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(bu,{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 break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?m.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[m.jsx(Ig,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(XC,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Xi=T.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:f="",name:p,title:v,componentName:g,placeholder:h,hideLeft:y=!1,required:b,disabled:x,reportStatus:S,hiddenLabel:E},I)=>{const w=Tu(),k=S!==void 0?S:w.input.iconFeedback,P=d??p,_=Pt(),F=e??_.inputOptionalLabel;return m.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Pe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:P,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:m.jsx(ly,{info:s,hideLeft:y,reportStatus:k,title:v,placeholder:h,children:F||n?m.jsxs(T.Fragment,{children:[b?null:m.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:F}),n?m.jsx(T.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 ${f}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",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})]})}),cy=(e,t,n,r)=>T.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:v="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:b,hiddenLabel:x,...S},E)=>{const I=e,w=S.id??S.name,k=T.useRef(null);return T.useEffect(()=>{if(k.current===null)return;const P=k.current,_=Vi(k.current),F=r?.(P),V=N=>{const O=N;if(O.key==="Enter"&&P.enterKeyHint==="next"){const D=P.getAttribute("data-next");if(D){const z=document.getElementById(D);if(z)return z.focus(),void O.preventDefault()}}};return P.addEventListener("keydown",V),()=>{F?.(),_(),P.removeEventListener("keydown",V)}},[]),m.jsx(Xi,{...n,info:i,left:a,error:l,right:c,form:S.form,loading:b,name:S.name,feedback:h,hideLeft:y,title:S.title,rightLabel:d,disabled:S.disabled,hiddenLabel:x,interactive:f,required:S.required,componentName:t,id:S.name||S.id,optionalText:p,labelClassName:g,placeholder:S.placeholder,container:Pe(u,n.container),children:m.jsx(I,{...n,...S,id:w,name:w,type:v,"data-next":s,"aria-busy":S.disabled,"aria-disabled":S.disabled,"aria-readonly":S.readOnly,ref:sr(E,k),className:Pe("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",S.className)})})}),Wo=cy(Tg,"input",{type:"text"}),OP=Io("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-1 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-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ro=T.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(ln,{...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:Pe(OP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),oo=T.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:v,error:g,...h},y)=>{const b=Pt(),x=T.useRef(null),S=h.id??h.name;T.useImperativeHandle(y,()=>x.current),T.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,k=Vi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{k(),I.abort()}},[]);const E=()=>x.current?.focus();return m.jsx(Xi,{info:n,left:v,error:g,form:h.form,loading:c,name:h.name,feedback:o,hideLeft:f,required:e,title:h.title,container:d,componentName:"select",rightLabel:s,hiddenLabel:l,interactive:a,id:h.name||h.id,optionalText:u,labelClassName:i,placeholder:h.placeholder,right:m.jsxs("label",{htmlFor:S,children:[p,m.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(gu,{size:20}),m.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:m.jsxs("select",{...h,id:S,name:S,required:e,ref:sr(y,x),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Pe("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",h.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(I=>T.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${S}-select-option-${I.value}`}))]})})});function In(e){return e?.ownerDocument||document}function _P({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
1
|
+
(function(ie,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):(ie=typeof globalThis<"u"?globalThis:ie||self,S(ie.components={},ie.React,ie["react/jsx-runtime"],ie.ReactDOM))})(this,(function(ie,S,m,Li){"use strict";function Wh(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 A=Wh(S),jn=Wh(Li);function qh(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=qh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Uh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qh(e))&&(r&&(r+=" "),r+=t);return r}const Gh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yh=Uh,Ao=(e,t)=>n=>{var r;if(t?.variants==null)return Yh(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 f=Gh(u)||Gh(d);return o[c][f]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,f]:c},[]);return Yh(e,a,l,n?.class,n?.className)};var Kh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tC(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 yc,Xh;function Po(){return Xh||(Xh=1,yc=TypeError),yc}const nC=tC(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var bc,Qh;function Xa(){if(Qh)return bc;Qh=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,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(U){return U.__proto__}:null);function k(U,Z){if(U===1/0||U===-1/0||U!==U||U&&U>-1e3&&U<1e3||I.call(/e/,Z))return Z;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof U=="number"){var Ge=U<0?-_(-U):_(U);if(Ge!==U){var Ze=String(Ge),Ne=b.call(Z,Ze.length+1);return x.call(Ze,Oe,"$&_")+"."+x.call(x.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(Z,Oe,"$&_")}var L=nC,$=L.custom,B=ae($)?$:null,q={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};bc=function U(Z,Oe,Ge,Ze){var Ne=Oe||{};if(te(Ne,"quoteStyle")&&!te(q,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var it=te(Ne,"customInspect")?Ne.customInspect:!0;if(typeof it!="boolean"&&it!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mt=Ne.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return ce(Z,Ne);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var at=String(Z);return mt?k(Z,at):at}if(typeof Z=="bigint"){var vn=String(Z)+"n";return mt?k(Z,vn):vn}var Yr=typeof Ne.depth>"u"?5:Ne.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=Yr&&Yr>0&&typeof Z=="object")return ee(Z)?"[Array]":"[Object]";var Kr=ht(Ne,Ge);if(typeof Ze>"u")Ze=[];else if(ve(Ze,Z)>=0)return"[Circular]";function Cn(Fi,vc,TH){if(vc&&(Ze=P.call(Ze),Ze.push(vc)),TH){var eC={depth:Ne.depth};return te(Ne,"quoteStyle")&&(eC.quoteStyle=Ne.quoteStyle),U(Fi,eC,Ge+1,Ze)}return U(Fi,Ne,Ge+1,Ze)}if(typeof Z=="function"&&!K(Z)){var Di=pe(Z),Ni=$e(Z,Cn);return"[Function"+(Di?": "+Di:" (anonymous)")+"]"+(Ni.length>0?" { "+C.call(Ni,", ")+" }":"")}if(ae(Z)){var KE=O?x.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(Z);return typeof Z=="object"&&!O?ke(KE):KE}if(ne(Z)){for(var Za="<"+E.call(String(Z.nodeName)),Vh=Z.attributes||[],gc=0;gc<Vh.length;gc++)Za+=" "+Vh[gc].name+"="+W(J(Vh[gc].value),"double",Ne);return Za+=">",Z.childNodes&&Z.childNodes.length&&(Za+="..."),Za+="</"+E.call(String(Z.nodeName))+">",Za}if(ee(Z)){if(Z.length===0)return"[]";var $h=$e(Z,Cn);return Kr&&!pt($h)?"["+$t($h,Kr)+"]":"[ "+C.call($h,", ")+" ]"}if(X(Z)){var zh=$e(Z,Cn);return!("cause"in Error.prototype)&&"cause"in Z&&!z.call(Z,"cause")?"{ ["+String(Z)+"] "+C.call(w.call("[cause]: "+Cn(Z.cause),zh),", ")+" }":zh.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+C.call(zh,", ")+" }"}if(typeof Z=="object"&&it){if(B&&typeof Z[B]=="function"&&L)return L(Z,{depth:Yr-Ge});if(it!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(Ae(Z)){var ZE=[];return r&&r.call(Z,function(Fi,vc){ZE.push(Cn(vc,Z,!0)+" => "+Cn(Fi,Z))}),qe("Map",n.call(Z),ZE,Kr)}if(j(Z)){var XE=[];return s&&s.call(Z,function(Fi){XE.push(Cn(Fi,Z))}),qe("Set",a.call(Z),XE,Kr)}if(me(Z))return _e("WeakMap");if(R(Z))return _e("WeakSet");if(oe(Z))return _e("WeakRef");if(H(Z))return ke(Cn(Number(Z)));if(Q(Z))return ke(Cn(F.call(Z)));if(se(Z))return ke(v.call(Z));if(de(Z))return ke(Cn(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Kh<"u"&&Z===Kh)return"{ [object globalThis] }";if(!Y(Z)&&!K(Z)){var jh=$e(Z,Cn),QE=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,Rh=Z instanceof Object?"":"null prototype",JE=!QE&&D&&Object(Z)===Z&&D in Z?b.call(fe(Z),8,-1):Rh?"Object":"",SH=QE||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",Bh=SH+(JE||Rh?"["+C.call(w.call([],JE||[],Rh||[]),": ")+"] ":"");return jh.length===0?Bh+"{}":Kr?Bh+"{"+$t(jh,Kr)+"}":Bh+"{ "+C.call(jh,", ")+" }"}return String(Z)};function W(U,Z,Oe){var Ge=Oe.quoteStyle||Z,Ze=q[Ge];return Ze+U+Ze}function J(U){return x.call(String(U),/"/g,""")}function re(U){return!D||!(typeof U=="object"&&(D in U||typeof U[D]<"u"))}function ee(U){return fe(U)==="[object Array]"&&re(U)}function Y(U){return fe(U)==="[object Date]"&&re(U)}function K(U){return fe(U)==="[object RegExp]"&&re(U)}function X(U){return fe(U)==="[object Error]"&&re(U)}function de(U){return fe(U)==="[object String]"&&re(U)}function H(U){return fe(U)==="[object Number]"&&re(U)}function se(U){return fe(U)==="[object Boolean]"&&re(U)}function ae(U){if(O)return U&&typeof U=="object"&&U instanceof Symbol;if(typeof U=="symbol")return!0;if(!U||typeof U!="object"||!N)return!1;try{return N.call(U),!0}catch{}return!1}function Q(U){if(!U||typeof U!="object"||!F)return!1;try{return F.call(U),!0}catch{}return!1}var le=Object.prototype.hasOwnProperty||function(U){return U in this};function te(U,Z){return le.call(U,Z)}function fe(U){return g.call(U)}function pe(U){if(U.name)return U.name;var Z=y.call(h.call(U),/^function\s*([\w$]+)/);return Z?Z[1]:null}function ve(U,Z){if(U.indexOf)return U.indexOf(Z);for(var Oe=0,Ge=U.length;Oe<Ge;Oe++)if(U[Oe]===Z)return Oe;return-1}function Ae(U){if(!n||!U||typeof U!="object")return!1;try{n.call(U);try{a.call(U)}catch{return!0}return U instanceof Map}catch{}return!1}function me(U){if(!c||!U||typeof U!="object")return!1;try{c.call(U,c);try{d.call(U,d)}catch{return!0}return U instanceof WeakMap}catch{}return!1}function oe(U){if(!p||!U||typeof U!="object")return!1;try{return p.call(U),!0}catch{}return!1}function j(U){if(!a||!U||typeof U!="object")return!1;try{a.call(U);try{n.call(U)}catch{return!0}return U instanceof Set}catch{}return!1}function R(U){if(!d||!U||typeof U!="object")return!1;try{d.call(U,d);try{c.call(U,c)}catch{return!0}return U instanceof WeakSet}catch{}return!1}function ne(U){return!U||typeof U!="object"?!1:typeof HTMLElement<"u"&&U instanceof HTMLElement?!0:typeof U.nodeName=="string"&&typeof U.getAttribute=="function"}function ce(U,Z){if(U.length>Z.maxStringLength){var Oe=U.length-Z.maxStringLength,Ge="... "+Oe+" more character"+(Oe>1?"s":"");return ce(b.call(U,0,Z.maxStringLength),Z)+Ge}var Ze=G[Z.quoteStyle||"single"];Ze.lastIndex=0;var Ne=x.call(x.call(U,Ze,"\\$1"),/[\x00-\x1f]/g,xe);return W(Ne,"single",Z)}function xe(U){var Z=U.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Oe?"\\"+Oe:"\\x"+(Z<16?"0":"")+T.call(Z.toString(16))}function ke(U){return"Object("+U+")"}function _e(U){return U+" { ? }"}function qe(U,Z,Oe,Ge){var Ze=Ge?$t(Oe,Ge):C.call(Oe,", ");return U+" ("+Z+") {"+Ze+"}"}function pt(U){for(var Z=0;Z<U.length;Z++)if(ve(U[Z],`
|
|
2
|
+
`)>=0)return!1;return!0}function ht(U,Z){var Oe;if(U.indent===" ")Oe=" ";else if(typeof U.indent=="number"&&U.indent>0)Oe=C.call(Array(U.indent+1)," ");else return null;return{base:Oe,prev:C.call(Array(Z+1),Oe)}}function $t(U,Z){if(U.length===0)return"";var Oe=`
|
|
3
|
+
`+Z.prev+Z.base;return Oe+C.call(U,","+Oe)+`
|
|
4
|
+
`+Z.prev}function $e(U,Z){var Oe=ee(U),Ge=[];if(Oe){Ge.length=U.length;for(var Ze=0;Ze<U.length;Ze++)Ge[Ze]=te(U,Ze)?Z(U[Ze],U):""}var Ne=typeof V=="function"?V(U):[],it;if(O){it={};for(var mt=0;mt<Ne.length;mt++)it["$"+Ne[mt]]=Ne[mt]}for(var at in U)te(U,at)&&(Oe&&String(Number(at))===at&&at<U.length||O&&it["$"+at]instanceof Symbol||(I.call(/[^\w$]/,at)?Ge.push(Z(at,U)+": "+Z(U[at],U)):Ge.push(at+": "+Z(U[at],U))));if(typeof V=="function")for(var vn=0;vn<Ne.length;vn++)z.call(U,Ne[vn])&&Ge.push("["+Z(Ne[vn])+"]: "+Z(U[Ne[vn]],U));return Ge}return bc}var xc,Jh;function rC(){if(Jh)return xc;Jh=1;var e=Xa(),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 xc=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,f=a(l,u);return f&&d&&d===f&&(l=void 0),!!f},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},xc}var wc,em;function tm(){return em||(em=1,wc=Object),wc}var Sc,nm;function oC(){return nm||(nm=1,Sc=Error),Sc}var Tc,rm;function iC(){return rm||(rm=1,Tc=EvalError),Tc}var Ec,om;function aC(){return om||(om=1,Ec=RangeError),Ec}var Cc,im;function sC(){return im||(im=1,Cc=ReferenceError),Cc}var kc,am;function lC(){return am||(am=1,kc=SyntaxError),kc}var Ic,sm;function cC(){return sm||(sm=1,Ic=URIError),Ic}var Ac,lm;function uC(){return lm||(lm=1,Ac=Math.abs),Ac}var Pc,cm;function dC(){return cm||(cm=1,Pc=Math.floor),Pc}var Oc,um;function fC(){return um||(um=1,Oc=Math.max),Oc}var _c,dm;function pC(){return dm||(dm=1,_c=Math.min),_c}var Mc,fm;function hC(){return fm||(fm=1,Mc=Math.pow),Mc}var Dc,pm;function mC(){return pm||(pm=1,Dc=Math.round),Dc}var Nc,hm;function gC(){return hm||(hm=1,Nc=Number.isNaN||function(t){return t!==t}),Nc}var Fc,mm;function vC(){if(mm)return Fc;mm=1;var e=gC();return Fc=function(n){return e(n)||n===0?n:n<0?-1:1},Fc}var Lc,gm;function yC(){return gm||(gm=1,Lc=Object.getOwnPropertyDescriptor),Lc}var Vc,vm;function ym(){if(vm)return Vc;vm=1;var e=yC();if(e)try{e([],"length")}catch{e=null}return Vc=e,Vc}var $c,bm;function bC(){if(bm)return $c;bm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return $c=e,$c}var zc,xm;function xC(){return xm||(xm=1,zc=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}),zc}var jc,wm;function wC(){if(wm)return jc;wm=1;var e=typeof Symbol<"u"&&Symbol,t=xC();return jc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},jc}var Rc,Sm;function Tm(){return Sm||(Sm=1,Rc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Rc}var Bc,Em;function Cm(){if(Em)return Bc;Em=1;var e=tm();return Bc=e.getPrototypeOf||null,Bc}var Hc,km;function SC(){if(km)return Hc;km=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 f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=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 Hc=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,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),v=[],g=0;g<p;g++)v[g]="$"+g;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},Hc}var Wc,Im;function Qa(){if(Im)return Wc;Im=1;var e=SC();return Wc=Function.prototype.bind||e,Wc}var qc,Am;function Uc(){return Am||(Am=1,qc=Function.prototype.call),qc}var Gc,Pm;function Om(){return Pm||(Pm=1,Gc=Function.prototype.apply),Gc}var Yc,_m;function TC(){return _m||(_m=1,Yc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Yc}var Kc,Mm;function EC(){if(Mm)return Kc;Mm=1;var e=Qa(),t=Om(),n=Uc(),r=TC();return Kc=r||e.call(n,t),Kc}var Zc,Dm;function Nm(){if(Dm)return Zc;Dm=1;var e=Qa(),t=Po(),n=Uc(),r=EC();return Zc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Zc}var Xc,Fm;function CC(){if(Fm)return Xc;Fm=1;var e=Nm(),t=ym(),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 Xc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Xc}var Qc,Lm;function kC(){if(Lm)return Qc;Lm=1;var e=Tm(),t=Cm(),n=CC();return Qc=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,Qc}var Jc,Vm;function IC(){if(Vm)return Jc;Vm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Qa();return Jc=n.call(e,t),Jc}var eu,$m;function tu(){if($m)return eu;$m=1;var e,t=tm(),n=oC(),r=iC(),o=aC(),i=sC(),a=lC(),s=Po(),l=cC(),c=uC(),u=dC(),d=fC(),f=pC(),p=hC(),v=mC(),g=vC(),h=Function,y=function(K){try{return h('"use strict"; return ('+K+").constructor;")()}catch{}},b=ym(),x=bC(),T=function(){throw new s},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=wC()(),w=kC(),C=Cm(),P=Tm(),_=Om(),F=Uc(),V={},N=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][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%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%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"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":E,"%TypedArray%":N,"%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%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":g,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(K){var D=w(w(K));O["%Error.prototype%"]=D}var z=function K(X){var de;if(X==="%AsyncFunction%")de=y("async function () {}");else if(X==="%GeneratorFunction%")de=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")de=y("async function* () {}");else if(X==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(de=H.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=K("%AsyncGenerator%");se&&w&&(de=w(se.prototype))}return O[X]=de,de},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"]},k=Qa(),L=IC(),$=k.call(F,Array.prototype.concat),B=k.call(_,Array.prototype.splice),q=k.call(F,String.prototype.replace),G=k.call(F,String.prototype.slice),W=k.call(F,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,ee=function(X){var de=G(X,0,1),H=G(X,-1);if(de==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&de!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return q(X,J,function(ae,Q,le,te){se[se.length]=le?q(te,re,"$1"):Q||ae}),se},Y=function(X,de){var H=X,se;if(L(M,H)&&(se=M[H],H="%"+se[0]+"%"),L(O,H)){var ae=O[H];if(ae===V&&(ae=z(H)),typeof ae>"u"&&!de)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:H,value:ae}}throw new a("intrinsic "+X+" does not exist!")};return eu=function(X,de){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new s('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=ee(X),se=H.length>0?H[0]:"",ae=Y("%"+se+"%",de),Q=ae.name,le=ae.value,te=!1,fe=ae.alias;fe&&(se=fe[0],B(H,$([0,1],fe)));for(var pe=1,ve=!0;pe<H.length;pe+=1){var Ae=H[pe],me=G(Ae,0,1),oe=G(Ae,-1);if((me==='"'||me==="'"||me==="`"||oe==='"'||oe==="'"||oe==="`")&&me!==oe)throw new a("property names with quotes must have matching quotes");if((Ae==="constructor"||!ve)&&(te=!0),se+="."+Ae,Q="%"+se+"%",L(O,Q))le=O[Q];else if(le!=null){if(!(Ae in le)){if(!de)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(b&&pe+1>=H.length){var j=b(le,Ae);ve=!!j,ve&&"get"in j&&!("originalValue"in j.get)?le=j.get:le=le[Ae]}else ve=L(le,Ae),le=le[Ae];ve&&!te&&(O[Q]=le)}}return le},eu}var nu,zm;function jm(){if(zm)return nu;zm=1;var e=tu(),t=Nm(),n=t([e("%String.prototype.indexOf%")]);return nu=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},nu}var ru,Rm;function Bm(){if(Rm)return ru;Rm=1;var e=tu(),t=jm(),n=Xa(),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 ru=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var v=l(d,p);return c(d)===0&&(d=void 0),v}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,v){d||(d=new o),a(d,p,v)}};return f},ru}var ou,Hm;function AC(){if(Hm)return ou;Hm=1;var e=tu(),t=jm(),n=Xa(),r=Bm(),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 ou=i?function(){var d,f,p={assert:function(v){if(!p.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&f)return f.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):f&&f.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!f&&f.has(v)},set:function(v,g){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,g)):r&&(f||(f=r()),f.set(v,g))}};return p}:r,ou}var iu,Wm;function qm(){if(Wm)return iu;Wm=1;var e=Po(),t=Xa(),n=rC(),r=Bm(),o=AC(),i=o||r||n;return iu=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},iu}var Um=e=>Array.isArray(e),au=e=>e===void 0,su=e=>e===null,PC=Function.bind.call(Function.call,Object.prototype.toString),OC=e=>!!e&&PC(e)==="[object Error]"||e instanceof Error,Gm=(e,t)=>e instanceof t,_C=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},MC=e=>Object.prototype.toString.call(e)==="[object Date]"&&Gm(e,Date),Re={array:Um,date:MC,empty:e=>su(e)||au(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:Gm,isError:OC,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>su(e)||au(e),null:su,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Um(e)&&typeof e=="object",primitive:_C,string:e=>typeof e=="string",undefined:au},DC=e=>Object.keys(e),Rn=(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},NC=e=>e.replace(/[^0-9]/g,"");const FC=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},LC=(e,t)=>({classGroupId:e,validator:t}),Ym=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ja="-",Km=[],VC="arbitrary..",$C=e=>{const t=jC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return zC(a);const s=a.split(Ja),l=s[0]===""&&s.length>1?1:0;return Zm(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?FC(c,l):l:c||Km}return n[a]||Km}}},Zm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Zm(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Ja):e.slice(t).join(Ja),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},zC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?VC+r:void 0})(),jC=e=>{const{theme:t,classGroups:n}=e;return RC(n,t)},RC=(e,t)=>{const n=Ym();for(const r in e){const o=e[r];lu(o,n,r,t)}return n},lu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];BC(a,t,n,r)}},BC=(e,t,n,r)=>{if(typeof e=="string"){HC(e,t,n);return}if(typeof e=="function"){WC(e,t,n,r);return}qC(e,t,n,r)},HC=(e,t,n)=>{const r=e===""?t:Xm(t,e);r.classGroupId=n},WC=(e,t,n,r)=>{if(UC(e)){lu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(LC(n,e))},qC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];lu(l,Xm(t,s),n,r)}},Xm=(e,t)=>{let n=e;const r=t.split(Ja),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=Ym(),n.nextPart.set(a,s)),n=s}return n},UC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,GC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},cu="!",Qm=":",YC=[],Jm=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),KC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const h=o[g];if(a===0&&s===0){if(h===Qm){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){c=g;continue}}h==="["?a++:h==="]"?a--:h==="("?s++:h===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(cu)?(f=d.slice(0,-1),p=!0):d.startsWith(cu)&&(f=d.slice(1),p=!0);const v=c&&c>l?c-l:void 0;return Jm(i,p,f,v)};if(t){const o=t+Qm,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):Jm(YC,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ZC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},XC=e=>({cache:GC(e.cacheSize),parseClassName:KC(e),sortModifiers:ZC(e),...$C(e)}),QC=/\s+/,JC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(QC);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?v.substring(0,g):v);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+cu:b,T=x+y;if(a.indexOf(T)>-1)continue;a.push(T);const E=o(y,h);for(let I=0;I<E.length;++I){const w=E[I];a.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},ek=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=eg(n))&&(o&&(o+=" "),o+=r);return o},eg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=eg(e[r]))&&(n&&(n+=" "),n+=t);return n},tk=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=XC(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=JC(l,n);return o(l,u),u};return i=a,(...l)=>i(ek(...l))},nk=[],zt=e=>{const t=n=>n[e]||nk;return t.isThemeGetter=!0,t},tg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ng=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rk=/^\d+\/\d+$/,ok=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ik=/\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$/,ak=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oo=e=>rk.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),yr=e=>!!e&&Number.isInteger(Number(e)),uu=e=>e.endsWith("%")&&We(e.slice(0,-1)),ar=e=>ok.test(e),ck=()=>!0,uk=e=>ik.test(e)&&!ak.test(e),rg=()=>!1,dk=e=>sk.test(e),fk=e=>lk.test(e),pk=e=>!we(e)&&!Se(e),hk=e=>_o(e,lg,rg),we=e=>tg.test(e),Zr=e=>_o(e,cg,uk),du=e=>_o(e,bk,We),og=e=>_o(e,ag,rg),mk=e=>_o(e,sg,fk),es=e=>_o(e,ug,dk),Se=e=>ng.test(e),Vi=e=>Mo(e,cg),gk=e=>Mo(e,xk),ig=e=>Mo(e,ag),vk=e=>Mo(e,lg),yk=e=>Mo(e,sg),ts=e=>Mo(e,ug,!0),_o=(e,t,n)=>{const r=tg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mo=(e,t,n=!1)=>{const r=ng.exec(e);return r?r[1]?t(r[1]):n:!1},ag=e=>e==="position"||e==="percentage",sg=e=>e==="image"||e==="url",lg=e=>e==="length"||e==="size"||e==="bg-size",cg=e=>e==="length",bk=e=>e==="number",xk=e=>e==="family-name",ug=e=>e==="shadow",wk=tk(()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),o=zt("tracking"),i=zt("leading"),a=zt("breakpoint"),s=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),d=zt("inset-shadow"),f=zt("text-shadow"),p=zt("drop-shadow"),v=zt("blur"),g=zt("perspective"),h=zt("aspect"),y=zt("ease"),b=zt("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"],E=()=>[...T(),Se,we],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[Se,we,l],P=()=>[Oo,"full","auto",...C()],_=()=>[yr,"none","subgrid",Se,we],F=()=>["auto",{span:["full",yr,Se,we]},yr,Se,we],V=()=>[yr,"auto",Se,we],N=()=>["auto","min","max","fr",Se,we],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],M=()=>[Oo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,Se,we],L=()=>[...T(),ig,og,{position:[Se,we]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",vk,hk,{size:[Se,we]}],q=()=>[uu,Vi,Zr],G=()=>["","none","full",c,Se,we],W=()=>["",We,Vi,Zr],J=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[We,uu,ig,og],Y=()=>["","none",v,Se,we],K=()=>["none",We,Se,we],X=()=>["none",We,Se,we],de=()=>[We,Se,we],H=()=>[Oo,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[ck],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[pk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",We],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oo,we,Se,h]}],container:["container"],columns:[{columns:[We,we,Se,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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[yr,"auto",Se,we]}],basis:[{basis:[Oo,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Oo,"auto","initial","none",we]}],grow:[{grow:["",We,Se,we]}],shrink:[{shrink:["",We,Se,we]}],order:[{order:[yr,"first","last","none",Se,we]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"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":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],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:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"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,Zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Se,du]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uu,we]}],"font-family":[{font:[gk,we,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,Se,we]}],"line-clamp":[{"line-clamp":[We,"none",Se,du]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Se,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Se,Zr]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[We,"auto",Se,we]}],"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",Se,we]}],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",Se,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yr,Se,we],radial:["",Se,we],conic:[yr,Se,we]},yk,mk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Se,we]}],"outline-w":[{outline:["",We,Vi,Zr]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ts,es]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ts,es]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[We,Zr]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ts,es]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[We,Se,we]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"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":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Se,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,we]}],filter:[{filter:["","none",Se,we]}],blur:[{blur:Y()}],brightness:[{brightness:[We,Se,we]}],contrast:[{contrast:[We,Se,we]}],"drop-shadow":[{"drop-shadow":["","none",p,ts,es]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",We,Se,we]}],"hue-rotate":[{"hue-rotate":[We,Se,we]}],invert:[{invert:["",We,Se,we]}],saturate:[{saturate:[We,Se,we]}],sepia:[{sepia:["",We,Se,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,we]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[We,Se,we]}],"backdrop-contrast":[{"backdrop-contrast":[We,Se,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Se,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Se,we]}],"backdrop-invert":[{"backdrop-invert":["",We,Se,we]}],"backdrop-opacity":[{"backdrop-opacity":[We,Se,we]}],"backdrop-saturate":[{"backdrop-saturate":[We,Se,we]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Se,we]}],"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",Se,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Se,we]}],ease:[{ease:["linear","initial",y,Se,we]}],delay:[{delay:[We,Se,we]}],animate:[{animate:["none",b,Se,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Se,we]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[Se,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",Se,we]}],"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",Se,we]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[We,Vi,Zr,du]}],stroke:[{stroke:["none",...k()]}],"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"]}}),sr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},Sk=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),fu=e=>Re.function(e),Pe=(...e)=>wk(Uh(e)),dg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},$i=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},fg=e=>e.scrollHeight>e.clientHeight,zi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},Tk=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},pg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,a=o.bottom<=r.bottom,s=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&a&&s&&l},ln=S.forwardRef(function(t,n){const r=t.as||"span";return m.jsx(r,{ref:n,...t,as:void 0})}),Ek={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"}},Ck=Ao("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"}}}),kk=Ao("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:Ek,defaultVariants:{theme:"primary",size:"default"}}),ns=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Pe(kk({size:a,theme:o?"loading":i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:Ck({theme:n})}):null,r,s.children]})}),Ik=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})};var Mt=function(){return Mt=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},Mt.apply(this,arguments)};function pu(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 hu(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 ji=function(e){return e.replace(new RegExp(" ","g")," ")},hg=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)},Ak=function(e){return e.replace(/^0+([0-9]+)/,"$1")},mg=function(e,t,n){var r=e.length-2,o=Ak(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},gg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},rs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},Pk=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},mu=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},Ok=function(e){return e==="money"||e==="currency"},_k=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Mt(Mt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},os=function(e,t){var n=hg(gg(e),t.fraction.length),r="".concat(t.currency).concat(mg(n,t.group,t.decimal));return ji(r)},Mk=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=pu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var v=_k(r,i,s);return v.currency=ji("".concat(v.currency.trim()," ")),v.literal=ji(v.literal.trim()),v},[r,i]),f=function(v){var g=os(v.target.value,d),h=rs(g);v.target.value=g,v.target.setAttribute("data-number",h.toString()),l?.(v),h!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var g=os(v,d),h=rs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});l?.(Mt(Mt({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var p=c.defaultValue?os(c.defaultValue,d):void 0;return S.createElement("input",Mt({},c,{value:typeof c.value=="string"?os(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),Dk=1,Nk=function(e){return e==="percentage"||e==="percent"||e==="percentual"},Fk=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Mt(Mt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},is=function(e,t){var n=hg(gg(e),t.fraction.length),r="".concat(mg(n,t.group,t.decimal)," ").concat(t.percentSign);return ji(r)},Lk=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=pu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=hu(S.useState(function(){var y,b;return(b=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var y,b=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(is(b,d))},[a.value]);var d=S.useMemo(function(){var y=Fk(r);return y.percentSign=ji("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-Dk,p=function(y){var b,x=s.current;x&&(x.setSelectionRange(f,f),y&&((b=a.onFocus)===null||b===void 0||b.call(a,y)))},v=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&p()}i?.(y)},g=function(y){var b=is(y.target.value,d),x=rs(b);u(b),y.target.value=b,y.target.setAttribute("data-number",x.toString()),o?.(y)};S.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var b=is(y,d),x=rs(b);u(b),s.current.value=b,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Mt(Mt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return p()},[c]);var h=a.defaultValue?is(a.defaultValue,d):void 0;return S.createElement("input",Mt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:p,onKeyUp:v,ref:s,type:"text"}))}),Ri={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},Vk=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=as[i];a===void 0?r.push(i.replace(Ri.dots,"\\.").replace(Ri.openParenthesis,"\\(").replace(Ri.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ri.leadingBars,"\\")},Bi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return gu(o,n);var i=Vk(o);return n?"^".concat(i,"$"):i},$k=function(e){return e.replace(Ri.escape,"\\$&")},gu=function(e,t){var n=e.map(function(r){return typeof r=="string"?$k(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},as={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]/}},zk=/\d/,vg="(dd) 9dddd-dddd",yg="(dd) dddd-dddd",bg="ddd.ddd.ddd-dd",xg="dd.ddd.ddd/dddd-dd",ss=function(e){return e.replace(/\D/g,"")},jk=["2",/[0-3]/,":",/[0-5]/,/\d/],Rk=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:bg,isoDate:"dddd-dd-dd",cnpj:xg,telephone:yg,cellphone:vg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ss(e).length<=11?bg:xg},int:function(e){return e===void 0&&(e=""),zk.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=ss(e);return t.length<11?yg:vg},time:function(e){var t=ss(e),n=t[0];return n==="2"?jk:Rk}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Mt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Bi(e,"",!0),infinity:n.infinity},n)},Zt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:ss}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function wg(e,t,n,r){var o,i;r===void 0&&(r=as);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],f=a[c];if(d===void 0){s+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(s+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return s}var Sg=function(e){return e},Bk=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Bi(e,n,t));return r.test(n)};function Hk(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var Wk=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,f=e.as,p=pu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=S.useRef(null);S.useImperativeHandle(t,function(){return v.current});var g=mu(s),h=mu(d),y=mu(u),b=S.useRef(Bk(u,i,p.value||p.defaultValue)),x=f??"input",T=hu(S.useState(""),2),E=T[0],I=T[1],w=Hk(E),C=S.useCallback(function(D,z){var M,k,L=(M=D??z)!==null&&M!==void 0?M:"";if(u===void 0)return L;var $=(k=L?.toString())!==null&&k!==void 0?k:"";return wg($,typeof u=="function"?u($):u,a??Sg,c??as)},[a,u,c]),P=hu(S.useState(function(){return C(p.value,p.defaultValue)}),2),_=P[0],F=P[1],V=C(p.defaultValue,p.defaultValue),N=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(_);return Array.isArray(D)?gu(D,i):Bi(u,_,i)}return typeof u=="string"?Bi(u,_,i):gu(u,i)},[l,_,i,u]);S.useEffect(function(){if(p.value!==void 0){var D=C(p.value,p.defaultValue);F(D),v.current!==null&&(v.current.value=D)}},[p.value,u,a,p.defaultValue]);var O=function(D){var z,M,k,L,$,B=D.currentTarget,q=D.target.value;if(y.current===void 0)return F(q),(z=h.current)===null||z===void 0||z.call(h,q),(M=g.current)===null||M===void 0||M.call(g,D),d?.(q);var G=new RegExp(Bi(y.current,q,i)),W=(k=B.selectionEnd)!==null&&k!==void 0?k:0,J=function(X,de,H){if(X.type!=="number")return X.setSelectionRange(de,H)};if(r&&b.current&&q.length>=_.length)return B.value=_,J(B,W-1,W-1);var re=!1;q.length<w.length&&(b.current=!1,re=!0),G.test(q)&&(b.current=!0);var ee=W,Y=q[ee-1],K=wg(q,typeof y.current=="function"?y.current(q):y.current,a??Sg,c??as);for(B.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==Y;)ee+=1;re?J(B,W,W):J(B,ee,ee),D.target.value=K,I(K),(L=h.current)===null||L===void 0||L.call(h,K),($=g.current)===null||$===void 0||$.call(g,D)};return S.createElement(x,Mt({},p,{ref:v,pattern:N,onChange:O,defaultValue:Tg(p.defaultValue)?V:void 0,value:Tg(p.value)?C(p.value,p.value):p.value}))}),Tg=function(e){return typeof e=="string"},Eg=S.forwardRef(function(e,t){return Ok(e.mask)?S.createElement(Mk,Mt({},e,{mask:void 0,ref:t})):Nk(e.mask)?S.createElement(Lk,Mt({},e,{mask:void 0,ref:t})):S.createElement(Wk,Mt({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(Eg,Mt({},e,t))}};on(Zt.cellTelephone),on(Zt.cellphone),on(Zt.cep),on(Zt.cnpj),on(Zt.color),on(Zt.cpf),on(Zt.cpfCnpj),on(Zt.creditCard),on(Zt.date),on(Zt.int),on(Zt.isoDate),on(Zt.telephone),on(Zt.time),on(Zt.uuid);var Cg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&Pk(Zt,t.mask)?Zt[t.mask]:{mask:t.mask}},[t.mask]),o=Mt(Mt({},t),r);return S.createElement(Eg,Mt({},o,{ref:n}))});const qk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),kg=e=>{const t=Uk(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ig=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Gk=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Yk={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"};const Kk=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,...Yk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ig("lucide",o),...!i&&!Gk(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const tt=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(Kk,{ref:i,iconNode:t,className:Ig(`lucide-${qk(kg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=kg(e),n};const Zk=tt("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"}]]);const Xk=tt("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"}]]);const Ag=tt("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"}]]);const Qk=tt("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"}]]);const Jk=tt("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"}]]);const vu=tt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const eI=tt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const yu=tt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const bu=tt("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"}]]);const tI=tt("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"}]]);const nI=tt("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"}]]);const rI=tt("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["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"}]]);const Pg=tt("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Og=tt("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const _g=tt("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const oI=tt("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"}]]);const iI=tt("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"}]]);const xu=tt("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"}]]);const aI=tt("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"}]]);const br=tt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const sI=tt("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const lI=tt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const cI=tt("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const wu=tt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const uI=tt("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"}]]);const dI=tt("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"}]]);const Su=tt("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"}]]);const ls=tt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Tu=tt("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"}]]);const fI=tt("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"}]]);const Do=tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),cs={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>)`},xr=(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(xr(a,t,n,s))},[]),Mg=(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]:Mg(a,t,n,s)}},{}),Dg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},us=(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)},pI={default:e=>us(e,{result:Dg.default}),dark:e=>us(e,{result:Dg.dark})},No=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},hI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Eu=(e,t)=>{const n=xr(e.colors,No(t?.colors)),r=xr(e.spacing,No(t?.spacing)),o=xr(e.rounded,No(t?.rounded)),i=xr(e.shadow,No(t?.rounded)),a=xr(e.zIndex,No(t?.zIndex??hI)),s=e.custom?xr(e.custom,No(t?.customTokens)):[];return n.concat(r,o,s,a,i)},mI=(e,t)=>us(Eu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),gI=(e,t)=>Eu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),vI=(e,t)=>us(Eu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ds={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",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",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"},fs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Xr=S.createContext({parser:cs.hsla,tweaks:fs,floatingRef:void 0,map:ds,locale:void 0}),Pt=()=>{const e=S.useContext(Xr);return e?e.map:ds},Cu=()=>{const e=S.useContext(Xr);return e?e.tweaks:fs};function ps(){return typeof window<"u"}function wr(e){return hs(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(hs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hs(e){return ps()?e instanceof Node||e instanceof qt(e).Node:!1}function nt(e){return ps()?e instanceof Element||e instanceof qt(e).Element:!1}function Ot(e){return ps()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Hi(e){return!ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const yI=new Set(["inline","contents"]);function Wi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!yI.has(o)}const bI=new Set(["table","td","th"]);function xI(e){return bI.has(wr(e))}const wI=[":popover-open",":modal"];function ms(e){return wI.some(t=>{try{return e.matches(t)}catch{return!1}})}const SI=["transform","translate","scale","rotate","perspective"],TI=["transform","translate","scale","rotate","perspective","filter"],EI=["paint","layout","strict","content"];function ku(e){const t=gs(),n=nt(e)?cn(e):e;return SI.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)||TI.some(r=>(n.willChange||"").includes(r))||EI.some(r=>(n.contain||"").includes(r))}function CI(e){let t=cr(e);for(;Ot(t)&&!lr(t);){if(ku(t))return t;if(ms(t))return null;t=cr(t)}return null}function gs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const kI=new Set(["html","body","#document"]);function lr(e){return kI.has(wr(e))}function cn(e){return qt(e).getComputedStyle(e)}function vs(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(wr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hi(e)&&e.host||Bn(e);return Hi(t)?t.host:t}function Ng(e){const t=cr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&Wi(t)?t:Ng(t)}function Sr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ng(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=Iu(a);return t.concat(a,a.visualViewport||[],Wi(o)?o:[],s&&n?Sr(s):[])}return t.concat(o,Sr(o,[],n))}function Iu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const II=["top","right","bottom","left"],Fg=["start","end"],Lg=II.reduce((e,t)=>e.concat(t,t+"-"+Fg[0],t+"-"+Fg[1]),[]),Tr=Math.min,un=Math.max,ys=Math.round,Fo=Math.floor,Hn=e=>({x:e,y:e}),AI={left:"right",right:"left",bottom:"top",top:"bottom"},PI={start:"end",end:"start"};function Au(e,t,n){return un(e,Tr(t,n))}function Qr(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function kn(e){return e.split("-")[1]}function Vg(e){return e==="x"?"y":"x"}function Pu(e){return e==="y"?"height":"width"}const OI=new Set(["top","bottom"]);function ur(e){return OI.has(Wn(e))?"y":"x"}function Ou(e){return Vg(ur(e))}function $g(e,t,n){n===void 0&&(n=!1);const r=kn(e),o=Ou(e),i=Pu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xs(a)),[a,xs(a)]}function _I(e){const t=xs(e);return[bs(e),t,bs(t)]}function bs(e){return e.replace(/start|end/g,t=>PI[t])}const zg=["left","right"],jg=["right","left"],MI=["top","bottom"],DI=["bottom","top"];function NI(e,t,n){switch(e){case"top":case"bottom":return n?t?jg:zg:t?zg:jg;case"left":case"right":return t?MI:DI;default:return[]}}function FI(e,t,n,r){const o=kn(e);let i=NI(Wn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(bs)))),i}function xs(e){return e.replace(/left|right|bottom|top/g,t=>AI[t])}function LI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rg(e){return typeof e!="number"?LI(e):{top:e,right:e,bottom:e,left:e}}function ws(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}}var VI=["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])"],Ss=VI.join(","),Bg=typeof Element>"u",Lo=Bg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ts=!Bg&&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},Es=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},$I=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Hg=function(t,n,r){if(Es(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ss));return n&&Lo.call(t,Ss)&&o.unshift(t),o=o.filter(r),o},Wg=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Es(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=Lo.call(a,Ss);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Es(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},qg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ug=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$I(t))&&!qg(t)?0:t.tabIndex},zI=function(t,n){var r=Ug(t);return r<0&&n&&!qg(t)?0:r},jI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Gg=function(t){return t.tagName==="INPUT"},RI=function(t){return Gg(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},HI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},WI=function(t){if(!t.name)return!0;var n=t.form||Ts(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=HI(o,t.form);return!i||i===t},qI=function(t){return Gg(t)&&t.type==="radio"},UI=function(t){return qI(t)&&!WI(t)},GI=function(t){var n,r=t&&Ts(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=Ts(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},Yg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},YI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lo.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=Ts(t);if(l&&!l.shadowRoot&&o(l)===!0)return Yg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(GI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Yg(t);return!1},KI=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 Lo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},_u=function(t,n){return!(n.disabled||Es(n)||RI(n)||YI(n,t)||BI(n)||KI(n))},Mu=function(t,n){return!(UI(n)||Ug(n)<0||!_u(t,n))},ZI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=zI(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(jI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Cs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Wg([t],n.includeContainer,{filter:Mu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZI}):r=Hg(t,n.includeContainer,Mu.bind(null,n)),XI(r)},QI=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Wg([t],n.includeContainer,{filter:_u.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Hg(t,n.includeContainer,_u.bind(null,n)),r},Kg=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lo.call(t,Ss)===!1?!1:Mu(n,t)};function Du(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zg(){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 Xg(){return/apple/i.test(navigator.vendor)}function Nu(){const e=/android/i;return e.test(Du())||e.test(Zg())}function JI(){return Du().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Qg(){return Zg().includes("jsdom/")}const Jg="data-floating-ui-focusable",eA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Fu="ArrowLeft",Lu="ArrowRight",tA="ArrowUp",nA="ArrowDown";function qn(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 Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Hi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Vu(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 rA(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function $u(e){return Ot(e)&&e.matches(eA)}function zu(e){return e?e.getAttribute("role")==="combobox"&&$u(e):!1}function oA(e){if(!e||Qg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ks(e){return e?e.hasAttribute(Jg)?e:e.querySelector("["+Jg+"]")||e:null}function Jr(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,...Jr(e,o.id,n)])}function iA(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Jr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function ev(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 Gt(e){e.preventDefault(),e.stopPropagation()}function aA(e){return"nativeEvent"in e}function tv(e){return e.mozInputSource===0&&e.isTrusted?!0:Nu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function nv(e){return Qg()?!1:!Nu()&&e.width===0&&e.height===0||Nu()&&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 Vo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var sA=typeof document<"u",lA=function(){},rt=sA?S.useLayoutEffect:lA;const cA={...A};function Wt(e){const t=A.useRef(e);return rt(()=>{t.current=e}),t}const uA=cA.useInsertionEffect||(e=>e());function Ct(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return uA(()=>{t.current=e}),A.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 Is(e,t,n){return Math.floor(e/t)!==n}function qi(e,t){return t<0||t>=e.current.length}function ju(e,t){return Xt(e,{disabledIndices:t})}function rv(e,t){return Xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xt(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&&As(e,a,o));return a}function dA(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,f=u;if(n.key===tA){if(d&&Gt(n),u===-1)f=c;else if(f=Xt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const p=u%a,v=c%a,g=c-(v-p);v===p?f=c:f=v>p?g:g-a}qi(e,f)&&(f=u)}if(n.key===nA&&(d&&Gt(n),u===-1?f=l:(f=Xt(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Xt(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),qi(e,f)&&(f=u)),r==="both"){const p=Fo(u/a);n.key===(i?Fu:Lu)&&(d&&Gt(n),u%a!==a-1?(f=Xt(e,{startingIndex:u,disabledIndices:s}),o&&Is(f,a,p)&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s})),Is(f,a,p)&&(f=u)),n.key===(i?Lu:Fu)&&(d&&Gt(n),u%a!==0?(f=Xt(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Is(f,a,p)&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Is(f,a,p)&&(f=u));const v=Fo(c/a)===p;qi(e,f)&&(o&&v?f=n.key===(i?Lu:Fu)?c:Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}):f=u)}return f}function fA(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 f=0;f<l;f++)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function pA(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 hA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function As(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 Ui=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ov(e,t){const n=Cs(e,Ui()),r=n.length;if(r===0)return;const o=qn(Ut(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function iv(e){return ov(Ut(e).body,1)||e}function av(e){return ov(Ut(e).body,-1)||e}function Gi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function mA(e){Cs(e,Ui()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function sv(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 lv(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),a=Ou(t),s=Pu(a),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kn(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const gA=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}=lv(c,r,l),f=r,p={},v=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x:b,y:x,data:T,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=x??d,p={...p,[h]:{...p[h],...T}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=lv(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function Ps(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:f=!1,padding:p=0}=Qr(t,e),v=Rg(p),h=s[f?d==="floating"?"reference":"floating":d],y=ws(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})),b=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},E=ws(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-E.top+v.top)/T.y,bottom:(E.bottom-y.bottom+v.bottom)/T.y,left:(y.left-E.left+v.left)/T.x,right:(E.right-y.right+v.right)/T.x}}const vA=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}=Qr(e,t)||{};if(c==null)return{};const d=Rg(u),f={x:n,y:r},p=Ou(o),v=Pu(p),g=await a.getDimensions(c),h=p==="y",y=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[v]+i.reference[p]-f[p]-i.floating[v],E=f[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(a.isElement==null?void 0:a.isElement(I)))&&(w=s.floating[x]||i.floating[v]);const C=T/2-E/2,P=w/2-g[v]/2-1,_=Tr(d[y],P),F=Tr(d[b],P),V=_,N=w-g[v]-F,O=w/2-g[v]/2+C,D=Au(V,O,N),z=!l.arrow&&kn(o)!=null&&O!==D&&i.reference[v]/2-(O<V?_:F)-g[v]/2<0,M=z?O<V?O-V:O-N:0;return{[p]:f[p]+M,data:{[p]:D,centerOffset:O-D-M,...z&&{alignmentOffset:M}},reset:z}}});function yA(e,t,n){return(e?[...n.filter(o=>kn(o)===e),...n.filter(o=>kn(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?kn(o)===e||(t?bs(o)!==o:!1):!0)}const bA=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:f=Lg,autoAlignment:p=!0,...v}=Qr(e,t),g=d!==void 0||f===Lg?yA(d||null,p,f):f,h=await Ps(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,b=g[y];if(b==null)return{};const x=$g(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==b)return{reset:{placement:g[0]}};const T=[h[Wn(b)],h[x[0]],h[x[1]]],E=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=g[y+1];if(I)return{data:{index:y+1,overflows:E},reset:{placement:I}};const w=E.map(_=>{const F=kn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce((V,N)=>V+N,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,kn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==s?{data:{index:y+1,overflows:E},reset:{placement:P}}:{}}}},xA=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:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=Qr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),b=ur(s),x=Wn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!g?[xs(s)]:_I(s)),I=v!=="none";!f&&I&&E.push(...FI(s,g,v,T));const w=[s,...E],C=await Ps(t,h),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(C[y]),d){const O=$g(o,a,T);P.push(C[O[0]],C[O[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(O=>O<=0)){var F,V;const O=(((F=i.flip)==null?void 0:F.index)||0)+1,D=w[O];if(D&&(!(d==="alignment"?b!==ur(D):!1)||_.every(k=>ur(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:O,overflows:_},reset:{placement:D}};let z=(V=_.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:V.placement;if(!z)switch(p){case"bestFit":{var N;const M=(N=_.filter(k=>{if(I){const L=ur(k.placement);return L===b||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,$)=>L+$,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:N[0];M&&(z=M);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}},wA=new Set(["left","top"]);async function SA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wn(n),s=kn(n),l=ur(n)==="y",c=wA.has(a)?-1:1,u=i&&l?-1:1,d=Qr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const TA=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 SA(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}}}}},EA=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:y,y:b}=h;return{x:y,y:b}}},...l}=Qr(e,t),c={x:n,y:r},u=await Ps(t,l),d=ur(Wn(o)),f=Vg(d);let p=c[f],v=c[d];if(i){const h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[h],x=p-u[y];p=Au(b,p,x)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[h],x=v-u[y];v=Au(b,v,x)}const g=s.fn({...t,[f]:p,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:a}}}}}},CA=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}=Qr(e,t),u=await Ps(t,c),d=Wn(o),f=kn(o),p=ur(o)==="y",{width:v,height:g}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const b=g-u.top-u.bottom,x=v-u.left-u.right,T=Tr(g-u[h],b),E=Tr(v-u[y],x),I=!t.middlewareData.shift;let w=T,C=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const _=un(u.left,0),F=un(u.right,0),V=un(u.top,0),N=un(u.bottom,0);p?C=v-2*(_!==0||F!==0?_+F:un(u.left,u.right)):w=g-2*(V!==0||N!==0?V+N:un(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const P=await a.getDimensions(s.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function cv(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ys(n)!==i||ys(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ru(e){return nt(e)?e:e.contextElement}function $o(e){const t=Ru(e);if(!Ot(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cv(t);let a=(i?ys(n.width):n.width)/r,s=(i?ys(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const kA=Hn(0);function uv(e){const t=qt(e);return!gs()||!t.visualViewport?kA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function eo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ru(e);let a=Hn(1);t&&(r?nt(r)&&(a=$o(r)):a=$o(e));const s=IA(i,n,r)?uv(i):Hn(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 f=qt(i),p=r&&nt(r)?qt(r):r;let v=f,g=Iu(v);for(;g&&r&&p!==v;){const h=$o(g),y=g.getBoundingClientRect(),b=cn(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,T=y.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,v=qt(g),g=Iu(v)}}return ws({width:u,height:d,x:l,y:c})}function Os(e,t){const n=vs(e).scrollLeft;return t?t.left+n:eo(Bn(e)).left+n}function dv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Os(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function AA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Bn(r),s=t?ms(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Ot(r);if((d||!d&&!i)&&((wr(r)!=="body"||Wi(a))&&(l=vs(r)),Ot(r))){const p=eo(r);c=$o(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!i?dv(a,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function PA(e){return Array.from(e.getClientRects())}function OA(e){const t=Bn(e),n=vs(e),r=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Os(e);const s=-n.scrollTop;return cn(r).direction==="rtl"&&(a+=un(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const fv=25;function _A(e,t){const n=qt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=gs();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Os(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-p);v<=fv&&(i-=v)}else c<=fv&&(i+=c);return{width:i,height:a,x:s,y:l}}const MA=new Set(["absolute","fixed"]);function DA(e,t){const n=eo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?$o(e):Hn(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 pv(e,t,n){let r;if(t==="viewport")r=_A(e,n);else if(t==="document")r=OA(Bn(e));else if(nt(t))r=DA(t,n);else{const o=uv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ws(r)}function hv(e,t){const n=cr(e);return n===t||!nt(n)||lr(n)?!1:cn(n).position==="fixed"||hv(n,t)}function NA(e,t){const n=t.get(e);if(n)return n;let r=Sr(e,[],!1).filter(s=>nt(s)&&wr(s)!=="body"),o=null;const i=cn(e).position==="fixed";let a=i?cr(e):e;for(;nt(a)&&!lr(a);){const s=cn(a),l=ku(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&MA.has(o.position)||Wi(a)&&!l&&hv(e,a))?r=r.filter(u=>u!==a):o=s,a=cr(a)}return t.set(e,r),r}function FA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ms(t)?[]:NA(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=pv(t,u,o);return c.top=un(d.top,c.top),c.right=Tr(d.right,c.right),c.bottom=Tr(d.bottom,c.bottom),c.left=un(d.left,c.left),c},pv(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LA(e){const{width:t,height:n}=cv(e);return{width:t,height:n}}function VA(e,t,n){const r=Ot(t),o=Bn(t),i=n==="fixed",a=eo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Os(o)}if(r||!r&&!i)if((wr(t)!=="body"||Wi(o))&&(s=vs(t)),r){const p=eo(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?dv(o,s):Hn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Bu(e){return cn(e).position==="static"}function mv(e,t){if(!Ot(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function gv(e,t){const n=qt(e);if(ms(e))return n;if(!Ot(e)){let o=cr(e);for(;o&&!lr(o);){if(nt(o)&&!Bu(o))return o;o=cr(o)}return n}let r=mv(e,t);for(;r&&xI(r)&&Bu(r);)r=mv(r,t);return r&&lr(r)&&Bu(r)&&!ku(r)?n:r||CI(e)||n}const $A=async function(e){const t=this.getOffsetParent||gv,n=this.getDimensions,r=await n(e.floating);return{reference:VA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zA(e){return cn(e).direction==="rtl"}const jA={convertOffsetParentRelativeRectToViewportRelativeRect:AA,getDocumentElement:Bn,getClippingRect:FA,getOffsetParent:gv,getElementRects:$A,getClientRects:PA,getDimensions:LA,getScale:$o,isElement:nt,isRTL:zA};function vv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RA(e,t){let n=null,r;const o=Bn(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:f,height:p}=c;if(s||t(),!f||!p)return;const v=Fo(d),g=Fo(o.clientWidth-(u+f)),h=Fo(o.clientHeight-(d+p)),y=Fo(u),x={rootMargin:-v+"px "+-g+"px "+-h+"px "+-y+"px",threshold:un(0,Tr(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!vv(c,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return a(!0),i}function to(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=Ru(e),u=o||i?[...c?Sr(c):[],...Sr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?RA(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?eo(e):null;l&&h();function h(){const y=eo(e);g&&!vv(g,y)&&n(),g=y,v=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const BA=TA,HA=bA,WA=EA,qA=xA,UA=CA,yv=vA,GA=(e,t,n)=>{const r=new Map,o={platform:jA,...n},i={...o.platform,_c:r};return gA(e,t,{...o,platform:i})};var YA=typeof document<"u",KA=function(){},_s=YA?S.useLayoutEffect:KA;function Ms(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(!Ms(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)&&!Ms(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function bv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xv(e,t){const n=bv(e);return Math.round(t*n)/n}function Hu(e){const t=A.useRef(e);return _s(()=>{t.current=e}),t}function ZA(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]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=A.useState(r);Ms(f,r)||p(r);const[v,g]=A.useState(null),[h,y]=A.useState(null),b=A.useCallback(k=>{k!==I.current&&(I.current=k,g(k))},[]),x=A.useCallback(k=>{k!==w.current&&(w.current=k,y(k))},[]),T=i||v,E=a||h,I=A.useRef(null),w=A.useRef(null),C=A.useRef(u),P=l!=null,_=Hu(l),F=Hu(o),V=Hu(c),N=A.useCallback(()=>{if(!I.current||!w.current)return;const k={placement:t,strategy:n,middleware:f};F.current&&(k.platform=F.current),GA(I.current,w.current,k).then(L=>{const $={...L,isPositioned:V.current!==!1};O.current&&!Ms(C.current,$)&&(C.current=$,jn.flushSync(()=>{d($)}))})},[f,t,n,F,V]);_s(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const O=A.useRef(!1);_s(()=>(O.current=!0,()=>{O.current=!1}),[]),_s(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(_.current)return _.current(T,E,N);N()}},[T,E,N,_,P]);const D=A.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=A.useMemo(()=>({reference:T,floating:E}),[T,E]),M=A.useMemo(()=>{const k={position:n,left:0,top:0};if(!z.floating)return k;const L=xv(z.floating,u.x),$=xv(z.floating,u.y);return s?{...k,transform:"translate("+L+"px, "+$+"px)",...bv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:$}},[n,s,z.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:N,refs:D,elements:z,floatingStyles:M}),[u,N,D,z,M])}const XA=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?yv({element:r.current,padding:o}).fn(n):{}:r?yv({element:r,padding:o}).fn(n):{}}}},zo=(e,t)=>({...BA(e),options:[e,t]}),Ds=(e,t)=>({...WA(e),options:[e,t]}),Ns=(e,t)=>({...qA(e),options:[e,t]}),wv=(e,t)=>({...UA(e),options:[e,t]}),Sv=(e,t)=>({...HA(e),options:[e,t]}),Wu=(e,t)=>({...XA(e),options:[e,t]});function QA(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 Tv=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function JA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Set),a=A.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=A.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=A.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(QA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return m.jsx(Tv.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function Ev(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(Tv),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var f;const p=t!==void 0;a.current[s]=p?t:(f=d?.textContent)!=null?f:null}},[s,i,a,t]);return rt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),rt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const eP="data-floating-ui-focusable",Cv="active",kv="selected",Yi="ArrowLeft",Ki="ArrowRight",Iv="ArrowUp",Fs="ArrowDown",tP={...A};let Av=!1,nP=0;const Pv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nP++;function rP(){const[e,t]=A.useState(()=>Av?Pv():void 0);return rt(()=>{e==null&&t(Pv())},[]),A.useEffect(()=>{Av=!0},[]),e}const Zi=tP.useId||rP;let Xi;process.env.NODE_ENV!=="production"&&(Xi=new Set);function Ls(){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=Xi)!=null&&e.has(o))){var i;(i=Xi)==null||i.add(o),console.warn(o)}}function oP(){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=Xi)!=null&&e.has(o))){var i;(i=Xi)==null||i.add(o),console.error(o)}}const qu=A.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:f,d:p,style:{transform:v,...g}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||Ls("The `ref` prop is required for `FloatingArrow`."));const y=Zi(),[b,x]=A.useState(!1);if(rt(()=>{if(!o)return;cn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&a!=null&&a.x||!I&&a!=null&&a.y)&&(w=null);const C=u*2,P=C/2,_=s/2*(c/-8+1),F=l/2*c/4,V=!!p,N=w&&E==="end"?"bottom":"top";let O=w&&E==="end"?"right":"left";w&&b&&(O=E==="end"?"left":"right");const D=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",k={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",[O]:D,[N]:z,[T]:I||V?"100%":"calc(100% - "+C/2+"px)",transform:[k,v].filter(L=>!!L).join(" "),...g},children:[C>0&&m.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:C+(p?0:1),d:M}),m.jsx("path",{stroke:C&&!p?h.fill:"none",d:M}),m.jsx("clipPath",{id:y,children:m.jsx("rect",{x:-P,y:P*(V?-1:1),width:s+C,height:s})})]})});function Ov(){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 _v=A.createContext(null),Mv=A.createContext(null),Er=()=>{var e;return((e=A.useContext(_v))==null?void 0:e.id)||null},Cr=()=>A.useContext(Mv);function iP(e){const t=Zi(),n=Cr(),o=Er();return rt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function aP(e){const{children:t,id:n}=e,r=Er();return m.jsx(_v.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function sP(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(a=>{n.current=[...n.current,a]},[]),o=A.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=A.useState(()=>Ov());return m.jsx(Mv.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function no(e){return"data-floating-ui-"+e}function Yt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Dv=no("safe-polygon");function Uu(e,t,n){if(n&&!Vo(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 Gu(e){return typeof e=="function"?e():e}function Nv(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:f=!0}=t,p=Cr(),v=Er(),g=Wt(c),h=Wt(l),y=Wt(n),b=Wt(d),x=A.useRef(),T=A.useRef(-1),E=A.useRef(),I=A.useRef(-1),w=A.useRef(!0),C=A.useRef(!1),P=A.useRef(()=>{}),_=A.useRef(!1),F=Ct(()=>{var M;const k=(M=o.current.openEvent)==null?void 0:M.type;return k?.includes("mouse")&&k!=="mousedown"});A.useEffect(()=>{if(!s)return;function M(k){let{open:L}=k;L||(Yt(T),Yt(I),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!g.current||!n)return;function M(L){F()&&r(!1,L,"hover")}const k=Ut(a.floating).documentElement;return k.addEventListener("mouseleave",M),()=>{k.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,F]);const V=A.useCallback(function(M,k,L){k===void 0&&(k=!0),L===void 0&&(L="hover");const $=Uu(h.current,"close",x.current);$&&!E.current?(Yt(T),T.current=window.setTimeout(()=>r(!1,M,L),$)):k&&(Yt(T),r(!1,M,L))},[h,r]),N=Ct(()=>{P.current(),E.current=void 0}),O=Ct(()=>{if(C.current){const M=Ut(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Dv),C.current=!1}}),D=Ct(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function M(q){if(Yt(T),w.current=!1,u&&!Vo(x.current)||Gu(b.current)>0&&!Uu(h.current,"open"))return;const G=Uu(h.current,"open",x.current);G?T.current=window.setTimeout(()=>{y.current||r(!0,q,"hover")},G):n||r(!0,q,"hover")}function k(q){if(D()){O();return}P.current();const G=Ut(a.floating);if(Yt(I),_.current=!1,g.current&&o.current.floatingContext){n||Yt(T),E.current=g.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q,!0,"safe-polygon")}});const J=E.current;G.addEventListener("mousemove",J),P.current=()=>{G.removeEventListener("mousemove",J)};return}(x.current!=="touch"||!Ht(a.floating,q.relatedTarget))&&V(q)}function L(q){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q)}})(q))}function $(){Yt(T)}function B(q){D()||V(q,!1)}if(nt(a.domReference)){const q=a.domReference,G=a.floating;return n&&q.addEventListener("mouseleave",L),f&&q.addEventListener("mousemove",M,{once:!0}),q.addEventListener("mouseenter",M),q.addEventListener("mouseleave",k),G&&(G.addEventListener("mouseleave",L),G.addEventListener("mouseenter",$),G.addEventListener("mouseleave",B)),()=>{n&&q.removeEventListener("mouseleave",L),f&&q.removeEventListener("mousemove",M),q.removeEventListener("mouseenter",M),q.removeEventListener("mouseleave",k),G&&(G.removeEventListener("mouseleave",L),G.removeEventListener("mouseenter",$),G.removeEventListener("mouseleave",B))}}},[a,s,e,u,f,V,N,O,r,n,y,p,h,g,o,D,b]),rt(()=>{var M;if(s&&n&&(M=g.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){C.current=!0;const L=a.floating;if(nt(a.domReference)&&L){var k;const $=Ut(a.floating).body;$.setAttribute(Dv,"");const B=a.domReference,q=p==null||(k=p.nodesRef.current.find(G=>G.id===v))==null||(k=k.context)==null?void 0:k.elements.floating;return q&&(q.style.pointerEvents=""),$.style.pointerEvents="none",B.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{$.style.pointerEvents="",B.style.pointerEvents="",L.style.pointerEvents=""}}}},[s,n,v,a,p,g,F]),rt(()=>{n||(x.current=void 0,_.current=!1,N(),O())},[n,N,O]),A.useEffect(()=>()=>{N(),Yt(T),Yt(I),O()},[s,a.domReference,N,O]);const z=A.useMemo(()=>{function M(k){x.current=k.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(k){const{nativeEvent:L}=k;function $(){!w.current&&!y.current&&r(!0,L,"hover")}u&&!Vo(x.current)||n||Gu(b.current)===0||_.current&&k.movementX**2+k.movementY**2<2||(Yt(I),x.current==="touch"?$():(_.current=!0,I.current=window.setTimeout($,Gu(b.current))))}}},[u,r,n,y,b]);return A.useMemo(()=>s?{reference:z}:{},[s,z])}let Fv=0;function ro(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Fv);const i=()=>e?.focus({preventScroll:n});o?i():Fv=requestAnimationFrame(i)}function Yu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Hi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function lP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function cP(e){return e?.ownerDocument||document}const jo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Lv(e){return e==="inert"?jo.inert:e==="aria-hidden"?jo["aria-hidden"]:jo.none}let Vs=new WeakSet,$s={},Ku=0;const uP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Vv=e=>e&&(e.host||Vv(e.parentNode)),dP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function fP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=dP(t,e),s=new Set,l=new Set(a),c=[];$s[o]||($s[o]=new WeakMap);const u=$s[o];a.forEach(d),f(t),s.clear();function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(wr(v)!=="script")if(s.has(v))f(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",y=Lv(i),b=(y.get(v)||0)+1,x=(u.get(v)||0)+1;y.set(v,b),u.set(v,x),c.push(v),b===1&&h&&Vs.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Ku++,()=>{c.forEach(p=>{const v=Lv(i),h=(v.get(p)||0)-1,y=(u.get(p)||0)-1;v.set(p,h),u.set(p,y),h||(!Vs.has(p)&&i&&p.removeAttribute(i),Vs.delete(p)),y||p.removeAttribute(o)}),Ku--,Ku||(jo.inert=new WeakMap,jo["aria-hidden"]=new WeakMap,jo.none=new WeakMap,Vs=new WeakSet,$s={})}}function $v(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=cP(e[0]).body;return fP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const zs={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},js=A.forwardRef(function(t,n){const[r,o]=A.useState();rt(()=>{Xg()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[no("focus-guard")]:"",style:zs};return m.jsx("span",{...t,...i})}),zv=A.createContext(null),jv=no("portal");function pP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zi(),o=Rv(),[i,a]=A.useState(null),s=A.useRef(null);return rt(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),rt(()=>{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(jv,""),l.appendChild(c),s.current=c,a(c)},[t,r]),rt(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!hs(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(jv,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function dr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=pP({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=a?.modal,p=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function g(h){i&&Gi(h)&&(h.type==="focusin"?sv:mA)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,f]),A.useEffect(()=>{i&&(p||sv(i))},[p,i]),m.jsxs(zv.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&m.jsx(js,{"data-type":"outside",ref:l,onFocus:g=>{if(Gi(g,i)){var h;(h=u.current)==null||h.focus()}else{const y=a?a.domReference:null,b=av(y);b?.focus()}}}),v&&i&&m.jsx("span",{"aria-owns":i.id,style:zs}),i&&jn.createPortal(t,i),v&&i&&m.jsx(js,{"data-type":"outside",ref:c,onFocus:g=>{if(Gi(g,i)){var h;(h=d.current)==null||h.focus()}else{const y=a?a.domReference:null,b=iv(y);b?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Rv=()=>A.useContext(zv);function Bv(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const hP=20;let kr=[];function Zu(){kr=kr.filter(e=>e.isConnected)}function mP(e){Zu(),e&&wr(e)!=="body"&&(kr.push(e),kr.length>hP&&(kr=kr.slice(-20)))}function Hv(){return Zu(),kr[kr.length-1]}function gP(e){const t=Ui();return Kg(e,t)?e:Cs(e,t)[0]||e}function Wv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Ui(),i=QI(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Kg(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 vP=A.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:zs})});function oo(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:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:h,dataRef:y,elements:{domReference:b,floating:x}}=t,T=Ct(()=>{var H;return(H=y.current.floatingContext)==null?void 0:H.nodeId}),E=Ct(p),I=typeof a=="number"&&a<0,w=zu(b)&&I,C=uP(),P=C?i:!0,_=!P||C&&f,F=Wt(o),V=Wt(a),N=Wt(s),O=Cr(),D=Rv(),z=A.useRef(null),M=A.useRef(null),k=A.useRef(!1),L=A.useRef(!1),$=A.useRef(-1),B=A.useRef(-1),q=D!=null,G=ks(x),W=Ct(function(H){return H===void 0&&(H=G),H?Cs(H,Ui()):[]}),J=Ct(H=>{const se=W(H);return F.current.map(ae=>b&&ae==="reference"?b:G&&ae==="floating"?G:se).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function H(ae){if(ae.key==="Tab"){Ht(G,qn(Ut(G)))&&W().length===0&&!w&&Gt(ae);const Q=J(),le=Un(ae);F.current[0]==="reference"&&le===b&&(Gt(ae),ae.shiftKey?ro(Q[Q.length-1]):ro(Q[1])),F.current[1]==="floating"&&le===G&&ae.shiftKey&&(Gt(ae),ro(Q[0]))}}const se=Ut(G);return se.addEventListener("keydown",H),()=>{se.removeEventListener("keydown",H)}},[r,b,G,c,F,w,W,J]),A.useEffect(()=>{if(r||!x)return;function H(se){const ae=Un(se),le=W().indexOf(ae);le!==-1&&($.current=le)}return x.addEventListener("focusin",H),()=>{x.removeEventListener("focusin",H)}},[r,x,W]),A.useEffect(()=>{if(r||!d)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function se(le){const te=le.relatedTarget,fe=le.currentTarget,pe=Un(le);queueMicrotask(()=>{const ve=T(),Ae=!(Ht(b,te)||Ht(x,te)||Ht(te,x)||Ht(D?.portalNode,te)||te!=null&&te.hasAttribute(no("focus-guard"))||O&&(Jr(O.nodesRef.current,ve).find(me=>{var oe,j;return Ht((oe=me.context)==null?void 0:oe.elements.floating,te)||Ht((j=me.context)==null?void 0:j.elements.domReference,te)})||ev(O.nodesRef.current,ve).find(me=>{var oe,j,R;return[(oe=me.context)==null?void 0:oe.elements.floating,ks((j=me.context)==null?void 0:j.elements.floating)].includes(te)||((R=me.context)==null?void 0:R.elements.domReference)===te})));if(fe===b&&G&&Wv(G,F),l&&fe!==b&&!(pe!=null&&pe.isConnected)&&qn(Ut(G))===Ut(G).body){Ot(G)&&G.focus();const me=$.current,oe=W(),j=oe[me]||oe[oe.length-1]||G;Ot(j)&&j.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&te&&Ae&&!L.current&&te!==Hv()&&(k.current=!0,g(!1,le,"focus-out"))})}const ae=!!(!O&&D);function Q(){Yt(B),y.current.insideReactTree=!0,B.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(x&&Ot(b))return b.addEventListener("focusout",se),b.addEventListener("pointerdown",H),x.addEventListener("focusout",se),ae&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",se),b.removeEventListener("pointerdown",H),x.removeEventListener("focusout",se),ae&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,O,D,g,d,l,W,w,T,F,y]);const re=A.useRef(null),ee=A.useRef(null),Y=Bv([re,D?.beforeInsideRef]),K=Bv([ee,D?.afterInsideRef]);A.useEffect(()=>{var H,se;if(r||!x)return;const ae=Array.from((D==null||(H=D.portalNode)==null?void 0:H.querySelectorAll("["+no("portal")+"]"))||[]),le=(se=(O?ev(O.nodesRef.current,T()):[]).find(pe=>{var ve;return zu(((ve=pe.context)==null?void 0:ve.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,te=[x,le,...ae,...E(),z.current,M.current,re.current,ee.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,F.current.includes("reference")||w?b:null].filter(pe=>pe!=null),fe=c||w?$v(te,!_,_):$v(te);return()=>{fe()}},[r,b,x,c,F,D,w,P,_,O,T,E]),rt(()=>{if(r||!Ot(G))return;const H=Ut(G),se=qn(H);queueMicrotask(()=>{const ae=J(G),Q=V.current,le=(typeof Q=="number"?ae[Q]:Q.current)||G,te=Ht(G,se);!I&&!te&&v&&ro(le,{preventScroll:le===G})})},[r,v,G,I,J,V]),rt(()=>{if(r||!G)return;const H=Ut(G),se=qn(H);mP(se);function ae(te){let{reason:fe,event:pe,nested:ve}=te;if(["hover","safe-polygon"].includes(fe)&&pe.type==="mouseleave"&&(k.current=!0),fe==="outside-press")if(ve)k.current=!1;else if(tv(pe)||nv(pe))k.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?k.current=!1:k.current=!0}}h.on("openchange",ae);const Q=H.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,zs),q&&b&&b.insertAdjacentElement("afterend",Q);function le(){if(typeof N.current=="boolean"){const te=b||Hv();return te&&te.isConnected?te:Q}return N.current.current||Q}return()=>{h.off("openchange",ae);const te=qn(H),fe=Ht(x,te)||O&&Jr(O.nodesRef.current,T(),!1).some(ve=>{var Ae;return Ht((Ae=ve.context)==null?void 0:Ae.elements.floating,te)}),pe=le();queueMicrotask(()=>{const ve=gP(pe);N.current&&!k.current&&Ot(ve)&&(!(ve!==te&&te!==H.body)||fe)&&ve.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,N,y,h,O,q,b,T]),A.useEffect(()=>(queueMicrotask(()=>{k.current=!1}),()=>{queueMicrotask(Zu)}),[r]),rt(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:b}),()=>{D.setFocusManagerState(null)}},[r,D,c,v,g,d,b]),rt(()=>{r||G&&Wv(G,F)},[r,G,F]);function X(H){return r||!u||!c?null:m.jsx(vP,{ref:H==="start"?z:M,onClick:se=>g(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const de=!r&&P&&(c?!w:!0)&&(q||c);return m.jsxs(m.Fragment,{children:[de&&m.jsx(js,{"data-type":"inside",ref:Y,onFocus:H=>{if(c){const ae=J();ro(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(k.current=!1,Gi(H,D.portalNode)){const ae=iv(b);ae?.focus()}else{var se;(se=D.beforeOutsideRef.current)==null||se.focus()}}}),!w&&X("start"),n,X("end"),de&&m.jsx(js,{"data-type":"inside",ref:K,onFocus:H=>{if(c)ro(J()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(k.current=!0),Gi(H,D.portalNode)){const ae=av(b);ae?.focus()}else{var se;(se=D.afterOutsideRef.current)==null||se.focus()}}})]})}let Rs=0;const qv="--floating-ui-scrollbar-width";function yP(){const e=Du(),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(qv,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(qv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Uv=()=>{};const Xu=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return rt(()=>{if(r)return Rs++,Rs===1&&(Uv=yP()),()=>{Rs--,Rs===0&&Uv()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Gv(e){return Ot(e.target)&&e.target.tagName==="BUTTON"}function bP(e){return Ot(e.target)&&e.target.tagName==="A"}function Yv(e){return $u(e)}function Ro(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,f=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current;g.button===0&&s!=="click"&&(Vo(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=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Vo(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){f.current=void 0,!(g.defaultPrevented||!u||Gv(g))&&(g.key===" "&&!Yv(i)&&(g.preventDefault(),p.current=!0),!bP(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||Gv(g)||Yv(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:v}:{},[a,v])}function xP(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,f=a.x,p=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=s&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Kv(e){return e!=null&&e.clientX!=null}function wP(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=A.useRef(!1),f=A.useRef(null),[p,v]=A.useState(),[g,h]=A.useState([]),y=Ct((I,w)=>{d.current||r.current.openEvent&&!Kv(r.current.openEvent)||a.setPositionReference(xP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=Ct(I=>{c!=null||u!=null||(n?f.current||h([]):y(I.clientX,I.clientY))}),x=Vo(p)?o:n,T=A.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const I=qt(o);function w(C){const P=Un(C);Ht(o,P)?(I.removeEventListener("mousemove",w),f.current=null):y(C.clientX,C.clientY)}if(!r.current.openEvent||Kv(r.current.openEvent)){I.addEventListener("mousemove",w);const C=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,y]);A.useEffect(()=>T(),[T,g]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),rt(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const E=A.useMemo(()=>{function I(w){let{pointerType:C}=w;v(C)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return A.useMemo(()=>s?{reference:E}:{},[s,E])}const SP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},TP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zv=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 Ir(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:f=!1,bubbles:p,capture:v}=t,g=Cr(),h=Ct(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,b=A.useRef(!1),{escapeKey:x,outsidePress:T}=Zv(p),{escapeKey:E,outsidePress:I}=Zv(v),w=A.useRef(!1),C=Ct(O=>{var D;if(!n||!a||!s||O.key!=="Escape"||w.current)return;const z=(D=i.current.floatingContext)==null?void 0:D.nodeId,M=g?Jr(g.nodesRef.current,z):[];if(!x&&(O.stopPropagation(),M.length>0)){let k=!0;if(M.forEach(L=>{var $;if(($=L.context)!=null&&$.open&&!L.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,aA(O)?O.nativeEvent:O,"escape-key")}),P=Ct(O=>{var D;const z=()=>{var M;C(O),(M=Un(O))==null||M.removeEventListener("keydown",z)};(D=Un(O))==null||D.addEventListener("keydown",z)}),_=Ct(O=>{var D;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof y=="function"&&!y(O))return;const k=Un(O),L="["+no("inert")+"]",$=Ut(o.floating).querySelectorAll(L);let B=nt(k)?k:null;for(;B&&!lr(B);){const J=cr(B);if(lr(J)||!nt(J))break;B=J}if($.length&&nt(k)&&!rA(k)&&!Ht(k,o.floating)&&Array.from($).every(J=>!Ht(B,J)))return;if(Ot(k)&&N){const J=lr(k),re=cn(k),ee=/auto|scroll/,Y=J||ee.test(re.overflowX),K=J||ee.test(re.overflowY),X=Y&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,de=K&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,H=re.direction==="rtl",se=de&&(H?O.offsetX<=k.offsetWidth-k.clientWidth:O.offsetX>k.clientWidth),ae=X&&O.offsetY>k.clientHeight;if(se||ae)return}const q=(D=i.current.floatingContext)==null?void 0:D.nodeId,G=g&&Jr(g.nodesRef.current,q).some(J=>{var re;return Vu(O,(re=J.context)==null?void 0:re.elements.floating)});if(Vu(O,o.floating)||Vu(O,o.domReference)||G)return;const W=g?Jr(g.nodesRef.current,q):[];if(W.length>0){let J=!0;if(W.forEach(re=>{var ee;if((ee=re.context)!=null&&ee.open&&!re.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,O,"outside-press")}),F=Ct(O=>{var D;const z=()=>{var M;_(O),(M=Un(O))==null||M.removeEventListener(c,z)};(D=Un(O))==null||D.addEventListener(c,z)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let O=-1;function D($){r(!1,$,"ancestor-scroll")}function z(){window.clearTimeout(O),w.current=!0}function M(){O=window.setTimeout(()=>{w.current=!1},gs()?5:0)}const k=Ut(o.floating);s&&(k.addEventListener("keydown",E?P:C,E),k.addEventListener("compositionstart",z),k.addEventListener("compositionend",M)),y&&k.addEventListener(c,I?F:_,I);let L=[];return f&&(nt(o.domReference)&&(L=Sr(o.domReference)),nt(o.floating)&&(L=L.concat(Sr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(Sr(o.reference.contextElement)))),L=L.filter($=>{var B;return $!==((B=k.defaultView)==null?void 0:B.visualViewport)}),L.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{s&&(k.removeEventListener("keydown",E?P:C,E),k.removeEventListener("compositionstart",z),k.removeEventListener("compositionend",M)),y&&k.removeEventListener(c,I?F:_,I),L.forEach($=>{$.removeEventListener("scroll",D)}),window.clearTimeout(O)}},[i,o,s,y,c,n,r,f,a,x,T,C,E,P,_,I,F]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const V=A.useMemo(()=>({onKeyDown:C,...u&&{[SP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[C,r,u,d]),N=A.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[TP[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return A.useMemo(()=>a?{reference:V,floating:N}:{},[a,V,N])}function EP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zi(),i=A.useRef({}),[a]=A.useState(()=>Ov()),s=Er()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!nt(p)&&oP("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]=A.useState(r.reference),u=Ct((p,v,g)=>{i.current.openEvent=p?v:void 0,a.emit("openchange",{open:p,event:v,reason:g,nested:s}),n?.(p,v,g)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=EP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Cr();rt(()=>{u&&(d.current=u)},[u]);const p=ZA({...e,elements:{...o,...s&&{reference:s}}}),v=A.useCallback(x=>{const T=nt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),p.refs.setReference(T)},[p.refs]),g=A.useCallback(x=>{(nt(x)||x===null)&&(d.current=x,a(x)),(nt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!nt(x))&&p.refs.setReference(x)},[p.refs]),h=A.useMemo(()=>({...p.refs,setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=A.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=A.useMemo(()=>({...p,...r,refs:h,elements:y,nodeId:t}),[p,h,y,t,r]);return rt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),A.useMemo(()=>({...p,context:b,refs:h,elements:y}),[p,h,y,b])}function Qu(){return JI()&&Xg()}function CP(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=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const p=qt(a.domReference);function v(){!n&&Ot(a.domReference)&&a.domReference===qn(Ut(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function h(){d.current=!1}return p.addEventListener("blur",v),Qu()&&(p.addEventListener("keydown",g,!0),p.addEventListener("pointerdown",h,!0)),()=>{p.removeEventListener("blur",v),Qu()&&(p.removeEventListener("keydown",g,!0),p.removeEventListener("pointerdown",h,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function p(v){let{reason:g}=v;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,s]),A.useEffect(()=>()=>{Yt(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const v=Un(p.nativeEvent);if(l&&nt(v)){if(Qu()&&!p.relatedTarget){if(!d.current&&!$u(v))return}else if(!oA(v))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const v=p.relatedTarget,g=p.nativeEvent,h=nt(v)&&v.hasAttribute(no("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=qn(a.domReference?a.domReference.ownerDocument:document);!v&&b===a.domReference||Ht((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ht(a.domReference,b)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:f}:{},[s,f])}function Ju(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Cv]:a,[kv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[eP]:""},...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&&[Cv,kv].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 f,p=arguments.length,v=new Array(p),g=0;g<p;g++)v[g]=arguments[g];return(f=r.get(c))==null?void 0:f.map(h=>h(...v)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function Yn(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=A.useCallback(s=>Ju(s,e,"reference"),t),i=A.useCallback(s=>Ju(s,e,"floating"),n),a=A.useCallback(s=>Ju(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const kP="Escape";function Bs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Hs(e,t){return Bs(t,e===Iv||e===Fs,e===Yi||e===Ki)}function ed(e,t,n){return Bs(t,e===Fs,n?e===Yi:e===Ki)||e==="Enter"||e===" "||e===""}function Xv(e,t,n){return Bs(t,n?e===Yi:e===Ki,e===Fs)}function Qv(e,t,n,r){const o=n?e===Ki:e===Yi,i=e===Iv;return t==="both"||t==="horizontal"&&r&&r>1?e===kP:Bs(t,o,i)}function Ws(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:f=!1,nested:p=!1,rtl:v=!1,virtual:g=!1,focusItemOnOpen:h="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ls("`useListNavigation` looping must be enabled to allow escaping."),g||Ls("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ls("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=ks(o.floating),V=Wt(F),N=Er(),O=Cr();rt(()=>{e.dataRef.current.orientation=T},[e,T]);const D=Ct(()=>{l(k.current===-1?null:k.current)}),z=zu(o.domReference),M=A.useRef(h),k=A.useRef(u??-1),L=A.useRef(null),$=A.useRef(!0),B=A.useRef(D),q=A.useRef(!!o.floating),G=A.useRef(n),W=A.useRef(!1),J=A.useRef(!1),re=Wt(x),ee=Wt(n),Y=Wt(w),K=Wt(u),[X,de]=A.useState(),[H,se]=A.useState(),ae=Ct(()=>{function me(ne){if(g){var ce;(ce=ne.id)!=null&&ce.endsWith("-fui-option")&&(ne.id=i+"-"+Math.random().toString(16).slice(2,10)),de(ne.id),O?.events.emit("virtualfocus",ne),C&&(C.current=ne)}else ro(ne,{sync:W.current,preventScroll:!0})}const oe=a.current[k.current],j=J.current;oe&&me(oe),(W.current?ne=>ne():requestAnimationFrame)(()=>{const ne=a.current[k.current]||oe;if(!ne)return;oe||me(ne);const ce=Y.current;ce&&le&&(j||!$.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});rt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(J.current=!0,k.current=u,D()):q.current&&(k.current=-1,B.current()))},[c,n,o.floating,u,D]),rt(()=>{if(c&&n&&o.floating)if(s==null){if(W.current=!1,K.current!=null)return;if(q.current&&(k.current=-1,ae()),(!G.current||!q.current)&&M.current&&(L.current!=null||M.current===!0&&L.current==null)){let me=0;const oe=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(oe),me++):(k.current=L.current==null||ed(L.current,T,v)||p?ju(a,re.current):rv(a,re.current),L.current=null,D())};oe()}}else qi(a,s)||(k.current=s,ae(),J.current=!1)},[c,n,o.floating,s,K,p,a,T,v,D,ae,re]),rt(()=>{var me;if(!c||o.floating||!O||g||!q.current)return;const oe=O.nodesRef.current,j=(me=oe.find(ce=>ce.id===N))==null||(me=me.context)==null?void 0:me.elements.floating,R=qn(Ut(o.floating)),ne=oe.some(ce=>ce.context&&Ht(ce.context.elements.floating,R));j&&!ne&&$.current&&j.focus({preventScroll:!0})},[c,o.floating,O,N,g]),rt(()=>{if(!c||!O||!g||N)return;function me(oe){se(oe.id),C&&(C.current=oe)}return O.events.on("virtualfocus",me),()=>{O.events.off("virtualfocus",me)}},[c,O,g,N,C]),rt(()=>{B.current=D,G.current=n,q.current=!!o.floating}),rt(()=>{n||(L.current=null,M.current=h)},[n,h]);const Q=s!=null,le=A.useMemo(()=>{function me(j){if(!ee.current)return;const R=a.current.indexOf(j);R!==-1&&k.current!==R&&(k.current=R,D())}return{onFocus(j){let{currentTarget:R}=j;W.current=!0,me(R)},onClick:j=>{let{currentTarget:R}=j;return R.focus({preventScroll:!0})},onMouseMove(j){let{currentTarget:R}=j;W.current=!0,J.current=!1,y&&me(R)},onPointerLeave(j){let{pointerType:R}=j;if(!(!$.current||R==="touch")&&(W.current=!0,!!y&&(k.current=-1,D(),!g))){var ne;(ne=V.current)==null||ne.focus({preventScroll:!0})}}}},[ee,V,y,a,D,g]),te=A.useCallback(()=>{var me;return E??(O==null||(me=O.nodesRef.current.find(oe=>oe.id===N))==null||(me=me.context)==null||(me=me.dataRef)==null?void 0:me.current.orientation)},[N,O,E]),fe=Ct(me=>{if($.current=!1,W.current=!0,me.which===229||!ee.current&&me.currentTarget===V.current)return;if(p&&Qv(me.key,T,v,I)){Hs(me.key,te())||Gt(me),r(!1,me.nativeEvent,"list-navigation"),Ot(o.domReference)&&(g?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const oe=k.current,j=ju(a,x),R=rv(a,x);if(z||(me.key==="Home"&&(Gt(me),k.current=j,D()),me.key==="End"&&(Gt(me),k.current=R,D())),I>1){const ne=P||Array.from({length:a.current.length},()=>({width:1,height:1})),ce=fA(ne,I,_),xe=ce.findIndex(qe=>qe!=null&&!As(a,qe,x)),ke=ce.reduce((qe,pt,ht)=>pt!=null&&!As(a,pt,x)?ht:qe,-1),_e=ce[dA({current:ce.map(qe=>qe!=null?a.current[qe]:null)},{event:me,orientation:T,loop:f,rtl:v,cols:I,disabledIndices:hA([...(typeof x!="function"?x:null)||a.current.map((qe,pt)=>As(a,pt,x)?pt:void 0),void 0],ce),minIndex:xe,maxIndex:ke,prevIndex:pA(k.current>R?j:k.current,ne,ce,I,me.key===Fs?"bl":me.key===(v?Yi:Ki)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(k.current=_e,D()),T==="both")return}if(Hs(me.key,T)){if(Gt(me),n&&!g&&qn(me.currentTarget.ownerDocument)===me.currentTarget){k.current=ed(me.key,T,v)?j:R,D();return}ed(me.key,T,v)?f?k.current=oe>=R?d&&oe!==a.current.length?-1:j:Xt(a,{startingIndex:oe,disabledIndices:x}):k.current=Math.min(R,Xt(a,{startingIndex:oe,disabledIndices:x})):f?k.current=oe<=j?d&&oe!==-1?a.current.length:R:Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:x}):k.current=Math.max(j,Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:x})),qi(a,k.current)&&(k.current=-1),D()}}),pe=A.useMemo(()=>g&&n&&Q&&{"aria-activedescendant":H||X},[g,n,Q,H,X]),ve=A.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:pe,onKeyDown:fe,onPointerMove(){$.current=!0}}),[pe,fe,T,z]),Ae=A.useMemo(()=>{function me(j){h==="auto"&&tv(j.nativeEvent)&&(M.current=!0)}function oe(j){M.current=h,h==="auto"&&nv(j.nativeEvent)&&(M.current=!0)}return{...pe,onKeyDown(j){$.current=!1;const R=j.key.startsWith("Arrow"),ne=["Home","End"].includes(j.key),ce=R||ne,xe=Xv(j.key,T,v),ke=Qv(j.key,T,v,I),_e=Xv(j.key,te(),v),qe=Hs(j.key,T),pt=(p?_e:qe)||j.key==="Enter"||j.key.trim()==="";if(g&&n){const U=O?.nodesRef.current.find(Oe=>Oe.parentId==null),Z=O&&U?iA(O.nodesRef.current,U.id):null;if(ce&&Z&&C){const Oe=new KeyboardEvent("keydown",{key:j.key,bubbles:!0});if(xe||ke){var ht,$t;const Ge=((ht=Z.context)==null?void 0:ht.elements.domReference)===j.currentTarget,Ze=ke&&!Ge?($t=Z.context)==null?void 0:$t.elements.domReference:xe?a.current.find(Ne=>Ne?.id===X):null;Ze&&(Gt(j),Ze.dispatchEvent(Oe),se(void 0))}if((qe||ne)&&Z.context&&Z.context.open&&Z.parentId&&j.currentTarget!==Z.context.elements.domReference){var $e;Gt(j),($e=Z.context.elements.domReference)==null||$e.dispatchEvent(Oe);return}}return fe(j)}if(!(!n&&!b&&R)){if(pt){const U=Hs(j.key,te());L.current=p&&U?null:j.key}if(p){_e&&(Gt(j),n?(k.current=ju(a,re.current),D()):r(!0,j.nativeEvent,"list-navigation"));return}qe&&(u!=null&&(k.current=u),Gt(j),!n&&b?r(!0,j.nativeEvent,"list-navigation"):fe(j),n&&D())}},onFocus(){n&&!g&&(k.current=-1,D())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:me,onClick:me}},[X,pe,I,fe,re,h,a,p,D,r,n,b,T,te,v,u,O,g,C]);return A.useMemo(()=>c?{reference:Ae,floating:ve,item:le}:{},[c,Ae,ve,le])}const IP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fr(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=Zi(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var b;return((b=ks(i.floating))==null?void 0:b.id)||a},[i.floating,a]),f=(r=IP.get(l))!=null?r:l,v=Er()!=null,g=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,v,o,u,l]),h=A.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=A.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return A.useMemo(()=>s?{reference:g,floating:h,item:y}:{},[s,g,h,y])}const Jv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Bo(e,t){return typeof e=="function"?e(t):e}function AP(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function PP(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]=A.useState("unmounted"),c=AP(n,a);return!c&&s==="close"&&l("unmounted"),rt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{jn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function ey(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=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,f=(u?a:a.close)||0,[p,v]=A.useState(()=>({...Bo(i,c),...Bo(n,c)})),{isMounted:g,status:h}=PP(e,{duration:a}),y=Wt(n),b=Wt(r),x=Wt(o),T=Wt(i);return rt(()=>{const E=Bo(y.current,c),I=Bo(x.current,c),w=Bo(T.current,c),C=Bo(b.current,c)||Object.keys(E).reduce((P,_)=>(P[_]="",P),{});if(h==="initial"&&v(P=>({transitionProperty:P.transitionProperty,...w,...E})),h==="open"&&v({transitionProperty:Object.keys(C).map(Jv).join(","),transitionDuration:d+"ms",...w,...C}),h==="close"){const P=I||E;v({transitionProperty:Object.keys(P).map(Jv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,x,y,b,T,d,h,c]),{isMounted:g,styles:p}}function OP(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:f=[],selectedIndex:p=null}=t,v=A.useRef(-1),g=A.useRef(""),h=A.useRef((n=p??a)!=null?n:-1),y=A.useRef(null),b=Ct(s),x=Ct(l),T=Wt(u),E=Wt(f);rt(()=>{r&&(Yt(v),y.current=null,g.current="")},[r]),rt(()=>{if(r&&g.current===""){var _;h.current=(_=p??a)!=null?_:-1}},[r,p,a]);const I=Ct(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),w=Ct(_=>{function F(z,M,k){const L=T.current?T.current(M,k):M.find($=>$?.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())===0);return L?z.indexOf(L):-1}const V=i.current;if(g.current.length>0&&g.current[0]!==" "&&(F(V,V,g.current)===-1?I(!1):_.key===" "&&Gt(_)),V==null||E.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Gt(_),I(!0)),V.every(z=>{var M,k;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((k=z[1])==null?void 0:k.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=y.current),g.current+=_.key,Yt(v),v.current=window.setTimeout(()=>{g.current="",h.current=y.current,I(!1)},d);const O=h.current,D=F(V,[...V.slice((O||0)+1),...V.slice(0,(O||0)+1)],g.current);D!==-1?(b(D),y.current=D):_.key!==" "&&(g.current="",I(!1))}),C=A.useMemo(()=>({onKeyDown:w}),[w]),P=A.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&I(!1)}}),[w,I]);return A.useMemo(()=>c?{reference:C,floating:P}:{},[c,C,P])}function ty(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,...ty(e,o.id,n)])}function ny(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 _P(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ry(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,f){const p=performance.now(),v=p-l;if(a===null||s===null||v===0)return a=d,s=f,l=p,null;const g=d-a,h=f-s,b=Math.sqrt(g*g+h*h)/v;return a=d,s=f,l=p,b}const u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:h,nodeId:y,tree:b}=d;return function(T){function E(){Yt(o),h()}if(Yt(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,C=[I,w],P=lP(T),_=T.type==="mouseleave",F=Yu(g.floating,P),V=Yu(g.domReference,P),N=g.domReference.getBoundingClientRect(),O=g.floating.getBoundingClientRect(),D=v.split("-")[0],z=f>O.right-O.width/2,M=p>O.bottom-O.height/2,k=_P(C,N),L=O.width>N.width,$=O.height>N.height,B=(L?N:O).left,q=(L?N:O).right,G=($?N:O).top,W=($?N:O).bottom;if(F&&(i=!0,!_))return;if(V&&(i=!1),V&&!_){i=!0;return}if(_&&nt(T.relatedTarget)&&Yu(g.floating,T.relatedTarget)||b&&ty(b.nodesRef.current,y).length)return;if(D==="top"&&p>=N.bottom-1||D==="bottom"&&p<=N.top+1||D==="left"&&f>=N.right-1||D==="right"&&f<=N.left+1)return E();let J=[];switch(D){case"top":J=[[B,N.top+1],[B,O.bottom-1],[q,O.bottom-1],[q,N.top+1]];break;case"bottom":J=[[B,O.top+1],[B,N.bottom-1],[q,N.bottom-1],[q,O.top+1]];break;case"left":J=[[O.right-1,W],[O.right-1,G],[N.left+1,G],[N.left+1,W]];break;case"right":J=[[N.right-1,W],[N.right-1,G],[O.left+1,G],[O.left+1,W]];break}function re(ee){let[Y,K]=ee;switch(D){case"top":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K+t+1],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K+t+1],H=[[O.left,z||L?O.bottom-t:O.top],[O.right,z?L?O.bottom-t:O.top:O.bottom-t]];return[X,de,...H]}case"bottom":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K-t],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K-t],H=[[O.left,z||L?O.top+t:O.bottom],[O.right,z?L?O.top+t:O.bottom:O.top+t]];return[X,de,...H]}case"left":{const X=[Y+t+1,$?K+t/2:M?K+t*4:K-t*4],de=[Y+t+1,$?K-t/2:M?K+t*4:K-t*4];return[...[[M||$?O.right-t:O.left,O.top],[M?$?O.right-t:O.left:O.right-t,O.bottom]],X,de]}case"right":{const X=[Y-t,$?K+t/2:M?K+t*4:K-t*4],de=[Y-t,$?K-t/2:M?K+t*4:K-t*4],H=[[M||$?O.left+t:O.right,O.top],[M?$?O.left+t:O.right:O.left+t,O.bottom]];return[X,de,...H]}}}if(!ny([I,w],J)){if(i&&!k)return E();if(!_&&r){const ee=c(T.clientX,T.clientY);if(ee!==null&&ee<.1)return E()}ny([I,w],re([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const oy=200,MP=500,Ho=()=>{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)}`},iy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ay={basic:/[,[\]]+?/,extend:/[,[\].]+?/},td=(e,t)=>{const n=iy(t,ay.basic,e)||iy(t,ay.extend,e);return n===void 0||n===e?void 0:n},Ar=()=>typeof window>"u",nd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),sy=(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},DP=e=>!e,Wo=()=>{},ly=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},rd=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=Wo,followCursor:d=!1,...f},p){const[v,g]=S.useState(n??!1),h=S.useRef(null),y=t||"span",b=O=>{g(O),u?.(O)},{refs:x,floatingStyles:T,context:E}=Gn({placement:i,open:v,whileElementsMounted:to,onOpenChange:n?void 0:b,middleware:[Ds(),zo(5),Sv(),Wu({padding:5,element:h}),Ns({fallbackAxisSideDirection:"start"})]}),I=Ir(E,{enabled:l}),w=fr(E,{role:"tooltip",enabled:l}),C=CP(E,{enabled:l?a:!1}),P=Ro(E,{enabled:l?c:!1}),_=wP(E,{enabled:!!l&&!!d}),F=Nv(E,{move:!0,delay:{open:oy},enabled:l?s:!1,handleClose:c?ry():null}),{getReferenceProps:V,getFloatingProps:N}=Yn([w,I,_,a?C:void 0,s?F:void 0,c?P:void 0]);return S.useEffect(()=>g(n===void 0?!1:n),[n]),m.jsxs(S.Fragment,{children:[m.jsx(y,{...V(f),ref:sr(x.setReference,p),children:r}),v&&m.jsx(dr,{children:m.jsxs(ln,{...N(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(qu,{ref:h,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),cy=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[a,e||o?m.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?m.jsx(rd,{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(br,{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 break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?m.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[m.jsx(bu,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(tI,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Qi=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:f="",name:p,title:v,componentName:g,placeholder:h,hideLeft:y=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Cu(),C=T!==void 0?T:w.input.iconFeedback,P=d??p,_=Pt(),F=e??_.inputOptionalLabel;return m.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Pe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:P,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:m.jsx(cy,{info:s,hideLeft:y,reportStatus:C,title:v,placeholder:h,children:F||n?m.jsxs(S.Fragment,{children:[b?null:m.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:F}),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 ${f}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",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})]})}),uy=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:v="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,C=S.useRef(null);return S.useEffect(()=>{if(C.current===null)return;const P=C.current,_=$i(C.current),F=r?.(P),V=N=>{const O=N;if(O.key==="Enter"&&P.enterKeyHint==="next"){const D=P.getAttribute("data-next");if(D){const z=document.getElementById(D);if(z)return z.focus(),void O.preventDefault()}}};return P.addEventListener("keydown",V),()=>{F?.(),_(),P.removeEventListener("keydown",V)}},[]),m.jsx(Qi,{...n,info:i,left:a,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:h,hideLeft:y,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:g,placeholder:T.placeholder,container:Pe(u,n.container),children:m.jsx(I,{...n,...T,id:w,name:w,type:v,"data-next":s,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:sr(E,C),className:Pe("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",T.className)})})}),qo=uy(Cg,"input",{type:"text"}),NP=Ao("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-1 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-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),pr=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(ln,{...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:Pe(NP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),io=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:v,error:g,...h},y)=>{const b=Pt(),x=S.useRef(null),T=h.id??h.name;S.useImperativeHandle(y,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,C=$i(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{C(),I.abort()}},[]);const E=()=>x.current?.focus();return m.jsx(Qi,{info:n,left:v,error:g,form:h.form,loading:c,name:h.name,feedback:o,hideLeft:f,required:e,title:h.title,container:d,componentName:"select",rightLabel:s,hiddenLabel:l,interactive:a,id:h.name||h.id,optionalText:u,labelClassName:i,placeholder:h.placeholder,right:m.jsxs("label",{htmlFor:T,children:[p,m.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(vu,{size:20}),m.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:m.jsxs("select",{...h,id:T,name:T,required:e,ref:sr(y,x),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Pe("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",h.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function In(e){return e?.ownerDocument||document}function FP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
5
5
|
`))},[r,n,e]);const{current:c}=A.useRef(t);A.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
6
|
-
`))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||a(c)},[]);return[s,l]}const uy={};function io(e,t){const n=A.useRef(uy);return n.current===uy&&(n.current=e(t)),n}const nd=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],MP=nd&&nd!==A.useLayoutEffect?nd:e=>e();function Ye(e){const t=io(DP).current;return t.next=e,MP(t.effect),t.trampoline}function DP(){const e={next:void 0,callback:NP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function NP(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const St=typeof document<"u"?A.useLayoutEffect:()=>{};function rd(e){const t=io(FP,e).current;return t.next=e,St(t.effect),t}function FP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let od;process.env.NODE_ENV!=="production"&&(od=new Set);function LP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");od.has(t)||(od.add(t),console.warn(`Base UI: ${t}`))}}function An(){}const Pn=Object.freeze({}),VP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$P="none",dy="track-press",zP="input-change",jP="focus-out",RP="keyboard",BP="drag";function qo(e,t,n,r){let o=!1,i=!1;const a=r??Pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function fy(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function HP(e,t){const n=A.useRef(e),r=Ye(t);St(()=>{n.current!==e&&r(n.current)},[e,r]),St(()=>{n.current=e},[e])}const WP={...A};let py=0;function qP(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(py+=1,r(`${t}-${py}`))},[n,t]),o}const hy=WP.useId;function Ws(e,t){if(hy!==void 0){const n=hy();return e??(t?`${t}-${n}`:n)}return qP(e,t)}function qs(e){return Ws(e,"base-ui")}function Ir(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function id(e,t,n,r){const o=io(my).current;return GP(o,e,t,n,r)&&gy(o,[e,t,n,r]),o.callback}function UP(e){const t=io(my).current;return YP(t,e)&&gy(t,e),t.callback}function my(){return{callback:null,cleanup:null,refs:[]}}function GP(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function YP(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function gy(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const KP=parseInt(A.version,10);function vy(e){return KP>=e}function yy(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(vy(19)?n?.ref:t.ref)??null}function ad(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ZP(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function XP(e,t){return typeof e=="function"?e(t):e}function QP(e,t){return typeof e=="function"?e(t):e}const Qi={};function sd(e,t,n,r,o){let i={...ld(e,Qi)};return t&&(i=Us(i,t)),n&&(i=Us(i,n)),r&&(i=Us(i,r)),i}function JP(e){if(e.length===0)return Qi;if(e.length===1)return ld(e[0],Qi);let t={...ld(e[0],Qi)};for(let n=1;n<e.length;n+=1)t=Us(t,e[n]);return t}function Us(e,t){return by(t)?t(e):eO(e,t)}function eO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ad(e.style,r);break}case"className":{e[n]=xy(e.className,r);break}default:tO(n,r)?e[n]=nO(e[n],r):e[n]=r}}return e}function tO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function by(e){return typeof e=="function"}function ld(e,t){return by(e)?e(t):e??Qi}function nO(e,t){return t?e?n=>{if(rO(n)){const o=n;cd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function cd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function xy(e,t){return t?e?t+" "+e:t:e}function rO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=oO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return iO(e,r,o,i)}function oO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?XP(n,i):void 0,d=c?QP(r,i):void 0,f=c?ZP(i,l):Pn,p=c?ad(f,Array.isArray(s)?JP(s):s)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(a)?p.ref=UP([p.ref,yy(o),...a]):p.ref=id(p.ref,yy(o),a):id(null,null)),c?(u!==void 0&&(p.className=xy(p.className,u)),d!==void 0&&(p.style=ad(p.style,d)),p):Pn}function iO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=sd(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return aO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Ir(8))}function aO(e,t){return e==="button"?T.createElement("button",{type:"button",...t,key:t.key}):e==="img"?T.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function On(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function wy(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const Ji=typeof navigator<"u",ud=dO(),sO=pO(),lO=fO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),ud.platform==="MacIntel"&&ud.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(ud.platform);const cO=Ji&&/apple/i.test(navigator.vendor);Ji&&sO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const uO=lO.includes("jsdom/");function dO(){if(!Ji)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function fO(){if(!Ji)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function pO(){if(!Ji)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ar(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function fd(e){return e?.ownerDocument||document}function pd(e){if(!e||uO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}var hO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],hd=hO.join(","),Sy=typeof Element>"u",ea=Sy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gs=!Sy&&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},Ys=function(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&&(typeof t.closest=="function"?t.closest("[inert]"):Ys(t.parentNode));return a},mO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},gO=function(t,n,r){if(Ys(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(hd));return n&&ea.call(t,hd)&&o.unshift(t),o=o.filter(r),o},md=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ys(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=md(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=ea.call(a,hd);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ys(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=md(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Ty=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ey=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||mO(t))&&!Ty(t)?0:t.tabIndex},vO=function(t,n){var r=Ey(t);return r<0&&n&&!Ty(t)?0:r},yO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ky=function(t){return t.tagName==="INPUT"},bO=function(t){return ky(t)&&t.type==="hidden"},xO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},wO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},SO=function(t){if(!t.name)return!0;var n=t.form||Gs(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=wO(o,t.form);return!i||i===t},TO=function(t){return ky(t)&&t.type==="radio"},EO=function(t){return TO(t)&&!SO(t)},kO=function(t){var n,r=t&&Gs(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=Gs(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},Cy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},CO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ea.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ea.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Gs(t);if(c&&!c.shadowRoot&&o(c)===!0)return Cy(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(kO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Cy(t);return!1},IO=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 ea.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},AO=function(t,n){return!(n.disabled||bO(n)||CO(n,t)||xO(n)||IO(n))},Iy=function(t,n){return!(EO(n)||Ey(n)<0||!AO(t,n))},PO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ay=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=vO(s,a),c=a?Ay(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(yO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Py=function(t,n){n=n||{};var r;return n.getShadowRoot?r=md([t],n.includeContainer,{filter:Iy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:PO}):r=gO(t,n.includeContainer,Iy.bind(null,n)),Ay(r)};const Oy=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _y(e,t){const n=Py(e,Oy()),r=n.length;if(r===0)return;const o=ao(fd(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function OO(e){return _y(fd(e).body,1)||e}function _O(e){return _y(fd(e).body,-1)||e}function gd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ar(n,r)}function MO(e){Py(e,Oy()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function My(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const vd=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(vd.displayName="CompositeListContext");function DO(){return A.useContext(vd)}function NO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ye(o),a=A.useRef(0),s=io(LO).current,l=io(FO).current,[c,u]=A.useState(0),d=A.useRef(c),f=Ye((y,b)=>{l.set(y,b??null),d.current+=1,u(d.current)}),p=Ye(y=>{l.delete(y),d.current+=1,u(d.current)}),v=A.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(VO).forEach((x,S)=>{const E=l.get(x)??{};y.set(x,{...E,index:S})}),y},[l,c]);St(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(b=>{const x=new Set,S=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(S),E.addedNodes.forEach(S)}),x.size===0&&(d.current+=1,u(d.current))});return v.forEach((b,x)=>{x.parentElement&&y.observe(x.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),St(()=>{d.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),a.current=v.size),i(v)},[i,v,n,r,c]),St(()=>()=>{n.current=[]},[n]),St(()=>()=>{r&&(r.current=[])},[r]);const g=Ye(y=>(s.add(y),()=>{s.delete(y)}));St(()=>{s.forEach(y=>y(v))},[s,v]);const h=A.useMemo(()=>({register:f,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:a}),[f,p,g,n,r,a]);return m.jsx(vd.Provider,{value:h,children:t})}function FO(){return new Map}function LO(){return new Set}function VO(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}function $O(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Dy=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:An,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Dy.displayName="FormContext");function Ny(){return A.useContext(Dy)}const zO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Fy=A.createContext({invalid:void 0,name:void 0,validityData:{state:zO,errors:[],error:"",value:"",initialValue:null},setValidityData:An,disabled:void 0,touched:!1,setTouched:An,dirty:!1,setDirty:An,filled:!1,setFilled:An,focused:!1,setFocused:An,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Fy.displayName="FieldRootContext");function yd(e=!0){const t=A.useContext(Fy);if(t.setValidityData===An&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Ir(28));return t}function jO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=Ny(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=yd(),f=Ye(e.getValue);St(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(v=>({...v,initialValue:p}))},[t,d,n,u.initialValue,f]),St(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:$O(u,l),validate(p=!0){let v=n;v===void 0&&(v=f()),c.current=!0,p?jn.flushSync(()=>a(v)):a(v)}})},[a,i,t,s,f,r,l,c,o,u,n]),St(()=>{const p=s.current.fields;return()=>{r&&p.delete(r)}},[s,r])}const Ly=A.createContext({controlId:void 0,setControlId:An,labelId:void 0,setLabelId:An,messageIds:[],setMessageIds:An,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Ly.displayName="LabelableContext");function Vy(){return A.useContext(Ly)}function $y(e,t){return e-t}function RO(e,t,n){const r=e.slice();return r[t]=n,r.sort($y)}function zy(e,t,n,r,o,i){let a=e;return a=On(a,n,r),o&&(a=RO(i,t,On(a,i[t-1]||-1/0,i[t+1]||1/0))),a}function jy(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,a,s)=>(a===s.length-1||o.push(Math.abs(i-s[a+1])),o),[]);return Math.min(...r)>=t*n}const ta={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},bd=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(bd.displayName="SliderRootContext");function Ks(){const e=A.useContext(bd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Ir(62));return e}function BO(e){return"key"in e?RP:zP}function HO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?wy(e,t):!1}const Ry=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:a=!1,id:s,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:v=0,name:g,onValueChange:h,onValueCommitted:y,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:S="push",thumbAlignment:E="center",value:I,...w}=t,k=qs(s),P=Ye(h),_=Ye(y),{clearErrors:F}=Ny(),{state:V,disabled:N,name:O,setTouched:D,setDirty:z,validityData:M,shouldValidateOnChange:C,validation:L}=yd(),{labelId:$}=Vy(),B=r??$,q=N||a,G=O??g,[W,J]=_P({controlled:I,default:i??p,name:"Slider"}),re=A.useRef(null),ee=A.useRef(null),Y=A.useRef([]),K=A.useRef(null),X=A.useRef(null),de=A.useRef(-1),H=A.useRef(null),se=A.useRef(null),ae=A.useRef("none"),Q=rd(l),[le,te]=A.useState(-1),[fe,pe]=A.useState(-1),[ve,Ae]=A.useState(!1),[me,oe]=A.useState(()=>new Map),[j,R]=A.useState([void 0,void 0]),ne=Ye($e=>{te($e),$e!==-1&&pe($e)});jO({id:k,commit:L.commit,value:W,controlRef:ee,name:G,getValue:()=>W}),HP(W,()=>{F(G),C()?L.commit(W):L.commit(W,!0);const $e=M.initialValue;let U;Array.isArray(W)&&Array.isArray($e)?U=!wy(W,$e):U=W!==$e,z(U)});const ce=Ye($e=>{$e&&(ee.current=$e)}),xe=Array.isArray(W),Ce=A.useMemo(()=>xe?W.slice().sort($y):[On(W,p,f)],[f,p,xe,W]),_e=Ye(($e,U)=>{if(Number.isNaN($e)||HO($e,W))return;const Z=U??qo($P,void 0,void 0,{activeThumbIndex:-1});ae.current=Z.reason;const Oe=new event.constructor(event.type,event);Object.defineProperty(Oe,"target",{writable:!0,value:{value:$e,name:G}}),Z.event=Oe,se.current=$e,P($e,Z),!Z.isCanceled&&J($e)}),qe=Ye(($e,U,Z)=>{const Oe=zy($e,U,p,f,xe,Ce);if(jy(Oe,x,v)){const Ge=BO(Z);_e(Oe,qo(Ge,Z.nativeEvent,void 0,{activeThumbIndex:U})),D(!0);const Ze=se.current??Oe;_(Ze,fy(Ge,Z.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&LP("Slider `max` must be greater than `min`."),St(()=>{const $e=ao(In(re.current));q&&$e&&re.current?.contains($e)&&$e.blur()},[q]),q&&le!==-1&&ne(-1);const pt=A.useMemo(()=>({...V,activeThumbIndex:le,disabled:q,dragging:ve,orientation:b,max:f,min:p,minStepsBetweenValues:v,step:x,values:Ce}),[V,le,q,ve,f,p,v,b,x,Ce]),ht=A.useMemo(()=>({active:le,controlRef:ee,disabled:q,dragging:ve,validation:L,formatOptionsRef:Q,handleInputChange:qe,indicatorPosition:j,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:fe,lastChangedValueRef:se,lastChangeReasonRef:ae,locale:u,max:f,min:p,minStepsBetweenValues:v,name:G,onValueCommitted:_,orientation:b,pressedInputRef:K,pressedThumbCenterOffsetRef:X,pressedThumbIndexRef:de,pressedValuesRef:H,registerFieldControlRef:ce,renderBeforeHydration:E==="edge",setActive:ne,setDragging:Ae,setIndicatorPosition:R,setValue:_e,state:pt,step:x,thumbCollisionBehavior:S,thumbMap:me,thumbRefs:Y,values:Ce}),[le,ee,B,q,ve,L,Q,qe,j,c,fe,se,ae,u,f,p,v,G,_,b,K,X,de,H,ce,ne,Ae,R,_e,pt,x,S,E,me,Y,Ce]),$t=an("div",t,{state:pt,ref:[n,re],props:[{"aria-labelledby":B,id:k,role:"group"},L.getValidationProps,w],stateAttributesMapping:ta});return m.jsx(bd.Provider,{value:ht,children:m.jsx(NO,{elementsRef:Y,onMapChange:oe,children:$t})})});process.env.NODE_ENV!=="production"&&(Ry.displayName="SliderRoot");const By=new Map;function WO(e,t){const n=JSON.stringify({locale:e,options:t}),r=By.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return By.set(n,o),o}function Uo(e,t,n){return e==null?"":WO(t,n).format(e)}const qO=[];function xd(e){A.useEffect(e,qO)}const Zs=null;let Hy=globalThis.requestAnimationFrame;class UO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&Hy!==requestAnimationFrame&&(Hy=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Xs=new UO;class wd{static create(){return new wd}static request(t){return Xs.request(t)}static cancel(t){return Xs.cancel(t)}currentId=Zs;request(t){this.cancel(),this.currentId=Xs.request(()=>{this.currentId=Zs,t()})}cancel=()=>{this.currentId!==Zs&&(Xs.cancel(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.cancel}function Wy(){const e=io(wd.create).current;return xd(e.disposeEffect),e}const qy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(qy.displayName="DirectionContext");function Uy(){return A.useContext(qy)?.direction??"ltr"}function Gy(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function GO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Yy(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(GO(t)))}function Ky({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:a,initialValues:s}){if(e.length===0)return[];const l=e.slice(),c=i*a,u=l.length-1,d=s??e,f=r+t*c,p=o-(u-t)*c;l[t]=On(n,f,p);for(let v=t+1;v<=u;v+=1){const g=l[v-1]+c,h=o-(u-v)*c,y=d[v]??l[v];let b=Math.max(l[v],g);y<b&&(b=Math.max(y,g)),l[v]=On(b,g,h)}for(let v=t-1;v>=0;v-=1){const g=l[v+1]-c,h=r+v*c,y=d[v]??l[v];let b=Math.min(l[v],g);y>b&&(b=Math.min(y,g)),l[v]=On(b,h,g)}for(let v=0;v<=u;v+=1)l[v]=Number(l[v].toFixed(12));return l}function YO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const v=u[o],g=1e-7,h=u.slice(),y=h[o-1],b=h[o+1],x=y!=null?y+p:a,S=b!=null?b-p:s,E=On(i,x,S),I=Number(E.toFixed(12));h[o]=I;const w=i>v,k=i<v,P=w&&b!=null&&i>=b-g,_=k&&y!=null&&i<=y+g;if(!P&&!_)return{value:h,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,V=h.map((z,M)=>{if(M===o)return I;const C=d[M];return C??u[M]});let N=i;P?N=Math.max(i,h[F]):N=Math.min(i,h[F]);const O=Ky({values:h,index:F,nextValue:N,min:a,max:s,step:l,minStepsBetweenValues:c,initialValues:V}),D=P?F-1:F+1;if(D>=0&&D<O.length){const z=O[D-1],M=O[D+1];let C=z!=null?z+p:a;C=Math.max(C,a+D*p);let L=M!=null?M-p:s;L=Math.min(L,s-(O.length-1-D)*p);const $=On(I,C,L);O[D]=Number($.toFixed(12))}return{value:O,thumbIndex:F,didSwap:!0}}case"push":return{value:Ky({values:u,index:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const v=u.slice(),g=v[o-1],h=v[o+1],y=g!=null?g+p:a,b=h!=null?h-p:s,x=On(i,y,b);return v[o]=Number(x.toFixed(12)),{value:v,thumbIndex:o,didSwap:!1}}}}const KO=2;function ZO(e,t){if(!e)return{start:0,end:0};function n(i){const a=i!=null?parseFloat(i):0;return Number.isNaN(a)?0:a}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Qs(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Zy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:a,dragging:s,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:v,onValueCommitted:g,orientation:h,pressedInputRef:y,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:S,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:P,state:_,step:F,thumbCollisionBehavior:V,thumbRefs:N,values:O}=Ks(),D=Uy(),z=O.length>1,M=h==="vertical",C=A.useRef(null),L=A.useRef(null),$=Ye(Q=>{Q&&L.current==null&&L.current==null&&(L.current=getComputedStyle(Q))}),B=A.useRef(null),q=A.useRef(0),G=A.useRef(0),W=rd(O),J=Ye(Q=>{x.current!==Q&&(x.current=Q);const le=N.current[Q];if(!le){b.current=null,y.current=null;return}y.current=le.querySelector('input[type="range"]')}),re=Ye(Q=>{const le=C.current;if(!le)return null;const{width:te,height:fe,bottom:pe,left:ve,right:Ae}=le.getBoundingClientRect(),me=ZO(L.current,M),oe=G.current,j=(M?fe:te)-me.start-me.end-oe*2,R=b.current??0,ne=Q.x-R,ce=Q.y-R,xe=M?pe-ce-me.end:(D==="rtl"?Ae-ne:ne-ve)-me.start,Ce=On((xe-oe)/j,0,1);let _e=(f-p)*Ce+p;if(_e=Yy(_e,F,p),_e=On(_e,p,f),!z)return{value:_e,thumbIndex:0,didSwap:!1};const qe=x.current;if(qe<0)return null;const pt=YO({behavior:V,values:O,currentValues:W.current??O,initialValues:S.current,pressedIndex:qe,nextValue:_e,min:p,max:f,step:F,minStepsBetweenValues:v});return V==="swap"&&pt.didSwap?J(pt.thumbIndex):x.current=pt.thumbIndex,pt}),ee=Ye(Q=>{S.current=z?O.slice():null,W.current=O;const le=x.current;let te=le;if(le>-1&&le<O.length){if(O[le]===f){let fe=le;for(;fe>0&&O[fe-1]===f;)fe-=1;te=fe}}else{const fe=M?"y":"x";let pe;te=-1;for(let ve=0;ve<N.current.length;ve+=1){const Ae=N.current[ve];if(tt(Ae)){const me=Gy(Ae),oe=Math.abs(Q[fe]-me[fe]);(pe===void 0||oe<=pe)&&(te=ve,pe=oe)}}}if(te>-1&&te!==le&&J(te),c){const fe=N.current[te];if(tt(fe)){const pe=fe.getBoundingClientRect(),ve=M?"height":"width";G.current=pe[ve]/2}}}),Y=Ye(Q=>{N.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),K=Ye(Q=>{const le=Qs(Q,B);if(le==null)return;if(q.current+=1,Q.type==="pointermove"&&Q.buttons===0){X(Q);return}const te=re(le);te!=null&&jy(te.value,F,v)&&(!s&&q.current>KO&&k(!0),P(te.value,qo(BP,Q,void 0,{activeThumbIndex:te.thumbIndex})),W.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&Y(te.thumbIndex))});function X(Q){w(-1),k(!1),y.current=null,b.current=null;const le=Qs(Q,B),te=le!=null?re(le):null;if(te!=null){const fe=d.current;l.commit(u.current??te.value),g(u.current??te.value,fy(fe,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),x.current=-1,B.current=null,S.current=null,H()}const de=Ye(Q=>{if(a)return;const le=Q.changedTouches[0];le!=null&&(B.current=le.identifier);const te=Qs(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Y(pe.thumbIndex),P(pe.value,qo(dy,Q,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex)}q.current=0;const fe=In(C.current);fe.addEventListener("touchmove",K,{passive:!0}),fe.addEventListener("touchend",X,{passive:!0})}),H=Ye(()=>{const Q=In(C.current);Q.removeEventListener("pointermove",K),Q.removeEventListener("pointerup",X),Q.removeEventListener("touchmove",K),Q.removeEventListener("touchend",X),S.current=null}),se=Wy();return A.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",de,{passive:!0}),()=>{Q.removeEventListener("touchstart",de),se.cancel(),H()}):()=>H()},[H,de,C,se]),A.useEffect(()=>{a&&H()},[a,H]),an("div",t,{state:_,ref:[n,E,C,$],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const le=C.current;if(!le||a||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const te=Qs(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Ar(N.current[pe.thumbIndex],ao(In(le)))?Q.preventDefault():se.request(()=>{Y(pe.thumbIndex)}),k(!0),b.current!=null||(P(pe.value,qo(dy,Q.nativeEvent,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex))}Q.nativeEvent.pointerId&&le.setPointerCapture(Q.nativeEvent.pointerId),q.current=0;const fe=In(C.current);fe.addEventListener("pointermove",K,{passive:!0}),fe.addEventListener("pointerup",X,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Zy.displayName="SliderControl");const Xy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=Ks();return an("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Xy.displayName="SliderTrack");const Js={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function el(e,t,n){return(e-t)*100/(n-t)}const tl="ArrowUp",nl="ArrowDown",rl="ArrowLeft",ol="ArrowRight",il="Home",al="End",XO=new Set([rl,ol]),QO=new Set([tl,nl]),JO=new Set([...XO,...QO]);[...JO];const e_=new Set([tl,nl,rl,ol,il,al]);let t_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function n_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=DO(),f=A.useRef(-1),[p,v]=A.useState(i??(o===t_.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),g=A.useRef(null),h=A.useCallback(y=>{if(g.current=y,p!==-1&&y!==null&&(c.current[p]=y,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??y.textContent}},[p,c,u,t,r]);return St(()=>{if(i!=null)return;const y=g.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),St(()=>{if(i==null)return l(y=>{const b=g.current?y.get(g.current)?.index:null;b!=null&&v(b)})},[i,l,v]),A.useMemo(()=>({ref:h,index:p}),[p,h])}const Qy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qy.displayName="CSPContext");const r_={disableStyleElements:!1};function o_(){return A.useContext(Qy)??r_}function i_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Vy(),a=qs(t);return St(()=>{if(!(!n&&!t||i===An)){if(n){const s=r?.current;tt(s)&&s.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}let a_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const s_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',Jy="PageUp",eb="PageDown",l_=new Set([tl,nl,rl,ol,il,al,Jy,eb]);function c_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Uo(e[t],r,n)} start range`:`${Uo(e[t],r,n)} end range`:n?Uo(e[t],r,n):void 0}function Go(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const tb=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":a,"aria-label":s,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:v,onBlur:g,onFocus:h,onKeyDown:y,tabIndex:b,...x}=t,{nonce:S}=o_(),E=qs(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:V,inset:N,labelId:O,largeStep:D,locale:z,max:M,min:C,minStepsBetweenValues:L,name:$,orientation:B,pressedInputRef:q,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:W,renderBeforeHydration:J,setActive:re,setIndicatorPosition:ee,state:Y,step:K,values:X}=Ks(),de=Uy(),H=c||P,se=X.length>1,ae=B==="vertical",Q=de==="rtl",{setTouched:le,setFocused:te,validationMode:fe}=yd(),pe=A.useRef(null),ve=A.useRef(null),Ae=qs(),me=i_(),oe=se?Ae:me,j=A.useMemo(()=>({inputId:oe}),[oe]),{ref:R,index:ne}=n_({metadata:j}),ce=se?p??ne:0,xe=ce===X.length-1,Ce=X[ce],_e=el(Ce,C,M),[qe,pt]=A.useState(!1),[ht,$t]=A.useState();xd(()=>pt(!0));const $e=w>=0&&w<X.length?w:-1,U=Ye(()=>{const ot=k.current,mt=pe.current;if(!ot||!mt)return;const it=mt.getBoundingClientRect(),vn=ot.getBoundingClientRect(),Ur=ae?"height":"width",Gr=vn[Ur]-it[Ur],Mi=(it[Ur]/2+Gr*_e/100)/vn[Ur]*100;$t(Mi),ce===0?ee(Di=>[Mi,Di[1]]):xe&&ee(Di=>[Di[0],Mi])});St(()=>{N&&queueMicrotask(U)},[U,N]),St(()=>{N&&U()},[U,N,_e]);const Z=A.useCallback(()=>{const ot=ae?"bottom":"insetInlineStart",mt=ae?"left":"top";let it;return se?I===ce?it=2:$e===ce&&(it=1):I===ce&&(it=1),N?{"--position":`${ht}%`,visibility:J&&!qe||ht===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[mt]:"50%",translate:`${(ae||!Q?-1:1)*50}% ${(ae?1:-1)*50}%`,zIndex:it}:Number.isFinite(_e)?{position:"absolute",[ot]:`${_e}%`,[mt]:"50%",translate:`${(ae||!Q?-1:1)*50}% ${(ae?1:-1)*50}%`,zIndex:it}:Js},[I,ce,N,qe,ht,se,J,Q,$e,_e,ae]);let Oe;B==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ge=sd({"aria-label":typeof u=="function"?u(ce):s,"aria-labelledby":l??O,"aria-describedby":a,"aria-orientation":B,"aria-valuenow":Ce,"aria-valuetext":typeof d=="function"?d(Uo(Ce,z,F.current??void 0),Ce,ce):c_(X,ce,F.current??void 0,z),disabled:H,id:oe,max:M,min:C,name:$,onChange(ot){V(ot.target.valueAsNumber,ce,ot)},onFocus(){re(ce),te(!0)},onBlur(){pe.current&&(re(-1),le(!0),te(!1),fe==="onBlur"&&_.commit(zy(Ce,ce,C,M,se,X)))},onKeyDown(ot){if(!l_.has(ot.key))return;e_.has(ot.key)&&ot.stopPropagation();let mt=null;const it=Yy(Ce,K,C);switch(ot.key){case tl:mt=Go(it,ot.shiftKey?D:K,1,C,M);break;case ol:mt=Go(it,ot.shiftKey?D:K,Q?-1:1,C,M);break;case nl:mt=Go(it,ot.shiftKey?D:K,-1,C,M);break;case rl:mt=Go(it,ot.shiftKey?D:K,Q?1:-1,C,M);break;case Jy:mt=Go(it,D,1,C,M);break;case eb:mt=Go(it,D,-1,C,M);break;case al:mt=M,se&&(mt=Number.isFinite(X[ce+1])?X[ce+1]-K*L:M);break;case il:mt=C,se&&(mt=Number.isFinite(X[ce-1])?X[ce-1]+K*L:C);break}mt!==null&&(V(mt,ce,ot),ot.preventDefault())},step:K,style:{...Js,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:Ce??""},_.getInputValidationProps),Ze=id(ve,_.inputRef,v);return an("div",t,{state:Y,ref:[n,R,pe],props:[{[a_.index]:ce,children:m.jsxs(A.Fragment,{children:[o,m.jsx("input",{ref:Ze,...Ge}),N&&!qe&&J&&xe&&m.jsx("script",{nonce:S,dangerouslySetInnerHTML:{__html:s_},suppressHydrationWarning:!0})]}),id:E,onBlur:g,onFocus:h,onPointerDown(ot){if(W.current=ce,pe.current!=null){const mt=B==="horizontal"?"x":"y",it=Gy(pe.current),vn=(B==="horizontal"?ot.clientX:ot.clientY)-it[mt];G.current=vn}ve.current!=null&&q.current!==ve.current&&(q.current=ve.current)},style:Z(),suppressHydrationWarning:J||void 0,tabIndex:-1},x],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(tb.displayName="SliderThumb");function u_(e,t,n,r,o,i){const a=n===void 0||t&&r===void 0?"hidden":void 0,s=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":a,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[s]="var(--start-position)",u[l]="var(--relative-size)",u):(u[s]=0,u[l]="var(--start-position)",u)}function d_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",s={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return s[o]=0,s[i]=`${n}%`,s;const l=r-n;return s[o]=`${n}%`,s[i]=`${l}%`,s}const nb=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:a,inset:s,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Ks(),[v,g]=A.useState(!1);xd(()=>g(!0));const h=u==="vertical",y=p.length>1,b=s?u_(h,y,a[0],a[1],d,v):d_(h,y,el(p[0],c,l),el(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(nb.displayName="SliderIndicator");const sl=e=>{const t=T.useContext(Kr);if(e)return e;if(t)return t.locale||e},f_=e=>{const[t,n]=T.useState(null),r=T.useRef(null);return T.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(td,{title:"",ref:r,as:tb,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},p_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=T.useRef(Bo()),s=r||o||[],l=sl();return m.jsx(Ry,{...i,value:o,locale:l,defaultValue:r,children:m.jsxs(Zy,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(Xy,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(nb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(s)?s.map((c,u)=>m.jsx(f_,{tooltip:t??!1},`${a.current}-${u}`)):null]})})},Pr=e=>{const t=T.useRef(e);return T.useEffect(()=>{t.current=e},[e]),t},h_=T.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=T.useId(),[s,l]=T.useState(o.checked??!1),c=s,u=T.useRef(null),d=Pr(o.onChange);T.useImperativeHandle(i,()=>u.current),T.useEffect(()=>{if(u.current!==null&&d.current){const p=g=>{d.current&&d.current(g)},v=u.current;return v.addEventListener("change",p),()=>v?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:Pe("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:p=>l(p.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:f,"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})]})}),na=T.createContext({});function _n(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const rb=typeof window<"u",ll=rb?T.useLayoutEffect:T.useEffect,cl=T.createContext(null);function Sd(e,t){e.indexOf(t)===-1&&e.push(t)}function ra(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function m_([...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 Kn=(e,t,n)=>n>t?t:n<e?e:n;function Td(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yo=()=>{},dn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Yo=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Td(t,n))},dn=(e,t,n)=>{if(!e)throw new Error(Td(t,n))});const pr={},ob=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ib(e){return typeof e=="object"&&e!==null}const ab=e=>/^0[^.\s]+$/u.test(e);function Ed(e){let t;return()=>(t===void 0&&(t=e()),t)}const yn=e=>e,g_=(e,t)=>n=>t(e(n)),oa=(...e)=>e.reduce(g_),Ko=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class kd{constructor(){this.subscriptions=[]}add(t){return Sd(this.subscriptions,t),()=>ra(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 Mn=e=>e*1e3,bn=e=>e/1e3;function sb(e,t){return t?e*(1e3/t):0}const lb=new Set;function Cd(e,t,n){e||lb.has(t)||(console.warn(Td(t,n)),lb.add(t))}const v_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},cb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,y_=1e-7,b_=12;function x_(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=cb(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>y_&&++s<b_);return a}function ia(e,t,n,r){if(e===t&&n===r)return yn;const o=i=>x_(i,0,1,e,n);return i=>i===0||i===1?i:cb(o(i),t,r)}const ub=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,db=e=>t=>1-e(1-t),fb=ia(.33,1.53,.69,.99),Id=db(fb),pb=ub(Id),hb=e=>(e*=2)<1?.5*Id(e):.5*(2-Math.pow(2,-10*(e-1))),Ad=e=>1-Math.sin(Math.acos(e)),mb=db(Ad),gb=ub(Ad),w_=ia(.42,0,1,1),S_=ia(0,0,.58,1),vb=ia(.42,0,.58,1),yb=e=>Array.isArray(e)&&typeof e[0]!="number";function bb(e,t){return yb(e)?e[v_(0,e.length,t)]:e}const xb=e=>Array.isArray(e)&&typeof e[0]=="number",wb={linear:yn,easeIn:w_,easeInOut:vb,easeOut:S_,circIn:Ad,circInOut:gb,circOut:mb,backIn:Id,backInOut:pb,backOut:fb,anticipate:hb},T_=e=>typeof e=="string",Pd=e=>{if(xb(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return ia(t,n,r,o)}else if(T_(e))return dn(wb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),wb[e];return e},ul=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function E_(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,f=!1)=>{const v=f&&o?n:r;return d&&a.add(u),v.has(u)||v.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 k_=40;function Sb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ul.reduce((x,S)=>(x[S]=E_(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=a,g=()=>{const x=pr.useManualTiming?o.timestamp:performance.now();n=!1,pr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,k_),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},h=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:ul.reduce((x,S)=>{const E=a[S];return x[S]=(I,w=!1,k=!1)=>(n||h(),E.schedule(I,w,k)),x},{}),cancel:x=>{for(let S=0;S<ul.length;S++)a[ul[S]].cancel(x)},state:o,steps:a}}const{schedule:gt,cancel:hr,state:Kt,steps:Od}=Sb(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0);let dl;function C_(){dl=void 0}const Jt={now:()=>(dl===void 0&&Jt.set(Kt.isProcessing||pr.useManualTiming?Kt.timestamp:performance.now()),dl),set:e=>{dl=e,queueMicrotask(C_)}},Tb=e=>t=>typeof t=="string"&&t.startsWith(e),Eb=Tb("--"),I_=Tb("var(--"),_d=e=>I_(e)?A_.test(e.split("/*")[0].trim()):!1,A_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function kb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},aa={...Zo,transform:e=>Kn(0,1,e)},fl={...Zo,default:1},sa=e=>Math.round(e*1e5)/1e5,Md=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function P_(e){return e==null}const O_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dd=(e,t)=>n=>!!(typeof n=="string"&&O_.test(n)&&n.startsWith(e)||t&&!P_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Md);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},__=e=>Kn(0,255,e),Nd={...Zo,transform:e=>Math.round(__(e))},so={test:Dd("rgb","red"),parse:Cb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nd.transform(e)+", "+Nd.transform(t)+", "+Nd.transform(n)+", "+sa(aa.transform(r))+")"};function M_(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 Fd={test:Dd("#"),parse:M_,transform:so.transform},la=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=la("deg"),Zn=la("%"),Te=la("px"),D_=la("vh"),N_=la("vw"),Ib={...Zn,parse:e=>Zn.parse(e)/100,transform:e=>Zn.transform(e*100)},Xo={test:Dd("hsl","hue"),parse:Cb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zn.transform(sa(t))+", "+Zn.transform(sa(n))+", "+sa(aa.transform(r))+")"},Ft={test:e=>so.test(e)||Fd.test(e)||Xo.test(e),parse:e=>so.test(e)?so.parse(e):Xo.test(e)?Xo.parse(e):Fd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?so.transform(e):Xo.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},F_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function L_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Md)?.length||0)+(e.match(F_)?.length||0)>0}const Ab="number",Pb="color",V_="var",$_="var(",Ob="${}",z_=/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 ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(z_,l=>(Ft.test(l)?(r.color.push(i),o.push(Pb),n.push(Ft.parse(l))):l.startsWith($_)?(r.var.push(i),o.push(V_),n.push(l)):(r.number.push(i),o.push(Ab),n.push(parseFloat(l))),++i,Ob)).split(Ob);return{values:n,split:s,indexes:r,types:o}}function _b(e){return ca(e).values}function Mb(e){const{split:t,types:n}=ca(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===Ab?i+=sa(o[a]):s===Pb?i+=Ft.transform(o[a]):i+=o[a]}return i}}const j_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function R_(e){const t=_b(e);return Mb(e)(t.map(j_))}const _r={test:L_,parse:_b,createTransformer:Mb,getAnimatableNone:R_};function Ld(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 B_({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=Ld(l,s,e+1/3),i=Ld(l,s,e),a=Ld(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function pl(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,Vd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},H_=[Fd,so,Xo],W_=e=>H_.find(t=>t.test(e));function Db(e){const t=W_(e);if(Yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xo&&(n=B_(n)),n}const Nb=(e,t)=>{const n=Db(e),r=Db(t);if(!n||!r)return pl(e,t);const o={...n};return i=>(o.red=Vd(n.red,r.red,i),o.green=Vd(n.green,r.green,i),o.blue=Vd(n.blue,r.blue,i),o.alpha=yt(n.alpha,r.alpha,i),so.transform(o))},$d=new Set(["none","hidden"]);function q_(e,t){return $d.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U_(e,t){return n=>yt(e,t,n)}function zd(e){return typeof e=="number"?U_:typeof e=="string"?_d(e)?pl:Ft.test(e)?Nb:K_:Array.isArray(e)?Fb:typeof e=="object"?Ft.test(e)?Nb:G_:pl}function Fb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>zd(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function G_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=zd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Y_(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 K_=(e,t)=>{const n=_r.createTransformer(t),r=ca(e),o=ca(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?$d.has(e)&&!o.values.length||$d.has(t)&&!r.values.length?q_(e,t):oa(Fb(Y_(r,o),o.values),n):(Yo(!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.`,"complex-values-different"),pl(e,t))};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):zd(e)(e,t)}const Z_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>gt.update(t,n),stop:()=>hr(t),now:()=>Kt.isProcessing?Kt.timestamp:Jt.now()}},Vb=(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)})`},hl=2e4;function jd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hl;)t+=n,r=e.next(t);return t>=hl?1/0:t}function $b(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jd(r),hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:bn(o)}}const X_=5;function zb(e,t,n){const r=Math.max(t-X_,0);return sb(n-e(r),t-r)}const Ct={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},Rd=.001;function Q_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;Yo(e<=Mn(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kn(Ct.minDamping,Ct.maxDamping,a),e=Kn(Ct.minDuration,Ct.maxDuration,bn(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-n,p=Bd(c,a),v=Math.exp(-d);return Rd-f/p*v},i=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),g=Bd(Math.pow(c,2),a);return(-o(c)+Rd>0?-1:1)*((f-p)*v)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Rd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=eM(o,i,s);if(e=Mn(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const J_=12;function eM(e,t,n){let r=n;for(let o=1;o<J_;o++)r=r-e(r)/t(r);return r}function Bd(e,t){return e*Math.sqrt(1-t*t)}const tM=["duration","bounce"],nM=["stiffness","damping","mass"];function jb(e,t){return t.some(n=>e[n]!==void 0)}function rM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!jb(e,nM)&&jb(e,tM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=Q_(e);t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ua(e=Ct.visualDuration,t=Ct.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:f,isResolvedFromDuration:p}=rM({...n,velocity:-bn(n.velocity||0)}),v=f||0,g=c/(2*Math.sqrt(l*u)),h=a-i,y=bn(Math.sqrt(l/u)),b=Math.abs(h)<5;r||(r=b?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=b?Ct.restDelta.granular:Ct.restDelta.default);let x;if(g<1){const E=Bd(y,g);x=I=>{const w=Math.exp(-g*y*I);return a-w*((v+g*y*h)/E*Math.sin(E*I)+h*Math.cos(E*I))}}else if(g===1)x=E=>a-Math.exp(-y*E)*(h+(v+y*h)*E);else{const E=y*Math.sqrt(g*g-1);x=I=>{const w=Math.exp(-g*y*I),k=Math.min(E*I,300);return a-w*((v+g*y*h)*Math.sinh(k)+E*h*Math.cosh(k))/E}}const S={calculatedDuration:p&&d||null,next:E=>{const I=x(E);if(p)s.done=E>=d;else{let w=E===0?v:0;g<1&&(w=E===0?Mn(v):zb(x,E,I));const k=Math.abs(w)<=r,P=Math.abs(a-I)<=o;s.done=k&&P}return s.value=s.done?a:I,s},toString:()=>{const E=Math.min(jd(S),hl),I=Vb(w=>S.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return S}ua.applyToOptions=e=>{const t=$b(e,100,ua);return e.ease=t.ease,e.duration=Mn(t.duration),e.type="keyframes",e};function Hd({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],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,v=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const h=d+g,y=a===void 0?h:a(h);y!==h&&(g=y-d);const b=k=>-g*Math.exp(-k/r),x=k=>y+b(k),S=k=>{const P=b(k),_=x(k);f.done=Math.abs(P)<=c,f.value=f.done?y:_};let E,I;const w=k=>{p(f.value)&&(E=k,I=ua({keyframes:[f.value,v(f.value)],velocity:zb(x,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let P=!1;return!I&&E===void 0&&(P=!0,S(k),w(k)),E!==void 0&&k>=E?I.next(k-E):(!P&&S(k),f)}}}function oM(e,t,n){const r=[],o=n||pr.mix||Lb,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]||yn:t;s=oa(l,s)}r.push(s)}return r}function Rb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length","range-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=oM(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 f=Ko(e[d],e[d+1],u);return s[d](f)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function Bb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ko(0,t,r);e.push(yt(n,1,o))}}function Hb(e){const t=[0];return Bb(t,e.length-1),t}function iM(e,t){return e.map(n=>n*t)}function aM(e,t){return e.map(()=>t||vb).splice(0,e.length-1)}function Qo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=yb(r)?r.map(Pd):Pd(r),i={done:!1,value:t[0]},a=iM(n&&n.length===t.length?n:Hb(t),e),s=Rb(a,t,{ease:Array.isArray(o)?o:aM(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const sM=e=>e!==null;function Wd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(sM),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const lM={decay:Hd,inertia:Hd,tween:Qo,keyframes:Qo,spring:ua};function Wb(e){typeof e.type=="string"&&(e.type=lM[e.type])}class qd{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 cM=e=>e/100;class Ud extends qd{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!==Jt.now()&&this.tick(Jt.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;Wb(t);const{type:n=Qo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Qo;process.env.NODE_ENV!=="production"&&l!==Qo&&dn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Qo&&typeof s[0]!="number"&&(this.mixKeyframes=oa(cM,Lb(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=jd(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:f,repeatDelay:p,type:v,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 y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,S=r;if(d){const k=Math.min(this.currentTime,o)/s;let P=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/s)):f==="mirror"&&(S=a)),x=Kn(0,1,_)*s}const E=b?{done:!1,value:u[0]}:S.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&v!==Hd&&(E.value=Wd(u,this.options,h,this.speed)),g&&g(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return bn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(this.currentTime)}set time(t){t=Mn(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(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Z_,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(Jt.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 uM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const lo=e=>e*180/Math.PI,Gd=e=>{const t=lo(Math.atan2(e[1],e[0]));return Yd(t)},dM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,skewX:e=>lo(Math.atan(e[1])),skewY:e=>lo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Yd=e=>(e=e%360,e<0&&(e+=360),e),qb=Gd,Ub=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Gb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ub,scaleY:Gb,scale:e=>(Ub(e)+Gb(e))/2,rotateX:e=>Yd(lo(Math.atan2(e[6],e[5]))),rotateY:e=>Yd(lo(Math.atan2(-e[2],e[0]))),rotateZ:qb,rotate:qb,skewX:e=>lo(Math.atan(e[4])),skewY:e=>lo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Kd(e){return e.includes("scale")?1:0}function Zd(e,t){if(!e||e==="none")return Kd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=fM,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dM,o=s}if(!o)return Kd(t);const i=r[t],a=o[1].split(",").map(hM);return typeof i=="function"?i(a):a[i]}const pM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zd(n,t)};function hM(e){return parseFloat(e.trim())}const Jo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ei=new Set(Jo),Yb=e=>e===Zo||e===Te,mM=new Set(["x","y","z"]),gM=Jo.filter(e=>!mM.has(e));function vM(e){const t=[];return gM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mr={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})=>Zd(t,"x"),y:(e,{transform:t})=>Zd(t,"y")};Mr.translateX=Mr.x,Mr.translateY=Mr.y;const co=new Set;let Xd=!1,Qd=!1,Jd=!1;function Kb(){if(Qd){const e=Array.from(co).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=vM(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)})}Qd=!1,Xd=!1,co.forEach(e=>e.complete(Jd)),co.clear()}function Zb(){co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qd=!0)})}function yM(){Jd=!0,Zb(),Kb(),Jd=!1}class ef{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?(co.add(this),Xd||(Xd=!0,gt.read(Zb),gt.resolveKeyframes(Kb))):(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])}uM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),co.delete(this)}cancel(){this.state==="scheduled"&&(co.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bM=e=>e.startsWith("--");function xM(e,t,n){bM(t)?e.style.setProperty(t,n):e.style[t]=n}const wM=Ed(()=>window.ScrollTimeline!==void 0),SM={};function TM(e,t){const n=Ed(e);return()=>SM[t]??n()}const Xb=TM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),da=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:da([0,.65,.55,1]),circOut:da([.55,0,1,.45]),backIn:da([.31,.01,.66,-.59]),backOut:da([.33,1.53,.69,.99])};function Jb(e,t){if(e)return typeof e=="function"?Xb()?Vb(e,t):"ease-out":xb(e)?da(e):Array.isArray(e)?e.map(n=>Jb(n,t)||Qb.easeOut):Qb[e]}function EM(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=Jb(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function tf(e){return typeof e=="function"&&"applyToOptions"in e}function kM({type:e,...t}){return tf(e)&&Xb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class CM extends qd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!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,dn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=kM(t);this.animation=EM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Wd(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):xM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 bn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Mn(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&wM()?(this.animation.timeline=t,yn):n(this)}}const ex={anticipate:hb,backInOut:pb,circInOut:gb};function IM(e){return e in ex}function AM(e){typeof e.ease=="string"&&IM(e.ease)&&(e.ease=ex[e.ease])}const nf=10;class PM extends CM{constructor(t){AM(t),Wb(t),super(t),t.startTime!==void 0&&(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 Ud({...a,autoplay:!1}),l=Math.max(nf,Jt.now()-this.startTime),c=Kn(0,nf,l-nf);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const tx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_r.test(e)||e==="0")&&!e.startsWith("url("));function OM(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 _M(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=tx(o,t),s=tx(i,t);return Yo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:OM(e)||(n==="spring"||tf(n))&&r}function rf(e){e.duration=0,e.type="keyframes"}const MM=new Set(["opacity","clipPath","filter","transform"]),DM=Ed(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function NM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return DM()&&n&&MM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const FM=40;class LM extends qd{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=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||ef;this.keyframeResolver=new p(s,(v,g,h)=>this.onKeyframesResolved(v,g,f,!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=Jt.now(),_M(t,i,a,s)||((pr.instantAnimations||!l)&&u?.(Wd(t,r,n)),t[0]=t[t.length-1],rf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>FM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&NM(f),v=f.motionValue?.owner?.current,g=p?new PM({...f,element:v}):new Ud(f);g.finished.then(()=>{this.notifyFinished()}).catch(yn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),yM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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 VM{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(){return nx(this.animations,"duration")}get iterationDuration(){return nx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function nx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class $M extends VM{then(t,n){return this.finished.finally(t).then(()=>{})}}function rx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const zM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jM(e){const t=zM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const RM=4;function ox(e,t,n=1){dn(n<=RM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=jM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return ob(a)?parseFloat(a):a}return _d(o)?ox(o,t,n+1):o}const BM={type:"spring",stiffness:500,damping:25,restSpeed:10},HM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),WM={type:"keyframes",duration:.8},qM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},UM=(e,{keyframes:t})=>t.length>2?WM:ei.has(e)?e.startsWith("scale")?HM(t[1]):BM:qM,GM=e=>e!==null;function YM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(GM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function of(e,t){return e?.[t]??e?.default??e}function KM({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 af=(e,t,n,r={},o,i)=>a=>{const s=of(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};KM(s)||Object.assign(u,UM(e,u)),u.duration&&(u.duration=Mn(u.duration)),u.repeatDelay&&(u.repeatDelay=Mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rf(u),u.delay===0&&(d=!0)),(pr.instantAnimations||pr.skipAnimations)&&(d=!0,rf(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=YM(u.keyframes,s);if(f!==void 0){gt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Ud(u):new LM(u)};function ix(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[o,i]=ix(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]=ix(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ti(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}const ax=new Set(["width","height","top","left","right","bottom",...Jo]),sx=30,ZM=e=>!isNaN(parseFloat(e)),fa={current:void 0};class XM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ZM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Cd(!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 kd);const r=this.events[t].add(n);return t==="change"?()=>{r(),gt.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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 fa.current&&fa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>sx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,sx);return sb(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 uo(e,t){return new XM(e,t)}const lf=e=>Array.isArray(e);function QM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function JM(e){return lf(e)?e[e.length-1]||0:e}function eD(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=JM(i[a]);QM(e,a,s)}}const jt=e=>!!(e&&e.getVelocity);function tD(e){return!!(jt(e)&&e.add)}function cf(e,t){const n=e.getValue("willChange");if(tD(n))return n.add(t);if(!n&&pr.WillChange){const r=new pr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function uf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const lx="data-"+uf("framerAppearId");function cx(e){return e.props[lx]}function nD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function df(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),f=s[u];if(f===void 0||c&&nD(c,u))continue;const p={delay:n,...of(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=cx(e);if(y){const b=window.MotionHandoffAnimation(y,u,gt);b!==null&&(p.startTime=b,g=!0)}}cf(e,u),d.start(af(u,d,f,e.shouldReduceMotion&&ax.has(u)?{type:!1}:p,e,g));const h=d.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{gt.update(()=>{a&&eD(e,a)})}),l}function ff(e,t,n={}){const r=ti(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(df(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return rD(e,t,l,c,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 rD(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(ff(l,t,{...a,delay:n+(typeof r=="function"?0:r)+rx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function oD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ff(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ff(e,t,n);else{const o=typeof t=="function"?ti(e,t,n.custom):t;r=Promise.all(df(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const iD={test:e=>e==="auto",parse:e=>e},ux=e=>t=>t.test(e),dx=[Zo,Te,Zn,Or,N_,D_,iD],fx=e=>dx.find(ux(e));function aD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ab(e):!0}const sD=new Set(["brightness","contrast","saturate","opacity"]);function lD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Md)||[];if(!r)return e;const o=n.replace(r,"");let i=sD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const cD=/\b([a-z-]*)\(.*?\)/gu,pf={..._r,getAnimatableNone:e=>{const t=e.match(cD);return t?t.map(lD).join(" "):e}},px={...Zo,transform:Math.round},hf={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,backgroundPositionX:Te,backgroundPositionY:Te,...{rotate:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:fl,scaleX:fl,scaleY:fl,scaleZ:fl,skew:Or,skewX:Or,skewY:Or,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:aa,originX:Ib,originY:Ib,originZ:Te},zIndex:px,fillOpacity:aa,strokeOpacity:aa,numOctaves:px},uD={...hf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:pf,WebkitFilter:pf},hx=e=>uD[e];function mx(e,t){let n=hx(e);return n!==pf&&(n=_r),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const dD=new Set(["auto","none","0"]);function fD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!dD.has(i)&&ca(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=mx(n,o)}class pD extends ef{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 u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),_d(d))){const f=ox(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ax.has(r)||t.length!==2)return;const[o,i]=t,a=fx(o),s=fx(i),l=kb(o),c=kb(i);if(l!==c&&Mr[r]){this.needsMeasurement=!0;return}if(a!==s)if(Yb(a)&&Yb(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Mr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||aD(t[o]))&&r.push(o);r.length&&fD(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=Mr[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]=Mr[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 gx(e,t,n){if(e==null)return[];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).filter(r=>r!=null)}const vx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mf(e){return ib(e)&&"offsetHeight"in e}const{schedule:gf}=Sb(queueMicrotask,!1),Dn={x:!1,y:!1};function yx(){return Dn.x||Dn.y}function hD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function bx(e,t){const n=gx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function xx(e){return!(e.pointerType==="touch"||yx())}function mD(e,t,n={}){const[r,o,i]=bx(e,n),a=s=>{if(!xx(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{xx(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const wx=(e,t)=>t?e===t?!0:wx(e,t.parentElement):!1,vf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,gD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sx(e){return gD.has(e.tagName)||e.isContentEditable===!0}const ml=new WeakSet;function Tx(e){return t=>{t.key==="Enter"&&e(t)}}function yf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Tx(()=>{if(ml.has(n))return;yf(n,"down");const o=Tx(()=>{yf(n,"up")}),i=()=>yf(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 Ex(e){return vf(e)&&!yx()}function yD(e,t,n={}){const[r,o,i]=bx(e,n),a=s=>{const l=s.currentTarget;if(!Ex(s))return;ml.add(l);const c=t(l,s),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ml.has(l)&&ml.delete(l),Ex(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||wx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),mf(s)&&(s.addEventListener("focus",c=>vD(c,o)),!Sx(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function bf(e){return ib(e)&&"ownerSVGElement"in e}function kx(e){return bf(e)&&e.tagName==="svg"}function bD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function xD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:bD(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Pd(r)(l/c)*c}return t+l}}function wD(...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=Rb(o,i,a);return t?s(r):s}const SD=[...dx,Ft,_r],TD=e=>SD.find(ux(e)),Cx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ni=()=>({x:Cx(),y:Cx()}),Ix=()=>({min:0,max:0}),Lt=()=>({x:Ix(),y:Ix()}),xf={current:null},Ax={current:!1},ED=typeof window<"u";function kD(){if(Ax.current=!0,!!ED)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xf.current=e.matches;e.addEventListener("change",t),t()}else xf.current=!1}const pa=new WeakMap;function gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ha(e){return typeof e=="string"||Array.isArray(e)}const wf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sf=["initial",...wf];function vl(e){return gl(e.animate)||Sf.some(t=>ha(e[t]))}function Px(e){return!!(vl(e)||e.variants)}function CD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(jt(o))e.addValue(r,o);else if(jt(i))e.addValue(r,uo(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,uo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ox=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yl={};function _x(e){yl=e}function ID(){return yl}class Mx{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=ef,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 f=Jt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,gt.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=vl(n),this.isVariantNode=Px(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&jt(p)&&p.set(l[f])}}mount(t){this.current=t,pa.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ax.current||kD(),this.shouldReduceMotion=xf.current),process.env.NODE_ENV!=="production"&&Cd(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hr(this.notifyUpdate),hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ei.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&>.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),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 yl){const n=yl[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):Lt()}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<Ox.length;r++){const o=Ox[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=CD(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=uo(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"&&(ob(r)||ab(r))?r=parseFloat(r):!TD(r)&&_r.test(n)&&(r=mx(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(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=sf(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&&!jt(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 kd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){gf.render(this.render)}}class Dx extends Mx{constructor(){super(...arguments),this.KeyframeResolver=pD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Nx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function AD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function PD(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}}function Tf(e){return e===void 0||e===1}function Ef({scale:e,scaleX:t,scaleY:n}){return!Tf(e)||!Tf(t)||!Tf(n)}function fo(e){return Ef(e)||Fx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Fx(e){return Lx(e.x)||Lx(e.y)}function Lx(e){return e&&e!=="0%"}function bl(e,t,n){const r=e-n,o=t*r;return n+o}function Vx(e,t,n,r,o){return o!==void 0&&(e=bl(e,o,r)),bl(e,n,r)+t}function kf(e,t=0,n=1,r,o){e.min=Vx(e.min,t,n,r,o),e.max=Vx(e.max,t,n,r,o)}function $x(e,{x:t,y:n}){kf(e.x,t.translate,t.scale,t.originPoint),kf(e.y,n.translate,n.scale,n.originPoint)}const zx=.999999999999,jx=1.0000000000001;function OD(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&&oi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,$x(e,a)),r&&fo(i.latestValues)&&oi(e,i.latestValues))}t.x<jx&&t.x>zx&&(t.x=1),t.y<jx&&t.y>zx&&(t.y=1)}function ri(e,t){e.min=e.min+t,e.max=e.max+t}function Rx(e,t,n,r,o=.5){const i=yt(e.min,e.max,o);kf(e,t,n,i,r)}function oi(e,t){Rx(e.x,t.x,t.scaleX,t.scale,t.originX),Rx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Bx(e,t){return Nx(PD(e.getBoundingClientRect(),t))}function _D(e,t,n){const r=Bx(e,n),{scroll:o}=t;return o&&(ri(r.x,o.offset.x),ri(r.y,o.offset.y)),r}const MD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},DD=Jo.length;function ND(e,t,n){let r="",o=!0;for(let i=0;i<DD;i++){const a=Jo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=vx(s,hf[a]);if(!l){o=!1;const u=MD[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Cf(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(ei.has(l)){a=!0;continue}else if(Eb(l)){o[l]=c;continue}else{const u=vx(c,hf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=ND(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}`}}function Hx(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function Wx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ma={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=Wx(e,t.target.x),r=Wx(e,t.target.y);return`${n}% ${r}%`}},FD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_r.parse(e);if(o.length>5)return r;const i=_r.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=yt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},If={borderRadius:{...ma,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ma,borderTopRightRadius:ma,borderBottomLeftRadius:ma,borderBottomRightRadius:ma,boxShadow:FD};function qx(e,{layout:t,layoutId:n}){return ei.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!If[e]||e==="opacity")}function Af(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(jt(r[a])||o&&jt(o[a])||qx(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function LD(e){return window.getComputedStyle(e)}class Ux extends Dx{constructor(){super(...arguments),this.type="html",this.renderInstance=Hx}readValueFromInstance(t,n){if(ei.has(n))return this.projection?.isProjecting?Kd(n):pM(t,n);{const r=LD(t),o=(Eb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Bx(t,n)}build(t,n,r){Cf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Af(t,n,r)}}function VD(e,t){return e in t}class $D extends Mx{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(VD(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 Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const zD={offset:"stroke-dashoffset",array:"stroke-dasharray"},jD={offset:"strokeDashoffset",array:"strokeDasharray"};function RD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?zD:jD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const BD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Cf(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of BD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&RD(d,o,i,a,!1)}const Yx=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"]),Kx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function HD(e,t,n,r){Hx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Yx.has(o)?o:uf(o),t.attrs[o])}function Zx(e,t,n){const r=Af(e,t,n);for(const o in e)if(jt(e[o])||jt(t[o])){const i=Jo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class Xx extends Dx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ei.has(n)){const r=hx(n);return r&&r.default||0}return n=Yx.has(n)?n:uf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Zx(t,n,r)}build(t,n,r){Gx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){HD(t,n,r,o)}mount(t){this.isSVGTag=Kx(t.tagName),super.mount(t)}}const WD=Sf.length;function Qx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Qx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<WD;n++){const r=Sf[n],o=e.props[r];(ha(o)||o===!1)&&(t[r]=o)}return t}function Jx(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 qD=[...wf].reverse(),UD=wf.length;function GD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>oD(e,n,r)))}function YD(e){let t=GD(e),n=e0(),r=!0;const o=l=>(c,u)=>{const d=ti(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...v}=d;c={...c,...v,...p}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Qx(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let h=0;h<UD;h++){const y=qD[h],b=n[y],x=c[y]!==void 0?c[y]:u[y],S=ha(x),E=y===l?b.isActive:null;E===!1&&(v=h);let I=x===u[y]&&x!==c[y]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&E===null||!x&&!b.prevProp||gl(x)||typeof x=="boolean")continue;const w=KD(b.prevProp,x);let k=w||y===l&&b.isActive&&!I&&S||h>v&&S,P=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(y),{});E===!1&&(F={});const{prevResolvedValues:V={}}=b,N={...V,...F},O=M=>{k=!0,f.has(M)&&(P=!0,f.delete(M)),b.needsAnimating[M]=!0;const C=e.getValue(M);C&&(C.liveStyle=!1)};for(const M in N){const C=F[M],L=V[M];if(p.hasOwnProperty(M))continue;let $=!1;lf(C)&&lf(L)?$=!Jx(C,L):$=C!==L,$?C!=null?O(M):f.add(M):C!==void 0&&f.has(M)?O(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=F,b.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(k=!1);const D=I&&w;k&&(!D||P)&&d.push(..._.map(M=>{const C={type:y};if(typeof M=="string"&&r&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,$=ti(L,M);if(L.enteringChildren&&$){const{delayChildren:B}=$.transition||{};C.delay=rx(L.enteringChildren,e,B)}}return{animation:M,options:C}}))}if(f.size){const h={};if(typeof c.initial!="boolean"){const y=ti(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(h.transition=y.transition)}f.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),h[y]=b??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=e0()}}}function KD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Jx(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function e0(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function t0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){t0(e.x,t.x),t0(e.y,t.y)}function n0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const r0=1e-4,ZD=1-r0,XD=1+r0,o0=.01,QD=0-o0,JD=0+o0;function en(e){return e.max-e.min}function eN(e,t,n){return Math.abs(e-t)<=n}function i0(e,t,n,r=.5){e.origin=r,e.originPoint=yt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ZD&&e.scale<=XD||isNaN(e.scale))&&(e.scale=1),(e.translate>=QD&&e.translate<=JD||isNaN(e.translate))&&(e.translate=0)}function ga(e,t,n,r){i0(e.x,t.x,n.x,r?r.originX:void 0),i0(e.y,t.y,n.y,r?r.originY:void 0)}function a0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function tN(e,t,n){a0(e.x,t.x,n.x),a0(e.y,t.y,n.y)}function s0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function xl(e,t,n){s0(e.x,t.x,n.x),s0(e.y,t.y,n.y)}function l0(e,t,n,r,o){return e-=t,e=bl(e,1/n,r),o!==void 0&&(e=bl(e,1/o,r)),e}function nN(e,t=0,n=1,r=.5,o,i=e,a=e){if(Zn.test(t)&&(t=parseFloat(t),t=yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=yt(i.min,i.max,r);e===i&&(s-=t),e.min=l0(e.min,t,n,s,o),e.max=l0(e.max,t,n,s,o)}function c0(e,t,[n,r,o],i,a){nN(e,t[n],t[r],t[o],t.scale,i,a)}const rN=["x","scaleX","originX"],oN=["y","scaleY","originY"];function u0(e,t,n,r){c0(e.x,t,rN,n?n.x:void 0,r?r.x:void 0),c0(e.y,t,oN,n?n.y:void 0,r?r.y:void 0)}function d0(e){return e.translate===0&&e.scale===1}function f0(e){return d0(e.x)&&d0(e.y)}function p0(e,t){return e.min===t.min&&e.max===t.max}function iN(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function h0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function m0(e,t){return h0(e.x,t.x)&&h0(e.y,t.y)}function g0(e){return en(e.x)/en(e.y)}function v0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xn(e){return[e("x"),e("y")]}function aN(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:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}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 y0=["TopLeft","TopRight","BottomLeft","BottomRight"],sN=y0.length,b0=e=>typeof e=="string"?parseFloat(e):e,x0=e=>typeof e=="number"||Te.test(e);function lN(e,t,n,r,o,i){o?(e.opacity=yt(0,n.opacity??1,cN(r)),e.opacityExit=yt(t.opacity??1,0,uN(r))):i&&(e.opacity=yt(t.opacity??1,n.opacity??1,r));for(let a=0;a<sN;a++){const s=`border${y0[a]}Radius`;let l=w0(t,s),c=w0(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||x0(l)===x0(c)?(e[s]=Math.max(yt(b0(l),b0(c),r),0),(Zn.test(c)||Zn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,r))}function w0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const cN=S0(0,.5,mb),uN=S0(.5,.95,yn);function S0(e,t,n){return r=>r<e?0:r>t?1:n(Ko(e,t,r))}function T0(e,t,n){const r=jt(e)?e:uo(e);return r.start(af("",r,t,n)),r.animation}function va(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const dN=(e,t)=>e.depth-t.depth;class fN{constructor(){this.children=[],this.isDirty=!1}add(t){Sd(this.children,t),this.isDirty=!0}remove(t){ra(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dN),this.isDirty=!1,this.children.forEach(t)}}function pN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hr(r),e(i-t))};return gt.setup(r,!0),()=>hr(r)}function wl(e){return jt(e)?e.get():e}class hN{constructor(){this.members=[]}add(t){Sd(this.members,t),t.scheduleRender()}remove(t){if(ra(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)}}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pf=["","X","Y","Z"],mN=1e3;let gN=0;function Of(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function E0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=cx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&E0(r)}function k0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=gN++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(bN),this.nodes.forEach(TN),this.nodes.forEach(EN),this.nodes.forEach(xN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 fN)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new kd),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=bf(a)&&!kx(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,d=0;const f=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{d=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=pN(f,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(A0)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||PN,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=c.getProps(),y=!this.targetLayout||!m0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...of(v,"layout"),onPlay:g,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||A0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),hr(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(kN),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&&E0(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(C0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(I0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(SN),this.nodes.forEach(vN),this.nodes.forEach(yN)):this.nodes.forEach(I0),this.clearAllSnapshots();const s=Jt.now();Kt.delta=Kn(0,1e3/60,s-Kt.timestamp),Kt.timestamp=s,Kt.isProcessing=!0,Od.update.process(Kt),Od.preRender.process(Kt),Od.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wN),this.sharedNodes.forEach(CN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(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.layoutVersion++,this.layoutCorrected=Lt(),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&&!f0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||fo(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)),ON(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Lt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_N))){const{scroll:c}=this.root;c&&(ri(s.x,c.offset.x),ri(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Lt();if(Nn(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&&Nn(s,a),ri(s.x,u.offset.x),ri(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Lt();Nn(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&&oi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&oi(l,u.latestValues)}return fo(this.latestValues)&&oi(l,this.latestValues),l}removeTransform(a){const s=Lt();Nn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Ef(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),u0(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&u0(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!==Kt.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))return;this.resolvedRelativeTargetAt=Kt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),$x(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ef(this.parent.latestValues)||Fx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),xl(this.relativeTargetOrigin,s,l),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===Kt.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;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;OD(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=Lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(n0(this.prevProjectionDelta.x,this.projectionDelta.x),n0(this.prevProjectionDelta.y,this.projectionDelta.y)),ga(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!v0(this.projectionDelta.x,this.prevProjectionDelta.x)||!v0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=ni(),this.projectionDelta=ni(),this.projectionDeltaWithTransform=ni()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ni();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Lt(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,g=p!==v,h=this.getStack(),y=!h||h.members.length<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(AN));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const E=S/1e3;P0(d.x,a.x,E),P0(d.y,a.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IN(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&iN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Nn(x,this.relativeTarget)),g&&(this.animationValues=u,lN(u,c,this.latestValues,E,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{Sl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=uo(0)),this.currentAnimation=T0(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(mN),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&&N0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Nn(s,l),oi(s,u),ga(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new hN),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&&Of("z",a,c,this.animationValues);for(let u=0;u<Pf.length;u++)Of(`rotate${Pf[u]}`,a,c,this.animationValues),Of(`skew${Pf[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()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=wl(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=wl(s?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=aN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in If){if(u[v]===void 0)continue;const{correct:g,applyTo:h,isCSSVariable:y}=If[v],b=d==="none"?u[v]:g(u[v],c);if(h){const x=h.length;for(let S=0;S<x;S++)a[h[S]]=b}else y?this.options.visualElement.renderState.vars[v]=b:a[v]=b}this.options.layoutId&&(a.pointerEvents=c===this?wl(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(C0),this.root.sharedNodes.clear()}}}function vN(e){e.updateLayout()}function yN(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"?xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):N0(o,t.layoutBox,n)&&xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=ni();ga(a,n,t.layoutBox);const s=ni();i?ga(s,e.applyTransform(r,!0),t.measuredBox):ga(s,n,t.layoutBox);const l=!f0(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();xl(p,t.layoutBox,d.layoutBox);const v=Lt();xl(v,n,f.layoutBox),m0(p,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,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 bN(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 xN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wN(e){e.clearSnapshot()}function C0(e){e.clearMeasurements()}function I0(e){e.isLayoutDirty=!1}function SN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function A0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function TN(e){e.resolveTargetDelta()}function EN(e){e.calcProjection()}function kN(e){e.resetSkewAndRotation()}function CN(e){e.removeLeadSnapshot()}function P0(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function O0(e,t,n,r){e.min=yt(t.min,n.min,r),e.max=yt(t.max,n.max,r)}function IN(e,t,n,r){O0(e.x,t.x,n.x,r),O0(e.y,t.y,n.y,r)}function AN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const PN={duration:.45,ease:[.4,0,.1,1]},_0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),M0=_0("applewebkit/")&&!_0("chrome/")?Math.round:yn;function D0(e){e.min=M0(e.min),e.max=M0(e.max)}function ON(e){D0(e.x),D0(e.y)}function N0(e,t,n){return e==="position"||e==="preserve-aspect"&&!eN(g0(t),g0(n),.2)}function _N(e){return e!==e.root&&e.scroll?.wasRoot}const MN=k0({attachResizeListener:(e,t)=>va(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),DN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function F0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(DN);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 _f={current:void 0},L0=k0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_f.current){const e=new MN({});e.mount(window),e.setOptions({layoutScroll:!0}),_f.current=e}return _f.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ii=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function V0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function NN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=V0(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():V0(e[o],null)}}}}function FN(...e){return A.useCallback(NN(...e),e)}class LN extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=mf(r)&&r.offsetWidth||0,i=mf(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function VN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=T.useId(),a=T.useRef(null),s=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=T.useContext(ii),c=e.props?.ref??e?.ref,u=FN(a,c);return T.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:v,right:g,bottom:h}=s.current;if(t||!a.current||!d||!f)return;const y=n==="left"?`left: ${v}`:`right: ${g}`,b=r==="bottom"?`bottom: ${h}`:`top: ${p}`;a.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const S=o??document.head;return S.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
6
|
+
`))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||a(c)},[]);return[s,l]}const dy={};function ao(e,t){const n=A.useRef(dy);return n.current===dy&&(n.current=e(t)),n}const od=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],LP=od&&od!==A.useLayoutEffect?od:e=>e();function Ye(e){const t=ao(VP).current;return t.next=e,LP(t.effect),t.trampoline}function VP(){const e={next:void 0,callback:$P,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $P(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const St=typeof document<"u"?A.useLayoutEffect:()=>{};function id(e){const t=ao(zP,e).current;return t.next=e,St(t.effect),t}function zP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let ad;process.env.NODE_ENV!=="production"&&(ad=new Set);function jP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ad.has(t)||(ad.add(t),console.warn(`Base UI: ${t}`))}}function An(){}const Pn=Object.freeze({}),RP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},BP="none",fy="track-press",HP="input-change",WP="focus-out",qP="keyboard",UP="drag";function Uo(e,t,n,r){let o=!1,i=!1;const a=r??Pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function py(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function GP(e,t){const n=A.useRef(e),r=Ye(t);St(()=>{n.current!==e&&r(n.current)},[e,r]),St(()=>{n.current=e},[e])}const YP={...A};let hy=0;function KP(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(hy+=1,r(`${t}-${hy}`))},[n,t]),o}const my=YP.useId;function qs(e,t){if(my!==void 0){const n=my();return e??(t?`${t}-${n}`:n)}return KP(e,t)}function Us(e){return qs(e,"base-ui")}function Pr(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function sd(e,t,n,r){const o=ao(gy).current;return XP(o,e,t,n,r)&&vy(o,[e,t,n,r]),o.callback}function ZP(e){const t=ao(gy).current;return QP(t,e)&&vy(t,e),t.callback}function gy(){return{callback:null,cleanup:null,refs:[]}}function XP(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function QP(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function vy(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const JP=parseInt(A.version,10);function yy(e){return JP>=e}function by(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(yy(19)?n?.ref:t.ref)??null}function ld(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function eO(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function tO(e,t){return typeof e=="function"?e(t):e}function nO(e,t){return typeof e=="function"?e(t):e}const Ji={};function cd(e,t,n,r,o){let i={...ud(e,Ji)};return t&&(i=Gs(i,t)),n&&(i=Gs(i,n)),r&&(i=Gs(i,r)),i}function rO(e){if(e.length===0)return Ji;if(e.length===1)return ud(e[0],Ji);let t={...ud(e[0],Ji)};for(let n=1;n<e.length;n+=1)t=Gs(t,e[n]);return t}function Gs(e,t){return xy(t)?t(e):oO(e,t)}function oO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ld(e.style,r);break}case"className":{e[n]=wy(e.className,r);break}default:iO(n,r)?e[n]=aO(e[n],r):e[n]=r}}return e}function iO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function xy(e){return typeof e=="function"}function ud(e,t){return xy(e)?e(t):e??Ji}function aO(e,t){return t?e?n=>{if(sO(n)){const o=n;dd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function dd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wy(e,t){return t?e?t+" "+e:t:e}function sO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=lO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return cO(e,r,o,i)}function lO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?tO(n,i):void 0,d=c?nO(r,i):void 0,f=c?eO(i,l):Pn,p=c?ld(f,Array.isArray(s)?rO(s):s)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(a)?p.ref=ZP([p.ref,by(o),...a]):p.ref=sd(p.ref,by(o),a):sd(null,null)),c?(u!==void 0&&(p.className=wy(p.className,u)),d!==void 0&&(p.style=ld(p.style,d)),p):Pn}function cO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=cd(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return uO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Pr(8))}function uO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function On(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Sy(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const ea=typeof navigator<"u",fd=mO(),dO=vO(),fO=gO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),fd.platform==="MacIntel"&&fd.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(fd.platform);const pO=ea&&/apple/i.test(navigator.vendor);ea&&dO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const hO=fO.includes("jsdom/");function mO(){if(!ea)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function gO(){if(!ea)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function vO(){if(!ea)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function so(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Or(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Hi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function hd(e){return e?.ownerDocument||document}function md(e){if(!e||hO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}var yO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],gd=yO.join(","),Ty=typeof Element>"u",ta=Ty?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ys=!Ty&&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},Ks=function(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&&(typeof t.closest=="function"?t.closest("[inert]"):Ks(t.parentNode));return a},bO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},xO=function(t,n,r){if(Ks(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(gd));return n&&ta.call(t,gd)&&o.unshift(t),o=o.filter(r),o},vd=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ks(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=vd(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=ta.call(a,gd);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ks(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=vd(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Ey=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Cy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bO(t))&&!Ey(t)?0:t.tabIndex},wO=function(t,n){var r=Cy(t);return r<0&&n&&!Ey(t)?0:r},SO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ky=function(t){return t.tagName==="INPUT"},TO=function(t){return ky(t)&&t.type==="hidden"},EO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},CO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},kO=function(t){if(!t.name)return!0;var n=t.form||Ys(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=CO(o,t.form);return!i||i===t},IO=function(t){return ky(t)&&t.type==="radio"},AO=function(t){return IO(t)&&!kO(t)},PO=function(t){var n,r=t&&Ys(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=Ys(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},Iy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ta.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ta.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Ys(t);if(c&&!c.shadowRoot&&o(c)===!0)return Iy(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(PO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Iy(t);return!1},_O=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 ta.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},MO=function(t,n){return!(n.disabled||TO(n)||OO(n,t)||EO(n)||_O(n))},Ay=function(t,n){return!(AO(n)||Cy(n)<0||!MO(t,n))},DO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Py=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=wO(s,a),c=a?Py(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(SO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Oy=function(t,n){n=n||{};var r;return n.getShadowRoot?r=vd([t],n.includeContainer,{filter:Ay.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DO}):r=xO(t,n.includeContainer,Ay.bind(null,n)),Py(r)};const _y=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function My(e,t){const n=Oy(e,_y()),r=n.length;if(r===0)return;const o=so(hd(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function NO(e){return My(hd(e).body,1)||e}function FO(e){return My(hd(e).body,-1)||e}function yd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Or(n,r)}function LO(e){Oy(e,_y()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Dy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const bd=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(bd.displayName="CompositeListContext");function VO(){return A.useContext(bd)}function $O(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ye(o),a=A.useRef(0),s=ao(jO).current,l=ao(zO).current,[c,u]=A.useState(0),d=A.useRef(c),f=Ye((y,b)=>{l.set(y,b??null),d.current+=1,u(d.current)}),p=Ye(y=>{l.delete(y),d.current+=1,u(d.current)}),v=A.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(RO).forEach((x,T)=>{const E=l.get(x)??{};y.set(x,{...E,index:T})}),y},[l,c]);St(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return v.forEach((b,x)=>{x.parentElement&&y.observe(x.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),St(()=>{d.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),a.current=v.size),i(v)},[i,v,n,r,c]),St(()=>()=>{n.current=[]},[n]),St(()=>()=>{r&&(r.current=[])},[r]);const g=Ye(y=>(s.add(y),()=>{s.delete(y)}));St(()=>{s.forEach(y=>y(v))},[s,v]);const h=A.useMemo(()=>({register:f,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:a}),[f,p,g,n,r,a]);return m.jsx(bd.Provider,{value:h,children:t})}function zO(){return new Map}function jO(){return new Set}function RO(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}function BO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Ny=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:An,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Ny.displayName="FormContext");function Fy(){return A.useContext(Ny)}const HO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ly=A.createContext({invalid:void 0,name:void 0,validityData:{state:HO,errors:[],error:"",value:"",initialValue:null},setValidityData:An,disabled:void 0,touched:!1,setTouched:An,dirty:!1,setDirty:An,filled:!1,setFilled:An,focused:!1,setFocused:An,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ly.displayName="FieldRootContext");function xd(e=!0){const t=A.useContext(Ly);if(t.setValidityData===An&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Pr(28));return t}function WO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=Fy(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=xd(),f=Ye(e.getValue);St(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(v=>({...v,initialValue:p}))},[t,d,n,u.initialValue,f]),St(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:BO(u,l),validate(p=!0){let v=n;v===void 0&&(v=f()),c.current=!0,p?jn.flushSync(()=>a(v)):a(v)}})},[a,i,t,s,f,r,l,c,o,u,n]),St(()=>{const p=s.current.fields;return()=>{r&&p.delete(r)}},[s,r])}const Vy=A.createContext({controlId:void 0,setControlId:An,labelId:void 0,setLabelId:An,messageIds:[],setMessageIds:An,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Vy.displayName="LabelableContext");function $y(){return A.useContext(Vy)}function zy(e,t){return e-t}function qO(e,t,n){const r=e.slice();return r[t]=n,r.sort(zy)}function jy(e,t,n,r,o,i){let a=e;return a=On(a,n,r),o&&(a=qO(i,t,On(a,i[t-1]||-1/0,i[t+1]||1/0))),a}function Ry(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,a,s)=>(a===s.length-1||o.push(Math.abs(i-s[a+1])),o),[]);return Math.min(...r)>=t*n}const na={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},wd=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(wd.displayName="SliderRootContext");function Zs(){const e=A.useContext(wd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Pr(62));return e}function UO(e){return"key"in e?qP:HP}function GO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?Sy(e,t):!1}const By=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:a=!1,id:s,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:v=0,name:g,onValueChange:h,onValueCommitted:y,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,C=Us(s),P=Ye(h),_=Ye(y),{clearErrors:F}=Fy(),{state:V,disabled:N,name:O,setTouched:D,setDirty:z,validityData:M,shouldValidateOnChange:k,validation:L}=xd(),{labelId:$}=$y(),B=r??$,q=N||a,G=O??g,[W,J]=FP({controlled:I,default:i??p,name:"Slider"}),re=A.useRef(null),ee=A.useRef(null),Y=A.useRef([]),K=A.useRef(null),X=A.useRef(null),de=A.useRef(-1),H=A.useRef(null),se=A.useRef(null),ae=A.useRef("none"),Q=id(l),[le,te]=A.useState(-1),[fe,pe]=A.useState(-1),[ve,Ae]=A.useState(!1),[me,oe]=A.useState(()=>new Map),[j,R]=A.useState([void 0,void 0]),ne=Ye($e=>{te($e),$e!==-1&&pe($e)});WO({id:C,commit:L.commit,value:W,controlRef:ee,name:G,getValue:()=>W}),GP(W,()=>{F(G),k()?L.commit(W):L.commit(W,!0);const $e=M.initialValue;let U;Array.isArray(W)&&Array.isArray($e)?U=!Sy(W,$e):U=W!==$e,z(U)});const ce=Ye($e=>{$e&&(ee.current=$e)}),xe=Array.isArray(W),ke=A.useMemo(()=>xe?W.slice().sort(zy):[On(W,p,f)],[f,p,xe,W]),_e=Ye(($e,U)=>{if(Number.isNaN($e)||GO($e,W))return;const Z=U??Uo(BP,void 0,void 0,{activeThumbIndex:-1});ae.current=Z.reason;const Oe=new event.constructor(event.type,event);Object.defineProperty(Oe,"target",{writable:!0,value:{value:$e,name:G}}),Z.event=Oe,se.current=$e,P($e,Z),!Z.isCanceled&&J($e)}),qe=Ye(($e,U,Z)=>{const Oe=jy($e,U,p,f,xe,ke);if(Ry(Oe,x,v)){const Ge=UO(Z);_e(Oe,Uo(Ge,Z.nativeEvent,void 0,{activeThumbIndex:U})),D(!0);const Ze=se.current??Oe;_(Ze,py(Ge,Z.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&jP("Slider `max` must be greater than `min`."),St(()=>{const $e=so(In(re.current));q&&$e&&re.current?.contains($e)&&$e.blur()},[q]),q&&le!==-1&&ne(-1);const pt=A.useMemo(()=>({...V,activeThumbIndex:le,disabled:q,dragging:ve,orientation:b,max:f,min:p,minStepsBetweenValues:v,step:x,values:ke}),[V,le,q,ve,f,p,v,b,x,ke]),ht=A.useMemo(()=>({active:le,controlRef:ee,disabled:q,dragging:ve,validation:L,formatOptionsRef:Q,handleInputChange:qe,indicatorPosition:j,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:fe,lastChangedValueRef:se,lastChangeReasonRef:ae,locale:u,max:f,min:p,minStepsBetweenValues:v,name:G,onValueCommitted:_,orientation:b,pressedInputRef:K,pressedThumbCenterOffsetRef:X,pressedThumbIndexRef:de,pressedValuesRef:H,registerFieldControlRef:ce,renderBeforeHydration:E==="edge",setActive:ne,setDragging:Ae,setIndicatorPosition:R,setValue:_e,state:pt,step:x,thumbCollisionBehavior:T,thumbMap:me,thumbRefs:Y,values:ke}),[le,ee,B,q,ve,L,Q,qe,j,c,fe,se,ae,u,f,p,v,G,_,b,K,X,de,H,ce,ne,Ae,R,_e,pt,x,T,E,me,Y,ke]),$t=an("div",t,{state:pt,ref:[n,re],props:[{"aria-labelledby":B,id:C,role:"group"},L.getValidationProps,w],stateAttributesMapping:na});return m.jsx(wd.Provider,{value:ht,children:m.jsx($O,{elementsRef:Y,onMapChange:oe,children:$t})})});process.env.NODE_ENV!=="production"&&(By.displayName="SliderRoot");const Hy=new Map;function YO(e,t){const n=JSON.stringify({locale:e,options:t}),r=Hy.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return Hy.set(n,o),o}function Go(e,t,n){return e==null?"":YO(t,n).format(e)}const KO=[];function Sd(e){A.useEffect(e,KO)}const Xs=null;let Wy=globalThis.requestAnimationFrame;class ZO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&Wy!==requestAnimationFrame&&(Wy=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Qs=new ZO;class Td{static create(){return new Td}static request(t){return Qs.request(t)}static cancel(t){return Qs.cancel(t)}currentId=Xs;request(t){this.cancel(),this.currentId=Qs.request(()=>{this.currentId=Xs,t()})}cancel=()=>{this.currentId!==Xs&&(Qs.cancel(this.currentId),this.currentId=Xs)};disposeEffect=()=>this.cancel}function qy(){const e=ao(Td.create).current;return Sd(e.disposeEffect),e}const Uy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Uy.displayName="DirectionContext");function Gy(){return A.useContext(Uy)?.direction??"ltr"}function Yy(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function XO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Ky(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(XO(t)))}function Zy({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:a,initialValues:s}){if(e.length===0)return[];const l=e.slice(),c=i*a,u=l.length-1,d=s??e,f=r+t*c,p=o-(u-t)*c;l[t]=On(n,f,p);for(let v=t+1;v<=u;v+=1){const g=l[v-1]+c,h=o-(u-v)*c,y=d[v]??l[v];let b=Math.max(l[v],g);y<b&&(b=Math.max(y,g)),l[v]=On(b,g,h)}for(let v=t-1;v>=0;v-=1){const g=l[v+1]-c,h=r+v*c,y=d[v]??l[v];let b=Math.min(l[v],g);y>b&&(b=Math.min(y,g)),l[v]=On(b,h,g)}for(let v=0;v<=u;v+=1)l[v]=Number(l[v].toFixed(12));return l}function QO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const v=u[o],g=1e-7,h=u.slice(),y=h[o-1],b=h[o+1],x=y!=null?y+p:a,T=b!=null?b-p:s,E=On(i,x,T),I=Number(E.toFixed(12));h[o]=I;const w=i>v,C=i<v,P=w&&b!=null&&i>=b-g,_=C&&y!=null&&i<=y+g;if(!P&&!_)return{value:h,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,V=h.map((z,M)=>{if(M===o)return I;const k=d[M];return k??u[M]});let N=i;P?N=Math.max(i,h[F]):N=Math.min(i,h[F]);const O=Zy({values:h,index:F,nextValue:N,min:a,max:s,step:l,minStepsBetweenValues:c,initialValues:V}),D=P?F-1:F+1;if(D>=0&&D<O.length){const z=O[D-1],M=O[D+1];let k=z!=null?z+p:a;k=Math.max(k,a+D*p);let L=M!=null?M-p:s;L=Math.min(L,s-(O.length-1-D)*p);const $=On(I,k,L);O[D]=Number($.toFixed(12))}return{value:O,thumbIndex:F,didSwap:!0}}case"push":return{value:Zy({values:u,index:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const v=u.slice(),g=v[o-1],h=v[o+1],y=g!=null?g+p:a,b=h!=null?h-p:s,x=On(i,y,b);return v[o]=Number(x.toFixed(12)),{value:v,thumbIndex:o,didSwap:!1}}}}const JO=2;function e_(e,t){if(!e)return{start:0,end:0};function n(i){const a=i!=null?parseFloat(i):0;return Number.isNaN(a)?0:a}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Js(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Xy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:a,dragging:s,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:v,onValueCommitted:g,orientation:h,pressedInputRef:y,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:C,setValue:P,state:_,step:F,thumbCollisionBehavior:V,thumbRefs:N,values:O}=Zs(),D=Gy(),z=O.length>1,M=h==="vertical",k=A.useRef(null),L=A.useRef(null),$=Ye(Q=>{Q&&L.current==null&&L.current==null&&(L.current=getComputedStyle(Q))}),B=A.useRef(null),q=A.useRef(0),G=A.useRef(0),W=id(O),J=Ye(Q=>{x.current!==Q&&(x.current=Q);const le=N.current[Q];if(!le){b.current=null,y.current=null;return}y.current=le.querySelector('input[type="range"]')}),re=Ye(Q=>{const le=k.current;if(!le)return null;const{width:te,height:fe,bottom:pe,left:ve,right:Ae}=le.getBoundingClientRect(),me=e_(L.current,M),oe=G.current,j=(M?fe:te)-me.start-me.end-oe*2,R=b.current??0,ne=Q.x-R,ce=Q.y-R,xe=M?pe-ce-me.end:(D==="rtl"?Ae-ne:ne-ve)-me.start,ke=On((xe-oe)/j,0,1);let _e=(f-p)*ke+p;if(_e=Ky(_e,F,p),_e=On(_e,p,f),!z)return{value:_e,thumbIndex:0,didSwap:!1};const qe=x.current;if(qe<0)return null;const pt=QO({behavior:V,values:O,currentValues:W.current??O,initialValues:T.current,pressedIndex:qe,nextValue:_e,min:p,max:f,step:F,minStepsBetweenValues:v});return V==="swap"&&pt.didSwap?J(pt.thumbIndex):x.current=pt.thumbIndex,pt}),ee=Ye(Q=>{T.current=z?O.slice():null,W.current=O;const le=x.current;let te=le;if(le>-1&&le<O.length){if(O[le]===f){let fe=le;for(;fe>0&&O[fe-1]===f;)fe-=1;te=fe}}else{const fe=M?"y":"x";let pe;te=-1;for(let ve=0;ve<N.current.length;ve+=1){const Ae=N.current[ve];if(nt(Ae)){const me=Yy(Ae),oe=Math.abs(Q[fe]-me[fe]);(pe===void 0||oe<=pe)&&(te=ve,pe=oe)}}}if(te>-1&&te!==le&&J(te),c){const fe=N.current[te];if(nt(fe)){const pe=fe.getBoundingClientRect(),ve=M?"height":"width";G.current=pe[ve]/2}}}),Y=Ye(Q=>{N.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),K=Ye(Q=>{const le=Js(Q,B);if(le==null)return;if(q.current+=1,Q.type==="pointermove"&&Q.buttons===0){X(Q);return}const te=re(le);te!=null&&Ry(te.value,F,v)&&(!s&&q.current>JO&&C(!0),P(te.value,Uo(UP,Q,void 0,{activeThumbIndex:te.thumbIndex})),W.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&Y(te.thumbIndex))});function X(Q){w(-1),C(!1),y.current=null,b.current=null;const le=Js(Q,B),te=le!=null?re(le):null;if(te!=null){const fe=d.current;l.commit(u.current??te.value),g(u.current??te.value,py(fe,Q))}"pointerType"in Q&&k.current?.hasPointerCapture(Q.pointerId)&&k.current?.releasePointerCapture(Q.pointerId),x.current=-1,B.current=null,T.current=null,H()}const de=Ye(Q=>{if(a)return;const le=Q.changedTouches[0];le!=null&&(B.current=le.identifier);const te=Js(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Y(pe.thumbIndex),P(pe.value,Uo(fy,Q,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex)}q.current=0;const fe=In(k.current);fe.addEventListener("touchmove",K,{passive:!0}),fe.addEventListener("touchend",X,{passive:!0})}),H=Ye(()=>{const Q=In(k.current);Q.removeEventListener("pointermove",K),Q.removeEventListener("pointerup",X),Q.removeEventListener("touchmove",K),Q.removeEventListener("touchend",X),T.current=null}),se=qy();return A.useEffect(()=>{const Q=k.current;return Q?(Q.addEventListener("touchstart",de,{passive:!0}),()=>{Q.removeEventListener("touchstart",de),se.cancel(),H()}):()=>H()},[H,de,k,se]),A.useEffect(()=>{a&&H()},[a,H]),an("div",t,{state:_,ref:[n,E,k,$],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const le=k.current;if(!le||a||Q.defaultPrevented||!nt(Q.target)||Q.button!==0)return;const te=Js(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Or(N.current[pe.thumbIndex],so(In(le)))?Q.preventDefault():se.request(()=>{Y(pe.thumbIndex)}),C(!0),b.current!=null||(P(pe.value,Uo(fy,Q.nativeEvent,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex))}Q.nativeEvent.pointerId&&le.setPointerCapture(Q.nativeEvent.pointerId),q.current=0;const fe=In(k.current);fe.addEventListener("pointermove",K,{passive:!0}),fe.addEventListener("pointerup",X,{once:!0})},tabIndex:-1},i],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(Xy.displayName="SliderControl");const Qy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=Zs();return an("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(Qy.displayName="SliderTrack");const el={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function tl(e,t,n){return(e-t)*100/(n-t)}const nl="ArrowUp",rl="ArrowDown",ol="ArrowLeft",il="ArrowRight",al="Home",sl="End",t_=new Set([ol,il]),n_=new Set([nl,rl]),r_=new Set([...t_,...n_]);[...r_];const o_=new Set([nl,rl,ol,il,al,sl]);let i_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function a_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=VO(),f=A.useRef(-1),[p,v]=A.useState(i??(o===i_.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),g=A.useRef(null),h=A.useCallback(y=>{if(g.current=y,p!==-1&&y!==null&&(c.current[p]=y,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??y.textContent}},[p,c,u,t,r]);return St(()=>{if(i!=null)return;const y=g.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),St(()=>{if(i==null)return l(y=>{const b=g.current?y.get(g.current)?.index:null;b!=null&&v(b)})},[i,l,v]),A.useMemo(()=>({ref:h,index:p}),[p,h])}const Jy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jy.displayName="CSPContext");const s_={disableStyleElements:!1};function l_(){return A.useContext(Jy)??s_}function c_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=$y(),a=Us(t);return St(()=>{if(!(!n&&!t||i===An)){if(n){const s=r?.current;nt(s)&&s.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}let u_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const d_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',eb="PageUp",tb="PageDown",f_=new Set([nl,rl,ol,il,al,sl,eb,tb]);function p_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Go(e[t],r,n)} start range`:`${Go(e[t],r,n)} end range`:n?Go(e[t],r,n):void 0}function Yo(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const nb=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":a,"aria-label":s,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:v,onBlur:g,onFocus:h,onKeyDown:y,tabIndex:b,...x}=t,{nonce:T}=l_(),E=Us(f),{active:I,lastUsedThumbIndex:w,controlRef:C,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:V,inset:N,labelId:O,largeStep:D,locale:z,max:M,min:k,minStepsBetweenValues:L,name:$,orientation:B,pressedInputRef:q,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:W,renderBeforeHydration:J,setActive:re,setIndicatorPosition:ee,state:Y,step:K,values:X}=Zs(),de=Gy(),H=c||P,se=X.length>1,ae=B==="vertical",Q=de==="rtl",{setTouched:le,setFocused:te,validationMode:fe}=xd(),pe=A.useRef(null),ve=A.useRef(null),Ae=Us(),me=c_(),oe=se?Ae:me,j=A.useMemo(()=>({inputId:oe}),[oe]),{ref:R,index:ne}=a_({metadata:j}),ce=se?p??ne:0,xe=ce===X.length-1,ke=X[ce],_e=tl(ke,k,M),[qe,pt]=A.useState(!1),[ht,$t]=A.useState();Sd(()=>pt(!0));const $e=w>=0&&w<X.length?w:-1,U=Ye(()=>{const it=C.current,mt=pe.current;if(!it||!mt)return;const at=mt.getBoundingClientRect(),vn=it.getBoundingClientRect(),Yr=ae?"height":"width",Kr=vn[Yr]-at[Yr],Di=(at[Yr]/2+Kr*_e/100)/vn[Yr]*100;$t(Di),ce===0?ee(Ni=>[Di,Ni[1]]):xe&&ee(Ni=>[Ni[0],Di])});St(()=>{N&&queueMicrotask(U)},[U,N]),St(()=>{N&&U()},[U,N,_e]);const Z=A.useCallback(()=>{const it=ae?"bottom":"insetInlineStart",mt=ae?"left":"top";let at;return se?I===ce?at=2:$e===ce&&(at=1):I===ce&&(at=1),N?{"--position":`${ht}%`,visibility:J&&!qe||ht===void 0?"hidden":void 0,position:"absolute",[it]:"var(--position)",[mt]:"50%",translate:`${(ae||!Q?-1:1)*50}% ${(ae?1:-1)*50}%`,zIndex:at}:Number.isFinite(_e)?{position:"absolute",[it]:`${_e}%`,[mt]:"50%",translate:`${(ae||!Q?-1:1)*50}% ${(ae?1:-1)*50}%`,zIndex:at}:el},[I,ce,N,qe,ht,se,J,Q,$e,_e,ae]);let Oe;B==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ge=cd({"aria-label":typeof u=="function"?u(ce):s,"aria-labelledby":l??O,"aria-describedby":a,"aria-orientation":B,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(Go(ke,z,F.current??void 0),ke,ce):p_(X,ce,F.current??void 0,z),disabled:H,id:oe,max:M,min:k,name:$,onChange(it){V(it.target.valueAsNumber,ce,it)},onFocus(){re(ce),te(!0)},onBlur(){pe.current&&(re(-1),le(!0),te(!1),fe==="onBlur"&&_.commit(jy(ke,ce,k,M,se,X)))},onKeyDown(it){if(!f_.has(it.key))return;o_.has(it.key)&&it.stopPropagation();let mt=null;const at=Ky(ke,K,k);switch(it.key){case nl:mt=Yo(at,it.shiftKey?D:K,1,k,M);break;case il:mt=Yo(at,it.shiftKey?D:K,Q?-1:1,k,M);break;case rl:mt=Yo(at,it.shiftKey?D:K,-1,k,M);break;case ol:mt=Yo(at,it.shiftKey?D:K,Q?1:-1,k,M);break;case eb:mt=Yo(at,D,1,k,M);break;case tb:mt=Yo(at,D,-1,k,M);break;case sl:mt=M,se&&(mt=Number.isFinite(X[ce+1])?X[ce+1]-K*L:M);break;case al:mt=k,se&&(mt=Number.isFinite(X[ce-1])?X[ce-1]+K*L:k);break}mt!==null&&(V(mt,ce,it),it.preventDefault())},step:K,style:{...el,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:ke??""},_.getInputValidationProps),Ze=sd(ve,_.inputRef,v);return an("div",t,{state:Y,ref:[n,R,pe],props:[{[u_.index]:ce,children:m.jsxs(A.Fragment,{children:[o,m.jsx("input",{ref:Ze,...Ge}),N&&!qe&&J&&xe&&m.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:d_},suppressHydrationWarning:!0})]}),id:E,onBlur:g,onFocus:h,onPointerDown(it){if(W.current=ce,pe.current!=null){const mt=B==="horizontal"?"x":"y",at=Yy(pe.current),vn=(B==="horizontal"?it.clientX:it.clientY)-at[mt];G.current=vn}ve.current!=null&&q.current!==ve.current&&(q.current=ve.current)},style:Z(),suppressHydrationWarning:J||void 0,tabIndex:-1},x],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(nb.displayName="SliderThumb");function h_(e,t,n,r,o,i){const a=n===void 0||t&&r===void 0?"hidden":void 0,s=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":a,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[s]="var(--start-position)",u[l]="var(--relative-size)",u):(u[s]=0,u[l]="var(--start-position)",u)}function m_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",s={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return s[o]=0,s[i]=`${n}%`,s;const l=r-n;return s[o]=`${n}%`,s[i]=`${l}%`,s}const rb=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:a,inset:s,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Zs(),[v,g]=A.useState(!1);Sd(()=>g(!0));const h=u==="vertical",y=p.length>1,b=s?h_(h,y,a[0],a[1],d,v):m_(h,y,tl(p[0],c,l),tl(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(rb.displayName="SliderIndicator");const ll=e=>{const t=S.useContext(Xr);if(e)return e;if(t)return t.locale||e},g_=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"));Re.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(rd,{title:"",ref:r,as:nb,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},v_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Ho()),s=r||o||[],l=ll();return m.jsx(By,{...i,value:o,locale:l,defaultValue:r,children:m.jsxs(Xy,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(Qy,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(rb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(s)?s.map((c,u)=>m.jsx(g_,{tooltip:t??!1},`${a.current}-${u}`)):null]})})},_r=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},y_=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=_r(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=g=>{d.current&&d.current(g)},v=u.current;return v.addEventListener("change",p),()=>v?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:Pe("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:p=>l(p.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:f,"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})]})}),ra=S.createContext({});function _n(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const ob=typeof window<"u",cl=ob?S.useLayoutEffect:S.useEffect,ul=S.createContext(null);function Ed(e,t){e.indexOf(t)===-1&&e.push(t)}function oa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function b_([...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 Kn=(e,t,n)=>n>t?t:n<e?e:n;function Cd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ko=()=>{},dn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Ko=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Cd(t,n))},dn=(e,t,n)=>{if(!e)throw new Error(Cd(t,n))});const hr={},ib=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ab(e){return typeof e=="object"&&e!==null}const sb=e=>/^0[^.\s]+$/u.test(e);function kd(e){let t;return()=>(t===void 0&&(t=e()),t)}const yn=e=>e,x_=(e,t)=>n=>t(e(n)),ia=(...e)=>e.reduce(x_),Zo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Id{constructor(){this.subscriptions=[]}add(t){return Ed(this.subscriptions,t),()=>oa(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 Mn=e=>e*1e3,bn=e=>e/1e3;function lb(e,t){return t?e*(1e3/t):0}const cb=new Set;function Ad(e,t,n){e||cb.has(t)||(console.warn(Cd(t,n)),cb.add(t))}const w_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},ub=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,S_=1e-7,T_=12;function E_(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=ub(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>S_&&++s<T_);return a}function aa(e,t,n,r){if(e===t&&n===r)return yn;const o=i=>E_(i,0,1,e,n);return i=>i===0||i===1?i:ub(o(i),t,r)}const db=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fb=e=>t=>1-e(1-t),pb=aa(.33,1.53,.69,.99),Pd=fb(pb),hb=db(Pd),mb=e=>(e*=2)<1?.5*Pd(e):.5*(2-Math.pow(2,-10*(e-1))),Od=e=>1-Math.sin(Math.acos(e)),gb=fb(Od),vb=db(Od),C_=aa(.42,0,1,1),k_=aa(0,0,.58,1),yb=aa(.42,0,.58,1),bb=e=>Array.isArray(e)&&typeof e[0]!="number";function xb(e,t){return bb(e)?e[w_(0,e.length,t)]:e}const wb=e=>Array.isArray(e)&&typeof e[0]=="number",Sb={linear:yn,easeIn:C_,easeInOut:yb,easeOut:k_,circIn:Od,circInOut:vb,circOut:gb,backIn:Pd,backInOut:hb,backOut:pb,anticipate:mb},I_=e=>typeof e=="string",_d=e=>{if(wb(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return aa(t,n,r,o)}else if(I_(e))return dn(Sb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Sb[e];return e},dl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function A_(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,f=!1)=>{const v=f&&o?n:r;return d&&a.add(u),v.has(u)||v.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 P_=40;function Tb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=dl.reduce((x,T)=>(x[T]=A_(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=a,g=()=>{const x=hr.useManualTiming?o.timestamp:performance.now();n=!1,hr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,P_),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},h=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:dl.reduce((x,T)=>{const E=a[T];return x[T]=(I,w=!1,C=!1)=>(n||h(),E.schedule(I,w,C)),x},{}),cancel:x=>{for(let T=0;T<dl.length;T++)a[dl[T]].cancel(x)},state:o,steps:a}}const{schedule:gt,cancel:mr,state:Kt,steps:Md}=Tb(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0);let fl;function O_(){fl=void 0}const Jt={now:()=>(fl===void 0&&Jt.set(Kt.isProcessing||hr.useManualTiming?Kt.timestamp:performance.now()),fl),set:e=>{fl=e,queueMicrotask(O_)}},Eb=e=>t=>typeof t=="string"&&t.startsWith(e),Cb=Eb("--"),__=Eb("var(--"),Dd=e=>__(e)?M_.test(e.split("/*")[0].trim()):!1,M_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function kb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Xo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},sa={...Xo,transform:e=>Kn(0,1,e)},pl={...Xo,default:1},la=e=>Math.round(e*1e5)/1e5,Nd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function D_(e){return e==null}const N_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fd=(e,t)=>n=>!!(typeof n=="string"&&N_.test(n)&&n.startsWith(e)||t&&!D_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ib=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Nd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},F_=e=>Kn(0,255,e),Ld={...Xo,transform:e=>Math.round(F_(e))},lo={test:Fd("rgb","red"),parse:Ib("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ld.transform(e)+", "+Ld.transform(t)+", "+Ld.transform(n)+", "+la(sa.transform(r))+")"};function L_(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 Vd={test:Fd("#"),parse:L_,transform:lo.transform},ca=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mr=ca("deg"),Zn=ca("%"),Te=ca("px"),V_=ca("vh"),$_=ca("vw"),Ab={...Zn,parse:e=>Zn.parse(e)/100,transform:e=>Zn.transform(e*100)},Qo={test:Fd("hsl","hue"),parse:Ib("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zn.transform(la(t))+", "+Zn.transform(la(n))+", "+la(sa.transform(r))+")"},Ft={test:e=>lo.test(e)||Vd.test(e)||Qo.test(e),parse:e=>lo.test(e)?lo.parse(e):Qo.test(e)?Qo.parse(e):Vd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?lo.transform(e):Qo.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},z_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function j_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Nd)?.length||0)+(e.match(z_)?.length||0)>0}const Pb="number",Ob="color",R_="var",B_="var(",_b="${}",H_=/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 ua(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(H_,l=>(Ft.test(l)?(r.color.push(i),o.push(Ob),n.push(Ft.parse(l))):l.startsWith(B_)?(r.var.push(i),o.push(R_),n.push(l)):(r.number.push(i),o.push(Pb),n.push(parseFloat(l))),++i,_b)).split(_b);return{values:n,split:s,indexes:r,types:o}}function Mb(e){return ua(e).values}function Db(e){const{split:t,types:n}=ua(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===Pb?i+=la(o[a]):s===Ob?i+=Ft.transform(o[a]):i+=o[a]}return i}}const W_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function q_(e){const t=Mb(e);return Db(e)(t.map(W_))}const Dr={test:j_,parse:Mb,createTransformer:Db,getAnimatableNone:q_};function $d(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 U_({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=$d(l,s,e+1/3),i=$d(l,s,e),a=$d(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function hl(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,zd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},G_=[Vd,lo,Qo],Y_=e=>G_.find(t=>t.test(e));function Nb(e){const t=Y_(e);if(Ko(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Qo&&(n=U_(n)),n}const Fb=(e,t)=>{const n=Nb(e),r=Nb(t);if(!n||!r)return hl(e,t);const o={...n};return i=>(o.red=zd(n.red,r.red,i),o.green=zd(n.green,r.green,i),o.blue=zd(n.blue,r.blue,i),o.alpha=yt(n.alpha,r.alpha,i),lo.transform(o))},jd=new Set(["none","hidden"]);function K_(e,t){return jd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Z_(e,t){return n=>yt(e,t,n)}function Rd(e){return typeof e=="number"?Z_:typeof e=="string"?Dd(e)?hl:Ft.test(e)?Fb:J_:Array.isArray(e)?Lb:typeof e=="object"?Ft.test(e)?Fb:X_:hl}function Lb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Rd(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function X_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Rd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Q_(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 J_=(e,t)=>{const n=Dr.createTransformer(t),r=ua(e),o=ua(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?jd.has(e)&&!o.values.length||jd.has(t)&&!r.values.length?K_(e,t):ia(Lb(Q_(r,o),o.values),n):(Ko(!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.`,"complex-values-different"),hl(e,t))};function Vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):Rd(e)(e,t)}const eM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>gt.update(t,n),stop:()=>mr(t),now:()=>Kt.isProcessing?Kt.timestamp:Jt.now()}},$b=(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)})`},ml=2e4;function Bd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ml;)t+=n,r=e.next(t);return t>=ml?1/0:t}function zb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Bd(r),ml);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:bn(o)}}const tM=5;function jb(e,t,n){const r=Math.max(t-tM,0);return lb(n-e(r),t-r)}const kt={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},Hd=.001;function nM({duration:e=kt.duration,bounce:t=kt.bounce,velocity:n=kt.velocity,mass:r=kt.mass}){let o,i;Ko(e<=Mn(kt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kn(kt.minDamping,kt.maxDamping,a),e=Kn(kt.minDuration,kt.maxDuration,bn(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-n,p=Wd(c,a),v=Math.exp(-d);return Hd-f/p*v},i=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),g=Wd(Math.pow(c,2),a);return(-o(c)+Hd>0?-1:1)*((f-p)*v)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Hd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=oM(o,i,s);if(e=Mn(e),isNaN(l))return{stiffness:kt.stiffness,damping:kt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const rM=12;function oM(e,t,n){let r=n;for(let o=1;o<rM;o++)r=r-e(r)/t(r);return r}function Wd(e,t){return e*Math.sqrt(1-t*t)}const iM=["duration","bounce"],aM=["stiffness","damping","mass"];function Rb(e,t){return t.some(n=>e[n]!==void 0)}function sM(e){let t={velocity:kt.velocity,stiffness:kt.stiffness,damping:kt.damping,mass:kt.mass,isResolvedFromDuration:!1,...e};if(!Rb(e,aM)&&Rb(e,iM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:kt.mass,stiffness:o,damping:i}}else{const n=nM(e);t={...t,...n,mass:kt.mass},t.isResolvedFromDuration=!0}return t}function da(e=kt.visualDuration,t=kt.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:f,isResolvedFromDuration:p}=sM({...n,velocity:-bn(n.velocity||0)}),v=f||0,g=c/(2*Math.sqrt(l*u)),h=a-i,y=bn(Math.sqrt(l/u)),b=Math.abs(h)<5;r||(r=b?kt.restSpeed.granular:kt.restSpeed.default),o||(o=b?kt.restDelta.granular:kt.restDelta.default);let x;if(g<1){const E=Wd(y,g);x=I=>{const w=Math.exp(-g*y*I);return a-w*((v+g*y*h)/E*Math.sin(E*I)+h*Math.cos(E*I))}}else if(g===1)x=E=>a-Math.exp(-y*E)*(h+(v+y*h)*E);else{const E=y*Math.sqrt(g*g-1);x=I=>{const w=Math.exp(-g*y*I),C=Math.min(E*I,300);return a-w*((v+g*y*h)*Math.sinh(C)+E*h*Math.cosh(C))/E}}const T={calculatedDuration:p&&d||null,next:E=>{const I=x(E);if(p)s.done=E>=d;else{let w=E===0?v:0;g<1&&(w=E===0?Mn(v):jb(x,E,I));const C=Math.abs(w)<=r,P=Math.abs(a-I)<=o;s.done=C&&P}return s.value=s.done?a:I,s},toString:()=>{const E=Math.min(Bd(T),ml),I=$b(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}da.applyToOptions=e=>{const t=zb(e,100,da);return e.ease=t.ease,e.duration=Mn(t.duration),e.type="keyframes",e};function qd({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],f={done:!1,value:d},p=C=>s!==void 0&&C<s||l!==void 0&&C>l,v=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,y=a===void 0?h:a(h);y!==h&&(g=y-d);const b=C=>-g*Math.exp(-C/r),x=C=>y+b(C),T=C=>{const P=b(C),_=x(C);f.done=Math.abs(P)<=c,f.value=f.done?y:_};let E,I;const w=C=>{p(f.value)&&(E=C,I=da({keyframes:[f.value,v(f.value)],velocity:jb(x,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let P=!1;return!I&&E===void 0&&(P=!0,T(C),w(C)),E!==void 0&&C>=E?I.next(C-E):(!P&&T(C),f)}}}function lM(e,t,n){const r=[],o=n||hr.mix||Vb,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]||yn:t;s=ia(l,s)}r.push(s)}return r}function Bb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length","range-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=lM(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 f=Zo(e[d],e[d+1],u);return s[d](f)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function Hb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Zo(0,t,r);e.push(yt(n,1,o))}}function Wb(e){const t=[0];return Hb(t,e.length-1),t}function cM(e,t){return e.map(n=>n*t)}function uM(e,t){return e.map(()=>t||yb).splice(0,e.length-1)}function Jo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=bb(r)?r.map(_d):_d(r),i={done:!1,value:t[0]},a=cM(n&&n.length===t.length?n:Wb(t),e),s=Bb(a,t,{ease:Array.isArray(o)?o:uM(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const dM=e=>e!==null;function Ud(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(dM),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const fM={decay:qd,inertia:qd,tween:Jo,keyframes:Jo,spring:da};function qb(e){typeof e.type=="string"&&(e.type=fM[e.type])}class Gd{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 pM=e=>e/100;class Yd extends Gd{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!==Jt.now()&&this.tick(Jt.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;qb(t);const{type:n=Jo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Jo;process.env.NODE_ENV!=="production"&&l!==Jo&&dn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Jo&&typeof s[0]!="number"&&(this.mixKeyframes=ia(pM,Vb(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=Bd(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:f,repeatDelay:p,type:v,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 y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,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 P=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/s)):f==="mirror"&&(T=a)),x=Kn(0,1,_)*s}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&v!==qd&&(E.value=Ud(u,this.options,h,this.speed)),g&&g(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return bn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(this.currentTime)}set time(t){t=Mn(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(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=eM,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(Jt.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 hM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const co=e=>e*180/Math.PI,Kd=e=>{const t=co(Math.atan2(e[1],e[0]));return Zd(t)},mM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Kd,rotateZ:Kd,skewX:e=>co(Math.atan(e[1])),skewY:e=>co(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zd=e=>(e=e%360,e<0&&(e+=360),e),Ub=Kd,Gb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gb,scaleY:Yb,scale:e=>(Gb(e)+Yb(e))/2,rotateX:e=>Zd(co(Math.atan2(e[6],e[5]))),rotateY:e=>Zd(co(Math.atan2(-e[2],e[0]))),rotateZ:Ub,rotate:Ub,skewX:e=>co(Math.atan(e[4])),skewY:e=>co(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xd(e){return e.includes("scale")?1:0}function Qd(e,t){if(!e||e==="none")return Xd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=gM,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=mM,o=s}if(!o)return Xd(t);const i=r[t],a=o[1].split(",").map(yM);return typeof i=="function"?i(a):a[i]}const vM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qd(n,t)};function yM(e){return parseFloat(e.trim())}const ei=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ti=new Set(ei),Kb=e=>e===Xo||e===Te,bM=new Set(["x","y","z"]),xM=ei.filter(e=>!bM.has(e));function wM(e){const t=[];return xM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Nr={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})=>Qd(t,"x"),y:(e,{transform:t})=>Qd(t,"y")};Nr.translateX=Nr.x,Nr.translateY=Nr.y;const uo=new Set;let Jd=!1,ef=!1,tf=!1;function Zb(){if(ef){const e=Array.from(uo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=wM(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)})}ef=!1,Jd=!1,uo.forEach(e=>e.complete(tf)),uo.clear()}function Xb(){uo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ef=!0)})}function SM(){tf=!0,Xb(),Zb(),tf=!1}class nf{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?(uo.add(this),Jd||(Jd=!0,gt.read(Xb),gt.resolveKeyframes(Zb))):(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])}hM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),uo.delete(this)}cancel(){this.state==="scheduled"&&(uo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const TM=e=>e.startsWith("--");function EM(e,t,n){TM(t)?e.style.setProperty(t,n):e.style[t]=n}const CM=kd(()=>window.ScrollTimeline!==void 0),kM={};function IM(e,t){const n=kd(e);return()=>kM[t]??n()}const Qb=IM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fa=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Jb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fa([0,.65,.55,1]),circOut:fa([.55,0,1,.45]),backIn:fa([.31,.01,.66,-.59]),backOut:fa([.33,1.53,.69,.99])};function ex(e,t){if(e)return typeof e=="function"?Qb()?$b(e,t):"ease-out":wb(e)?fa(e):Array.isArray(e)?e.map(n=>ex(n,t)||Jb.easeOut):Jb[e]}function AM(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=ex(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function rf(e){return typeof e=="function"&&"applyToOptions"in e}function PM({type:e,...t}){return rf(e)&&Qb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class OM extends Gd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!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,dn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=PM(t);this.animation=AM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Ud(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):EM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 bn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Mn(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&CM()?(this.animation.timeline=t,yn):n(this)}}const tx={anticipate:mb,backInOut:hb,circInOut:vb};function _M(e){return e in tx}function MM(e){typeof e.ease=="string"&&_M(e.ease)&&(e.ease=tx[e.ease])}const of=10;class DM extends OM{constructor(t){MM(t),qb(t),super(t),t.startTime!==void 0&&(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 Yd({...a,autoplay:!1}),l=Math.max(of,Jt.now()-this.startTime),c=Kn(0,of,l-of);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const nx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dr.test(e)||e==="0")&&!e.startsWith("url("));function NM(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 FM(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=nx(o,t),s=nx(i,t);return Ko(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:NM(e)||(n==="spring"||rf(n))&&r}function af(e){e.duration=0,e.type="keyframes"}const LM=new Set(["opacity","clipPath","filter","transform"]),VM=kd(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $M(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return VM()&&n&&LM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const zM=40;class jM extends Gd{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=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||nf;this.keyframeResolver=new p(s,(v,g,h)=>this.onKeyframesResolved(v,g,f,!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=Jt.now(),FM(t,i,a,s)||((hr.instantAnimations||!l)&&u?.(Ud(t,r,n)),t[0]=t[t.length-1],af(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>zM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&$M(f),v=f.motionValue?.owner?.current,g=p?new DM({...f,element:v}):new Yd(f);g.finished.then(()=>{this.notifyFinished()}).catch(yn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),SM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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 RM{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(){return rx(this.animations,"duration")}get iterationDuration(){return rx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function rx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class BM extends RM{then(t,n){return this.finished.finally(t).then(()=>{})}}function ox(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const HM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function WM(e){const t=HM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const qM=4;function ix(e,t,n=1){dn(n<=qM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=WM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return ib(a)?parseFloat(a):a}return Dd(o)?ix(o,t,n+1):o}const UM={type:"spring",stiffness:500,damping:25,restSpeed:10},GM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YM={type:"keyframes",duration:.8},KM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ZM=(e,{keyframes:t})=>t.length>2?YM:ti.has(e)?e.startsWith("scale")?GM(t[1]):UM:KM,XM=e=>e!==null;function QM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(XM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function sf(e,t){return e?.[t]??e?.default??e}function JM({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 lf=(e,t,n,r={},o,i)=>a=>{const s=sf(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};JM(s)||Object.assign(u,ZM(e,u)),u.duration&&(u.duration=Mn(u.duration)),u.repeatDelay&&(u.repeatDelay=Mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(af(u),u.delay===0&&(d=!0)),(hr.instantAnimations||hr.skipAnimations)&&(d=!0,af(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=QM(u.keyframes,s);if(f!==void 0){gt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Yd(u):new jM(u)};function ax(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function cf(e,t,n,r){if(typeof t=="function"){const[o,i]=ax(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]=ax(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ni(e,t,n){const r=e.getProps();return cf(r,t,n!==void 0?n:r.custom,e)}const sx=new Set(["width","height","top","left","right","bottom",...ei]),lx=30,eD=e=>!isNaN(parseFloat(e)),pa={current:void 0};class tD{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=eD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ad(!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 Id);const r=this.events[t].add(n);return t==="change"?()=>{r(),gt.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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 pa.current&&pa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>lx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,lx);return lb(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 fo(e,t){return new tD(e,t)}const uf=e=>Array.isArray(e);function nD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fo(n))}function rD(e){return uf(e)?e[e.length-1]||0:e}function oD(e,t){const n=ni(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=rD(i[a]);nD(e,a,s)}}const jt=e=>!!(e&&e.getVelocity);function iD(e){return!!(jt(e)&&e.add)}function df(e,t){const n=e.getValue("willChange");if(iD(n))return n.add(t);if(!n&&hr.WillChange){const r=new hr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ff(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const cx="data-"+ff("framerAppearId");function ux(e){return e.props[cx]}function aD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pf(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),f=s[u];if(f===void 0||c&&aD(c,u))continue;const p={delay:n,...sf(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=ux(e);if(y){const b=window.MotionHandoffAnimation(y,u,gt);b!==null&&(p.startTime=b,g=!0)}}df(e,u),d.start(lf(u,d,f,e.shouldReduceMotion&&sx.has(u)?{type:!1}:p,e,g));const h=d.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{gt.update(()=>{a&&oD(e,a)})}),l}function hf(e,t,n={}){const r=ni(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(pf(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return sD(e,t,l,c,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 sD(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(hf(l,t,{...a,delay:n+(typeof r=="function"?0:r)+ox(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function lD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>hf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=hf(e,t,n);else{const o=typeof t=="function"?ni(e,t,n.custom):t;r=Promise.all(pf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const cD={test:e=>e==="auto",parse:e=>e},dx=e=>t=>t.test(e),fx=[Xo,Te,Zn,Mr,$_,V_,cD],px=e=>fx.find(dx(e));function uD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sb(e):!0}const dD=new Set(["brightness","contrast","saturate","opacity"]);function fD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Nd)||[];if(!r)return e;const o=n.replace(r,"");let i=dD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const pD=/\b([a-z-]*)\(.*?\)/gu,mf={...Dr,getAnimatableNone:e=>{const t=e.match(pD);return t?t.map(fD).join(" "):e}},hx={...Xo,transform:Math.round},gf={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,backgroundPositionX:Te,backgroundPositionY:Te,...{rotate:Mr,rotateX:Mr,rotateY:Mr,rotateZ:Mr,scale:pl,scaleX:pl,scaleY:pl,scaleZ:pl,skew:Mr,skewX:Mr,skewY:Mr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:sa,originX:Ab,originY:Ab,originZ:Te},zIndex:hx,fillOpacity:sa,strokeOpacity:sa,numOctaves:hx},hD={...gf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:mf,WebkitFilter:mf},mx=e=>hD[e];function gx(e,t){let n=mx(e);return n!==mf&&(n=Dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mD=new Set(["auto","none","0"]);function gD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!mD.has(i)&&ua(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=gx(n,o)}class vD extends nf{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 u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Dd(d))){const f=ix(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!sx.has(r)||t.length!==2)return;const[o,i]=t,a=px(o),s=px(i),l=kb(o),c=kb(i);if(l!==c&&Nr[r]){this.needsMeasurement=!0;return}if(a!==s)if(Kb(a)&&Kb(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Nr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||uD(t[o]))&&r.push(o);r.length&&gD(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=Nr[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]=Nr[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 vx(e,t,n){if(e==null)return[];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).filter(r=>r!=null)}const yx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vf(e){return ab(e)&&"offsetHeight"in e}const{schedule:yf}=Tb(queueMicrotask,!1),Dn={x:!1,y:!1};function bx(){return Dn.x||Dn.y}function yD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function xx(e,t){const n=vx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function wx(e){return!(e.pointerType==="touch"||bx())}function bD(e,t,n={}){const[r,o,i]=xx(e,n),a=s=>{if(!wx(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{wx(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const Sx=(e,t)=>t?e===t?!0:Sx(e,t.parentElement):!1,bf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Tx(e){return xD.has(e.tagName)||e.isContentEditable===!0}const gl=new WeakSet;function Ex(e){return t=>{t.key==="Enter"&&e(t)}}function xf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ex(()=>{if(gl.has(n))return;xf(n,"down");const o=Ex(()=>{xf(n,"up")}),i=()=>xf(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 Cx(e){return bf(e)&&!bx()}function SD(e,t,n={}){const[r,o,i]=xx(e,n),a=s=>{const l=s.currentTarget;if(!Cx(s))return;gl.add(l);const c=t(l,s),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),gl.has(l)&&gl.delete(l),Cx(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||Sx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),vf(s)&&(s.addEventListener("focus",c=>wD(c,o)),!Tx(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function wf(e){return ab(e)&&"ownerSVGElement"in e}function kx(e){return wf(e)&&e.tagName==="svg"}function TD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function ED(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:TD(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=_d(r)(l/c)*c}return t+l}}function CD(...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=Bb(o,i,a);return t?s(r):s}const kD=[...fx,Ft,Dr],ID=e=>kD.find(dx(e)),Ix=()=>({translate:0,scale:1,origin:0,originPoint:0}),ri=()=>({x:Ix(),y:Ix()}),Ax=()=>({min:0,max:0}),Lt=()=>({x:Ax(),y:Ax()}),Sf={current:null},Px={current:!1},AD=typeof window<"u";function PD(){if(Px.current=!0,!!AD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Sf.current=e.matches;e.addEventListener("change",t),t()}else Sf.current=!1}const ha=new WeakMap;function vl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ma(e){return typeof e=="string"||Array.isArray(e)}const Tf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ef=["initial",...Tf];function yl(e){return vl(e.animate)||Ef.some(t=>ma(e[t]))}function Ox(e){return!!(yl(e)||e.variants)}function OD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(jt(o))e.addValue(r,o);else if(jt(i))e.addValue(r,fo(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,fo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const _x=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bl={};function Mx(e){bl=e}function _D(){return bl}class Dx{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=nf,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 f=Jt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,gt.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=yl(n),this.isVariantNode=Ox(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&jt(p)&&p.set(l[f])}}mount(t){this.current=t,ha.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Px.current||PD(),this.shouldReduceMotion=Sf.current),process.env.NODE_ENV!=="production"&&Ad(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),mr(this.notifyUpdate),mr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ti.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&>.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),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 bl){const n=bl[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):Lt()}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<_x.length;r++){const o=_x[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=OD(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=fo(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"&&(ib(r)||sb(r))?r=parseFloat(r):!ID(r)&&Dr.test(n)&&(r=gx(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(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=cf(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&&!jt(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 Id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){yf.render(this.render)}}class Nx extends Dx{constructor(){super(...arguments),this.KeyframeResolver=vD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Fr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Fx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function MD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function DD(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}}function Cf(e){return e===void 0||e===1}function kf({scale:e,scaleX:t,scaleY:n}){return!Cf(e)||!Cf(t)||!Cf(n)}function po(e){return kf(e)||Lx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Lx(e){return Vx(e.x)||Vx(e.y)}function Vx(e){return e&&e!=="0%"}function xl(e,t,n){const r=e-n,o=t*r;return n+o}function $x(e,t,n,r,o){return o!==void 0&&(e=xl(e,o,r)),xl(e,n,r)+t}function If(e,t=0,n=1,r,o){e.min=$x(e.min,t,n,r,o),e.max=$x(e.max,t,n,r,o)}function zx(e,{x:t,y:n}){If(e.x,t.translate,t.scale,t.originPoint),If(e.y,n.translate,n.scale,n.originPoint)}const jx=.999999999999,Rx=1.0000000000001;function ND(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&&ii(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,zx(e,a)),r&&po(i.latestValues)&&ii(e,i.latestValues))}t.x<Rx&&t.x>jx&&(t.x=1),t.y<Rx&&t.y>jx&&(t.y=1)}function oi(e,t){e.min=e.min+t,e.max=e.max+t}function Bx(e,t,n,r,o=.5){const i=yt(e.min,e.max,o);If(e,t,n,i,r)}function ii(e,t){Bx(e.x,t.x,t.scaleX,t.scale,t.originX),Bx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Hx(e,t){return Fx(DD(e.getBoundingClientRect(),t))}function FD(e,t,n){const r=Hx(e,n),{scroll:o}=t;return o&&(oi(r.x,o.offset.x),oi(r.y,o.offset.y)),r}const LD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},VD=ei.length;function $D(e,t,n){let r="",o=!0;for(let i=0;i<VD;i++){const a=ei[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=yx(s,gf[a]);if(!l){o=!1;const u=LD[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Af(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(ti.has(l)){a=!0;continue}else if(Cb(l)){o[l]=c;continue}else{const u=yx(c,gf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=$D(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}`}}function Wx(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function qx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ga={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=qx(e,t.target.x),r=qx(e,t.target.y);return`${n}% ${r}%`}},zD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Dr.parse(e);if(o.length>5)return r;const i=Dr.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=yt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},Pf={borderRadius:{...ga,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ga,borderTopRightRadius:ga,borderBottomLeftRadius:ga,borderBottomRightRadius:ga,boxShadow:zD};function Ux(e,{layout:t,layoutId:n}){return ti.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pf[e]||e==="opacity")}function Of(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(jt(r[a])||o&&jt(o[a])||Ux(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function jD(e){return window.getComputedStyle(e)}class Gx extends Nx{constructor(){super(...arguments),this.type="html",this.renderInstance=Wx}readValueFromInstance(t,n){if(ti.has(n))return this.projection?.isProjecting?Xd(n):vM(t,n);{const r=jD(t),o=(Cb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hx(t,n)}build(t,n,r){Af(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Of(t,n,r)}}function RD(e,t){return e in t}class BD extends Dx{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(RD(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 Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const HD={offset:"stroke-dashoffset",array:"stroke-dasharray"},WD={offset:"strokeDashoffset",array:"strokeDasharray"};function qD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?HD:WD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const UD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Af(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of UD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&qD(d,o,i,a,!1)}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"]),Zx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GD(e,t,n,r){Wx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Kx.has(o)?o:ff(o),t.attrs[o])}function Xx(e,t,n){const r=Of(e,t,n);for(const o in e)if(jt(e[o])||jt(t[o])){const i=ei.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class Qx extends Nx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ti.has(n)){const r=mx(n);return r&&r.default||0}return n=Kx.has(n)?n:ff(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Xx(t,n,r)}build(t,n,r){Yx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){GD(t,n,r,o)}mount(t){this.isSVGTag=Zx(t.tagName),super.mount(t)}}const YD=Ef.length;function Jx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Jx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<YD;n++){const r=Ef[n],o=e.props[r];(ma(o)||o===!1)&&(t[r]=o)}return t}function e0(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 KD=[...Tf].reverse(),ZD=Tf.length;function XD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lD(e,n,r)))}function QD(e){let t=XD(e),n=t0(),r=!0;const o=l=>(c,u)=>{const d=ni(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...v}=d;c={...c,...v,...p}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Jx(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let h=0;h<ZD;h++){const y=KD[h],b=n[y],x=c[y]!==void 0?c[y]:u[y],T=ma(x),E=y===l?b.isActive:null;E===!1&&(v=h);let I=x===u[y]&&x!==c[y]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&E===null||!x&&!b.prevProp||vl(x)||typeof x=="boolean")continue;const w=JD(b.prevProp,x);let C=w||y===l&&b.isActive&&!I&&T||h>v&&T,P=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(y),{});E===!1&&(F={});const{prevResolvedValues:V={}}=b,N={...V,...F},O=M=>{C=!0,f.has(M)&&(P=!0,f.delete(M)),b.needsAnimating[M]=!0;const k=e.getValue(M);k&&(k.liveStyle=!1)};for(const M in N){const k=F[M],L=V[M];if(p.hasOwnProperty(M))continue;let $=!1;uf(k)&&uf(L)?$=!e0(k,L):$=k!==L,$?k!=null?O(M):f.add(M):k!==void 0&&f.has(M)?O(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=F,b.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(C=!1);const D=I&&w;C&&(!D||P)&&d.push(..._.map(M=>{const k={type:y};if(typeof M=="string"&&r&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,$=ni(L,M);if(L.enteringChildren&&$){const{delayChildren:B}=$.transition||{};k.delay=ox(L.enteringChildren,e,B)}}return{animation:M,options:k}}))}if(f.size){const h={};if(typeof c.initial!="boolean"){const y=ni(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(h.transition=y.transition)}f.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),h[y]=b??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=t0()}}}function JD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!e0(t,e):!1}function ho(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function t0(){return{animate:ho(!0),whileInView:ho(),whileHover:ho(),whileTap:ho(),whileDrag:ho(),whileFocus:ho(),exit:ho()}}function n0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){n0(e.x,t.x),n0(e.y,t.y)}function r0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const o0=1e-4,eN=1-o0,tN=1+o0,i0=.01,nN=0-i0,rN=0+i0;function en(e){return e.max-e.min}function oN(e,t,n){return Math.abs(e-t)<=n}function a0(e,t,n,r=.5){e.origin=r,e.originPoint=yt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eN&&e.scale<=tN||isNaN(e.scale))&&(e.scale=1),(e.translate>=nN&&e.translate<=rN||isNaN(e.translate))&&(e.translate=0)}function va(e,t,n,r){a0(e.x,t.x,n.x,r?r.originX:void 0),a0(e.y,t.y,n.y,r?r.originY:void 0)}function s0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function iN(e,t,n){s0(e.x,t.x,n.x),s0(e.y,t.y,n.y)}function l0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function wl(e,t,n){l0(e.x,t.x,n.x),l0(e.y,t.y,n.y)}function c0(e,t,n,r,o){return e-=t,e=xl(e,1/n,r),o!==void 0&&(e=xl(e,1/o,r)),e}function aN(e,t=0,n=1,r=.5,o,i=e,a=e){if(Zn.test(t)&&(t=parseFloat(t),t=yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=yt(i.min,i.max,r);e===i&&(s-=t),e.min=c0(e.min,t,n,s,o),e.max=c0(e.max,t,n,s,o)}function u0(e,t,[n,r,o],i,a){aN(e,t[n],t[r],t[o],t.scale,i,a)}const sN=["x","scaleX","originX"],lN=["y","scaleY","originY"];function d0(e,t,n,r){u0(e.x,t,sN,n?n.x:void 0,r?r.x:void 0),u0(e.y,t,lN,n?n.y:void 0,r?r.y:void 0)}function f0(e){return e.translate===0&&e.scale===1}function p0(e){return f0(e.x)&&f0(e.y)}function h0(e,t){return e.min===t.min&&e.max===t.max}function cN(e,t){return h0(e.x,t.x)&&h0(e.y,t.y)}function m0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function g0(e,t){return m0(e.x,t.x)&&m0(e.y,t.y)}function v0(e){return en(e.x)/en(e.y)}function y0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xn(e){return[e("x"),e("y")]}function uN(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:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}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 b0=["TopLeft","TopRight","BottomLeft","BottomRight"],dN=b0.length,x0=e=>typeof e=="string"?parseFloat(e):e,w0=e=>typeof e=="number"||Te.test(e);function fN(e,t,n,r,o,i){o?(e.opacity=yt(0,n.opacity??1,pN(r)),e.opacityExit=yt(t.opacity??1,0,hN(r))):i&&(e.opacity=yt(t.opacity??1,n.opacity??1,r));for(let a=0;a<dN;a++){const s=`border${b0[a]}Radius`;let l=S0(t,s),c=S0(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||w0(l)===w0(c)?(e[s]=Math.max(yt(x0(l),x0(c),r),0),(Zn.test(c)||Zn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,r))}function S0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pN=T0(0,.5,gb),hN=T0(.5,.95,yn);function T0(e,t,n){return r=>r<e?0:r>t?1:n(Zo(e,t,r))}function E0(e,t,n){const r=jt(e)?e:fo(e);return r.start(lf("",r,t,n)),r.animation}function ya(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const mN=(e,t)=>e.depth-t.depth;class gN{constructor(){this.children=[],this.isDirty=!1}add(t){Ed(this.children,t),this.isDirty=!0}remove(t){oa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mN),this.isDirty=!1,this.children.forEach(t)}}function vN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mr(r),e(i-t))};return gt.setup(r,!0),()=>mr(r)}function Sl(e){return jt(e)?e.get():e}class yN{constructor(){this.members=[]}add(t){Ed(this.members,t),t.scheduleRender()}remove(t){if(oa(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)}}const Tl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_f=["","X","Y","Z"],bN=1e3;let xN=0;function Mf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function C0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ux(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&C0(r)}function k0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=xN++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(TN),this.nodes.forEach(IN),this.nodes.forEach(AN),this.nodes.forEach(EN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 gN)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Id),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=wf(a)&&!kx(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,d=0;const f=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{d=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=vN(f,250),Tl.hasAnimatedSinceResize&&(Tl.hasAnimatedSinceResize=!1,this.nodes.forEach(P0)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||DN,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=c.getProps(),y=!this.targetLayout||!g0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...sf(v,"layout"),onPlay:g,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||P0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),mr(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(PN),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&&C0(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(I0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kN),this.nodes.forEach(wN),this.nodes.forEach(SN)):this.nodes.forEach(A0),this.clearAllSnapshots();const s=Jt.now();Kt.delta=Kn(0,1e3/60,s-Kt.timestamp),Kt.timestamp=s,Kt.isProcessing=!0,Md.update.process(Kt),Md.preRender.process(Kt),Md.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CN),this.sharedNodes.forEach(ON)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(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.layoutVersion++,this.layoutCorrected=Lt(),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&&!p0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||po(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)),NN(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Lt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(FN))){const{scroll:c}=this.root;c&&(oi(s.x,c.offset.x),oi(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Lt();if(Nn(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&&Nn(s,a),oi(s.x,u.offset.x),oi(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Lt();Nn(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&&ii(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),po(u.latestValues)&&ii(l,u.latestValues)}return po(this.latestValues)&&ii(l,this.latestValues),l}removeTransform(a){const s=Lt();Nn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!po(c.latestValues))continue;kf(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),d0(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return po(this.latestValues)&&d0(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!==Kt.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))return;this.resolvedRelativeTargetAt=Kt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),iN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),zx(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||kf(this.parent.latestValues)||Lx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),wl(this.relativeTargetOrigin,s,l),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===Kt.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;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;ND(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=Lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(r0(this.prevProjectionDelta.x,this.projectionDelta.x),r0(this.prevProjectionDelta.y,this.projectionDelta.y)),va(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!y0(this.projectionDelta.x,this.prevProjectionDelta.x)||!y0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=ri(),this.projectionDelta=ri(),this.projectionDeltaWithTransform=ri()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Lt(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,g=p!==v,h=this.getStack(),y=!h||h.members.length<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(MN));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;O0(d.x,a.x,E),O0(d.y,a.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_N(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&cN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Nn(x,this.relativeTarget)),g&&(this.animationValues=u,fN(u,c,this.latestValues,E,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(mr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{Tl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=fo(0)),this.currentAnimation=E0(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(bN),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&&F0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Nn(s,l),ii(s,u),va(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new yN),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&&Mf("z",a,c,this.animationValues);for(let u=0;u<_f.length;u++)Mf(`rotate${_f[u]}`,a,c,this.animationValues),Mf(`skew${_f[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()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Sl(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Sl(s?.pointerEvents)||""),this.hasProjected&&!po(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=uN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Pf){if(u[v]===void 0)continue;const{correct:g,applyTo:h,isCSSVariable:y}=Pf[v],b=d==="none"?u[v]:g(u[v],c);if(h){const x=h.length;for(let T=0;T<x;T++)a[h[T]]=b}else y?this.options.visualElement.renderState.vars[v]=b:a[v]=b}this.options.layoutId&&(a.pointerEvents=c===this?Sl(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(I0),this.root.sharedNodes.clear()}}}function wN(e){e.updateLayout()}function SN(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"?xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):F0(o,t.layoutBox,n)&&xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=ri();va(a,n,t.layoutBox);const s=ri();i?va(s,e.applyTransform(r,!0),t.measuredBox):va(s,n,t.layoutBox);const l=!p0(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();wl(p,t.layoutBox,d.layoutBox);const v=Lt();wl(v,n,f.layoutBox),g0(p,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,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 TN(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 EN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CN(e){e.clearSnapshot()}function I0(e){e.clearMeasurements()}function A0(e){e.isLayoutDirty=!1}function kN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function P0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function IN(e){e.resolveTargetDelta()}function AN(e){e.calcProjection()}function PN(e){e.resetSkewAndRotation()}function ON(e){e.removeLeadSnapshot()}function O0(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _0(e,t,n,r){e.min=yt(t.min,n.min,r),e.max=yt(t.max,n.max,r)}function _N(e,t,n,r){_0(e.x,t.x,n.x,r),_0(e.y,t.y,n.y,r)}function MN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const DN={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),D0=M0("applewebkit/")&&!M0("chrome/")?Math.round:yn;function N0(e){e.min=D0(e.min),e.max=D0(e.max)}function NN(e){N0(e.x),N0(e.y)}function F0(e,t,n){return e==="position"||e==="preserve-aspect"&&!oN(v0(t),v0(n),.2)}function FN(e){return e!==e.root&&e.scroll?.wasRoot}const LN=k0({attachResizeListener:(e,t)=>ya(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),VN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function L0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(VN);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 Df={current:void 0},V0=k0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Df.current){const e=new LN({});e.mount(window),e.setOptions({layoutScroll:!0}),Df.current=e}return Df.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ai=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $N(...e){return t=>{let n=!1;const r=e.map(o=>{const i=$0(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():$0(e[o],null)}}}}function zN(...e){return A.useCallback($N(...e),e)}class jN extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=vf(r)&&r.offsetWidth||0,i=vf(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function RN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=S.useId(),a=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(ai),c=e.props?.ref??e?.ref,u=zN(a,c);return S.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:v,right:g,bottom:h}=s.current;if(t||!a.current||!d||!f)return;const y=n==="left"?`left: ${v}`:`right: ${g}`,b=r==="bottom"?`bottom: ${h}`:`top: ${p}`;a.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const T=o??document.head;return T.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
7
7
|
[data-motion-pop-id="${i}"] {
|
|
8
8
|
position: absolute !important;
|
|
9
9
|
width: ${d}px !important;
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
${y}px !important;
|
|
12
12
|
${b}px !important;
|
|
13
13
|
}
|
|
14
|
-
`),()=>{S.contains(x)&&S.removeChild(x)}},[t]),m.jsx(LN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const $N=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=_n(zN),d=T.useId();let f=!0,p=T.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const g of u.values())if(!g)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),T.useMemo(()=>{u.forEach((v,g)=>u.set(g,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(VN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),m.jsx(cl.Provider,{value:p,children:e})};function zN(){return new Map}function $0(e=!0){const t=T.useContext(cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=T.useId();T.useEffect(()=>{if(e)return o(i)},[e]);const a=T.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Tl=e=>e.key||"";function z0(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const fn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=$0(a),f=T.useMemo(()=>z0(e),[e]),p=a&&!u?[]:f.map(Tl),v=T.useRef(!0),g=T.useRef(f),h=_n(()=>new Map),y=T.useRef(new Set),[b,x]=T.useState(f),[S,E]=T.useState(f);ll(()=>{v.current=!1,g.current=f;for(let k=0;k<S.length;k++){const P=Tl(S[k]);p.includes(P)?(h.delete(P),y.current.delete(P)):h.get(P)!==!0&&h.set(P,!1)}},[S,p.length,p.join("-")]);const I=[];if(f!==b){let k=[...f];for(let P=0;P<S.length;P++){const _=S[P],F=Tl(_);p.includes(F)||(k.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(k=I),E(z0(k)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&S.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:w}=T.useContext(na);return m.jsx(m.Fragment,{children:S.map(k=>{const P=Tl(k),_=a&&!u?!1:f===S||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),h.has(P))h.set(P,!0);else return;let V=!0;h.forEach(N=>{N||(V=!1)}),V&&(w?.(),E(g.current),a&&d?.(),r&&r())};return m.jsx($N,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:k},P)})})},jN=T.createContext(null);function RN(){const e=T.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function BN(){const e=RN(),[t,n]=T.useState(0),r=T.useCallback(()=>{e.current&&n(t+1)},[t]);return[T.useCallback(()=>gt.postRender(r),[r]),t]}const j0=e=>e===!0,HN=e=>j0(e===!0)||e==="id",WN=({children:e,id:t,inherit:n=!0})=>{const r=T.useContext(na),o=T.useContext(jN),[i,a]=BN(),s=T.useRef(null),l=r.id||o;s.current===null&&(HN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:j0(n)&&r.group||F0()});const c=T.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(na.Provider,{value:c,children:e})},R0=T.createContext({strict:!1}),B0={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"]};let H0=!1;function qN(){if(H0)return;const e={};for(const t in B0)e[t]={isEnabled:n=>B0[t].some(r=>!!n[r])};_x(e),H0=!0}function W0(){return qN(),ID()}function UN(e){const t=W0();for(const n in e)t[n]={...t[n],...e[n]};_x(t)}const GN=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 El(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||GN.has(e)}let q0=e=>!El(e);function U0(e){typeof e=="function"&&(q0=t=>t.startsWith("on")?!El(t):e(t))}try{U0(require("@emotion/is-prop-valid").default)}catch{}function YN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(q0(o)||n===!0&&El(o)||!t&&!El(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mf({children:e,isValidProp:t,...n}){t&&U0(t),n={...T.useContext(ii),...n},n.isStatic=_n(()=>n.isStatic);const r=T.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(ii.Provider,{value:r,children:e})}const kl=T.createContext({});function KN(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function ZN(e){const{initial:t,animate:n}=KN(e,T.useContext(kl));return T.useMemo(()=>({initial:t,animate:n}),[G0(t),G0(n)])}function G0(e){return Array.isArray(e)?e.join(" "):e}const Df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Y0(e,t,n){for(const r in t)!jt(t[r])&&!qx(r,n)&&(e[r]=t[r])}function XN({transformTemplate:e},t){return T.useMemo(()=>{const n=Df();return Cf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function QN(e,t){const n=e.style||{},r={};return Y0(r,n,e),Object.assign(r,XN(e,t)),r}function JN(e,t){const n={},r=QN(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 K0=()=>({...Df(),attrs:{}});function e2(e,t,n,r){const o=T.useMemo(()=>{const i=K0();return Gx(i,t,Kx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Y0(i,e.style,e),o.style={...i,...o.style}}return o}const t2=["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 Nf(e){return typeof e!="string"||e.includes("-")?!1:!!(t2.indexOf(e)>-1||/[A-Z]/u.test(e))}function n2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Nf(e)?e2:JN)(t,r,o,e),c=YN(t,typeof e=="string",i),u=e!==T.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=T.useMemo(()=>jt(d)?d.get():d,[d]);return T.createElement(e,{...u,children:f})}function r2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:o2(n,r,o,e),renderState:t()}}function o2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:a,animate:s}=e;const l=vl(e),c=Px(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"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=sf(e,f[p]);if(v){const{transitionEnd:g,transition:h,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[b]=x)}for(const b in g)o[b]=g[b]}}}return o}const Z0=e=>(t,n)=>{const r=T.useContext(kl),o=T.useContext(cl),i=()=>r2(e,t,r,o);return n?i():_n(i)},i2=Z0({scrapeMotionValuesFromProps:Af,createRenderState:Df}),a2=Z0({scrapeMotionValuesFromProps:Zx,createRenderState:K0}),s2=Symbol.for("motionComponentSymbol");function l2(e,t,n){const r=T.useRef(n);T.useInsertionEffect(()=>{r.current=n});const o=T.useRef(null);return T.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const X0=T.createContext({});function ya(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function c2(e,t,n,r,o,i){const{visualElement:a}=T.useContext(kl),s=T.useContext(R0),l=T.useContext(cl),c=T.useContext(ii).reducedMotion,u=T.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=T.useContext(X0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&u2(u.current,n,o,f);const p=T.useRef(!1);T.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[lx],g=T.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),T.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),g.current=!1),d.enteringChildren=void 0)}),d}function u2(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:Q0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ya(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Q0(e){if(e)return e.options.allowProjection!==!1?e.projection:Q0(e.parent)}function Ff(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&UN(r);const i=n?n==="svg":Nf(e),a=i?a2:i2;function s(c,u){let d;const f={...T.useContext(ii),...c,layoutId:d2(c)},{isStatic:p}=f,v=ZN(c),g=a(c,p);if(!p&&rb){f2(f,r);const h=p2(f);d=h.MeasureLayout,v.visualElement=c2(e,g,f,o,h.ProjectionNode,i)}return m.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?m.jsx(d,{visualElement:v.visualElement,...f}):null,n2(e,c,l2(g,v.visualElement,u),g,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=T.forwardRef(s);return l[s2]=e,l}function d2({layoutId:e}){const t=T.useContext(na).id;return t&&e!==void 0?t+"-"+e:e}function f2(e,t){const n=T.useContext(R0).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?Yo(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function p2(e){const t=W0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function h2(e,t){if(typeof Proxy>"u")return Ff;const n=new Map,r=(i,a)=>Ff(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&Cd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Ff(a,void 0,e,t)),n.get(a))})}const m2=(e,t)=>t.isSVG??Nf(e)?new Xx(t):new Ux(t,{allowProjection:e!==T.Fragment});class g2 extends Dr{constructor(t){super(t),t.animationState||(t.animationState=YD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(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 v2=0;class y2 extends Dr{constructor(){super(...arguments),this.id=v2++}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 b2={animation:{Feature:g2},exit:{Feature:y2}};function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const x2=e=>t=>vf(t)&&e(t,ba(t));function xa(e,t,n,r){return va(e,t,x2(n),r)}const J0=({current:e})=>e?e.ownerDocument.defaultView:null,ew=(e,t)=>Math.abs(e-t);function w2(e,t){const n=ew(e.x,t.x),r=ew(e.y,t.y);return Math.sqrt(n**2+r**2)}const tw=new Set(["auto","scroll"]);class nw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Vf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,g=w2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!g)return;const{point:h}=p,{timestamp:y}=Kt;this.history.push({...h,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Lf(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:g,onSessionEnd:h,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Vf(p.type==="pointercancel"?this.lastMoveEventInfo:Lf(v,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),h&&h(p,b)},!vf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=ba(t),c=Lf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Vf(c,this.history)),this.removeListeners=oa(xa(this.contextWindow,"pointermove",this.handlePointerMove),xa(this.contextWindow,"pointerup",this.handlePointerUp),xa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(tw.has(r.overflowX)||tw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Lf(e,t){return t?{point:t(e.point)}:e}function rw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vf({point:e},t){return{point:e,delta:rw(e,ow(t)),offset:rw(e,S2(t)),velocity:T2(t,.1)}}function S2(e){return e[0]}function ow(e){return e[e.length-1]}function T2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ow(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=bn(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 E2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function iw(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 k2(e,{top:t,left:n,bottom:r,right:o}){return{x:iw(e.x,n,o),y:iw(e.y,t,r)}}function aw(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 C2(e,t){return{x:aw(e.x,t.x),y:aw(e.y,t.y)}}function I2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Ko(t.min,t.max-r,e.min):r>o&&(n=Ko(e.min,e.max-o,t.min)),Kn(0,1,n)}function A2(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 $f=.35;function P2(e=$f){return e===!1?e=0:e===!0&&(e=$f),{x:sw(e,"left","right"),y:sw(e,"top","bottom")}}function sw(e,t,n){return{min:lw(e,t),max:lw(e,n)}}function lw(e,t){return typeof e=="number"?e:e[t]||0}const O2=new WeakMap;class _2{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=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(ba(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:g}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Zn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[y];S&&(b=en(S)*(parseFloat(b)/100))}}this.originPoint[y]=b}),g&>.postRender(()=>g(d,f)),cf(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:g,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=M2(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>xn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new nw(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:J0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&>.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=E2(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&&ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=k2(r.layoutBox,t):this.constraints=!1,this.elastic=P2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=A2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ya(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=_D(r,o.root,this.visualElement.getTransformPagePoint());let a=C2(o.layout.layoutBox,i);if(n){const s=n(AD(a));this.hasMutatedConstraints=!!s,s&&(a=Nx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=xn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cf(this.visualElement,t),r.start(af(t,r,0,n,this.visualElement,!1))}stopAnimation(){xn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xn(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){xn(n=>{const{drag:r}=this.getProps();if(!Cl(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],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ya(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};xn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=I2({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(),xn(a=>{if(!Cl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;O2.set(this.visualElement,this);const t=this.visualElement.current,n=xa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&Sx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ya(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()),gt.read(r);const a=va(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(xn(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=$f,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function M2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class D2 extends Dr{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new _2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const cw=e=>(t,n)=>{e&>.postRender(()=>e(t,n))};class N2 extends Dr{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new nw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:J0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cw(t),onStart:cw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&>.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let zf=!1;class F2 extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),zf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,zf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;zf=!0,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 uw(e){const[t,n]=$0(),r=T.useContext(na);return m.jsx(F2,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(X0),isPresent:t,safeToRemove:n})}const L2={pan:{Feature:N2},drag:{Feature:D2,ProjectionNode:L0,MeasureLayout:uw}};function dw(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&>.postRender(()=>i(t,ba(t)))}class V2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=mD(t,(n,r)=>(dw(this.node,r,"Start"),o=>dw(this.node,o,"End"))))}unmount(){}}class $2 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=oa(va(this.node.current,"focus",()=>this.onFocus()),va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fw(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&>.postRender(()=>i(t,ba(t)))}class z2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=yD(t,(n,r)=>(fw(this.node,r,"Start"),(o,{success:i})=>fw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Rf=new WeakMap,j2=e=>{const t=jf.get(e.target);t&&t(e)},R2=e=>{e.forEach(j2)};function B2({root:e,...t}){const n=e||document;Rf.has(n)||Rf.set(n,{});const r=Rf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(R2,{root:e,...t})),r[o]}function H2(e,t,n){const r=B2(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const W2={some:0,all:1};class q2 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:W2[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(),f=c?u:d;f&&f(l)};return H2(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(U2(t,n))&&this.startObserver()}unmount(){}}function U2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const G2={...b2,...{inView:{Feature:q2},tap:{Feature:z2},focus:{Feature:$2},hover:{Feature:V2}},...L2,...{layout:{ProjectionNode:L0,MeasureLayout:uw}}},Be=h2(G2,m2);function Y2(e){return T.useEffect(()=>()=>e(),[])}function ho(e){const t=_n(()=>uo(e)),{isStatic:n}=T.useContext(ii);if(n){const[,r]=T.useState(e);T.useEffect(()=>t.on("change",r),[])}return t}function pw(e,t){const n=ho(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),hr(r)}}),n}function K2(e){fa.current=[],e();const t=pw(fa.current,e);return fa.current=void 0,t}function Z2(e,t,n,r){if(typeof e=="function")return K2(e);const i=typeof t=="function"?t:wD(t,n,r);return Array.isArray(e)?hw(e,i):hw([e],([a])=>i(a))}function hw(e,t){const n=_n(()=>[]);return pw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Bf(e){return typeof e=="object"&&!Array.isArray(e)}function mw(e,t,n,r){return e==null?[]:typeof e=="string"&&Bf(t)?gx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function X2(e,t,n){return e*(t+1)}function gw(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 Q2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function J2(e,t,n,r,o,i){Q2(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:bb(n,a)})}function eF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function tF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const nF="easeInOut",rF=20;function oF(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,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,gw(d,v.at,u,c));continue}let[g,h,y={}]=v;y.at!==void 0&&(d=gw(d,y.at,u,c));let b=0;const x=(S,E,I,w=0,k=0)=>{const P=iF(S),{delay:_=0,times:F=Hb(P),type:V=t.type||"keyframes",repeat:N,repeatType:O,repeatDelay:D=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:C}=E;const L=typeof _=="function"?_(w,k):_,$=P.length,B=tf(V)?V:o?.[V||"keyframes"];if($<=2&&B){let J=100;if($===2&&lF(P)){const Y=P[1]-P[0];J=Math.abs(Y)}const re={...t,...z};C!==void 0&&(re.duration=Mn(C));const ee=$b(re,J,B);M=ee.ease,C=ee.duration}C??(C=i);const q=d+L;F.length===1&&F[0]===0&&(F[1]=1);const G=F.length-P.length;if(G>0&&Bb(F,G),P.length===1&&P.unshift(null),N){dn(N<rF,"Repeat count too high, must be less than 20","repeat-count-high"),C=X2(C,N);const J=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let Y=0;Y<N;Y++){P.push(...J);for(let K=0;K<J.length;K++)F.push(re[K]+(Y+1)),M.push(K===0?"linear":bb(ee,K-1))}eF(F,N)}const W=q+C;J2(I,P,M,F,q,W),b=Math.max(L+C,b),f=Math.max(W,f)};if(jt(g)){const S=vw(g,s);x(h,y,yw("default",S))}else{const S=mw(g,h,r,l),E=S.length;for(let I=0;I<E;I++){h=h,y=y;const w=S[I],k=vw(w,s);for(const P in h)x(h[P],aF(y,P),yw(P,k),I,E)}}u=d,d+=b}return s.forEach((p,v)=>{for(const g in p){const h=p[g];h.sort(tF);const y=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:k,value:P,easing:_}=h[w];y.push(P),b.push(Ko(0,f,k)),x.push(_||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(nF)),b[b.length-1]!==1&&(b.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const S=a.get(v);S.keyframes[g]=y;const{type:E,...I}=t;S.transition[g]={...I,duration:f,ease:x,times:b,...n}}}),a}function vw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function yw(e,t){return t[e]||(t[e]=[]),t[e]}function iF(e){return Array.isArray(e)?e:[e]}function aF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const sF=e=>typeof e=="number",lF=e=>e.every(sF);function cF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=bf(e)&&!kx(e)?new Xx(t):new Ux(t);n.mount(e),pa.set(e,n)}function uF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new $D(t);n.mount(e),pa.set(e,n)}function dF(e,t){return jt(e)||typeof e=="number"||typeof e=="string"&&!Bf(t)}function bw(e,t,n,r){const o=[];if(dF(e,t))o.push(T0(e,Bf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=mw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?cF:uF;pa.has(l)||c(l);const u=pa.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...df(u,{...t,transition:d},{}))}}return o}function fF(e,t,n){const r=[];return oF(e,t,n,{spring:ua}).forEach(({keyframes:i,transition:a},s)=>{r.push(...bw(s,i,a))}),r}function pF(e){return Array.isArray(e)&&e.some(Array.isArray)}function xw(e){function t(n,r,o){let i=[],a;if(pF(n))i=fF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=bw(n,r,c,e)}const s=new $M(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{ra(e.animations,s)})),s}return t}const ww=xw();function hF(){const e=_n(()=>({current:null,animations:[]})),t=_n(()=>xw(e));return Y2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class mF{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)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const gF=()=>new mF;function vF(){return _n(gF)}const Sw=T.createContext(null);function yF(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=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?m_(e,o,o+i):e}function bF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=_n(()=>Be[t]),l=[],c=T.useRef(!1),u=T.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,g)=>{const h=l.findIndex(y=>v===y.value);h!==-1?l[h].layout=g[n]:l.push({value:v,layout:g[n]}),l.sort(wF)},updateOrder:(v,g,h)=>{if(c.current)return;const y=yF(l,v,g,h);l!==y&&(c.current=!0,r(y.map(xF).filter(b=>o.indexOf(b)!==-1)))}};T.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return m.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:m.jsx(Sw.Provider,{value:d,children:e})})}const Tw=T.forwardRef(bF);function xF(e){return e.value}function wF(e,t){return e.layout.min-t.layout.min}const Il=50,Ew=25,SF=new Set(["auto","scroll"]),wa=new WeakMap,Sa=new WeakMap;let Ta=null;function TF(){if(Ta){const e=Hf(Ta,"y");e&&(Sa.delete(e),wa.delete(e));const t=Hf(Ta,"x");t&&t!==e&&(Sa.delete(t),wa.delete(t)),Ta=null}}function EF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return SF.has(r)}function Hf(e,t){let n=e?.parentElement;for(;n;){if(EF(n,t))return n;n=n.parentElement}return null}function kF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Il){const l=1-a/Il;return{amount:-Ew*l*l,edge:"start"}}else if(s<Il){const l=1-s/Il;return{amount:Ew*l*l,edge:"end"}}return{amount:0,edge:null}}function CF(e,t,n,r){if(!e)return;Ta=e;const o=Hf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=kF(i,o,n);if(s===null){Sa.delete(o),wa.delete(o);return}if(Sa.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Sa.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;wa.set(o,u)}if(a>0){const c=wa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function kw(e,t=0){return jt(e)?e:ho(t)}function IF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=_n(()=>Be[r]),u=T.useContext(Sw),d={x:kw(t.x),y:kw(t.y)},f=Z2([d.x,d.y],([y,b])=>y||b?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:g,groupRef:h}=u;return m.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,b)=>{const{velocity:x,point:S}=b,E=d[p].get();g(n,E,x[p]),CF(h.current,S[p],p,x[p]),o&&o(y,b)},onDragEnd:(y,b)=>{TF(),i&&i(y,b)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const Cw=T.forwardRef(IF);var Al={exports:{}},Wf={},Pl={exports:{}},qf={};var Iw;function AF(){if(Iw)return qf;Iw=1;var e=T;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=f,l(g)&&h({inst:g})},[d,p,f]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return qf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qf}var Uf={};var Aw;function PF(){return Aw||(Aw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!d){var h=v();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:v}});var y=h[0].inst,b=h[1];return l(function(){y.value=g,y.getSnapshot=v,n(y)&&b({inst:y})},[p,g,v]),s(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Uf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Uf}var Pw;function Ow(){return Pw||(Pw=1,process.env.NODE_ENV==="production"?Pl.exports=AF():Pl.exports=PF()),Pl.exports}var _w;function OF(){if(_w)return Wf;_w=1;var e=T,t=Ow();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 Wf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&g.hasValue){var w=g.value;if(p(w,I))return S=w}return S=I}if(w=S,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,S=k)}var b=!1,x,S,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Wf}var Gf={};var Mw;function _F(){return Mw||(Mw=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=T,n=Ow(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&g.hasValue){var w=g.value;if(p(w,I))return S=w}return S=I}if(w=S,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,S=k)}var b=!1,x,S,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var h=o(c,v[0],v[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())})()),Gf}var Dw;function MF(){return Dw||(Dw=1,process.env.NODE_ENV==="production"?Al.exports=OF():Al.exports=_F()),Al.exports}MF();var ai=function(){return ai=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},ai.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 Nw(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 si=function(e){var t=T.useRef(e??{});return T.useEffect(function(){t.current=e},[e]),t},DF=function(e){var t=T.useRef(void 0);return T.useEffect(function(){t.current=e},[e]),t.current},NF=function(e){return Object.entries(e)},Fw=function(e){return e instanceof Promise},Lw=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)},ai(ai({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},FF=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,Nw([],Ea(a),!1)),u=function(d,f){return n(function(p){return Lw(d,p,i,f)})};return Fw(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))}},LF=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,Nw([],Ea(a),!1)),c=function(u){return n(function(d){return Lw(u,d,i,o.current)})};return Fw(l)?l.then(function(u){return c(u)}):c(l)}},Yf=function(e,t,n){var r,o,i,a=Ea(T.useState(function(){return e}),2),s=a[0],l=a[1],c=si(s),u=si((r=n?.props)!==null&&r!==void 0?r:{}),d=si(t),f=si((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=si((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=T.useRef(e),g=DF(s),h=si(g),y=T.useRef(null);T.useEffect(function(){if(y.current!==null){var S=y.current;f.current.forEach(function(E){E(s,g,S)})}},[s,f,g]);var b=Ea(T.useState(function(){var S=function(){return u.current},E=d.current({props:S,state:function(){return c.current},initialState:v.current,previousState:function(){return h.current}});return NF(E).reduce(function(I,w){var k,P=Ea(w,2),_=P[0],F=P[1];return ai(ai({},I),(k={},k[_]=n?.debug?FF(_,F,l,S,y,p.current):LF(_,F,l,S,y,p.current),k))},{})}),1),x=b[0];return[s,x,u.current]},VF=Object.defineProperty,Vw=Object.getOwnPropertySymbols,$F=Object.prototype.hasOwnProperty,zF=Object.prototype.propertyIsEnumerable,$w=(e,t,n)=>t in e?VF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jF=(e,t)=>{for(var n in t||(t={}))$F.call(t,n)&&$w(e,n,t[n]);if(Vw)for(var n of Vw(t))zF.call(t,n)&&$w(e,n,t[n]);return e},Kf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},RF=(e,t,n,r)=>_l(Kf,e,t,n,r),li=e=>typeof e=="object",Nr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(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=>Nr(e[r],t[r]))},BF=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,HF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),zw=e=>["string","number"].includes(typeof e),jw=e=>e==null||e?.length===0||e==="",Rw={eq:Nr,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:jw,notEmpty:e=>!jw(e),in:(e,t)=>Kf(t,n=>Nr(e,n)),notIn:(e,t)=>Bw(t,n=>!Nr(e,n))},WF=e=>{if(e in Rw)return Rw[e];throw new Error("Linq - Symbol not found")},ci=(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},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=WF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},qF=(e,t,n,r)=>_l(ci,e,t,n,r),Bw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},UF=(e,t,n,r)=>_l(Bw,e,t,n,r),Hw=e=>{if(e===null)return null;const t=jF({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?Hw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Ww=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1},GF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},YF=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Nr(o,t)):n===r.indexOf(t)),KF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},qw=(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())},ZF=(e,t)=>qw(e,n=>n[t]),Uw=(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},XF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},QF=(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 Ol(e)&&Ol(t)?r.map(a=>Number.parseInt(a)):r},Zf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,a]=XF(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return QF(e,t,r)},JF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Zf(r,o,1):Zf(r,i,Number.parseInt(o,10))}return zw(e)&&zw(t)?Zf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Xf=(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},Gw=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},eL=(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)},tL=(e,t,n,r)=>_l(eL,e,t,n,r),Yw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(HF(t))},Kw=(e=>(e.Asc="asc",e.Desc="desc",e))(Kw||{}),nL=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),rL=(e,t)=>e.sort(nL(t)),oL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},iL=class Rh{constructor(t=[]){this.array=t}static Range(...t){return JF(...t)}static New(t){return new Rh(t)}Where(t,n,r){return this.array=qF(this.array,t,n,r),this}Some(t,n,r){return RF(this.array,t,n,r)}All(t,n,r){return UF(this.array,t,n,r)}Reverse(){return this.array=Gw(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=tL(this.array,t,n,r),this}Distinct(){return this.array=YF(this.array),this}First(t){return t===void 0?this.array[0]:KF(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?Xf((n,r)=>n+r,0,this.array):Xf((n,r)=>n+BF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return ZF(this.array,t)}GroupWith(t){return qw(this.array,t)}Except(t){return ci(this.array,n=>!Ww(t,n))}Intersect(t){return ci(this.array,n=>Ww(t,n))}OrderBy(t,n){let r;return r=t?Yw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Gw(r):r,this}Includes(t){return Kf(this.array,n=>Nr(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 Xf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Uw(this.array,n=>[t,n]))}Zip(t,n){return Uw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Rh(Hw(this.array))}ToObject(t){return GF(this.array,t)}Sort(t){return Array.isArray(t)?rL(this.array,t):Yw(this.array,t)}Unique(t){return oL(this.array,t)}},Zw=iL;const Ml=0,Fr=1,ui=2,Xw=4;function Qw(e){return()=>e}function aL(e){e()}function ka(e,t){return n=>e(t(n))}function Jw(e,t){return()=>e(t)}function sL(e,t){return n=>e(t,n)}function Qf(e){return e!==void 0}function lL(...e){return()=>{e.map(aL)}}function di(){}function Dl(e,t){return t(e),e}function cL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Fr,t)}function ze(e,t){e(Ml,t)}function Jf(e){e(ui)}function Tt(e){return e(Xw)}function Ie(e,t){return st(e,sL(t,Ml))}function Fn(e,t){const n=e(Fr,r=>{n(),t(r)});return n}function e1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function t1(e,t){return e===t}function xt(e=t1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Me(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ue(e,...t){const n=uL(...t);return((r,o)=>{switch(r){case ui:Jf(e);return;case Fr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function mo(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...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);st(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 uL(...e){return t=>e.reduceRight(cL,t)}function dL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Fr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),di);case ui:r(),n=null;return}}}function he(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Ml:t=o;break;case Fr:{o(t);break}case Xw:return t}return n(r,o)})}function Qt(e,t){return Dl(he(t),n=>Ie(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Ml:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case Fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function pn(e){return Dl(Ke(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:fL(),singleton:n}}const fL=()=>Symbol();function pL(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 Vt(...e){const t=Ke(),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);st(i,l=>{n[a]=l,r=r|s,r===o&&ze(t,n)})}),function(i,a){switch(i){case ui:{Jf(t);return}case Fr:return r===o&&a(n),st(t,a)}}}function De(e,t=t1){return ue(e,xt(t))}function ep(...e){return function(t,n){switch(t){case ui:return;case Fr:return lL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const hL={0:"debug",3:"error",1:"log",2:"warn"},mL=()=>typeof globalThis>"u"?window:globalThis,Lr=Qe(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=mL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[hL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return tp(e,t,n).callbackRef}function tp(e,t,n){const r=T.useRef(null);let o=a=>{};const i=T.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 n1(e,t,n,r,o,i,a,s,l){const c=T.useCallback(u=>{const d=gL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i?.(s?r1("column-gap",getComputedStyle(u).columnGap,o):r1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return tp(c,n,l)}function gL(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},sn.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 r1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function np(e,t,n){const r=T.useRef(null),o=T.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=tp(o,!0,n),s=T.useCallback(()=>{o(a.current)},[o,a]);return T.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 tn=Qe(()=>{const e=Ke(),t=Ke(),n=he(0),r=Ke(),o=he(0),i=Ke(),a=Ke(),s=he(0),l=he(0),c=he(0),u=he(0),d=Ke(),f=Ke(),p=he(!1),v=he(!1),g=he(!1);return Ie(ue(e,be(({scrollTop:h})=>h)),t),Ie(ue(e,be(({scrollHeight:h})=>h)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ca={lvl:0};function o1(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 ft(e){return e===Ca}function Ia(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Ia(e.l,t):Ia(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function hn(e,t,n){return ft(e)?s1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?l1(Rt(e,{l:hn(e.l,t,n)})):l1(Rt(e,{r:hn(e.r,t,n)}))}function fi(){return Ca}function pi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return vL(op(e,r,n))}function rp(e,t){if(ft(e))return Ca;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=a1(r);return Nl(Rt(e,{k:i,l:i1(r),v:a}))}}else return t<n?Nl(Rt(e,{l:rp(r,t)})):Nl(Rt(e,{r:rp(o,t)}))}function go(e){return ft(e)?[]:[...go(e.l),{k:e.k,v:e.v},...go(e.r)]}function op(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(op(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(op(i,t,n))),s}function Nl(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(ip(t))return c1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ip(e))return ap(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=ip(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ap(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return s1(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 i1(e){return ft(e.r)?e.l:Nl(Rt(e,{r:i1(e.r)}))}function ip(e){return ft(e)||e.lvl>e.r.lvl}function a1(e){return ft(e.r)?[e.k,e.v]:a1(e.r)}function s1(e,t,n,r=Ca,o=Ca){return{k:e,l:r,lvl:n,r:o,v:t}}function l1(e){return ap(c1(e))}function c1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function ap(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function vL(e){return o1(e,({k:t,v:n})=>({index:t,value:n}))}function u1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const sp=Qe(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function d1(e,t,n){return e[Fl(e,t,n)]}function Fl(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 yL(e,t,n,r){const o=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!ft(e.groupOffsetTree)}function lp({index:e},t){return t===e?0:t<e?-1:1}function bL(){return{groupIndices:[],groupOffsetTree:fi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fi()}}function xL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=hn(e,0,i);continue}const s=pi(e,a-1,o+1);if(s.some(IL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=rp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=hn(e,o+1,f));c&&(e=hn(e,a,i))}return[e,n]}function wL(e){return typeof e.groupIndex<"u"}function SL({offset:e},t){return t===e?0:t<e?-1:1}function Pa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=d1(t,e,lp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function f1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function p1(e,t,n){if(wL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=f1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function TL(e,t,n,r=0){return r>0&&(t=Math.max(t,d1(e,r,lp).offset)),o1(yL(e,t,n,SL),CL)}function EL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,g)=>hn(hn(v,g,f),g+1,p),a)}else[a,s]=xL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=cp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>hn(f,p,Pa(p,d,o)),fi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function kL(e){return go(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 h1(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 cp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Fl(o,t-1,lp),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of pi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function CL(e){return{index:e.index,value:e}}function IL(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 AL={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Qt(r,0),i=Ke(),a=Ke(),s=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),p=he((w,k)=>Vn(w,AL[k])),v=he(void 0),g=he(0),h=bL(),y=Qt(ue(n,He(l,e,g),Qn(EL,h),xt()),h),b=Qt(ue(l,xt(),Qn((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ue(l,Me(w=>w.length>0),He(y,g),be(([w,k,P])=>{const _=w.reduce((F,V,N)=>hn(F,V,Pa(V,k.offsetTree,P)||N),fi());return{...k,groupIndices:w,groupOffsetTree:_}})),y),Ie(ue(r,He(y),Me(([w,{lastIndex:k}])=>w<k),be(([w,{lastIndex:k,lastSize:P}])=>[{endIndex:k,size:P,startIndex:w}])),n),Ie(c,u);const x=Qt(ue(c,be(w=>w===void 0)),!0);Ie(ue(u,Me(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const k=Tt(d),P=Tt(l).length>0;return k?P?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ue(f,Me(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const k=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const V=w[F];V!==P&&(k.push({endIndex:F-1,size:P,startIndex:_}),P=V,_=F)}return k.push({endIndex:w.length-1,size:P,startIndex:_}),k})),n),Ie(ue(l,He(d,u),Me(([,w,k])=>w!==void 0&&k!==void 0),be(([w,k,P])=>{const _=[];for(let F=0;F<w.length;F++){const V=w[F],N=w[F+1];_.push({startIndex:V,endIndex:V,size:k}),N!==void 0&&_.push({startIndex:V+1,endIndex:N-1,size:P})}return _})),n);const S=pn(ue(n,He(y),Qn(({sizes:w},[k,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:h}),be(w=>w.changed)));st(ue(s,Qn((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:k}=Tt(y);if(w>0)ze(t,!0),ze(i,w+h1(w,k));else if(w<0){const P=Tt(b);P.length>0&&(w-=h1(-w,P)),ze(a,w)}}),st(ue(s,He(e)),([w,k])=>{w<0&&k("`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},sn.ERROR)});const E=pn(i);Ie(ue(i,He(y),be(([w,k])=>{const P=k.groupIndices.length>0,_=[],F=k.lastSize;if(P){const V=Ia(k.sizeTree,0);let N=0,O=0;for(;N<w;){const z=k.groupIndices[O],M=k.groupIndices.length===O+1?1/0:k.groupIndices[O+1]-z-1;_.push({endIndex:z,size:V,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,N+=M+1}const D=go(k.sizeTree);return N!==w&&D.shift(),D.reduce((z,{k:M,v:C})=>{let L=z.ranges;return z.prevSize!==0&&(L=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:L}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return go(k.sizeTree).reduce((V,{k:N,v:O})=>({prevIndex:N+w,prevSize:O,ranges:[...V.ranges,{endIndex:N+w-1,size:V.prevSize,startIndex:V.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=pn(ue(a,He(y,g),be(([w,{offsetTree:k},P])=>{const _=-w;return Pa(_,k,P)})));return Ie(ue(a,He(y,g),be(([w,k,P])=>{if(k.groupIndices.length>0){if(ft(k.sizeTree))return k;let _=fi();const F=Tt(b);let V=0,N=0,O=0;for(;V<-w;){O=F[N];const D=F[N+1]-O-1;N++,V+=D+1}if(_=go(k.sizeTree).reduce((D,{k:z,v:M})=>hn(D,Math.max(0,z+w),M),_),V!==-w){const D=Ia(k.sizeTree,O);_=hn(_,0,D);const z=Ln(k.sizeTree,-w+1)[1];_=hn(_,1,z)}return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}else{const _=go(k.sizeTree).reduce((F,{k:V,v:N})=>hn(F,Math.max(0,V+w),N),fi());return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:E,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:g,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:S,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt(Lr,sp),{singleton:!0});function PL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const m1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),a=Ke(),s=pn(ue(i,be(PL)));return Ie(ue(s,be(l=>l.totalCount)),n),Ie(ue(s,be(l=>l.groupIndices)),e),Ie(ue(Vt(o,t,r),Me(([l,c])=>Ll(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),Vr=Qe(([{log:e}])=>{const t=he(!1),n=pn(ue(t,Me(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt(Lr),{singleton:!0}),OL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function g1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!OL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oa=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:f}])=>{const p=Ke(),v=Ke(),g=he(0);let h=null,y=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),ze(l,!1)}return Ie(ue(p,He(n,d,r,g,s,a,f),He(e,i,o),be(([[S,E,I,w,k,P,_,F],V,N,O])=>{const D=g1(S),{align:z,behavior:M,offset:C}=D,L=w-1,$=p1(D,E,L);let B=Pa($,E.offsetTree,V)+P;z==="end"?(B+=N+Ln(E.sizeTree,$)[1]-I+O,$===L&&(B+=_)):z==="center"?B+=(N+Ln(E.sizeTree,$)[1]-I+O)/2:B-=k,C&&(B+=C);const q=G=>{x(),G?(F("retrying to scroll to",{location:S},sn.DEBUG),ze(p,S)):(ze(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(x(),M==="smooth"){let G=!1;b=st(t,W=>{G=G||W}),h=Fn(u,()=>{q(G)})}else h=Fn(ue(t,_L(150)),q);return y=setTimeout(()=>{x()},1200),ze(l,!0),F("scrolling from index to",{behavior:M,index:$,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:g}},bt(er,tn,Lr),{singleton:!0});function _L(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function up(e,t){e==0?t():requestAnimationFrame(()=>{up(e-1,t)})}function dp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _a=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=he(!0),l=he(0),c=he(!0);return Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),s),Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),c),st(ue(Vt(t,a),He(s,n,e,c),Me(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||Qf(p))&&!d&&!v),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),up(4,()=>{Fn(r,()=>{ze(s,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,Oa,Vr),{singleton:!0});function v1(e,t){return Math.abs(e-t)<1.01}const Ma="up",Da="down",ML="none",DL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},NL=0,Na=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=he(!1),s=he(!0),l=Ke(),c=Ke(),u=he(4),d=he(NL),f=Qt(ue(ep(ue(De(o),mo(1),Xn(!0)),ue(De(o),mo(1),Xn(!1),e1(100))),xt()),!1),p=Qt(ue(ep(ue(n,Xn(!0)),ue(n,Xn(!1),e1(200))),xt()),!1);Ie(ue(Vt(De(o),De(d)),be(([b,x])=>b<=x),xt()),s),Ie(ue(s,mr(50)),c);const v=pn(ue(Vt(r,De(i),De(t),De(e),De(u)),Qn((b,[{scrollHeight:x,scrollTop:S},E,I,w,k])=>{const P=S+E-x>-k,_={scrollHeight:x,scrollTop:S,viewportHeight:E};if(P){let V,N;return S>b.state.scrollTop?(V="SCROLLED_DOWN",N=b.state.scrollTop-S):(V="SIZE_DECREASED",N=b.state.scrollTop-S||b.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:N,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":E<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":S<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},DL),xt((b,x)=>b&&b.atBottom===x.atBottom))),g=Qt(ue(r,Qn((b,{scrollHeight:x,scrollTop:S,viewportHeight:E})=>{if(v1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const I=x-(S+E)<1;return b.scrollTop!==S&&I?{changed:!0,jump:b.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Me(b=>b.changed),be(b=>b.jump)),0);Ie(ue(v,be(b=>b.atBottom)),a),Ie(ue(a,mr(50)),l);const h=he(Da);Ie(ue(r,be(({scrollTop:b})=>b),xt(),Qn((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Ma:Da,prevScrollTop:x},{direction:Da,prevScrollTop:0}),be(b=>b.direction)),h),Ie(ue(r,mr(50),Xn(ML)),h);const y=he(0);return Ie(ue(f,Me(b=>!b),Xn(0)),y),Ie(ue(o,mr(100),He(f),Me(([b,x])=>x),Qn(([b,x],[S])=>[x,S],[0,0]),be(([b,x])=>x-b)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},bt(tn)),Fa="top",La="bottom",y1="none";function b1(e,t,n){return typeof e=="number"?n===Ma&&t===Fa||n===Da&&t===La?e:0:n===Ma?t===Fa?e.main:e.reverse:t===La?e.main:e.reverse}function x1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const fp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),a=he(0),s=he(0),l=he(0),c=Qt(ue(Vt(De(r),De(o),De(n),De(i,Aa),De(l),De(a),De(t),De(e),De(s)),be(([u,d,f,[p,v],g,h,y,b,x])=>{const S=u-b,E=h+y,I=Math.max(f-S,0);let w=y1;const k=x1(x,Fa),P=x1(x,La);return p-=b,p+=f+y,v+=f+y,v-=b,p>u+E-k&&(w=Ma),v<u-I+d+P&&(w=Da),w!==y1?[Math.max(S-f-b1(g,Fa,w)-k,0),S-I-y+d+b1(g,La,w)+P]:null}),Me(u=>u!=null),xt(Aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function FL(e,t,n){if(Ll(t)){const r=f1(e,t);return[{index:Ln(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 pp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vl(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,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:S1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:S1(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function w1(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=dp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Vl(c,[],s,o,n,r)}function S1(e,t,n){if(e.length===0)return[];if(!Ll(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=pi(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}function T1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const vo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const g=he([]),h=he(0),y=Ke(),b=he(0);Ie(i.topItemsIndexes,g);const x=Qt(ue(Vt(p,v,De(l,Aa),De(o),De(r),De(c),u,De(g),De(t),De(n),De(b),e),Me(([w,k,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!k&&!F}),be(([,,[w,k],P,_,F,V,N,O,D,z,M])=>{var C,L,$,B;const q=_,{offsetTree:G,sizeTree:W}=q,J=Tt(h);if(P===0)return{...pp,totalCount:P};if(w===0&&k===0)return J===0?{...pp,totalCount:P}:w1(J,F,_,O,D,M||[]);if(ft(W))return J>0?null:Vl(FL(dp(F,P),q,M),[],P,D,q,O);const re=[];if(N.length>0){const se=N[0],ae=N[N.length-1];let Q=0;for(const le of pi(W,se,ae)){const te=le.value,fe=Math.max(le.start,se),pe=Math.min(le.end,ae);for(let ve=fe;ve<=pe;ve++)re.push({data:M?.[ve],index:ve,offset:Q,size:te}),Q+=te}}if(!V)return Vl([],re,P,D,q,O);const ee=N.length>0?N[N.length-1]+1:0,Y=TL(G,w,k,ee);if(Y.length===0)return null;const K=P-1,X=Dl([],se=>{for(const ae of Y){const Q=ae.value;let le=Q.offset,te=ae.start;const fe=Q.size;if(Q.offset<w){te+=Math.floor((w-Q.offset+D)/(fe+D));const ve=te-ae.start;le+=ve*fe+ve*D}te<ee&&(le+=(ee-te)*fe,te=ee);const pe=Math.min(ae.end,K);for(let ve=te;ve<=pe&&!(le>=k);ve++)se.push({data:M?.[ve],index:ve,offset:le,size:fe}),le+=fe+D}}),de=T1(z,Fa),H=T1(z,La);if(X.length>0&&(de>0||H>0)){const se=X[0],ae=X[X.length-1];if(de>0&&se.index>ee){const Q=Math.min(de,se.index-ee),le=[];let te=se.offset;for(let fe=se.index-1;fe>=se.index-Q;fe--){const pe=(L=(C=pi(W,fe,fe)[0])==null?void 0:C.value)!=null?L:se.size;te-=pe+D,le.unshift({data:M?.[fe],index:fe,offset:te,size:pe})}X.unshift(...le)}if(H>0&&ae.index<K){const Q=Math.min(H,K-ae.index);let le=ae.offset+ae.size+D;for(let te=ae.index+1;te<=ae.index+Q;te++){const fe=(B=($=pi(W,te,te)[0])==null?void 0:$.value)!=null?B:ae.size;X.push({data:M?.[te],index:te,offset:le,size:fe}),le+=fe+D}}}return Vl(X,re,P,D,q,O)}),Me(w=>w!==null),xt()),pp);Ie(ue(e,Me(Qf),be(w=>w?.length)),o),Ie(ue(x,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ue(x,be(w=>[w.top,w.bottom])),a),Ie(ue(x,be(w=>w.items)),y);const S=pn(ue(x,Me(({items:w})=>w.length>0),He(o,e),Me(([{items:w},k])=>w[w.length-1].originalIndex===k-1),be(([,w,k])=>[w-1,k]),xt(Aa),be(([w])=>w))),E=pn(ue(x,mr(200),Me(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),be(({items:w})=>w[0].index),xt())),I=pn(ue(x,Me(({items:w})=>w.length>0),be(({items:w})=>{let k=0,P=w.length-1;for(;w[k].type==="group"&&k<P;)k++;for(;w[P].type==="group"&&P>k;)P--;return{endIndex:w[P].index,startIndex:w[k].index}}),xt(u1)));return{endReached:S,initialItemCount:h,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:g,...f}},bt(er,m1,fp,_a,Oa,Na,Vr,sp),{singleton:!0}),E1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),a=Qt(ue(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(De(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,vo),{singleton:!0}),LL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Qt(ue(Vt(n,e,t),Me(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,E1),{singleton:!0}),k1=Qe(()=>({context:he(null)})),VL=({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,C1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ie(ue(u,He(t,l,n,i,o,r,s),He(e),be(([[d,f,p,v,g,h,y,b],x])=>{const{align:S,behavior:E,calculateViewLocation:I=VL,done:w,...k}=d,P=p1(d,f,v-1),_=Pa(P,f.offsetTree,x)+g+h,F=_+Ln(f.sizeTree,P)[1],V=b+h,N=b+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:S,behavior:E,...k},viewportBottom:N,viewportTop:V});return O?w&&Fn(ue(a,Me(D=>!D),mo(Tt(a)?1:2)),w):w?.(),O}),Me(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,Oa,vo,Lr),{singleton:!0});function I1(e){return e?e==="smooth"?"smooth":"auto":!1}const $L=(e,t)=>typeof e=="function"?I1(e(t)):t&&I1(e),zL=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:f},{scrollIntoView:p}])=>{const v=he(!1),g=Ke();let h=null;function y(E){ze(a,{align:"end",behavior:E,index:"LAST"})}st(ue(Vt(ue(De(t),mo(1)),l),He(De(v),i,s,d),be(([[E,I],w,k,P,_])=>{let F=I&&P,V="auto";return F&&(V=$L(w,k||_),F=F&&!!V),{followOutputBehavior:V,shouldFollow:F,totalCount:E}}),Me(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E)}):h=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E),h=null})});function b(E){const I=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ue(Vt(De(v),t,c),Me(([E,,I])=>E&&I),Qn(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),Me(({refreshed:E})=>E),He(v,t)),([,E])=>{Tt(s)&&b(E!==!1)}),st(g,()=>{b(Tt(v)!==!1)}),st(Vt(De(v),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=he(null),S=Ke();return Ie(ep(ue(De(r),be(E=>{var I;return(I=E?.length)!=null?I:0})),ue(De(t))),S),st(ue(Vt(ue(S,mo(1)),l),He(De(x),s,d,f),be(([[E,I],w,k,P,_])=>I&&k&&w?.({context:_,totalCount:E,scrollingInProgress:P})),Me(E=>!!E),mr(0)),E=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,E)}):h=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,E),h=null})}),{autoscrollToBottom:g,followOutput:v,scrollIntoViewOnChange:x}},bt(er,Na,Oa,_a,Vr,Lr,tn,k1,C1)),jL=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ue(s,He(i),Me(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>w1(l,c,u,d,f,p))),a),{}),bt(er,_a,vo,Vr),{singleton:!0}),RL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return st(ue(e,He(r),Me(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ue(n,mo(1),Me(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Vr,tn,vo),{singleton:!0}),A1=Qe(([{scrollVelocity:e}])=>{const t=he(!1),n=Ke(),r=he(!1);return Ie(ue(e,He(r,t,n),Me(([o,i])=>!!i),be(([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}),xt()),t),st(ue(Vt(t,e,n),He(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Na),{singleton:!0}),hp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=he(!1),a=he(void 0);return Ie(ue(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ue(t,He(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),BL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ke(),u=he(void 0),d=he(null),f=he(null);return Ie(s,d),Ie(l,f),st(ue(c,He(t,r,a,d,f,n)),([p,v,g,h,y,b,x])=>{const S=kL(v.sizeTree);h&&y!==null&&b!==null&&(g=y.scrollTop-b.offsetTop),g-=x,p({ranges:S,scrollTop:g})}),Ie(ue(u,Me(Qf),be(HL)),o),Ie(ue(i,He(u),Me(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,_a,Vr,hp));function HL(e){return{align:"start",index:0,offset:e.scrollTop}}const WL=Qe(([{topItemsIndexes:e}])=>{const t=he(0);return Ie(ue(t,Me(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(vo));function P1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const qL=P1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UL=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:f},{log:p},{recalcInProgress:v}])=>{const g=pn(ue(l,He(a),Qn(([,y,b,x],[{bottom:S,items:E,offsetBottom:I,totalCount:w},k])=>{const P=S+I;let _=0;return b===w&&y.length>0&&E.length>0&&(E[0].originalIndex===0&&y[0].originalIndex===0||(_=P-x,_!==0&&(_+=k))),[_,E,w,P]},[0,[],0,0]),Me(([y])=>y!==0),He(r,s,n,o,p,v),Me(([,y,b,x,,,S])=>!S&&!x&&y!==0&&b===Ma),be(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function h(y){y>0?(ze(t,{behavior:"auto",top:-y}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-y}))}return st(ue(g,He(e,i)),([y,b,x])=>{x&&qL()?ze(e,b-y):h(-y)}),st(ue(Vt(Qt(i,!1),e,v),Me(([y,b,x])=>!y&&!x&&b!==0),be(([y,b])=>b),mr(1)),h),Ie(ue(d,be(y=>({top:-y}))),t),st(ue(c,He(f,u),be(([y,{groupIndices:b,lastSize:x,sizeTree:S},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(y);{let w=0;const k=Ia(S,0);let P=0,_=0;for(;P<y;){P++,w+=k;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;P+F>y&&(w-=k,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{ze(e,y),requestAnimationFrame(()=>{ze(t,{top:y}),requestAnimationFrame(()=>{ze(e,0),ze(v,!1)})})}),{deviation:e}},bt(tn,Na,vo,er,Lr,sp)),GL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(fp,jL,Vr,A1,E1,RL,LL,hp,C1,Lr,k1)),O1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:g,scrolledToInitialItem:h},y,b,x,S,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:k},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:V,rangeChanged:N,...O}=S;return Ie(N,P.scrollSeekRangeChanged),Ie(ue(P.windowViewportRect,be(D=>D.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:g,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:V,totalCount:f,...x,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:N,...O,...P,...y,sizes:u,...b}},bt(er,_a,tn,BL,zL,vo,Oa,UL,WL,m1,GL));function YL(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 $l=typeof document<"u"?T.useLayoutEffect:T.useEffect;function mp(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=T.createContext({});function l(h,y){h.propsReady&&ze(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];ze(x,y[b])}for(const b of o)if(b in y){const x=h[t.optional[b]];ze(x,y[b])}h.propsReady&&ze(h.propsReady,!0)}function c(h){return i.reduce((y,b)=>(y[b]=x=>{const S=h[t.methods[b]];ze(S,x)},y),{})}function u(h){return a.reduce((y,b)=>(y[b]=dL(h[t.events[b]]),y),{})}const d=T.forwardRef((h,y)=>{const{children:b,...x}=h,[S]=T.useState(()=>Dl(pL(e),w=>{l(w,x)})),[E]=T.useState(Jw(u,S));$l(()=>{for(const w of a)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(Jf)}},[x,E,S]),$l(()=>{l(S,x)}),T.useImperativeHandle(y,Qw(c(S)));const I=n;return m.jsx(s.Provider,{value:S,children:n?m.jsx(I,{...YL([...r,...o,...a],x),children:b}):b})}),f=h=>{const y=T.useContext(s);return T.useCallback(b=>{ze(y[h],b)},[y,h])},p=h=>{const y=T.useContext(s)[h],b=T.useCallback(x=>st(y,x),[y]);return T.useSyncExternalStore(b,()=>Tt(y),()=>Tt(y))},v=h=>{const y=T.useContext(s)[h],[b,x]=T.useState(Jw(Tt,y));return $l(()=>st(y,S=>{S!==b&&x(Qw(S))}),[y,b]),b},g=T.version.startsWith("18")?p:v;return{Component:d,useEmitter:(h,y)=>{const b=T.useContext(s)[h];$l(()=>st(b,y),[y,b])},useEmitterValue:g,usePublisher:f}}const zl=T.createContext(void 0),_1=T.createContext(void 0),M1=typeof document<"u"?T.useLayoutEffect:T.useEffect;function gp(e){return"self"in e}function KL(e){return"body"in e}function D1(e,t,n,r=di,o,i){const a=T.useRef(null),s=T.useRef(null),l=T.useRef(null),c=T.useCallback(f=>{let p,v,g;const h=f.target;if(KL(h)||gp(h)){const b=gp(h)?h:h.defaultView;g=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,v=i?b.innerWidth:b.innerHeight}else g=i?h.scrollLeft:h.scrollTop,p=i?h.scrollWidth:h.scrollHeight,v=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(g,0),viewportHeight:v})};f.suppressFlushSync?y():Fi.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);T.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let g,h,y;gp(p)?(h=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),g=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(h=p[i?"scrollWidth":"scrollHeight"],g=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const b=h-g;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),v1(g,h)||f.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const vp="-webkit-sticky",N1="sticky",yp=P1(()=>{if(typeof document>"u")return N1;const e=document.createElement("div");return e.style.position=vp,e.style.position===vp?vp:N1});function bp(e){return e}const ZL=Qe(()=>{const e=he(s=>`Item ${s}`),t=he(s=>`Group ${s}`),n=he({}),r=he(bp),o=he("div"),i=he(di),a=(s,l=null)=>Qt(ue(n,be(c=>c[s]),xt()),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")}}),XL=Qe(([e,t])=>({...e,...t}),bt(O1,ZL)),QL=({height:e})=>m.jsx("div",{style:{height:e}}),JL={overflowAnchor:"none",position:yp(),zIndex:1},F1={overflowAnchor:"none"},eV={...F1,display:"inline-block",height:"100%"},L1=T.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=wn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=wn("gap"),g=Fe("horizontalDirection"),{callbackRef:h}=n1(n,f,d,e?di:s,p,v,o,g,Fe("skipAnimationFrameInResizeObserver")),[y,b]=T.useState(0);Sp("deviation",O=>{y!==O&&b(O)});const x=Fe("EmptyPlaceholder"),S=Fe("ScrollSeekPlaceholder")||QL,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),V=Fe("initialItemFinalLocationReached"),N=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...wt(x,c)}):m.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:N,children:(e?t.topItems:t.items).map(O=>{const D=O.originalIndex,z=k(D+t.firstItemIndex,O.data,c);return P?T.createElement(S,{...wt(S,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?T.createElement(w,{...wt(w,c),"data-index":D,"data-item-index":O.index,"data-known-size":O.size,key:z,style:JL},u(O.index,c)):T.createElement(I,{...wt(I,c),...V1(I,O.data),"data-index":D,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:g?eV:F1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),tV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},nV={outline:"none",overflowX:"auto",position:"relative"},hi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),rV={position:yp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function V1(e,t){return{item:typeof e=="string"?void 0:t}}const oV=T.memo(function(){const e=Fe("HeaderComponent"),t=wn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(T.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),iV=T.memo(function(){const e=Fe("FooterComponent"),t=wn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(T.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null});function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=D1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),m.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?nV:tV,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function wp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=T.useRef(null),v=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=D1(s,c,l,v,f);return M1(()=>{var b;return h.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",y),e("scrollBy",g),m.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const aV=({children:e})=>{const t=T.useContext(zl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=T.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:hi(o),children:e})},sV=({children:e})=>{const t=T.useContext(zl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Fe("customScrollParent"),i=np(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return T.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:hi(a),children:e})},lV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...rV,marginTop:`${n}px`},o=Fe("context");return m.jsx(t,{style:r,...wt(t,o),children:e})},cV=T.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return m.jsxs(r||t?fV:dV,{...e,context:o,children:[n&&m.jsx(lV,{children:m.jsx(L1,{showTopList:!0})}),m.jsxs(r||t?sV:aV,{children:[m.jsx(oV,{}),m.jsx(L1,{}),m.jsx(iV,{})]})]})}),{Component:uV,useEmitter:Sp,useEmitterValue:Fe,usePublisher:wn}=mp(XL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",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"}},cV),dV=xp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:wn}),fV=wp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:wn}),Tp=uV,pV=Qe(()=>{const e=he(c=>m.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),a=he(bp),s=he(di),l=(c,u=null)=>Qt(ue(i,be(d=>d[c]),xt()),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")}}),hV=Qe(([e,t])=>({...e,...t}),bt(O1,pV)),mV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),gV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),vV={overflowAnchor:"none"},$1={position:yp(),zIndex:2,overflowAnchor:"none"},z1=T.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),a=je("fixedHeaderHeight"),s=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||mV,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((g,h,y)=>(y===0?g.push(h.size):g.push(g[y-1]+h.size),g),[]),v=(e?t.topItems:t.items).map(g=>{const h=g.originalIndex,y=n(h+r,g.data,o),b=e?h===0?0:p[h-1]:0;return i?T.createElement(u,{...wt(u,o),height:g.size,index:g.index,key:y,type:g.type||"item"}):g.type==="group"?T.createElement(d,{...wt(d,o),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,key:y,style:{...$1,top:a}},c(g.index,o)):T.createElement(f,{...wt(f,o),...V1(f,g.data),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:y,style:e?{...$1,top:a+b}:vV},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:v})}),yV=T.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=n1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,v]=T.useState(0);Ep("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const g=je("EmptyPlaceholder"),h=je("FillerRow")||gV,y=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),S=je("context");if(x===0&&g)return m.jsx(g,{...wt(g,S)});const E=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+b+p-E,w=e.offsetBottom,k=I>0?m.jsx(h,{context:S,height:I},"padding-top"):null,P=w>0?m.jsx(h,{context:S,height:w},"padding-bottom"):null;return m.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,S),children:[k,t&&m.jsx(z1,{showTopList:!0}),m.jsx(z1,{}),P]})}),bV=({children:e})=>{const t=T.useContext(zl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(T.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:hi(!1),children:e})},xV=({children:e})=>{const t=T.useContext(zl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=np(n,o,je("skipAnimationFrameInResizeObserver"));return T.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:hi(!1),children:e})},wV=T.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Jn(T.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Jn(T.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?EV:TV,d=n||t?xV:bV,f=je("TableComponent"),p=je("TableHeadComponent"),v=je("TableFooterComponent"),g=i?m.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,h=a?m.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...wt(u,s),children:m.jsx(d,{children:m.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[g,m.jsx(yV,{},"TableBody"),h]})})})}),{Component:SV,useEmitter:Ep,useEmitterValue:je,usePublisher:$n}=mp(hV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",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"}},wV),TV=xp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),EV=wp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),kV=SV,j1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},CV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:R1,floor:jl,max:Va,min:kp,round:B1}=Math;function H1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function IV(e){return{...CV,items:e}}function Rl(e,t){return e&&e.width===t.width&&e.height===t.height}function AV(e,t){return e&&e.column===t.column&&e.row===t.row}const PV=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},f,p,{didMount:v,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:S},E])=>{const I=he(0),w=he(0),k=he(j1),P=he({height:0,width:0}),_=he({height:0,width:0}),F=Ke(),V=Ke(),N=he(0),O=he(null),D=he({column:0,row:0}),z=Ke(),M=Ke(),C=he(!1),L=he(0),$=he(!0),B=he(!1),q=he(!1);st(ue(v,He(L),Me(([Y,K])=>!!K)),()=>{ze($,!1)}),st(ue(Vt(v,$,_,P,L,B),Me(([Y,K,X,de,,H])=>Y&&!K&&X.height!==0&&de.height!==0&&!H)),([,,,,Y])=>{ze(B,!0),up(1,()=>{ze(F,Y)}),Fn(ue(c),()=>{ze(t,[0,0]),ze($,!0)})}),Ie(ue(M,Me(Y=>Y!=null&&Y.scrollTop>0),Xn(0)),w),st(ue(v,He(M),Me(([,Y])=>Y!=null)),([,Y])=>{Y&&(ze(P,Y.viewport),ze(_,Y.item),ze(D,Y.gap),Y.scrollTop>0&&(ze(C,!0),Fn(ue(c,mo(1)),K=>{ze(C,!1)}),ze(l,{top:Y.scrollTop})))}),Ie(ue(P,be(({height:Y})=>Y)),d),Ie(ue(Vt(De(P,Rl),De(_,Rl),De(D,(Y,K)=>Y&&Y.column===K.column&&Y.row===K.row),De(c)),be(([Y,K,X,de])=>({gap:X,item:K,scrollTop:de,viewport:Y}))),z),Ie(ue(Vt(De(I),r,De(D,AV),De(_,Rl),De(P,Rl),De(O),De(w),De(C),De($),De(L)),Me(([,,,,,,,Y])=>!Y),be(([Y,[K,X],de,H,se,ae,Q,,le,te])=>{const{column:fe,row:pe}=de,{height:ve,width:Ae}=H,{width:me}=se;if(Q===0&&(Y===0||me===0))return j1;if(Ae===0){const qe=dp(te,Y),pt=qe+Math.max(Q-1,0);return IV(H1(qe,pt,ae))}const oe=W1(me,Ae,fe);let j,R;le?K===0&&X===0&&Q>0?(j=0,R=Q-1):(j=oe*jl((K+pe)/(ve+pe)),R=oe*R1((X+pe)/(ve+pe))-1,R=kp(Y-1,Va(R,oe-1)),j=kp(R,Va(0,j))):(j=0,R=-1);const ne=H1(j,R,ae),{bottom:ce,top:xe}=q1(se,de,H,ne),Ce=R1(Y/oe),_e=Ce*ve+(Ce-1)*pe-ce;return{bottom:ce,itemHeight:ve,items:ne,itemWidth:Ae,offsetBottom:_e,offsetTop:xe,top:xe}})),k),Ie(ue(O,Me(Y=>Y!==null),be(Y=>Y.length)),I),Ie(ue(Vt(P,_,k,D),Me(([Y,K,{items:X}])=>X.length>0&&K.height!==0&&Y.height!==0),be(([Y,K,{items:X},de])=>{const{bottom:H,top:se}=q1(Y,de,K,X);return[se,H]}),xt(Aa)),t);const G=he(!1);Ie(ue(c,He(G),be(([Y,K])=>K||Y!==0)),G);const W=pn(ue(Vt(k,I),Me(([{items:Y}])=>Y.length>0),He(G),Me(([[Y,K],X])=>{const de=Y.items[Y.items.length-1].index===K-1;return(X||Y.bottom>0&&Y.itemHeight>0&&Y.offsetBottom===0&&Y.items.length===K)&&de}),be(([[,Y]])=>Y-1),xt())),J=pn(ue(De(k),Me(({items:Y})=>Y.length>0&&Y[0].index===0),Xn(0),xt())),re=pn(ue(De(k),He(C),Me(([{items:Y},K])=>Y.length>0&&!K),be(([{items:Y}])=>({endIndex:Y[Y.length-1].index,startIndex:Y[0].index})),xt(u1),mr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ue(F,He(P,_,I,D),be(([Y,K,X,de,H])=>{const se=g1(Y),{align:ae,behavior:Q,offset:le}=se;let te=se.index;te==="LAST"&&(te=de-1),te=Va(0,te,kp(de-1,te));let fe=Cp(K,H,X,te);return ae==="end"?fe=B1(fe-K.height+X.height):ae==="center"&&(fe=B1(fe-K.height/2+X.height/2)),le&&(fe+=le),{behavior:Q,top:fe}})),l);const ee=Qt(ue(k,be(Y=>Y.offsetBottom+Y.bottom)),0);return Ie(ue(S,be(Y=>({height:Y.visibleHeight,width:Y.visibleWidth}))),P),{customScrollParent:h,data:O,deviation:N,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:S,...p,gridState:k,horizontalDirection:q,initialTopMostItemIndex:L,totalListHeight:ee,...f,endReached:W,propsReady:g,rangeChanged:re,startReached:J,stateChanged:z,stateRestoreInProgress:C,...E}},bt(fp,tn,Na,A1,Vr,hp,Lr));function W1(e,t,n){return Va(1,jl((e+n)/(jl(t)+n)))}function q1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Cp(e,t,n,r[0].index);return{bottom:Cp(e,t,n,r[r.length-1].index)+o,top:i}}function Cp(e,t,n,r){const o=W1(e.width,n.width,t.column),i=jl(r/o),a=i*n.height+Va(0,i-1)*t.row;return a>0?a+t.row:a}const OV=Qe(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(bp),a=he("div"),s=he(di),l=(d,f=null)=>Qt(ue(t,be(p=>p[d]),xt()),f),c=he(!1),u=he(!1);return Ie(De(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")}}),_V=Qe(([e,t])=>({...e,...t}),bt(PV,OV)),MV=T.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=Sn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),g=Sn("reportReadyState"),h=Jn(T.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const x=y.firstChild;if(x){const{height:S,width:E}=x.getBoundingClientRect();d({height:S,width:E})}f({column:G1("column-gap",getComputedStyle(y).columnGap,p),row:G1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return M1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),v?null:m.jsx(l,{className:t,ref:h,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const b=o(y.index,y.data,u);return i?m.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):T.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),DV=T.memo(function(){const e=Et("HeaderComponent"),t=Sn("headerHeight"),n=Et("headerFooterTag"),r=Jn(T.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),NV=T.memo(function(){const e=Et("FooterComponent"),t=Sn("footerHeight"),n=Et("headerFooterTag"),r=Jn(T.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),FV=({children:e})=>{const t=T.useContext(_1),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=Jn(T.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return T.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:hi(!1),children:e})},LV=({children:e})=>{const t=T.useContext(_1),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=Et("customScrollParent"),i=np(n,o,!1);return T.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:hi(!1),children:e})},VV=T.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?zV:$V,o=n||t?LV:FV,i=Et("context");return m.jsx(r,{...e,...wt(r,i),children:m.jsxs(o,{children:[m.jsx(DV,{}),m.jsx(MV,{}),m.jsx(NV,{})]})})}),{useEmitter:U1,useEmitterValue:Et,usePublisher:Sn}=mp(_V,{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"}},VV),$V=xp({useEmitter:U1,useEmitterValue:Et,usePublisher:Sn}),zV=wp({useEmitter:U1,useEmitterValue:Et,usePublisher:Sn});function G1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Y1=e=>{const t=e.Icon??Og,n=Pt();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})]})},Ip=m.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),$a=e=>m.jsx(ln,{...e,as:e.as||"span",className:Pe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function jV(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 RV=e=>{const t=T.useId(),n=Pt(),r=T.useMemo(()=>jV(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 p-3 border-t-muted text-sm 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(T.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(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:m.jsx(T.Fragment,{children:typeof i=="string"?m.jsx("li",{children:"..."}):m.jsx("li",{children:m.jsx(ln,{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(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},BV=e=>{const t=T.useRef(null),n=T.useRef(null),[r,o]=T.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 T.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})})},HV=(e,t,n)=>{const r=n.cols,o=n.loading;return m.jsx(T.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=Ju(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return T.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(BV,{children:m.jsx(f,{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?Ip:c?m.jsx(T.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(T.Fragment,{children:Re.nil(l)?"":l})}))})})},mi=e=>{const t=T.useId(),[n,r]=T.useState(e.open);T.useEffect(()=>r(e.open),[e.open]);const o=T.useRef(null),i=T.useMemo(()=>[$o(10),Ds({fallbackAxisSideDirection:"end"}),Ms(),Bu({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:Jr,onOpenChange:(v,g)=>{const h=g?.relatedTarget;h&&h.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=jo(l),u=kr(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return m.jsxs(T.Fragment,{children:[m.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(no,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[m.jsx(Hu,{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-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Ap={},K1;function WV(){return K1||(K1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const b=y.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((y,b)=>({...y,[b]:o(b,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,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(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 y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=f.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=S,u()}},p=h=>{const y=new Set,b=x=>{h().removeItem(x);const S=i(h());y.forEach(E=>E(S))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const S=h().getItem(x);return!n(S)},deleteAll:()=>{t(h(),b),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,S)=>{h().setItem(x,JSON.stringify(S)),y.forEach(E=>E(h()))}}},v=p(()=>window.sessionStorage),g=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=g,e.SessionStorage=v,e.createStorage=p})(Ap)),Ap}var za=WV();const Pp=e=>e.headerLabel??e.thead??e.id,Op=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var gi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(gi||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,qV=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},UV={},GV=(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})},YV=(e,t,n=UV)=>{const r=Cr()?null:za.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Yf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:GV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Cr()||za.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},KV=e=>{const t=Pr(e),n=T.useRef(null),r=T.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]},ZV=()=>Cr()?void 0:document.querySelector('[data-component="modal-body"]'),XV=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),QV=(e,t)=>e.toSorted(XV(t)),Z1=(e,t,n)=>({label:t,id:Bo(),type:n,value:e.id}),JV=e=>{const t=Pt(),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,Z1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return m.jsx(T.Fragment,{children:m.jsx(mi,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(Cg,{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(oo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(oo,{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(ss,{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(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},e$=e=>{const t=Pt(),[n,r]=T.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");T.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=Z1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Pp(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(GC,{size:14}):null,n==="desc"?m.jsx(UC,{size:14}):null,n==="undefined"?m.jsx(Cg,{size:14}):null]})},X1=T.createContext({}),t$=X1.Provider,n$=()=>T.useContext(X1),Mp=(e,t,n,r={})=>{const o=e.id,i=e.type??gi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Bo(),operation:l,label:Pp(e),name:o,type:i,value:"",...r}},Dp=()=>{const e=Pt(),t=T.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:T.useMemo(()=>({[gi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[gi.Boolean]:[t.is,t.isNot],[gi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},r$=e=>{const t=Pt(),n=Dp(),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(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return Mp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},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=_p(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return m.jsx(T.Fragment,{children:m.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(rI,{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(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(oo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(Wo,{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(ss,{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(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},o$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Dp(),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=_p(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(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(Wo,{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(ss,{className:"text-danger",size:14})})]})},i$={top:0,left:0,right:0,bottom:-1},a$=e=>{const t=Tu(),n=Pt(),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=Dp(),l=o?iI:aI,c=T.useRef(null),u=g=>{const h=g.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==h))},d=T.useCallback(g=>{if(g===null)return;c.current=g;const h=new AbortController;return g.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(g=>e.header.id===g.value),p=f?.type?f.type===Kw.Asc?"ascending":"descending":"none",v=Pp(e.header);return m.jsxs(Cw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,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(mi,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),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:v})]}),children:m.jsxs("ul",{className:"font-medium",children:[r.length===0?null:m.jsx(T.Fragment,{children:r.map(g=>m.jsx("li",{className:"my-1",children:m.jsx(o$,{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(xu,{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(e$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(Be.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:i$,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=>{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,b=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+b)}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 y=c.current.getBoundingClientRect().width,b=h.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},s$=e=>{const[t,n]=KV(e.setCols);return m.jsx(Tw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(fn,{children:e.headers.map((r,o)=>m.jsx(a$,{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}`))})})},l$=T.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(fn,{children:n.children})})),c$=T.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??""}`})),u$=T.forwardRef(({context:e,...t},n)=>{const r=n$(),o={...t?.style,top:Re.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"})}),d$=T.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??""}`})}),f$=T.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),p$={TableRow:d$,TableFoot:f$,TableHead:u$,Table:c$,TableBody:l$},h$=[0,0,0,0,0,0,0,0,0,0],m$=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Ip:m.jsx(Y1,{})}),g$=()=>m.jsx(T.Fragment,{}),v$=[],Q1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=T.useRef(null),[,f]=T.useState(!1),p=Pr(a),v=Pr(u.loadingMore),g=T.useMemo(()=>{if(u.loading)return h$;if(c)return u.rows;const b=new Zw(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():QV(b.Select(),r)},[u.loading,u.rows,c,t,r]);T.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(S=>S[S.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[v,p]);const h=g.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return m.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[m.jsx(kV,{components:p$,context:y,totalCount:g.length,itemContent:h?g$:HV,data:h?v$:g,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(s$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),h?m.jsx(m$,{loading:u.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?m.jsx(RV,{...l}):null]})},y$=({item:e,onPointerDown:t})=>{const n=ho(0);return m.jsxs(Cw,{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(nI,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},b$=e=>{const t=Pt(),n=Op(e.cols),r=vF(),[o,i]=T.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Zw(e.rows).GroupBy(u),v=e.cols.find(g=>g.id===u);e.setGroups(Pk(p).map((g,h)=>{const y=p[g];return{...v,groupId:Bo(),groupKey:u,index:h,rows:y,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(T.Fragment,{children:m.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(lI,{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(oo,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(ro,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(ss,{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(WN,{children:m.jsx(Tw,{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(y$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},x$=e=>m.jsx("header",{className:"mb-1 min-w-full",children:m.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[m.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[m.jsx("span",{children:m.jsx(r$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(JV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(b$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[m.jsxs("span",{children:[m.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","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 p-0 whitespace-pre",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=_p(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),w$=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),S$=e=>{const t=Tu(),n=T.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=T.useMemo(()=>Op(e.cols),[e.cols]),[i,a]=Yf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:w$(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 T.useEffect(()=>{a.cols(e.cols)},[e.cols]),m.jsx(t$,{value:n,children:m.jsxs(fn,{initial:!1,children:[r?m.jsx(x$,{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(Q1,{...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(Q1,{...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}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>m.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Pe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-3",i),children:[e?m.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",a),children:e}):o,m.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",s.className),children:t?m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx($a,{className:"w-full"}),m.jsx($a,{className:"w-8/12"}),m.jsx($a,{className:"w-10/12"}),m.jsx($a,{className:"w-1/2"})]}):n})]});Hl.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:Re.string(o.title)?o.title:void 0,className:Pe("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 T$=e=>{const t=e.interactive??!0,n=e.Icon??bu;return m.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center 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:Pe("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($a,{className:"h-10"}):m.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},E$=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(dr,{children:m.jsx(Mf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(fn,{presenceAffectsLayout:!0,children:[e?m.jsx(Be.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(Ku,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(Be.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(Mo,{})})}),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]})})}),k$=e=>{const[t,n]=T.useState(null),r=T.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=jo(o),s=fr(o,{role:"dialog"}),l=kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=T.useCallback(()=>{n(null)},[]),d=T.Children.toArray(e.children);return m.jsxs(T.Fragment,{children:[m.jsx(E$,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,g=`${r}-${p}`,h=()=>n({...v,id:g}),y=v.leading;return m.jsx(Be.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(Be.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(T.Fragment,{children:[v.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:v.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:v.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?m.jsx(y,{open:h}):null]})})]})})})},g)})})]})},C$=e=>m.jsx(T.Fragment,{children:e.children}),J1=()=>{const e=T.useContext(Kr);return e?e.parser:ls.hsla},Np=.3,Wl={duration:Np,type:"tween",ease:"easeInOut"},eS=T.createContext(null),Fp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},vi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},I$=e=>m.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"M18 6 6 18"}),m.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"m6 6 12 12"})]}),A$=e=>m.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:m.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:vi.animate,initial:vi.initial,transition:Fp})}),P$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},O$={duration:.6,delay:.2,type:"tween",ease:"circOut"},_$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",M$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,tS=()=>T.useContext(eS),D$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=J1(),s=tS(),[l,c]=T.useState(t);T.useEffect(()=>{if(!s){c(t);return}const d=M$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=_$(e,l,n);return s?.steps&&100/s?.steps,m.jsxs(T.Fragment,{children:[m.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),m.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[m.jsx(Be.div,{variants:P$,transition:O$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),m.jsx(Be.div,{initial:!1,animate:u,transition:Wl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:Wl,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:Wl,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:Wl,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:m.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?m.jsx(A$,{className:"size-6 text-primary-foreground"}):u==="error"?m.jsx(I$,{className:"size-6 text-danger-foreground"}):m.jsx(T.Fragment,{children:m.jsx("span",{children:e})})})}),m.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:m.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},N$=e=>{const t=T.useRef(e.currentStep),[n,r]=T.useState(e.currentStep);T.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Np*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Np,steps:T.Children.count(e.children)};return m.jsx(eS.Provider,{value:o,children:m.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},nS=(e,t)=>{const[n,r]=T.useState(()=>t||e);return T.useEffect(()=>{r(e)},[e]),[n,r]},rS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},oS=T.createContext(""),F$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Lp=(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(!F$(a))return a}return n==="backward"?Lp(e,e.length-1,"backward"):Lp(e,-1,"forward")},iS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Lp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},aS={[rS.ArrowLeft]:(e,t)=>iS(t,"backward"),[rS.ArrowRight]:(e,t)=>iS(t,"forward")},L$=e=>{const[t,n]=nS(e.active),r=T.useRef(null),o=Pr(e.onChange);T.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]),T.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=T.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(Re.keyof(aS,c)){const u=aS[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(oS.Provider,{value:t,children:m.jsx(Hl,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[m.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",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:Pe("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(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},V$=()=>T.useContext(oS),$$=e=>{const t=V$();return m.jsx(T.Fragment,{children:e.id===t?e.children:null})},sS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},z$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},lS=e=>m.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sS,exit:sS.false,transition:z$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),j$=Io("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"}}),R$=T.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx(fn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?m.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx(lS,{"data-open":!!i,open:!!i,children:m.jsx(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Pe(j$({theme:n}),t),children:m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",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(Mo,{size:20})}):null,m.jsxs("div",{className:Pe("flex gap-2 items-center",a.title?"":"w-fit"),children:[!r&&n==="success"?m.jsx(Ig,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(bu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(sI,{"aria-hidden":"true",size:20}):null,r]}),a.title?m.jsx("h4",{className:"col-start-2 text-lg font-semibold tracking-3 text-balance",children:a.title}):null,m.jsx("div",{className:"col-start-2 w-full",children:a.children})]})})})}):null})}),B$=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:Pe("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]}),H$=Symbol.for("react.lazy");function cS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function W$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=cS(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():cS(e[o],null)}}}}const ql=A[" use ".trim().toString()];function q$(e){return typeof e=="object"&&e!==null&&"then"in e}function uS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===H$&&"_payload"in e&&q$(e._payload)}function U$(e){const t=G$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;uS(i)&&typeof ql=="function"&&(i=ql(i._payload));const s=A.Children.toArray(i),l=s.find(K$);if(l){const c=l.props.children,u=s.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return m.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const dS=U$("Slot");function G$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(uS(o)&&typeof ql=="function"&&(o=ql(o._payload)),A.isValidElement(o)){const a=X$(o),s=Z$(i,o.props);return o.type!==A.Fragment&&(s.ref=r?W$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const Y$=Symbol("radix.slottable");function K$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Y$}function Z$(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 X$(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)}const fS=(e="")=>Pe("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),Vp=T.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),pS=T.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]=T.useState(r??!1),[f,p]=T.useState(!1),[v,g]=T.useState(null),h=T.useRef([]),y=T.useRef([]),b=T.useContext(Vp),x=Sr(),S=Tr(),E=tP(),I=Tv(),w=x!==null,{floatingStyles:k,refs:P,context:_}=Gn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Jr,placement:w?"right":"bottom-start",middleware:[$o({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ds(),Ms()]}),F=fr(_,{role:"menu"}),V=kr(_,{bubbles:!0}),N=Dv(_,{move:!1,enabled:n,delay:{open:ry},handleClose:ny({blockPointerEvents:!0,requireIntent:!1})}),O=jo(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=Hs(_,{loop:!0,activeIndex:v,nested:w,listRef:h,onNavigate:g}),z=CP(_,{activeIndex:v,listRef:y,resetMs:AP,onMatch:u?g:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:L}=Yn([N,O,F,V,D,z]);T.useEffect(()=>{if(!S)return;const B=()=>d(!1),q=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return S.events.on("click",B),S.events.on("menuopen",q),()=>{S.events.off("click",B),S.events.off("menuopen",q)}},[S,E,x]),T.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:x,nodeId:E})},[S,u,E,x]);const $=o?l.className:Pe(fS(l.className));return m.jsxs(nP,{id:E,children:[m.jsx(T.Fragment,{children:l.asChild?m.jsx(dS,{...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:s,className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[s,w&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(vu,{size:14})]})]})}),m.jsx(Vp.Provider,{value:{activeIndex:v,setActiveIndex:g,getItemProps:L,setHasFocusInside:p,isOpen:u},children:m.jsx(KA,{elementsRef:h,labelsRef:y,children:u&&m.jsx(dr,{children:m.jsx(no,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:m.jsx(t,{...C(),ref:P.setFloating,style:{...l.style,...k},className:Pe("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})})})})})]})}),Q$=T.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=T.useContext(Vp),s=Tv({label:n?null:e}),l=Tr(),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:sr(s.ref,i),className:fS(`${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]})}),J$=T.forwardRef((e,t)=>Sr()===null?m.jsx(rP,{children:m.jsx(pS,{...e,isParent:!0,ref:t})}):m.jsx(pS,{...e,isParent:!1,ref:t})),$p=T.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:Pe("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:Pe("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:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),ez=({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:Pe("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]}),tz=cy("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
15
|
-
`);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)}),nz=(e,t)=>Cr()?t:window.matchMedia(e).matches,rz=(e,t=!0)=>{const[n,r]=T.useState(t);return T.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(nz(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},oz=()=>T.useContext(Kr).floatingRef??void 0,Tn="500ms",iz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Tn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Tn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Tn}},az={enter:{x:"0%",opacity:1,animationDuration:Tn},exit:{x:["0%","30%"],opacity:0,animationDuration:Tn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Tn}},zp={drawer:e=>e==="left"?iz:az,sheet:{enter:{opacity:1,y:"0%",animationDuration:Tn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Tn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Tn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Tn},enter:{opacity:1,scale:[1.05,1],animationDuration:Tn},initial:{opacity:.5,scale:.95,animationDuration:Tn,transition:{duration:.5,ease:"easeInOut"}}}},sz=Io("z-floating border border-floating-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"}}),hS={top:0,left:0,right:0,bottom:0},mS=e=>e*.6,lz=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),f=window.outerHeight,p=mS(f);return d>=p?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(Be.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:hS,whileDrag:{cursor:"grabbing"},className:Pe("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})},Ul={drawer:"right",sheet:"none",dialog:"none"},cz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ul.drawer:Ul[o]:t?Ul[o]:Ul.sheet},uz=[],jp=T.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:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:S=uz,...E},I)=>{const w=oz(),k=T.useRef(null),P=T.useRef(null),_=T.useId(),F=T.useId(),V=rz("(min-width: 64rem)"),N=cz(V,p,h,y),O=V||p?zp[h]:zp.sheet,D=typeof O=="function"?O(N):O,z=V||p?h:"sheet",M=z!=="dialog",C=Gn({open:e,onOpenChange:a,strategy:"fixed"}),L=jo(C.context,{}),$=fr(C.context,{role:"dialog"}),B=kr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:ae=>{const Q=ae.target;return b&&!!Q?.isConnected}}),q=Yn([L,B,$].concat(S)),G=o,W=ho(void 0),J=ho(void 0),re=T.useRef(!1),ee=T.useRef(0);T.useEffect(()=>{W.set(void 0),J.set(void 0)},[z,W,J]);const Y=()=>a(!1);T.useImperativeHandle(I,()=>({context:C.context,floating:P.current}),[C.context,P]);const X=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:hS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ae,Q)=>{const te=C.refs.floating.current.getBoundingClientRect(),fe=W.get()||te.height,pe=Math.abs(fe-Q.delta.y),ve=window.outerHeight,Ae=mS(ve);return pe>=Ae?W.set(pe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>W.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},de=ho(void 0),H=ho(void 0),se=r?dS:Be.button;return m.jsxs(T.Fragment,{children:[o?m.jsx(se,{ref:C.refs.setReference,...q.getReferenceProps(),layoutId:v,type:"button",children:G}):null,m.jsx(Mf,{reducedMotion:d?"user":"always",children:m.jsx(dr,{preserveTabOrder:!0,root:w,children:m.jsx(fn,{mode:"wait",propagate:!0,children:e?m.jsx(Ku,{lockScroll:!0,className:Pe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",g),children:m.jsx(no,{guards:!0,modal:!0,closeOnFocusOut:x,context:C.context,children:m.jsx(fn,{propagate:!0,children:m.jsxs(Be.div,{...E,...t?{"aria-labelledby":_,"aria-describedby":F}:{"aria-label":s},...q.getFloatingProps({"aria-modal":e,ref:sr(C.refs.setFloating,P),className:Pe(sz({position:N,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:D,"data-component":"modal",style:z==="drawer"?{width:W}:{height:W,y:J},children:[M&&u?m.jsx(lz,{onChange:a,value:W,sheet:z==="sheet",position:N,parent:C.refs.floating}):null,t?m.jsx(Be.header,{...X,className:"relative w-full isolate",children:t?m.jsx("h2",{id:_,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(Be.section,{ref:k,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(H.set(void 0),de.set(void 0),re.current){const ae=J.get()||0,Q=window.innerHeight*.2;ae>Q?(await ww(J,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):ww(J,0,{type:"spring",bounce:0,duration:.3}),re.current=!1}},onTouchStart:ae=>{const Q=ae.changedTouches[0];de.set(Q.pageY),H.set(Q.pageY),re.current=!1},onTouchMove:ae=>{const le=ae.changedTouches[0].pageY,te=H.get()||le,fe=k.current?.scrollTop||0;if(!re.current&&fe<=0&&le>te&&z==="sheet"&&(re.current=!0,ee.current=le),re.current){const pe=le-ee.current;pe<0?J.set(pe*.2):J.set(pe)}H.set(le)},children:i}),n?m.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?m.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:m.jsx("button",{type:"button",onClick:Y,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:m.jsx(Mo,{})})}):null]})})})}):null})})})]})}),dz=e=>{const[t,n]=hF();return T.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:xD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},fz=e=>m.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),pz=e=>m.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),hz=e=>m.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:m.jsxs(T.Fragment,{children:[m.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),m.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"text-base w-fit":"w-full text-lg"),children:e.children})]})}),gS=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})]}),mz=e=>m.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[m.jsx("div",{children:m.jsx(gS,{title:e.title,children:e.description})}),m.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),vS=e=>m.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),gz=()=>m.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:m.jsx(vS,{})}),vz=e=>{const t=T.useRef(null),n=T.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=T.useState(e.open??!1);T.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=jo(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=kr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(ro,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(Be.span,{layoutId:o,children:e.trigger})}),m.jsx(fn,{children:i?m.jsx(dr,{root:t,children:m.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},yz=(e,t)=>{const n=T.useRef(t);n.current=t,T.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},bz=()=>{const[e,t]=T.useState({width:0,height:0});return T.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},xz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),wz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,Sz=({steps:e,active:t=!1,onClose:n=Ho,onFinish:r=Ho,onChange:o=Ho,labels:i})=>{const a=Pt(),[s,l]=T.useState(0),c=e[s],[u,d]=T.useState(null),[f,p]=T.useState(xz()),[v,g]=T.useState(!1),h=T.useRef(null),{width:y,height:b}=bz(),x={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:S,floatingStyles:E,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:Jr,middleware:[$o(10),Ds(),Ms(),Bu({element:h})]}),{getFloatingProps:w}=Yn([fr(I)]);T.useEffect(()=>{t&&l(0)},[t]),T.useEffect(()=>{g(!1)},[s,t]),T.useEffect(()=>{if(!t||!c)return;const V=wz(c.element);V?(c.onEnter?.(),setTimeout(()=>{p(V.getBoundingClientRect()),S.setReference(V),d(V)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,S]),T.useLayoutEffect(()=>{if(!u)return;const V=()=>p(u.getBoundingClientRect());return V(),window.addEventListener("scroll",V,{capture:!0,passive:!0}),window.addEventListener("resize",V,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",V,{capture:!0}),window.removeEventListener("resize",V,{capture:!0})}},[u,y,b]),yz(u,V=>{p(V.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l(V=>V+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l(V=>V-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return m.jsx(dr,{children:m.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[m.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("defs",{children:m.jsxs("mask",{id:"driver-mask",children:[m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),m.jsx(Be.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>g(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),m.jsx(fn,{mode:"wait",children:c&&v&&m.jsx("div",{...w(),ref:S.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:m.jsxs(Be.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-floating-background border-floating-border",children:[u&&m.jsx(Hu,{ref:h,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&m.jsx("h3",{children:c.title}),c.description&&m.jsx(T.Fragment,{children:c.description}),m.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[m.jsx(ro,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),m.jsxs("div",{className:"flex gap-2",children:[F&&m.jsx(ro,{size:"small",theme:"ghost-muted",onClick:P,children:x.previous}),m.jsx(ro,{size:"small",onClick:k,children:_?x.next:x.finish})]})]}),m.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},yS=6048e5,Tz=864e5,Ez=6e4,kz=36e5,Cz=1e3,bS=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&bS in e?e[bS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Gl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function xS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(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 yi(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=Je(e,n?.in),d=o||r?xS(u,o+r*12):u,f=a||i?Gl(d,a+i*7):d,p=l+s*60,g=(c+p*60)*1e3;return ut(e,+f+g)}let Iz={};function yo(){return Iz}function tr(e,t){const n=yo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(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 bi(e,t){return tr(e,{...t,weekStartsOn:1})}function wS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=bi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=bi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Yl(e){const t=Je(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 Kl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function bo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function Az(e,t,n){const[r,o]=Kl(n?.in,e,t),i=bo(r),a=bo(o),s=+i-Yl(i),l=+a-Yl(a);return Math.round((s-l)/Tz)}function Pz(e,t){const n=wS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bi(r)}function Oz(e){return ut(e,Date.now())}function _z(e,t,n){const[r,o]=Kl(n?.in,e,t);return+bo(r)==+bo(o)}function Mz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zl(e){return!(!Mz(e)&&typeof e!="number"||isNaN(+Je(e)))}function Dz(e,t){const[n,r]=Kl(e,t.start,t.end);return{start:n,end:r}}function SS(e,t){const{start:n,end:r}=Dz(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(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function TS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Nz(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Fz(e,t){const n=yo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(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 Lz={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"}},Vz=(e,t,n)=>{let r;const o=Lz[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 Rp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $z={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rz={date:Rp({formats:$z,defaultWidth:"full"}),time:Rp({formats:zz,defaultWidth:"full"}),dateTime:Rp({formats:jz,defaultWidth:"full"})},Bz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hz=(e,t,n,r)=>Bz[e];function ja(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 Wz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uz={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"]},Gz={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"]},Yz={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"}},Kz={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"}},Zz={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:ja({values:Wz,defaultWidth:"wide"}),quarter:ja({values:qz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ja({values:Uz,defaultWidth:"wide"}),day:ja({values:Gz,defaultWidth:"wide"}),dayPeriod:ja({values:Yz,defaultWidth:"wide",formattingValues:Kz,defaultFormattingWidth:"wide"})};function Ra(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)?Qz(s,d=>d.test(a)):Xz(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 Xz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Qz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Jz(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 ej=/^(\d+)(th|st|nd|rd)?/i,tj=/\d+/i,nj={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},rj={any:[/^b/i,/^(a|c)/i]},oj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ij={any:[/1/i,/2/i,/3/i,/4/i]},aj={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},sj={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]},lj={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},cj={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]},uj={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},dj={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}},fj={ordinalNumber:Jz({matchPattern:ej,parsePattern:tj,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:nj,defaultMatchWidth:"wide",parsePatterns:rj,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:oj,defaultMatchWidth:"wide",parsePatterns:ij,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:aj,defaultMatchWidth:"wide",parsePatterns:sj,defaultParseWidth:"any"}),day:Ra({matchPatterns:lj,defaultMatchWidth:"wide",parsePatterns:cj,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:uj,defaultMatchWidth:"any",parsePatterns:dj,defaultParseWidth:"any"})},ES={code:"en-US",formatDistance:Vz,formatLong:Rz,formatRelative:Hz,localize:Zz,match:fj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pj(e,t){const n=Je(e,t?.in);return Az(n,Nz(n))+1}function kS(e,t){const n=Je(e,t?.in),r=+bi(n)-+Pz(n);return Math.round(r/yS)+1}function Bp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=yo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function hj(e,t){const n=yo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Bp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function CS(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+hj(n,t);return Math.round(r/yS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $r={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(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];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},xi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},IS={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"});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 $r.y(e,t)},Y:function(e,t,n,r){const o=Bp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=wS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(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 dt(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"});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 dt(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"});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 $r.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"});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 dt(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=CS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=kS(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){const r=pj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(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"});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 dt(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"});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 dt(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"});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 dt(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"});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"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=xi.noon:r===0?o=xi.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"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=xi.evening:r>=12?o=xi.afternoon:r>=4?o=xi.morning:o=xi.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"});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 $r.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return PS(r);case"XXXX":case"XX":return xo(r);default:return xo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return PS(r);case"xxxx":case"xx":return xo(r);default:return xo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+AS(r,":");default:return"GMT"+xo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+AS(r,":");default:return"GMT"+xo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function AS(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+dt(i,2)}function PS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):xo(e,t)}function xo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const OS=(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"});default:return t.date({width:"full"})}},_S=(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"});default:return t.time({width:"full"})}},Hp={p:_S,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return OS(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;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",OS(r,t)).replace("{{time}}",_S(o,t))}},mj=/^D+$/,gj=/^Y+$/,vj=["D","DD","YY","YYYY"];function MS(e){return mj.test(e)}function DS(e){return gj.test(e)}function Wp(e,t,n){const r=yj(e,t,n);if(console.warn(r),vj.includes(e))throw new RangeError(r)}function yj(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 bj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wj=/^'([^]*?)'?$/,Sj=/''/g,Tj=/[a-zA-Z]/;function qp(e,t,n){const r=yo(),o=r.locale??ES,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Zl(s))throw new RangeError("Invalid time value");let l=t.match(xj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Hp[d];return f(u,o.formatLong)}return u}).join("").match(bj).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Ej(u)};if(IS[d])return{isToken:!0,value:u};if(d.match(Tj))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;(DS(d)||MS(d))&&Wp(d,t,String(e));const f=IS[d[0]];return f(s,d,o.localize,c)}).join("")}function Ej(e){const t=e.match(wj);return t?t[1].replace(Sj,"'"):e}function kj(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Cj(){return Object.assign({},yo())}function Ij(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function Aj(e,t){return+Je(e)>+Je(t)}function Pj(e,t){return+Je(e)<+Je(t)}function Oj(e,t){const n=_j(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function _j(e){return typeof e=="function"&&e.prototype?.constructor===e}const Mj=10;class NS{subPriority=0;validate(t,n){return!0}}class Dj extends NS{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 Nj extends NS{priority=Mj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Oj(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Dj(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Fj extends rt{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"});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 Dt={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}/},nr={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 Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(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*kz+i*Ez+a*Cz),rest:t.slice(n[0].length)}}function FS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Xl(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Up(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function LS(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 VS(e){return e%400===0||e%4===0&&e%100!==0}class Lj extends rt{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 Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(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=LS(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 Vj extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Bp(t,o);if(r.isTwoDigitYear){const s=LS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(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),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class $j extends rt{priority=130;parse(t,n){return Xl(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),bi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class zj extends rt{priority=130;parse(t,n){return Xl(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 jj extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(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"});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 Rj extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(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"});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 Bj extends rt{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 Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(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"});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 Hj extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(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"});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 Wj(e,t,n){const r=Je(e,n?.in),o=CS(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class qj extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Wj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Uj(e,t,n){const r=Je(e,n?.in),o=kS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Gj extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return bi(Uj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Yj=[31,28,31,30,31,30,31,31,30,31,30,31],Kj=[31,29,31,30,31,30,31,31,30,31,30,31];class Zj extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=VS(r),i=t.getMonth();return o?n>=1&&n<=Kj[i]:n>=1&&n<=Yj[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 Xj extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return VS(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 Gp(e,t,n){const r=yo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(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 Gl(i,u,n)}class Qj extends rt{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"});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=Gp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Jj extends rt{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 Nt(_t(n.length,t),i);case"eo":return Nt(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"});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=Gp(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 eR extends rt{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 Nt(_t(n.length,t),i);case"co":return Nt(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"});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=Gp(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 tR(e,t,n){const r=Je(e,n?.in),o=Ij(r,n),i=t-o;return Gl(r,i,n)}class nR extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(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 Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(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=tR(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 rR extends rt{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"});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(Up(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class oR extends rt{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"});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(Up(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class iR extends rt{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"});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(Up(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class aR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 sR extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 lR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 cR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 uR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(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 dR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(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 fR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class pR extends rt{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","x"]}class hR extends rt{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","X"]}class mR extends rt{priority=40;parse(t){return FS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class gR extends rt{priority=20;parse(t){return FS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const vR={G:new Fj,y:new Lj,Y:new Vj,R:new $j,u:new zj,Q:new jj,q:new Rj,M:new Bj,L:new Hj,w:new qj,I:new Gj,d:new Zj,D:new Xj,E:new Qj,e:new Jj,c:new eR,i:new nR,a:new rR,b:new oR,B:new iR,h:new aR,H:new sR,K:new lR,k:new cR,m:new uR,s:new dR,S:new fR,X:new pR,x:new hR,t:new mR,T:new gR},yR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xR=/^'([^]*?)'?$/,wR=/''/g,SR=/\S/,TR=/[a-zA-Z]/;function ER(e,t,n,r){const o=()=>ut(n,NaN),i=Cj(),a=i.locale??ES,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new Nj(r?.in,n)],d=t.match(bR).map(h=>{const y=h[0];if(y in Hp){const b=Hp[y];return b(h,a.formatLong)}return h}).join("").match(yR),f=[];for(let h of d){DS(h)&&Wp(h,t,e),MS(h)&&Wp(h,t,e);const y=h[0],b=vR[y];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${h}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);f.push({token:y,fullToken:h});const S=b.run(e,h,a.match,c);if(!S)return o();u.push(S.setter),e=S.rest}else{if(y.match(TR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(h==="''"?h="'":y==="'"&&(h=kR(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&SR.test(e))return o();const p=u.map(h=>h.priority).sort((h,y)=>y-h).filter((h,y,b)=>b.indexOf(h)===y).map(h=>u.filter(y=>y.priority===h).sort((y,b)=>b.subPriority-y.subPriority)).map(h=>h[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const g={};for(const h of p){if(!h.validate(v,c))return o();const y=h.set(v,g,c);Array.isArray(y)?(v=y[0],Object.assign(g,y[1])):v=y}return v}function kR(e){return e.match(xR)[1].replace(wR,"'")}function CR(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function IR(e,t){return _z(ut(e,e),Oz(e))}function AR(e,t,n){return Gl(e,-t,n)}function PR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=kj(a);return r.setMonth(t,Math.min(i,s)),r}function OR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=PR(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 _R(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function MR(e,t,n){return xS(e,-t,n)}function Ba(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=MR(e,o+r*12,n),d=AR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const DR=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function NR(e,t){return T.useRef(DR(e,t)).current}function $S(e,t){const n=T.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 FR=/^(?<hour>\d\d):(?<min>\d\d)$/,LR={type:"spring",bounce:.3,duration:.6},zS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),jS={enter:zS(1),exit:zS(-1),middle:{x:"0%",opacity:1}},RS={exit:{visibility:"hidden"}},VR=e=>{const t=tr(TS(e));return SS({start:t,end:yi(t,{days:41})})},BS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),$R=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=TS(new Date(1970,o,1).setMonth(o)),a=BS(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yp={ArrowLeft:(e,t)=>t==="days"?Ba(e,{days:1}):Ba(e,{months:1}),ArrowRight:(e,t)=>t==="days"?yi(e,{days:1}):yi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ba(e,{weeks:1}):Ba(e,{years:1}),ArrowDown:(e,t)=>t==="days"?yi(e,{weeks:1}):yi(e,{years:1})},HS=(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)},wo=e=>e.getFullYear().toString().padStart(4,"0"),zR=(e,t,n)=>e===void 0||n===void 0?!1:Aj(t,e)&&Pj(t,n),jR=e=>{const t=Pt();return m.jsx(Be.tbody,{layout:!0,variants:jS,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.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?bo(e.date).toISOString():void 0),l=IR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=CR(i,e.stateDate),d=!u||c,f=e.rangeMode?zR(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:Pe("relative",Re.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:Pe(`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":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Re.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}`)})})},RR=()=>bo(new Date),WS=({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:f="date",datetimeTitle:p,...v})=>{const g=T.useRef(Bo()),h=Pt(),y=sl(o),b=T.useRef(null),{date:x,range:S}=v,E=x||new Date,I=T.useRef(null),[w,k]=Yf({date:E,isAnimating:!1,year:wo(E),direction:void 0,range:{from:S?.from,to:S?.to},months:$R(g.current,E,y),selectMode:l?"from":void 0,week:SS({start:tr(E),end:Fz(E)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(HS(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const L=C(M.state().date);return{date:L,year:wo(L)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=yi(L.date,{months:1});return{date:$,isAnimating:!0,direction:1,year:wo($)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=Ba(L.date,{months:1});return{date:$,isAnimating:!0,direction:-1,year:wo($)}},onSelectDate:C=>{const L=M.state(),$=C.currentTarget.dataset.range==="true",B=C.currentTarget.dataset.date||"",q=new Date(B);return{date:q,year:wo(q),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:$?{from:L.selectMode==="from"?q:L.range.from,to:L.selectMode==="to"?q:L.range.to}:L.range}},onChangeMonth:C=>{const L=C.target.value,B=Array.from(C.target.options).find(G=>G.value===L),q=M.state();if(B){const G=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+G),{...q,date:W,year:wo(W)}}return q},onKeyDown:C=>{const L=C.key,$=M.state();if(L in Yp){(L==="ArrowUp"||L==="ArrowDown")&&C.preventDefault();const B=M.state().date,q=Re.keyof(Yp,L)?Yp[L](B,C.shiftKey?"month":"days"):null;if(q!==null)return HS(C.target,b,q),{...$,date:q,year:wo(q)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,C,L)=>((L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&L.props.onChangeMonth?.(M.date),M),(M,C,L)=>(L.method==="onChangeYear"&&L.props.onChangeYear?.(M.date),M),(M,C,L)=>{const $=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&$&&t?(c?.(M.range),M):($&&t&&c?.(M.date),M)}]}),P=VR(w.date),_=ay(P,7),F=w.date.toISOString(),V=BS(w.date,y);T.useEffect(()=>{t||c?.(w.date)},[F,t]);const N=NR(M=>k.date(C=>_R(new Date(C),+M)),1200),O=M=>{const C=M.currentTarget.value;k.onChangeYear(C),s?.(new Date(C)),N(C)},D=$S((M,C)=>(M.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const M=RR();k.date(()=>M),c?.(M)};return m.jsx(Mf,{transition:LR,children:m.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:D.onTouchEnd,onTouchStart:D.onTouchStart,className:Pe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(fn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:m.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:RS,onClick:k.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(ZC,{className:"h-4 w-4"})}),m.jsx(Be.span,{layout:!0,variants:jS,custom:w.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:k.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:w.months}),m.jsx(Tg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:RS,onClick:k.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(vu,{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(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[m.jsx("thead",{children:m.jsx("tr",{children:w.week.map(M=>m.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),m.jsx(jR,{zip:_,range:S,styles:u,date:x||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},V)})}),f==="datetime"?m.jsx("section",{className:"grid items-center my-4",children:m.jsx(Wo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?qp(x,"HH:mm"):void 0,title:p||h.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,L=FR.exec(C);if(!L)return;const $=L.groups.hour,B=L.groups.min,q=OR(w.date,{hours:Number($),minutes:Number(B),seconds:0});k.date(()=>q),c?.(q)}})}):null,m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Kp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Kp.displayName="ProgressRootContext");function BR(){const e=A.useContext(Kp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Ir(51));return e}let Zp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const qS={status(e){return e==="progressing"?{[Zp.progressing]:""}:e==="complete"?{[Zp.complete]:""}:e==="indeterminate"?{[Zp.indeterminate]:""}:null}};function HR(e,t,n){return e==null?"":n?Uo(e,t,n):Uo(e/100,t,{style:"percent"})}function WR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const US=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=WR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=rd(r);let g="indeterminate";Number.isFinite(l)&&(g=l===a?"complete":"progressing");const h=HR(l,i,v.current),y=A.useMemo(()=>({status:g}),[g]),b={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(h,l),role:"progressbar"},x=A.useMemo(()=>({formattedValue:h,max:a,min:s,setLabelId:p,state:y,status:g,value:l}),[h,a,s,p,y,g,l]),S=an("div",t,{state:y,ref:n,props:[b,d],stateAttributesMapping:qS});return m.jsx(Kp.Provider,{value:x,children:S})});process.env.NODE_ENV!=="production"&&(US.displayName="ProgressRoot");const GS=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=BR(),u=Number.isFinite(l)&&l!==null?el(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:qS})});process.env.NODE_ENV!=="production"&&(GS.displayName="ProgressIndicator");const qR=e=>m.jsxs(US,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(GS,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Re.number(e.percent)?m.jsx("p",{className:Pe("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]}),Ql=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})]});Ql.Icon=function(t){return m.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ql.Body=function(t){return m.jsx(ln,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},Ql.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(ln,{...t,type:"button"})})};const UR=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),GR=e=>m.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),YS=new Date(1970,11,31),Xp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},KS={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},YR={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")},Qp=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},KR={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},ZR={day:"numeric",month:"numeric",year:"numeric"},XR=T.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=sl(t),d=T.useId(),f=Pt(),p=T.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?KR:ZR),[u,s]),[v,g]=T.useState(e||void 0),[h,y]=T.useState(!1),b=Qp(p,YS).flatMap(V=>Re.keyof(Xp,V.type)?Xp[V.type](V.value):[]),x=T.useMemo(()=>Qp(p,YS).reduce((V,N)=>V+(Re.keyof(KS,N.type)?KS[N.type](N.value):""),""),[p]),S=e?.toISOString(),[E,I]=T.useState(v?Qp(p,v).reduce((V,N)=>V+(Re.keyof(Xp,N.type)?YR[N.type](v,N.value):""),""):""),w=V=>{const N=V.target.value;if(I(N),b.length===N.length&&b.every((D,z)=>{const M=N.charAt(z);return typeof D=="string"?M===D:D.test(M)})){const D=ER(N,x,new Date),z=s==="datetime"?D:bo(D);return g(z),r?.(z)}return g(void 0),r?.(void 0)};T.useEffect(()=>{Zl(e)&&(g(e),I(qp(e,x)))},[S,x]);const k=V=>(g(V),r?.(V),i&&y(!1),I(V?qp(V,x):"")),P=Zl(v),_=P?v.toISOString():void 0,F=m.jsx(WS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:P?v:void 0});return m.jsx(T.Fragment,{children:m.jsx(Wo,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":_,formNoValidate:!h,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:h?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:a?m.jsxs(T.Fragment,{children:[m.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),m.jsx(mi,{open:h,onChange:y,buttonProps:{"aria-describedby":d},trigger:m.jsxs("span",{"aria-labelledby":d,children:[m.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),m.jsx(KC,{})]}),children:F})]}):null})})}),QR=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],JR=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],eB=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],tB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ZS=(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},XS=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},nB=e=>typeof e=="number"?Math.log(e):XS(e)*Math.log(10),rB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},QS=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},oB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function iB(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,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?tB:eB:t.binary?JR:QR,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return QS(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=oB(t);let l;if(e<1){const c=ZS(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?nB(e)/Math.log(1024):XS(e)/3),n.length-1);if(e=rB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=ZS(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return QS(l,t.fixedWidth)}var Jl={exports:{}},ec={exports:{}},lt={};var JS;function aB(){if(JS)return lt;JS=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case u:case v:case p:case a:return E;default:return I}}case n:return I}}}function S(E){return x(E)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(E){return S(E)||x(E)===l},lt.isConcurrentMode=S,lt.isContextConsumer=function(E){return x(E)===s},lt.isContextProvider=function(E){return x(E)===a},lt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},lt.isForwardRef=function(E){return x(E)===u},lt.isFragment=function(E){return x(E)===r},lt.isLazy=function(E){return x(E)===v},lt.isMemo=function(E){return x(E)===p},lt.isPortal=function(E){return x(E)===n},lt.isProfiler=function(E){return x(E)===i},lt.isStrictMode=function(E){return x(E)===o},lt.isSuspense=function(E){return x(E)===d},lt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===p||E.$$typeof===a||E.$$typeof===s||E.$$typeof===u||E.$$typeof===h||E.$$typeof===y||E.$$typeof===b||E.$$typeof===g)},lt.typeOf=x,lt}var ct={};var eT;function sB(){return eT||(eT=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===v||H.$$typeof===p||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===h||H.$$typeof===y||H.$$typeof===b||H.$$typeof===g)}function S(H){if(typeof H=="object"&&H!==null){var se=H.$$typeof;switch(se){case t:var ae=H.type;switch(ae){case l:case c:case r:case i:case o:case d:return ae;default:var Q=ae&&ae.$$typeof;switch(Q){case s:case u:case v:case p:case a:return Q;default:return se}}case n:return se}}}var E=l,I=c,w=s,k=a,P=t,_=u,F=r,V=v,N=p,O=n,D=i,z=o,M=d,C=!1;function L(H){return C||(C=!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.")),$(H)||S(H)===l}function $(H){return S(H)===c}function B(H){return S(H)===s}function q(H){return S(H)===a}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function W(H){return S(H)===u}function J(H){return S(H)===r}function re(H){return S(H)===v}function ee(H){return S(H)===p}function Y(H){return S(H)===n}function K(H){return S(H)===i}function X(H){return S(H)===o}function de(H){return S(H)===d}ct.AsyncMode=E,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=k,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=V,ct.Memo=N,ct.Portal=O,ct.Profiler=D,ct.StrictMode=z,ct.Suspense=M,ct.isAsyncMode=L,ct.isConcurrentMode=$,ct.isContextConsumer=B,ct.isContextProvider=q,ct.isElement=G,ct.isForwardRef=W,ct.isFragment=J,ct.isLazy=re,ct.isMemo=ee,ct.isPortal=Y,ct.isProfiler=K,ct.isStrictMode=X,ct.isSuspense=de,ct.isValidElementType=x,ct.typeOf=S})()),ct}var tT;function nT(){return tT||(tT=1,process.env.NODE_ENV==="production"?ec.exports=aB():ec.exports=sB()),ec.exports}var Jp,rT;function lB(){if(rT)return Jp;rT=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 Jp=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 f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},Jp}var eh,oT;function th(){if(oT)return eh;oT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eh=e,eh}var nh,iT;function aT(){return iT||(iT=1,nh=Function.call.bind(Object.prototype.hasOwnProperty)),nh}var rh,sT;function cB(){if(sT)return rh;sT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=th(),n={},r=aT();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 f=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 f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}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 p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},rh=o,rh}var oh,lT;function uB(){if(lT)return oh;lT=1;var e=nT(),t=lB(),n=th(),r=aT(),o=cB(),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 oh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:x,element:S(),elementType:E(),instanceOf:I,node:_(),objectOf:k,oneOf:w,oneOfType:P,shape:V,exact:N};function v($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function g($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h($){if(process.env.NODE_ENV!=="production")var B={},q=0;function G(J,re,ee,Y,K,X,de){if(Y=Y||f,X=X||ee,de!==n){if(l){var H=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 H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=Y+":"+ee;!B[se]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+Y+"`. 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."),B[se]=!0,q++)}}return re[ee]==null?J?re[ee]===null?new g("The "+K+" `"+X+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new g("The "+K+" `"+X+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:$(re,ee,Y,K,X)}var W=G.bind(null,!1);return W.isRequired=G.bind(null,!0),W}function y($){function B(q,G,W,J,re,ee){var Y=q[G],K=z(Y);if(K!==$){var X=M(Y);return new g("Invalid "+J+" `"+re+"` of type "+("`"+X+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return h(B)}function b(){return h(a)}function x($){function B(q,G,W,J,re){if(typeof $!="function")return new g("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=q[G];if(!Array.isArray(ee)){var Y=z(ee);return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var K=0;K<ee.length;K++){var X=$(ee,K,W,J,re+"["+K+"]",n);if(X instanceof Error)return X}return null}return h(B)}function S(){function $(B,q,G,W,J){var re=B[q];if(!s(re)){var ee=z(re);return new g("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return h($)}function E(){function $(B,q,G,W,J){var re=B[q];if(!e.isValidElementType(re)){var ee=z(re);return new g("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return h($)}function I($){function B(q,G,W,J,re){if(!(q[G]instanceof $)){var ee=$.name||f,Y=L(q[G]);return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return h(B)}function w($){if(!Array.isArray($))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 B(q,G,W,J,re){for(var ee=q[G],Y=0;Y<$.length;Y++)if(v(ee,$[Y]))return null;var K=JSON.stringify($,function(de,H){var se=M(H);return se==="symbol"?String(H):H});return new g("Invalid "+J+" `"+re+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+K+"."))}return h(B)}function k($){function B(q,G,W,J,re){if(typeof $!="function")return new g("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var K in ee)if(r(ee,K)){var X=$(ee,K,W,J,re+"."+K,n);if(X instanceof Error)return X}return null}return h(B)}function P($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var q=$[B];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(q)+" at index "+B+"."),a}function G(W,J,re,ee,Y){for(var K=[],X=0;X<$.length;X++){var de=$[X],H=de(W,J,re,ee,Y,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&K.push(H.data.expectedType)}var se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+ee+" `"+Y+"` supplied to "+("`"+re+"`"+se+"."))}return h(G)}function _(){function $(B,q,G,W,J){return O(B[q])?null:new g("Invalid "+W+" `"+J+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return h($)}function F($,B,q,G,W){return new g(($||"React class")+": "+B+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function V($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var K in $){var X=$[K];if(typeof X!="function")return F(W,J,re,K,M(X));var de=X(ee,K,W,J,re+"."+K,n);if(de)return de}return null}return h(B)}function N($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var K=t({},q[G],$);for(var X in K){var de=$[X];if(r($,X)&&typeof de!="function")return F(W,J,re,X,M(de));if(!de)return new g("Invalid "+J+" `"+re+"` key `"+X+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
|
|
16
|
-
Valid keys: `+JSON.stringify(Object.keys($),null," "));var H=de(ee,X,W,J,re+"."+X,n);if(H)return H}return null}return h(B)}function O($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(O);if($===null||s($))return!0;var B=d($);if(B){var q=B.call($),G;if(B!==$.entries){for(;!(G=q.next()).done;)if(!O(G.value))return!1}else for(;!(G=q.next()).done;){var W=G.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function D($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(B,$)?"symbol":B}function M($){if(typeof $>"u"||$===null)return""+$;var B=z($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function C($){var B=M($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function L($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},oh}var ih,cT;function dB(){if(cT)return ih;cT=1;var e=th();function t(){}function n(){}return n.resetWarningCache=t,ih=function(){function r(a,s,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}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},ih}var uT;function fB(){if(uT)return Jl.exports;if(uT=1,process.env.NODE_ENV!=="production"){var e=nT(),t=!0;Jl.exports=uB()(e.isElement,t)}else Jl.exports=dB()();return Jl.exports}var pB=fB();const vt=Yh(pB);function So(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;const hB=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 wi(e,t,n){const r=mB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&dT(r,"path",i),dT(r,"relativePath",i),r}function mB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=hB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function dT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const gB=[".DS_Store","Thumbs.db"];function vB(e){return So(this,void 0,void 0,function*(){return tc(e)&&yB(e.dataTransfer)?SB(e.dataTransfer,e.type):bB(e)?xB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?wB(e):[]})}function yB(e){return tc(e)}function bB(e){return tc(e)&&tc(e.target)}function tc(e){return typeof e=="object"&&e!==null}function xB(e){return ah(e.target.files).map(t=>wi(t))}function wB(e){return So(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>wi(n))})}function SB(e,t){return So(this,void 0,void 0,function*(){if(e.items){const n=ah(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(TB));return fT(pT(r))}return fT(ah(e.files).map(n=>wi(n)))})}function fT(e){return e.filter(t=>gB.indexOf(t.name)===-1)}function ah(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 TB(e){if(typeof e.webkitGetAsEntry!="function")return hT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?mT(t):hT(e,t)}function pT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?pT(n):[n]],[])}function hT(e,t){return So(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,wi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function EB(e){return So(this,void 0,void 0,function*(){return e.isDirectory?mT(e):kB(e)})}function mT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>So(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(EB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function kB(e){return So(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=wi(r,e.fullPath);t(o)},r=>{n(r)})})})}var nc={},gT;function CB(){return gT||(gT=1,nc.__esModule=!0,nc.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}),nc}var IB=CB();const sh=Yh(IB);function vT(e){return OB(e)||PB(e)||wT(e)||AB()}function AB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
19
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
20
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PT(e,t){if(e){if(typeof e=="string")return uh(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 uh(e,t)}}function uh(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 i4(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 a4(e){if(Array.isArray(e))return e}function OT(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 At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(n),!0).forEach(function(r){dh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e,t){if(e==null)return{};var n=s4(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 s4(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 fh=T.forwardRef(function(e,t){var n=e.children,r=ic(e,ZB),o=MT(r),i=o.open,a=ic(o,XB);return T.useImperativeHandle(t,function(){return{open:i}},[i]),T.createElement(T.Fragment,null,n(At(At({},a),{},{open:i})))});fh.displayName="Dropzone";var _T={disabled:!1,getFilesFromEvent:vB,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};fh.defaultProps=_T,fh.propTypes={children:vt.func,accept:vt.objectOf(vt.arrayOf(vt.string)),multiple:vt.bool,preventDropOnDocument:vt.bool,noClick:vt.bool,noKeyboard:vt.bool,noDrag:vt.bool,noDragEventsBubbling:vt.bool,minSize:vt.number,maxSize:vt.number,maxFiles:vt.number,disabled:vt.bool,getFilesFromEvent:vt.func,onFileDialogCancel:vt.func,onFileDialogOpen:vt.func,useFsAccessApi:vt.bool,autoFocus:vt.bool,onDragEnter:vt.func,onDragLeave:vt.func,onDragOver:vt.func,onDrop:vt.func,onDropAccepted:vt.func,onDropRejected:vt.func,onError:vt.func,validator:vt.func};var ph={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function MT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=At(At({},_T),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,f=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,P=t.validator,_=T.useMemo(function(){return GB(n)},[n]),F=T.useMemo(function(){return UB(n)},[n]),V=T.useMemo(function(){return typeof h=="function"?h:DT},[h]),N=T.useMemo(function(){return typeof g=="function"?g:DT},[g]),O=T.useRef(null),D=T.useRef(null),z=T.useReducer(l4,ph),M=ch(z,2),C=M[0],L=M[1],$=C.isFocused,B=C.isFileDialogActive,q=T.useRef(typeof window<"u"&&window.isSecureContext&&y&&qB()),G=function(){!q.current&&B&&setTimeout(function(){if(D.current){var R=D.current.files;R.length||(L({type:"closeDialog"}),N())}},300)};T.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[D,B,N,q]);var W=T.useRef([]),J=function(R){O.current&&O.current.contains(R.target)||(R.preventDefault(),W.current=[])};T.useEffect(function(){return x&&(document.addEventListener("dragover",CT,!1),document.addEventListener("drop",J,!1)),function(){x&&(document.removeEventListener("dragover",CT),document.removeEventListener("drop",J))}},[O,x]),T.useEffect(function(){return!r&&b&&O.current&&O.current.focus(),function(){}},[O,b,r]);var re=T.useCallback(function(j){k?k(j):console.error(j)},[k]),ee=T.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[].concat(e4(W.current),[j.target]),oc(j)&&Promise.resolve(o(j)).then(function(R){if(!(rc(j)&&!w)){var ne=R.length,ce=ne>0&&RB({files:R,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:P}),xe=ne>0&&!ce;L({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(R){return re(R)})},[o,c,re,w,_,a,i,s,l,P]),Y=T.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=oc(j);if(R&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return R&&d&&d(j),!1},[d,w]),K=T.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=W.current.filter(function(ce){return O.current&&O.current.contains(ce)}),ne=R.indexOf(j.target);ne!==-1&&R.splice(ne,1),W.current=R,!(R.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oc(j)&&u&&u(j))},[O,u,w]),X=T.useCallback(function(j,R){var ne=[],ce=[];j.forEach(function(xe){var Ce=ET(xe,_),_e=ch(Ce,2),qe=_e[0],pt=_e[1],ht=kT(xe,a,i),$t=ch(ht,2),$e=$t[0],U=$t[1],Z=P?P(xe):null;if(qe&&$e&&!Z)ne.push(xe);else{var Oe=[pt,U];Z&&(Oe=Oe.concat(Z)),ce.push({file:xe,errors:Oe.filter(function(Ge){return Ge})})}}),(!s&&ne.length>1||s&&l>=1&&ne.length>l)&&(ne.forEach(function(xe){ce.push({file:xe,errors:[jB]})}),ne.splice(0)),L({acceptedFiles:ne,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(ne,ce,R),ce.length>0&&v&&v(ce,R),ne.length>0&&p&&p(ne,R)},[L,s,_,a,i,l,f,p,v,P]),de=T.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[],oc(j)&&Promise.resolve(o(j)).then(function(R){rc(j)&&!w||X(R,j)}).catch(function(R){return re(R)}),L({type:"reset"})},[o,X,re,w]),H=T.useCallback(function(){if(q.current){L({type:"openDialog"}),V();var j={multiple:s,types:F};window.showOpenFilePicker(j).then(function(R){return o(R)}).then(function(R){X(R,null),L({type:"closeDialog"})}).catch(function(R){YB(R)?(N(R),L({type:"closeDialog"})):KB(R)?(q.current=!1,D.current?(D.current.value=null,D.current.click()):re(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."))):re(R)});return}D.current&&(L({type:"openDialog"}),V(),D.current.value=null,D.current.click())},[L,V,N,y,X,re,F,s]),se=T.useCallback(function(j){!O.current||!O.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),H())},[O,H]),ae=T.useCallback(function(){L({type:"focus"})},[]),Q=T.useCallback(function(){L({type:"blur"})},[]),le=T.useCallback(function(){S||(WB()?setTimeout(H,0):H())},[S,H]),te=function(R){return r?null:R},fe=function(R){return E?null:te(R)},pe=function(R){return I?null:te(R)},ve=function(R){w&&R.stopPropagation()},Ae=T.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.role,xe=j.onKeyDown,Ce=j.onFocus,_e=j.onBlur,qe=j.onClick,pt=j.onDragEnter,ht=j.onDragOver,$t=j.onDragLeave,$e=j.onDrop,U=ic(j,QB);return At(At(dh({onKeyDown:fe(or(xe,se)),onFocus:fe(or(Ce,ae)),onBlur:fe(or(_e,Q)),onClick:te(or(qe,le)),onDragEnter:pe(or(pt,ee)),onDragOver:pe(or(ht,Y)),onDragLeave:pe(or($t,K)),onDrop:pe(or($e,de)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},ne,O),!r&&!E?{tabIndex:0}:{}),U)}},[O,se,ae,Q,le,ee,Y,K,de,E,I,r]),me=T.useCallback(function(j){j.stopPropagation()},[]),oe=T.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.onChange,xe=j.onClick,Ce=ic(j,JB),_e=dh({accept:_,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:te(or(ce,de)),onClick:te(or(xe,me)),tabIndex:-1},ne,D);return At(At({},_e),Ce)}},[D,n,s,de,r]);return At(At({},C),{},{isFocused:$&&!r,getRootProps:Ae,getInputProps:oe,rootRef:O,inputRef:D,open:te(H)})}function l4(e,t){switch(t.type){case"focus":return At(At({},e),{},{isFocused:!0});case"blur":return At(At({},e),{},{isFocused:!1});case"openDialog":return At(At({},ph),{},{isFileDialogActive:!0});case"closeDialog":return At(At({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return At(At({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return At(At({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return At({},ph);default:return e}}function DT(){}const NT=T.createContext([null,()=>{}]),c4=()=>T.useContext(NT),u4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,d4={csv:wu,xls:wu,mov:Pg,mp4:Pg,xlsx:wu,pdf:Ag,txt:Ag,json:JC,mp3:YC},f4=e=>{const[,t]=c4(),[n,r]=T.useState({url:"",type:"",size:""});T.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:u4(l),size:iB(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=d4[e.file.name.split(".").at(-1)]??Og,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(Mo,{size:16})})})]})},p4=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(f4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),FT=e=>{const t=Pt(),n=e.dragging?eI:tI;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})]})]})},h4=e=>e.isDragActive?m.jsx(FT,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(p4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(T.Fragment,{children:e.idle}),m4=m.jsx(FT,{dragging:!1}),g4=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]})},v4=({idle:e=m4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Pt(),a=T.useState(null),[s,l]=T.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(h=>h.concat(g))},{getRootProps:f,getInputProps:p,isDragActive:v}=MT({onDrop:d});return m.jsxs(NT.Provider,{value:a,children:[m.jsx(jp,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(g4,{item:a[0]}):null}),m.jsxs("div",{...f(),"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",{...p(o),name:o.name,id:o.name}),m.jsx(h4,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},LT=()=>window.matchMedia("@media (pointer: coarse)"),y4=()=>{const e=T.useRef(Cr()?null:LT()),[t,n]=T.useState(Cr()?!1:e.current?.matches??!1);return T.useEffect(()=>{(e.current===null?LT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},VT=(e,t="overflow-hidden")=>{const n=T.useRef(null),r=y4(),o=T.useRef(Cr()?"":document.documentElement.style.overflowY);return T.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||sy())return;document.documentElement.style.padding=ug(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),T.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(Ok(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?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},b4=(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]},$T=(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},zT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},jT=(e,t)=>{const n=$T(t,zT.basic,e);return n!==void 0&&n!==e?n:$T(t,zT.extend,e)},RT=e=>e.replace(/[^0-9]/g,""),ac=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),BT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?RT(e).includes(RT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?b4(e,t)!==null:!1,x4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>BT(e,o,n,r)):BT(e,t,n,r),hh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(ac):ac(`${i.value}`)}));return e.forEach(i=>{const a=jT(i,t);o.forEach(s=>{const l=jT(i,s.key);if(!l)return;const c=ac(`${s.value}`.toLocaleLowerCase()).trim(),u=ac(`${l}`.toLocaleLowerCase()).trim();if(x4(u,c,s.score,s.match))return void r.set(a,i);Re.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},w4=e=>m.jsx(T.Fragment,{children:e.children}),S4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},T4=[],E4=T.forwardRef(function(t,n){return m.jsx(Be.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:m.jsx(fn,{children:t.children})})}),k4=T.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),C4={List:E4,Item:k4},Si=40,I4=T.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:f=!1,required:p=!1,dynamicOption:v=!1,...g},h)=>{const y=T.useRef(null),b=T.useRef(null),x=T.useRef(null),S=g.value??g.defaultValue??"",E=Pt(),[I,w]=T.useState(()=>Math.min(320,Si*o.length)),[k,P]=T.useState(!1),[_,F]=T.useState(""),[V,N]=T.useState(S),[O,D]=T.useState(()=>o.find(R=>R.value===S)?.label??S),[z,M]=T.useState(null),C=T.useRef(T4),L=VT(k,"block-only"),$=v&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=()=>Fi.flushSync(()=>P(!0)),q=_?hh($,"value",[{key:"value",value:_},{key:"label",value:_}]):$,G=()=>{P(!1),w(0)},W=q.filter(R=>R.hidden!==!0),J=v?void 0:`^(${o.map(R=>`${ed(R.value)}${R.label?"|"+ed(R.label):""}`).join("|")})$`,{x:re,y:ee,strategy:Y,refs:K,context:X,placement:de}=Gn({open:k,transform:!0,onOpenChange:P,placement:"bottom-start",whileElementsMounted:Jr,middleware:[$o(4),wv({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),xv({padding:10,elementContext:"reference",apply(R){const ce=R.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,xe=$i(K.reference.current,window.innerHeight),Ce=Math.min(ce<Si?xe:ce,xe,R.availableHeight),_e=W.length===0?Si:Math.min(Ce,xe,ce),qe=`${b.current.getBoundingClientRect().width}px`;Object.assign(R.elements.floating.style,{width:qe,maxWidth:qe,height:_e})}})]}),H=Jv(X,S4),{getReferenceProps:se,getFloatingProps:ae,getItemProps:Q}=Yn([fr(X,{role:"listbox"}),kr(X),Hs(X,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);T.useEffect(()=>{if(g.value){const R=o.find(ne=>ne.value===g.value);R&&(D(R.label??R.value),N(g.value))}},[g.value,o.length]),T.useEffect(()=>{if(!k)return w(0);const R=K.reference;if(R.current===null)return;const ne=$i(R.current,window.innerHeight);setTimeout(()=>w(Math.min(ne,W.length*Si)),100)},[_,k,K.reference,W.length]),T.useEffect(()=>{const R=K.reference.current;if(R)return Vi(R)},[]);const le=(R,ne)=>{N(R.value);const ce=K.reference.current;if(!ce)return;ce?.setAttribute("data-value",R.value),ce.value=R.value;const xe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(xe),g.onChange&&g.onChange(xe),D(R.label??""),G(),F(""),M(ne)},te=R=>{const ne=R.target.value;return F(ne),!k&&ne===""?P(!0):(R.target.name=g.name||"",ne?P(!0):g.onChange?.(R))},fe=()=>{B(),F(""),K.reference.current?.focus()},pe=()=>{M(R=>R===null?0:R),B(),F("")},ve=()=>{K.reference.current?.setAttribute("data-value",""),F(""),N(""),D(""),cg(K.reference.current),G()},Ae=g.id||g.name,me=`${Ae}-shadow`,oe=W.length===0,j=de==="top"||de==="top-start";return m.jsxs(Xi,{...g,left:e,error:t,ref:b,form:g.form,loading:r,name:g.name,feedback:k&&j?g.title:d,hideLeft:f,required:p,title:g.title,container:i,rightLabel:a,interactive:s,id:me,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:fe,children:[m.jsx(gu,{size:20}),m.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),V?m.jsx("button",{type:"button",onClick:ve,className:"p-2 transition-colors md:p-1 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.jsx("input",{"data-shadow":"true",...se({...g,onFocus:pe,pattern:J,onChange:te,id:me,name:me,ref:K.setReference,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),G();if(k){if(R.key==="ArrowDown"){let ne=Re.number(z)?z+1:0;return ne>W.length-1&&(ne=0),x.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="ArrowUp"){let ne=Re.number(z)?z-1:W.length-1;return ne<0&&(ne=W.length-1),x.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="Enter"){if(z!==null&&W[z])return R.preventDefault(),le(W[z],z);if(W.length===1)return R.preventDefault(),le(W[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Ae,"data-target":Ae,required:p,value:k?_:o.length===0?"":O||V,"aria-autocomplete":"list",autoComplete:"off",className:Pe("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:Ae,name:Ae,type:"hidden","data-origin":Ae,ref:h,required:p,defaultValue:g.value||V||void 0}),m.jsx(dr,{preserveTabOrder:!0,children:k?m.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(Be.div,{...ae({ref:sr(L,K.setFloating),style:{...H.styles,left:re,top:ee??0,position:Y,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:oe?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",j?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const ne=K.floating.current.querySelectorAll("li").item(0),ce=(ne?ne.getBoundingClientRect().height:Si)*W.length;return Fi.flushSync(()=>w(ce+2))},children:[oe?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,m.jsx(Tp,{overscan:40,ref:x,hidden:oe,data:W,style:{height:I},defaultItemHeight:Si,components:C4,scrollerRef:R=>{y.current=R},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(R,ne)=>{const ce=ne.Render??w4,xe=V===ne.value||V===ne.label,Ce=z===R,_e=ne.label??ne.value;return m.jsx("button",{"data-value":ne.value,...Q({ref:qe=>{C.current[R]=qe},role:"option",type:"button","aria-checked":xe,"aria-current":xe,"aria-selected":xe,"aria-busy":ne.disabled,onClick:()=>le(ne,R),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${xe?"bg-primary-hover text-primary-foreground":""} ${Ce?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(ce,{...g,label:ne.label,value:ne.value,children:_e})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(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 zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const HT=40,A4=e=>m.jsx(T.Fragment,{children:e.children}),P4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},WT=[],O4=T.forwardRef(function(t,n){return m.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:m.jsx(fn,{children:t.children})})}),_4=T.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),M4={List:O4,Item:_4},D4=e=>{const t=Pt(),n=T.useRef(null),r=T.Children.count(e.children),[o,i]=T.useState(!1);return T.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(ts,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},N4=T.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:f=!1,required:p=!1,dynamicOption:v=!1,onChangeOptions:g,...h},y)=>{const b=T.useMemo(()=>new zn(r.map(oe=>[oe.value,oe])),[r]),x=T.useRef(null),S=T.useRef(null),E=h.value??h.defaultValue??WT,I=Pt(),[w,k]=T.useState(0),[P,_]=T.useState(!1),[F,V]=T.useState(""),[N,O]=T.useState(()=>{const oe=new zn;return E.forEach(j=>{const R=b.get(j);return R?oe.set(j,R):void 0}),oe}),D=T.useMemo(()=>Array.from(N.keys()),[N]),[z,M]=T.useState(()=>{const oe=new Set(E);return r.reduce((j,R)=>oe.has(R.value)?[...j,R.label??R.value]:j,[])??E}),[C,L]=T.useState(null),$=T.useRef(WT),B=v&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,q=F.length===0?B:hh(B,"value",[{key:"value",value:F},{key:"label",value:F}]),G=VT(P,"block-only"),W=q.filter(oe=>oe.hidden!==!0),J=W.length===0,{x:re,y:ee,strategy:Y,refs:K,context:X}=Gn({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Jr,middleware:[$o(4),xv({padding:10,elementContext:"reference",apply(oe){const R=oe.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ne=$i(K.reference.current,window.innerHeight),ce=Math.min(R<HT?ne:R,ne,oe.availableHeight),xe=W.length===0?HT:Math.min(ce,ne,R),Ce=`${x.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Ce,maxWidth:Ce,height:xe})}})]}),de=Jv(X,P4),{getReferenceProps:H,getFloatingProps:se,getItemProps:ae}=Yn([fr(X,{role:"listbox"}),kr(X),Hs(X,{cols:0,listRef:$,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:oe=>L(j=>oe??j)})]);T.useEffect(()=>{if(!P)return k(0);const oe=K.reference;if(oe.current===null)return;const j=$i(oe.current,window.innerHeight);setTimeout(()=>k(Math.min(j,W.length*40)),100)},[F,P,K.reference]),T.useEffect(()=>{h.value&&O(new zn(h.value.map(oe=>[oe,b.get(oe)])))},[h.value,b]),T.useEffect(()=>{const oe=K.reference.current;if(oe)return Vi(oe)},[]);const Q=(oe,j)=>{const R=N.clone(xe=>xe.has(oe.value)?xe.remove(oe.value):xe.set(oe.value,oe));O(R);const ne=K.reference.current;if(!ne)return;const ce=R.map(xe=>xe.value);ne?.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),M(xe=>xe.concat(oe.label??"")),V(""),L(j)},le=oe=>{const j=oe.target.value;return V(j),!P&&j===""?_(!0):(oe.target.name=h.name||"",j?_(!0):void 0)},te=()=>{_(!0),V(""),K.reference.current?.focus()},fe=()=>{_(!0),V("")},pe=()=>{K.reference.current?.setAttribute("data-value","[]"),V(""),_(!1),O(new zn),g?.([])},ve=h.id||h.name,Ae=N.map((oe,j)=>m.jsx(ts,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:R=>{R.preventDefault(),R.stopPropagation(),Q(oe,j)},children:m.jsx(Mo,{size:14})}),children:oe.label??oe.value},`MultiSelect-${oe.value}-x`)),me={height:J?"0":N.size===0?w-49:w-86};return m.jsxs(Xi,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:f,required:p,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 gap-0.5 items-center",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:te,children:[m.jsx(gu,{size:20}),m.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),N?m.jsx("button",{type:"button",onClick:pe,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",{...H({...h,onFocus:fe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),className:Pe("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:[D.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),m.jsx(D4,{label:c,children:Ae})]}),m.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:p,defaultValue:h.value||D||void 0}),m.jsx(dr,{preserveTabOrder:!0,children:P?m.jsx(Ku,{lockScroll:!0,children:m.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...se({ref:K.setFloating,style:{...de.styles,top:ee??0,position:Y,left:re,height:w-(D.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[m.jsx("input",{autoFocus:!0,value:F,onChange:le,title:h.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:oe=>{if(oe.key==="ArrowDown"){let j=C+1;return j>W.length-1&&(j=0),S.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="ArrowUp"){let j=C-1;return j<0&&(j=W.length-1),S.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="Escape")return oe.currentTarget.blur(),_(!1);if(oe.key==="Enter"){if(C!==null&&W[C])return oe.preventDefault(),Q(W[C],C);if(W.length===1)return oe.preventDefault(),Q(W[0],0)}}}),J?m.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:m.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:s||I.autocompleteEmpty})}):null,J?null:m.jsx(Be.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:J?"auto":w},style:me,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return k(0);const j=K.floating.current.querySelectorAll("li").item(0),R=(j?j.getBoundingClientRect().height:40)*W.length;return Fi.flushSync(()=>k(R+2))},children:m.jsx(Tp,{ref:S,hidden:J,data:W,components:M4,style:me,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(oe,j)=>{const R=j.Render??A4,ne=N.has(j.value)||N.has(j.label??""),ce=C===oe,xe=j.label??j.value;return m.jsxs("button",{"data-value":j.value,...ae({ref:Ce=>{$.current[oe]=Ce},role:"option",type:"button","aria-checked":ne,"aria-current":ne,"aria-selected":ne,"aria-busy":j.disabled,onClick:()=>Q(j,oe)}),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 ${ne||ce?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx($p,{onChange:Ho,checked:ne,"aria-checked":ne,onClick:Ce=>{Ce.stopPropagation(),Q(j,oe)}}),m.jsx(R,{...h,label:j.label,value:j.value,children:xe})]})}})}),m.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:N.size===0?m.jsx(ts,{theme:"muted",size:"small",children:I.autocompleteEmpty}):Ae})]})})}):null})]})}),F4=e=>{const[t,n]=T.useState(0);return T.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},L4={Item:T.forwardRef(function(t,n){return m.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:T.forwardRef(function(t,n){return m.jsx("ul",{...t,ref:n,className:"space-y-3"})})},V4=e=>{const t=T.useRef(null),n=F4(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(Wo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(Tp,{height:n,useWindowScroll:!0,data:e.source,components:L4,itemContent:(r,o)=>m.jsx(T.Fragment,{children:m.jsx($p,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(ro,{children:m.jsx(vu,{})})}),m.jsx("div",{})]})};function $4(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 z4=({children:e,...t})=>{const n=Pr(t.onIntersection),r=T.useRef(null),[o,i]=T.useState(()=>r.current===null?!1:$4(r.current));return T.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})};let qT=0;function j4(e){return qT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${qT}`}const Wa=0;class sc{static create(){return new sc}currentId=Wa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Wa,n()},t)}isStarted(){return this.currentId!==Wa}clear=()=>{this.currentId!==Wa&&(clearTimeout(this.currentId),this.currentId=Wa)};disposeEffect=()=>this.clear}const lc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(lc.displayName="ToastContext");function mh(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));return e}function gh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const UT=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,s]=A.useState([]),[l,c]=A.useState(!1),[u,d]=A.useState(!1),[f,p]=A.useState(null);a.length===0&&(l&&c(!1),u&&d(!1));const v=l||u,g=A.useRef(new Map),h=A.useRef(null),y=A.useRef(!0),b=A.useRef(!1);function x(N){const O=ao(In(h.current));if(!h.current||!Ar(h.current,O)||!pd(O))return;const D=a.findIndex(C=>C.id===N);let z=null,M=D+1;for(;M<a.length;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M+=1}if(!z)for(M=D-1;M>=0;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M-=1}z?z.ref?.current?.focus():f?.focus({preventScroll:!0})}const S=Ye(()=>{b.current||(b.current=!0,g.current.forEach(N=>{if(N.timeout){N.timeout.clear();const O=Date.now()-N.start,D=N.delay-O;N.remaining=D>0?D:0}}))}),E=Ye(()=>{b.current&&(b.current=!1,g.current.forEach((N,O)=>{N.remaining=N.remaining>0?N.remaining:N.delay,N.timeout??=sc.create(),N.timeout.start(N.remaining,()=>{g.current.delete(O),N.callback()}),N.start=Date.now()}))}),I=Ye(N=>{s(z=>{const M=z.map(L=>L.id===N?{...L,transitionStatus:"ending",height:0}:L),C=M.filter(L=>L.transitionStatus!=="ending");return M.map(L=>{if(L.transitionStatus==="ending")return L;const $=C.indexOf(L)>=o;return{...L,limited:$}})});const O=g.current.get(N);O&&O.timeout&&(O.timeout.clear(),g.current.delete(N)),a.find(z=>z.id===N)?.onClose?.(),x(N),a.length===1&&(c(!1),d(!1))}),w=Ye(N=>{s(D=>D.filter(z=>z.id!==N)),a.find(D=>D.id===N)?.onRemove?.()}),k=Ye((N,O,D)=>{const z=Date.now(),M=y.current&&!l&&!u,C=M?sc.create():void 0;C?.start(O,()=>{g.current.delete(N),D()}),g.current.set(N,{timeout:C,start:M?z:0,delay:O,remaining:O,callback:D})}),P=Ye(N=>{const O=N.id||j4("toast"),D={...N,id:O,transitionStatus:"starting"};s(M=>{const C=[D,...M],L=C.filter($=>$.transitionStatus!=="ending");if(L.length>o){const $=L.length-o,B=L.slice(-$);return C.map(q=>B.some(G=>G.id===q.id)?{...q,limited:!0}:{...q,limited:!1})}return C.map($=>({...$,limited:!1}))});const z=D.timeout??r;return D.type!=="loading"&&z>0&&k(O,z,()=>I(O)),(l||u||!y.current)&&S(),O}),_=Ye((N,O)=>{const D=a.find(W=>W.id===N)??null,z=D?{...D,...O}:null;if(jn.flushSync(()=>{s(W=>W.map(J=>J.id===N?{...J,...O}:J))}),!z)return;const M=z.timeout??r,C=D?.timeout??r,L=Object.hasOwn(O,"timeout"),$=z.transitionStatus!=="ending"&&z.type!=="loading"&&M>0,B=g.current.has(N),q=C!==M,G=D?.type==="loading";if(!$&&B){g.current.get(N)?.timeout?.clear(),g.current.delete(N);return}if($&&(!B||q||L||G)){const W=g.current.get(N);W&&(W.timeout?.clear(),g.current.delete(N)),k(N,M,()=>I(N)),(l||u||!y.current)&&S()}}),F=Ye((N,O)=>{const D=gh(O.loading),z=P({...D,type:"loading"}),M=N.then(C=>{const L=gh(O.success,C);return _(z,{...L,type:"success",timeout:L.timeout}),C}).catch(C=>{const L=gh(O.error,C);return _(z,{...L,type:"error",timeout:L.timeout}),Promise.reject(C)});return{}.hasOwnProperty.call(O,"setPromise")&&O.setPromise(M),M});A.useEffect(function(){return i?i[" subscribe"](({action:D,options:z})=>{const M=z.id;D==="promise"&&z.promise?F(z.promise,z):D==="update"&&M?_(M,z):D==="close"&&M?I(M):P(z)}):void 0},[P,_,k,r,i,F,I]);const V=A.useMemo(()=>({toasts:a,setToasts:s,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:v,add:P,close:I,remove:w,update:_,promise:F,pauseTimers:S,resumeTimers:E,prevFocusElement:f,setPrevFocusElement:p,viewportRef:h,scheduleTimer:k,windowFocusedRef:y}),[P,I,u,l,v,S,f,F,w,E,k,a,_]);return m.jsx(lc.Provider,{value:V,children:n})};process.env.NODE_ENV!=="production"&&(UT.displayName="ToastProvider");const Ti=A.forwardRef(function(t,n){const[r,o]=A.useState();St(()=>{cO&&o("button")},[]);const i={tabIndex:0,role:r};return m.jsx("span",{...t,ref:n,style:Js,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ti.displayName="FocusGuard");const GT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(GT.displayName="ToastViewportContext");let R4=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const YT=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{toasts:s,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:v,setPrevFocusElement:g,expanded:h,focused:y}=mh(),b=A.useRef(!1),x=A.useRef(!1),S=s.length,E=s[0]?.height??0,I=A.useMemo(()=>s.some(C=>C.transitionStatus==="ending"),[s]);A.useEffect(()=>{if(!f.current)return;function C($){S!==0&&$.key==="F6"&&$.target!==f.current&&($.preventDefault(),g(ao(In(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const L=qt(f.current);return L.addEventListener("keydown",C),()=>{L.removeEventListener("keydown",C)}},[l,d,g,S,f]),A.useEffect(()=>{if(!f.current||!S)return;const C=qt(f.current);function L(B){B.target===C&&(p.current=!1,l())}function $(B){if(B.relatedTarget||B.target===C)return;const q=dd(B),G=ao(In(f.current));(!Ar(f.current,q)||!pd(G))&&c(),setTimeout(()=>{p.current=!0})}return C.addEventListener("blur",L,!0),C.addEventListener("focus",$,!0),()=>{C.removeEventListener("blur",L,!0),C.removeEventListener("focus",$,!0)}},[l,c,f,p,d,S]),A.useEffect(()=>{const C=f.current;if(!C||S===0)return;const L=In(C);function $(B){if(B.pointerType!=="touch")return;const q=dd(B);Ar(C,q)||(c(),u(!1),d(!1))}return L.addEventListener("pointerdown",$,!0),()=>{L.removeEventListener("pointerdown",$,!0)}},[S,c,d,u,f]);function w(C){f.current&&(b.current=!0,C.relatedTarget===f.current?s[0]?.ref?.current?.focus():v?.focus({preventScroll:!0}))}function k(C){C.key==="Tab"&&C.shiftKey&&C.target===f.current&&(C.preventDefault(),v?.focus({preventScroll:!0}),c())}A.useEffect(()=>{!p.current||I||!x.current||(c(),u(!1),x.current=!1)},[I,c,u,p]);function P(){l(),u(!0),x.current=!1}function _(){s.some(C=>C.transitionStatus==="ending")?x.current=!0:(c(),u(!1))}function F(){if(b.current){b.current=!1;return}y||pd(In(f.current).activeElement)&&(d(!0),l())}function V(C){!y||Ar(f.current,C.relatedTarget)||(d(!1),c())}const N={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:V,onKeyDown:k,onClick:F},O=A.useMemo(()=>({expanded:h}),[h]),D=an("div",t,{ref:[n,f],state:O,props:[N,{style:{[R4.frontmostHeight]:E?`${E}px`:void 0}},a,{children:m.jsxs(A.Fragment,{children:[S>0&&v&&m.jsx(Ti,{onFocus:w}),i,S>0&&v&&m.jsx(Ti,{onFocus:w})]})}]}),z=A.useMemo(()=>({viewportRef:f}),[f]),M=A.useMemo(()=>s.filter(C=>C.priority==="high"),[s]);return m.jsxs(GT.Provider,{value:z,children:[S>0&&v&&m.jsx(Ti,{onFocus:w}),D,!y&&M.length>0&&m.jsx("div",{style:Js,children:M.map(C=>m.jsxs("div",{role:"alert","aria-atomic":!0,children:[m.jsx("div",{children:C.title}),m.jsx("div",{children:C.description})]},C.id))})]})});process.env.NODE_ENV!=="production"&&(YT.displayName="ToastViewport");function B4(e){return vy(19)?e:e?"true":void 0}const vh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(vh.displayName="ToastRootContext");function Ei(){const e=A.useContext(vh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Ir(66));return e}let yh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const H4={[yh.startingStyle]:""},W4={[yh.endingStyle]:""},q4={transitionStatus(e){return e==="starting"?H4:e==="ending"?W4:null}};function U4(e){return e==null?e:"current"in e?e.current:e}function G4(e,t=!1,n=!0){const r=Wy();return Ye((o,i=null)=>{r.cancel();function a(){jn.flushSync(o)}const s=U4(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=yh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;a()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function Y4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ye(o),a=G4(r,n,!1);A.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}let Eo=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const K4={...q4,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qa=40,Z4=10,zr=.5,X4=1;function KT(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Q4(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const s=a[1].split(", ").map(parseFloat);s.length===6?(r=s[4],o=s[5],i=Math.sqrt(s[0]*s[0]+s[1]*s[1])):s.length===16&&(r=s[12],o=s[13],i=s[0])}}return{x:r,y:o,scale:i}}const ZT=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...s}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(a)?a:[a]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:v,setToasts:g,pauseTimers:h,expanded:y,setHovering:b}=mh(),[x,S]=A.useState(void 0),[E,I]=A.useState(!1),[w,k]=A.useState(!1),[P,_]=A.useState(!1),[F,V]=A.useState({x:0,y:0}),[N,O]=A.useState({x:0,y:0,scale:1}),[D,z]=A.useState(),[M,C]=A.useState(),[L,$]=A.useState(null),B=A.useRef(null),q=A.useRef({x:0,y:0}),G=A.useRef({x:0,y:0,scale:1}),W=A.useRef(void 0),J=A.useRef(0),re=A.useRef(!1),ee=A.useRef({x:0,y:0}),Y=A.useRef(!1),K=A.useMemo(()=>d.indexOf(r),[r,d]),X=A.useMemo(()=>d.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,d]),de=A.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((j,R)=>j+(R.height||0),0),[d,r]);Y4({open:r.transitionStatus!=="ending",ref:B,onComplete(){r.transitionStatus==="ending"&&v(r.id)}});const H=Ye((j=!1)=>{const R=B.current;if(!R)return;const ne=R.style.height;R.style.height="auto";const ce=R.offsetHeight;R.style.height=ne;function xe(){g(Ce=>Ce.map(_e=>_e.id===r.id?{..._e,ref:B,height:ce,transitionStatus:void 0}:_e))}j?jn.flushSync(xe):xe()});St(H,[H]);function se(j,R){let ne=j,ce=R;return!c.includes("left")&&!c.includes("right")?ne=j>0?j**zr:-(Math.abs(j)**zr):(!c.includes("right")&&j>0&&(ne=j**zr),!c.includes("left")&&j<0&&(ne=-(Math.abs(j)**zr))),!c.includes("up")&&!c.includes("down")?ce=R>0?R**zr:-(Math.abs(R)**zr):(!c.includes("down")&&R>0&&(ce=R**zr),!c.includes("up")&&R<0&&(ce=-(Math.abs(R)**zr))),{x:ne,y:ce}}function ae(j){if(j.button!==0)return;j.pointerType==="touch"&&h();const R=dd(j.nativeEvent);if(!(R&&R.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(re.current=!1,W.current=void 0,J.current=0,q.current={x:j.clientX,y:j.clientY},ee.current=q.current,B.current){const ce=Q4(B.current);G.current=ce,O(ce),V({x:ce.x,y:ce.y})}b(!0),I(!0),k(!1),$(null),Y.current=!0,B.current?.setPointerCapture(j.pointerId)}}function Q(j){if(!E)return;j.preventDefault(),Y.current&&(q.current={x:j.clientX,y:j.clientY},Y.current=!1);const{clientY:R,clientX:ne,movementX:ce,movementY:xe}=j;(xe<0&&R>ee.current.y||xe>0&&R<ee.current.y)&&(ee.current={x:ee.current.x,y:R}),(ce<0&&ne>ee.current.x||ce>0&&ne<ee.current.x)&&(ee.current={x:ne,y:ee.current.y});const Ce=ne-q.current.x,_e=R-q.current.y,qe=R-ee.current.y,pt=ne-ee.current.x;if(!w&&Math.sqrt(Ce*Ce+_e*_e)>=X4&&(k(!0),L===null)){const Oe=c.includes("left")||c.includes("right"),Ge=c.includes("up")||c.includes("down");if(Oe&&Ge){const Ze=Math.abs(Ce),Ne=Math.abs(_e);$(Ze>Ne?"horizontal":"vertical")}}let ht;if(!W.current)L==="vertical"?_e>0?ht="down":_e<0&&(ht="up"):L==="horizontal"?Ce>0?ht="right":Ce<0&&(ht="left"):Math.abs(Ce)>=Math.abs(_e)?ht=Ce>0?"right":"left":ht=_e>0?"down":"up",ht&&c.includes(ht)&&(W.current=ht,J.current=KT(ht,Ce,_e),S(ht));else{const Z=W.current,Oe=KT(Z,pt,qe);Oe>qa?(re.current=!1,S(Z)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&J.current-Oe>=Z4&&(re.current=!0)}const $t=se(Ce,_e);let $e=G.current.x,U=G.current.y;L==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=$t.x):(L==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=$t.x),(c.includes("up")||c.includes("down"))&&(U+=$t.y)),V({x:$e,y:U})}function le(j){if(!E)return;if(I(!1),k(!1),$(null),B.current?.releasePointerCapture(j.pointerId),re.current){V({x:N.x,y:N.y}),S(void 0);return}let R=!1;const ne=F.x-N.x,ce=F.y-N.y;let xe;for(const Ce of c){switch(Ce){case"right":ne>qa&&(R=!0,xe="right");break;case"left":ne<-qa&&(R=!0,xe="left");break;case"down":ce>qa&&(R=!0,xe="down");break;case"up":ce<-qa&&(R=!0,xe="up");break}if(R)break}R?(S(xe),_(!0),p(r.id)):(V({x:N.x,y:N.y}),S(void 0))}function te(j){if(j.key==="Escape"){if(!B.current||!Ar(B.current,ao(In(B.current))))return;p(r.id)}}A.useEffect(()=>{if(!u)return;const j=B.current;if(!j)return;function R(ne){Ar(j,ne.target)&&ne.preventDefault()}return j.addEventListener("touchmove",R,{passive:!1}),()=>{j.removeEventListener("touchmove",R)}},[u]);function fe(){if(!E&&F.x===N.x&&F.y===N.y&&!P)return{[Eo.swipeMovementX]:"0px",[Eo.swipeMovementY]:"0px"};const j=F.x-N.x,R=F.y-N.y;return{transition:E?"none":void 0,transform:E?`translateX(${F.x}px) translateY(${F.y}px) scale(${N.scale})`:void 0,[Eo.swipeMovementX]:`${j}px`,[Eo.swipeMovementY]:`${R}px`}}const pe=r.priority==="high",ve={role:pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":M,"aria-hidden":pe&&!f?!0:void 0,onPointerDown:u?ae:void 0,onPointerMove:u?Q:void 0,onPointerUp:u?le:void 0,onKeyDown:te,inert:B4(r.limited),style:{...fe(),[Eo.index]:r.transitionStatus==="ending"?K:X,[Eo.offsetY]:`${de}px`,[Eo.height]:r.height?`${r.height}px`:void 0}},Ae=A.useMemo(()=>({rootRef:B,toast:r,titleId:D,setTitleId:z,descriptionId:M,setDescriptionId:C,swiping:E,swipeDirection:x,recalculateHeight:H,index:K,visibleIndex:X,expanded:y}),[r,D,M,E,x,H,K,X,y]),me=A.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:Ae.swiping,swipeDirection:Ae.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,Ae.swiping,Ae.swipeDirection]),oe=an("div",t,{ref:[n,Ae.rootRef],state:me,stateAttributesMapping:K4,props:[ve,s]});return m.jsx(vh.Provider,{value:Ae,children:oe})});process.env.NODE_ENV!=="production"&&(ZT.displayName="ToastRoot");const XT=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:s,recalculateHeight:l}=Ei(),c=A.useRef(null);St(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const v=new ResizeObserver(()=>l(!0)),g=new MutationObserver(()=>l(!0));return v.observe(p),g.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{v.disconnect(),g.disconnect()}},[l]);const u=a>0,d=A.useMemo(()=>({expanded:s,behind:u}),[s,u]);return an("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(XT.displayName="ToastContent");const QT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.description,u=!!c,d=Ws(i),{setDescriptionId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("p",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(QT.displayName="ToastDescription");const JT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.title,u=!!c,d=Ws(i),{setTitleId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("h2",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(JT.displayName="ToastTitle");let bh;process.env.NODE_ENV!=="production"&&(bh=new Set);function eE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");bh.has(t)||(bh.add(t),console.error(`Base UI: ${t}`))}}const tE=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(tE.displayName="CompositeRootContext");function J4(e=!1){const t=A.useContext(tE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ir(16));return t}function e3(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,i,o])}}function t3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=J4(!0)!==void 0,s=Ye(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=e3({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||eE("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&eE("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=A.useCallback(()=>{const f=i.current;n3(f)&&a&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,a]);St(c,[c]);const u=A.useCallback((f={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:y,...b}=f;return sd({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}p?.(S)},onMouseDown(S){t||v?.(S)},onKeyDown(S){if(t||(cd(S),h?.(S)),S.baseUIHandlerPrevented)return;const E=S.target===S.currentTarget&&!o&&!s()&&!t,I=S.key==="Enter",w=S.key===" ";E&&((w||I)&&S.preventDefault(),I&&p?.(S))},onKeyUp(S){t||(cd(S),g?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&p?.(S)},onPointerDown(S){if(t){S.preventDefault();return}y?.(S)}},o?void 0:{role:"button"},l,b)},[t,l,o,s]),d=Ye(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function n3(e){return Ot(e)&&e.tagName==="BUTTON"}const nE=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...s}=t,{close:l,expanded:c}=mh(),{toast:u}=Ei(),[d,f]=A.useState(!1),{getButtonProps:p,buttonRef:v}=t3({disabled:i,native:a}),g=A.useMemo(()=>({type:u.type}),[u.type]);return an("button",t,{ref:[n,v],state:g,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!=="production"&&(nE.displayName="ToastClose");function r3(e){return`data-base-ui-${e}`}const xh=A.createContext(null);process.env.NODE_ENV!=="production"&&(xh.displayName="PortalContext");const o3=()=>A.useContext(xh),i3=r3("portal");function rE(e={}){const{ref:t,container:n,componentProps:r=Pn,elementProps:o,elementState:i}=e,a=Ws(),l=o3()?.portalNode,[c,u]=A.useState(null),[d,f]=A.useState(null),p=Ye(y=>{y!==null&&f(y)}),v=A.useRef(null);St(()=>{if(n===null){v.current&&(v.current=null,f(null),u(null));return}if(a==null)return;const y=(n&&(ps(n)?n:n.current))??l??document.body;if(y==null){v.current&&(v.current=null,f(null),u(null));return}v.current!==y&&(v.current=y,f(null),u(y))},[n,l,a]);const g=an("div",r,{ref:[t,p],state:i,props:[{id:a,[i3]:""},o]});return{portalNode:d,portalSubtree:c&&g?jn.createPortal(g,c):null}}const a3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=rE({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),v=A.useRef(null),[g,h]=A.useState(null),y=g?.modal,b=g?.open,x=typeof s=="boolean"?s:!!g&&!g.modal&&g.open&&!!c;A.useEffect(()=>{if(!c||y)return;function E(I){c&&I.relatedTarget&&gd(I)&&(I.type==="focusin"?My:MO)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,y]),A.useEffect(()=>{!c||b||My(c)},[b,c]);const S=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:v,portalNode:c,setFocusManagerState:h}),[c]);return m.jsxs(A.Fragment,{children:[u,m.jsxs(xh.Provider,{value:S,children:[x&&c&&m.jsx(Ti,{"data-type":"outside",ref:d,onFocus:E=>{if(gd(E,c))p.current?.focus();else{const I=g?g.domReference:null;_O(I)?.focus()}}}),x&&c&&m.jsx("span",{"aria-owns":c.id,style:VP}),c&&jn.createPortal(r,c),x&&c&&m.jsx(Ti,{"data-type":"outside",ref:f,onFocus:E=>{if(gd(E,c))v.current?.focus();else{const I=g?g.domReference:null;OO(I)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,qo(jP,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(a3.displayName="FloatingPortal");const oE=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...s}=t,{portalNode:l,portalSubtree:c}=rE({container:o,ref:n,componentProps:t,elementProps:s});return!c&&!l?null:m.jsxs(A.Fragment,{children:[c,l&&jn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(oE.displayName="FloatingPortalLite");const s3=oE;function iE(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return A.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const l3=e=>{const[t,n]=T.useState(!1),r=()=>n(!0),o=()=>n(!1);return T.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},c3=Io("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-wrap 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",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-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"}},defaultVariants:{theme:"default"}}),aE=T.createContext(()=>{throw new Error("Not implemented")}),u3=()=>T.useContext(aE),sE={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]}};function d3(e){const t=e.toast.data?.closable??!0,n=e.hover?"hover":e.isLast?"isLast":"other",r=c3({theme:e.toast.data?.theme||"default"});return m.jsx(ZT,{toast:e.toast,swipeDirection:["down","right"],children:m.jsx(Be.li,{layout:!0,layoutScroll:!0,animate:n,"data-index":e.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:sE[e.reversedIndex]||sE.default},children:m.jsxs(XT,{className:r,children:[m.jsxs("div",{className:"flex flex-col p-4",children:[e.toast.title?m.jsx(JT,{className:"text-lg font-medium leading-relaxed select-text"}):null,m.jsx(QT,{className:"select-text"})]}),t?m.jsx(nE,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:m.jsx(Mo,{className:"size-5"})}):null]})})})}function f3({max:e=5}){const t=T.useRef(null),n=l3(t),o=iE().toasts.slice(-e);return m.jsx(YT,{ref:t,"data-items":o.length,style:{justifyContent:"start",height:`${(n?o.length:Math.min(1,o.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",children:m.jsx(Be.ol,{className:"flex flex-col gap-4",children:m.jsx(fn,{presenceAffectsLayout:!0,mode:"popLayout",children:o.reverse().map((i,a,s)=>m.jsx(d3,{toast:i,hover:n,index:a,isLast:s.length-1===a,reversedIndex:s.length-(a+1)},i.id))})})})}function p3({children:e,max:t=5}){const n=iE(),r=T.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=T.useCallback((i,a)=>{const s=n.add({description:i,title:a?.title,timeout:a?.timeout,data:{theme:a?.theme,closable:a?.closable}});return{close:()=>n.close(s),clear:r}},[n,r]);return m.jsxs(aE.Provider,{value:o,children:[e,m.jsx(s3,{children:m.jsx(f3,{max:t})})]})}function h3({children:e,max:t=5,timeout:n=5e3}){return m.jsx(UT,{limit:t,timeout:n,children:m.jsx(p3,{max:t,children:e})})}const m3=/Mac|iPod|iPhone|iPad/,cc=()=>m3.test(navigator.userAgent),g3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?cc()?"Meta":"Control":n==="Hyper"?cc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),lE=e=>e.map(t=>t.trim()).join("+");class v3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=lE(g3(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=lE(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 y3=e=>(e=e.trim(),e==="Alt"?cc()?m.jsx(oI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?cc()?m.jsx(QC,{"aria-label":"Command",size:12}):"Ctrl":e),b3=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return m.jsxs(T.Fragment,{children:[m.jsx("kbd",{"aria-label":n,children:y3(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},x3=e=>m.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:du(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),w3=T.forwardRef((e,t)=>{const n=T.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:m.jsx(x3,{text:e.text,item:o})}):o.type!=="shortcut"?m.jsx(T.Fragment,{}):m.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Pe("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 gap-2 items-center",children:[o.Icon?o.Icon:null,m.jsx("span",{children:du(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx(b3,{value:o.shortcut}):null]})}),S3=(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:Re.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=hh(o,"title",n),a=r.filter(s=>Re.function(s.enabled)?s.enabled({text:t}):!1);return zn.unique(i.concat(a),s=>s.title)},T3=[0,0,0,0,0],cE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=cE(n.items);if(r)return r}return null},E3=e=>{const t=T.useId(),n=T.useRef(null),[r,o]=T.useState(""),i=T.useRef([]),a=Pt(),s=Pr(r),[l,c]=T.useState(null),u=e.bind??"Mod + k",d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:Jr,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(S=>S.type==="group"?[S,...S.items]:[S]),p=S3(f,r),v=Hs(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:S=>{const E=p[S];return E?E.type==="group":!1},onNavigate:S=>{Re.number(S)&&(dg(n.current,i.current[S])||i.current[S]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Re.number(S)?S:e.open?E??0:null)}}),{getItemProps:g,getReferenceProps:h,getFloatingProps:y}=Yn([v]),b=r===""?f:[{type:"group",title:"Results",items:[]},...p.filter(S=>S.type!=="group")];T.useEffect(()=>{const S=new v3;return S.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&S.add(E.shortcut,I=>E.action({event:I,setText:o,text:s.current,setOpen:e.onChangeVisibility}))}),S.register()},[u,f,e,s]);const x=e.Icon??yu;return m.jsx(T.Fragment,{children:m.jsxs(jp,{...y(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[m.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[m.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?m.jsx(x,{Default:yu,text:r,size:16}):m.jsx(yu,{size:16})}),m.jsx("input",{...h({ref:d.refs.setReference,onKeyDown:S=>{const E=Re.number(l)?b[l]:null;if(S.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:S,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=cE(p);w?.type==="shortcut"&&w.action({event:S,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:S=>o(S.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[m.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:a.commandPaletteLoading}),T3.map((S,E)=>m.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Ip},`${t}-${E}-skeleton-index`))]}):m.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[b.map((S,E)=>T.createElement(w3,{...g({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),S.type==="shortcut"&&S.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:S,text:r,active:l===E,key:`${t}-${S.type}-${E}`})),b.length===1?m.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:a.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(l)?m.jsx(e.Preview,{command:b[l],text:r}):null]}),e.footer?m.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border",children:e.footer}):null]})})},k3=["INPUT","SELECT"],uE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{k3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var wh,dE;function Sh(){if(dE)return wh;dE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return wh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},wh}var Th,fE;function pE(){if(fE)return Th;fE=1;var e=Sh(),t=Hm(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,k){return o.set(w,k),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,k){o.set(w,k)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var k=w.pop(),P=k.obj[k.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);k.obj[k.prop]=_}}},d=function(w,k){for(var P=k&&k.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function I(w,k,P){if(!k)return w;if(typeof k!="object"&&typeof k!="function"){if(r(w))w.push(k);else if(w&&typeof w=="object")if(a(w)){var _=s(w)+1;w[_]=k,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,k))&&(w[k]=!0);else return[w,k];return w}if(!w||typeof w!="object"){if(a(k)){for(var F=Object.keys(k),V=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},N=0;N<F.length;N++){var O=parseInt(F[N],10);V[O+1]=k[F[N]]}return i(V,s(k)+1)}return[w].concat(k)}var D=w;return r(w)&&!r(k)&&(D=d(w,P)),r(w)&&r(k)?(k.forEach(function(z,M){if(n.call(w,M)){var C=w[M];C&&typeof C=="object"&&z&&typeof z=="object"?w[M]=I(C,z,P):w.push(z)}else w[M]=z}),w):Object.keys(k).reduce(function(z,M){var C=k[M];return n.call(z,M)?z[M]=I(z[M],C,P):z[M]=C,z},D)},p=function(w,k){return Object.keys(k).reduce(function(P,_){return P[_]=k[_],P},w)},v=function(I,w,k){var P=I.replace(/\+/g," ");if(k==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},g=1024,h=function(w,k,P,_,F){if(w.length===0)return w;var V=w;if(typeof w=="symbol"?V=Symbol.prototype.toString.call(w):typeof w!="string"&&(V=String(w)),P==="iso-8859-1")return escape(V).replace(/%u[0-9a-f]{4}/gi,function(L){return"%26%23"+parseInt(L.slice(2),16)+"%3B"});for(var N="",O=0;O<V.length;O+=g){for(var D=V.length>=g?V.slice(O,O+g):V,z=[],M=0;M<D.length;++M){var C=D.charCodeAt(M);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||F===e.RFC1738&&(C===40||C===41)){z[z.length]=D.charAt(M);continue}if(C<128){z[z.length]=c[C];continue}if(C<2048){z[z.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){z[z.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}M+=1,C=65536+((C&1023)<<10|D.charCodeAt(M)&1023),z[z.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}N+=z.join("")}return N},y=function(w){for(var k=[{obj:{o:w},prop:"o"}],P=[],_=0;_<k.length;++_)for(var F=k[_],V=F.obj[F.prop],N=Object.keys(V),O=0;O<N.length;++O){var D=N[O],z=V[D];typeof z=="object"&&z!==null&&P.indexOf(z)===-1&&(k.push({obj:V,prop:D}),P.push(z))}return u(k),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},S=function(w,k,P,_){if(a(w)){var F=s(w)+1;return w[F]=k,l(w,F),w}var V=[].concat(w,k);return V.length>P?i(d(V,{plainObjects:_}),V.length-1):V},E=function(w,k){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(k(w[_]));return P}return k(w)};return Th={arrayToObject:d,assign:p,combine:S,compact:y,decode:v,encode:h,isBuffer:x,isOverflow:a,isRegExp:b,maybeMap:E,merge:f},Th}var Eh,hE;function C3(){if(hE)return Eh;hE=1;var e=Hm(),t=pE(),n=Sh(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},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"},f={},p=function g(h,y,b,x,S,E,I,w,k,P,_,F,V,N,O,D,z,M){for(var C=h,L=M,$=0,B=!1;(L=L.get(f))!==void 0&&!B;){var q=L.get(h);if($+=1,typeof q<"u"){if(q===$)throw new RangeError("Cyclic object value");B=!0}typeof L.get(f)>"u"&&($=0)}if(typeof P=="function"?C=P(y,C):C instanceof Date?C=V(C):b==="comma"&&i(C)&&(C=t.maybeMap(C,function(Q){return Q instanceof Date?V(Q):Q})),C===null){if(E)return k&&!D?k(y,u.encoder,z,"key",N):y;C=""}if(d(C)||t.isBuffer(C)){if(k){var G=D?y:k(y,u.encoder,z,"key",N);return[O(G)+"="+O(k(C,u.encoder,z,"value",N))]}return[O(y)+"="+O(String(C))]}var W=[];if(typeof C>"u")return W;var J;if(b==="comma"&&i(C))D&&k&&(C=t.maybeMap(C,k)),J=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(P))J=P;else{var re=Object.keys(C);J=_?re.sort(_):re}var ee=w?String(y).replace(/\./g,"%2E"):String(y),Y=x&&i(C)&&C.length===1?ee+"[]":ee;if(S&&i(C)&&C.length===0)return Y+"[]";for(var K=0;K<J.length;++K){var X=J[K],de=typeof X=="object"&&X&&typeof X.value<"u"?X.value:C[X];if(!(I&&de===null)){var H=F&&w?String(X).replace(/\./g,"%2E"):String(X),se=i(C)?typeof b=="function"?b(Y,H):Y:Y+(F?"."+H:"["+H+"]");M.set(h,$);var ae=e();ae.set(f,M),s(W,g(de,se,b,x,S,E,I,w,b==="comma"&&D&&i(C)?null:k,P,_,F,V,N,O,D,z,ae))}}return W},v=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 y=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 b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var E;if(h.arrayFormat in o?E=h.arrayFormat:"indices"in h?E=h.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:y,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:S,format:b,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 Eh=function(g,h){var y=g,b=v(h),x,S;typeof b.filter=="function"?(S=b.filter,y=S("",y)):i(b.filter)&&(S=b.filter,x=S);var E=[];if(typeof y!="object"||y===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(y)),b.sort&&x.sort(b.sort);for(var k=e(),P=0;P<x.length;++P){var _=x[P],F=y[_];b.skipNulls&&F===null||s(E,p(F,_,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,k))}var V=E.join(b.delimiter),N=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?N+="utf8=%26%2310003%3B&":N+="utf8=%E2%9C%93&"),V.length>0?N+V:""},Eh}var kh,mE;function I3(){if(mE)return kh;mE=1;var e=pE(),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(v,g){return String.fromCharCode(parseInt(g,10))})},i=function(p,v,g){if(p&&typeof p=="string"&&v.comma&&p.indexOf(",")>-1)return p.split(",");if(v.throwOnLimitExceeded&&g>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,g){var h={__proto__:null},y=g.ignoreQueryPrefix?v.replace(/^\?/,""):v;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=g.parameterLimit===1/0?void 0:g.parameterLimit,x=y.split(g.delimiter,g.throwOnLimitExceeded?b+1:b);if(g.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var S=-1,E,I=g.charset;if(g.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===s?I="utf-8":x[E]===a&&(I="iso-8859-1"),S=E,E=x.length);for(E=0;E<x.length;++E)if(E!==S){var w=x[E],k=w.indexOf("]="),P=k===-1?w.indexOf("="):k+1,_,F;if(P===-1?(_=g.decoder(w,r.decoder,I,"key"),F=g.strictNullHandling?null:""):(_=g.decoder(w.slice(0,P),r.decoder,I,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),g,n(h[_])?h[_].length:0),function(N){return g.decoder(N,r.decoder,I,"value")}))),F&&g.interpretNumericEntities&&I==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var V=t.call(h,_);V&&g.duplicates==="combine"?h[_]=e.combine(h[_],F,g.arrayLimit,g.plainObjects):(!V||g.duplicates==="last")&&(h[_]=F)}}return h},c=function(p,v,g,h){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");y=Array.isArray(v)&&v[b]?v[b].length:0}for(var x=h?v:i(v,g,y),S=p.length-1;S>=0;--S){var E,I=p[S];if(I==="[]"&&g.parseArrays)e.isOverflow(x)?E=x:E=g.allowEmptyArrays&&(x===""||g.strictNullHandling&&x===null)?[]:e.combine([],x,g.arrayLimit,g.plainObjects);else{E=g.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,k=g.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(k,10);!g.parseArrays&&k===""?E={0:x}:!isNaN(P)&&I!==k&&String(P)===k&&P>=0&&g.parseArrays&&P<=g.arrayLimit?(E=[],E[P]=x):k!=="__proto__"&&(E[k]=x)}x=E}return x},u=function(v,g){var h=g.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(g.depth<=0)return!g.plainObjects&&t.call(Object.prototype,h)&&!g.allowPrototypes?void 0:[h];var y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=y.exec(h),S=x?h.slice(0,x.index):h,E=[];if(S){if(!g.plainObjects&&t.call(Object.prototype,S)&&!g.allowPrototypes)return;E.push(S)}for(var I=0;(x=b.exec(h))!==null&&I<g.depth;){I+=1;var w=x[1].slice(1,-1);if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(x[1])}if(x){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+h.slice(x.index)+"]")}return E},d=function(v,g,h,y){if(v){var b=u(v,h);if(b)return c(b,g,h,y)}},f=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var g=typeof v.charset>"u"?r.charset:v.charset,h=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:g,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:h,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return kh=function(p,v){var g=f(v);if(p===""||p===null||typeof p>"u")return g.plainObjects?{__proto__:null}:{};for(var h=typeof p=="string"?l(p,g):p,y=g.plainObjects?{__proto__:null}:{},b=Object.keys(h),x=0;x<b.length;++x){var S=b[x],E=d(S,h[S],g,typeof p=="string");y=e.merge(y,E,g)}return g.allowSparse===!0?y:e.compact(y)},kh}var Ch,gE;function A3(){if(gE)return Ch;gE=1;var e=C3(),t=I3(),n=Sh();return Ch={formats:n,parse:t,stringify:e},Ch}var P3=A3(),et;(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})(et||(et={}));var vE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vE||(vE={}));const Ee=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return Number.isNaN(e)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(e)?Ee.array:e===null?Ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ee.promise:typeof Map<"u"&&e instanceof Map?Ee.map:typeof Set<"u"&&e instanceof Set?Ee.set:typeof Date<"u"&&e instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ge=et.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 gr 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 gr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.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()}}gr.create=e=>new gr(e);const Ih=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.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}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.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 ge.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 ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let O3=Ih;function _3(){return O3}const M3=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 ye(e,t){const n=_3(),r=M3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ih?void 0:Ih].filter(o=>!!o)});e.common.issues.push(r)}class mn{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 Le;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 mn.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 Le;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 Le=Object.freeze({status:"aborted"}),Ua=e=>({status:"dirty",value:e}),En=e=>({status:"valid",value:e}),yE=e=>e.status==="aborted",bE=e=>e.status==="dirty",ki=e=>e.status==="valid",uc=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));class Rr{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 xE=(e,t)=>{if(ki(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 gr(e.common.issues);return this._error=n,this._error}}};function Ue(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 Xe{get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new mn,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(uc(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:jr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return xE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ki(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=>ki(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:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(uc(o)?o:Promise.resolve(o));return xE(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:ge.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 Pi({schema:this,typeName:Ve.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 Hr.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this)}promise(){return hc.create(this,this._def)}or(t){return fc.create([this,t],this._def)}and(t){return pc.create(this,t,this._def)}transform(t){return new Pi({...Ue(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Oh({...Ue(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new tH({typeName:Ve.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _h({...Ue(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mh.create(this,t)}readonly(){return Dh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const D3=/^c[^\s-]{8,}$/i,N3=/^[0-9a-z]+$/,F3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,L3=/^[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,V3=/^[a-z0-9_-]{21}$/i,$3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,z3=/^[-+]?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)?)??$/,j3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ah;const B3=/^(?:(?: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])$/,H3=/^(?:(?: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])$/,W3=/^(([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]))$/,q3=/^(([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])$/,U3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wE="((\\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])))",Y3=new RegExp(`^${wE}$`);function SE(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 K3(e){return new RegExp(`^${SE(e)}$`)}function Z3(e){let t=`${wE}T${SE(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 X3(e,t){return!!((t==="v4"||!t)&&B3.test(e)||(t==="v6"||!t)&&W3.test(e))}function Q3(e,t){if(!$3.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 J3(e,t){return!!((t==="v4"||!t)&&H3.test(e)||(t==="v6"||!t)&&q3.test(e))}class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ee.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.string,received:i.parsedType}),Le}const r=new mn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.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),ye(o,{code:ge.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?ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")j3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ah||(Ah=new RegExp(R3,"u")),Ah.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")L3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")V3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")D3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")N3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")F3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:ge.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),ye(o,{validation:"regex",code:ge.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),ye(o,{code:ge.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),ye(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Z3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Y3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?K3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?z3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?X3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Q3(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?J3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?U3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?G3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...ke.errToObj(r)})}_addCheck(t){return new ko({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.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,...ke.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,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ke.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new ko({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ko({...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}}ko.create=e=>new ko({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ue(e)});function eH(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 Ci extends Xe{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)!==Ee.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.number,received:i.parsedType}),Le}let r;const o=new mn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.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),ye(r,{code:ge.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),ye(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?eH(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.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"&&et.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)}}Ci.create=e=>new Ci({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class Ga extends Xe{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)!==Ee.bigint)return this._getInvalidInput(t);let r;const o=new mn;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),ye(r,{code:ge.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),ye(r,{code:ge.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),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ga({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.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}}Ga.create=e=>new Ga({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class TE extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ee.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.boolean,received:r.parsedType}),Le}return En(t.data)}}TE.create=e=>new TE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class dc extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ee.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_date}),Le}const r=new mn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.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),ye(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new dc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.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}}dc.create=e=>new dc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ue(e)});class EE extends Xe{_parse(t){if(this._getType(t)!==Ee.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.symbol,received:r.parsedType}),Le}return En(t.data)}}EE.create=e=>new EE({typeName:Ve.ZodSymbol,...Ue(e)});class kE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.undefined,received:r.parsedType}),Le}return En(t.data)}}kE.create=e=>new kE({typeName:Ve.ZodUndefined,...Ue(e)});class CE extends Xe{_parse(t){if(this._getType(t)!==Ee.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.null,received:r.parsedType}),Le}return En(t.data)}}CE.create=e=>new CE({typeName:Ve.ZodNull,...Ue(e)});class IE extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return En(t.data)}}IE.create=e=>new IE({typeName:Ve.ZodAny,...Ue(e)});class AE extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return En(t.data)}}AE.create=e=>new AE({typeName:Ve.ZodUnknown,...Ue(e)});class Br extends Xe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.never,received:n.parsedType}),Le}}Br.create=e=>new Br({typeName:Ve.ZodNever,...Ue(e)});class PE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.void,received:r.parsedType}),Le}return En(t.data)}}PE.create=e=>new PE({typeName:Ve.ZodVoid,...Ue(e)});class ir extends Xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ee.array)return ye(n,{code:ge.invalid_type,expected:Ee.array,received:n.parsedType}),Le;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ye(n,{code:a?ge.too_big:ge.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&&(ye(n,{code:ge.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&&(ye(n,{code:ge.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 Rr(n,a,n.path,s)))).then(a=>mn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rr(n,a,n.path,s)));return mn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ir({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new ir({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new ir({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}ir.create=(e,t)=>new ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ue(t)});function Ii(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hr.create(Ii(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof ir?new ir({...e._def,type:Ii(e.element)}):e instanceof Hr?Hr.create(Ii(e.unwrap())):e instanceof Oi?Oi.create(Ii(e.unwrap())):e instanceof Co?Co.create(e.items.map(t=>Ii(t))):e}class Bt extends Xe{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=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ee.object){const c=this._getOrReturnCtx(t);return ye(c,{code:ge.invalid_type,expected:Ee.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Br&&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 Rr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Br){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&&(ye(o,{code:ge.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 Rr(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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>mn.mergeObjectSync(r,c)):mn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new Bt({...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:ke.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Ii(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return DE(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)});class fc extends Xe{_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 gr(s.ctx.common.issues));return ye(n,{code:ge.invalid_union,unionErrors:a}),Le}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 gr(l));return ye(n,{code:ge.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}fc.create=(e,t)=>new fc({options:e,typeName:Ve.ZodUnion,...Ue(t)});function Ph(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===Ee.object&&r===Ee.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ph(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ee.array&&r===Ee.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=Ph(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ee.date&&r===Ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class pc extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(yE(i)||yE(a))return Le;const s=Ph(i.value,a.value);return s.valid?((bE(i)||bE(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ge.invalid_intersection_types}),Le)};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}))}}pc.create=(e,t,n)=>new pc({left:e,right:t,typeName:Ve.ZodIntersection,...Ue(n)});class Co extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.array)return ye(r,{code:ge.invalid_type,expected:Ee.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ye(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ge.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 Rr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>mn.mergeArray(n,a)):mn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Co({...this._def,rest:t})}}Co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Co({items:e,typeName:Ve.ZodTuple,rest:null,...Ue(t)})};class OE extends Xe{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!==Ee.map)return ye(r,{code:ge.invalid_type,expected:Ee.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rr(r,s,r.path,[c,"key"])),value:i._parse(new Rr(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 Le;(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 Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}OE.create=(e,t,n)=>new OE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ue(n)});class Ya extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.set)return ye(r,{code:ge.invalid_type,expected:Ee.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:ge.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&&(ye(r,{code:ge.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 Le;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 Rr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ya({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new Ya({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ya.create=(e,t)=>new Ya({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ue(t)});class _E extends Xe{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})}}_E.create=(e,t)=>new _E({getter:e,typeName:Ve.ZodLazy,...Ue(t)});class ME extends Xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}ME.create=(e,t)=>new ME({value:e,typeName:Ve.ZodLiteral,...Ue(t)});function DE(e,t){return new Ai({values:e,typeName:Ve.ZodEnum,...Ue(t)})}class Ai extends Xe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:et.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Le}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 ye(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Le}return En(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 Ai.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ai.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ai.create=DE;class NE extends Xe{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ee.string&&r.parsedType!==Ee.number){const o=et.objectValues(n);return ye(r,{expected:et.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return ye(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Le}return En(t.data)}get enum(){return this._def.values}}NE.create=(e,t)=>new NE({values:e,typeName:Ve.ZodNativeEnum,...Ue(t)});class hc extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ee.promise&&n.common.async===!1)return ye(n,{code:ge.invalid_type,expected:Ee.promise,received:n.parsedType}),Le;const r=n.parsedType===Ee.promise?n.data:Promise.resolve(n.data);return En(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hc.create=(e,t)=>new hc({type:e,typeName:Ve.ZodPromise,...Ue(t)});class Pi extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.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=>{ye(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 Le;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Ua(l.value):l});{if(n.value==="aborted")return Le;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Le:s.status==="dirty"||n.value==="dirty"?Ua(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"?Le:(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"?Le:(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(!ki(a))return Le;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=>ki(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Le);et.assertNever(o)}}Pi.create=(e,t,n)=>new Pi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ue(n)}),Pi.createWithPreprocess=(e,t,n)=>new Pi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ue(n)});class Hr extends Xe{_parse(t){return this._getType(t)===Ee.undefined?En(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:Ve.ZodOptional,...Ue(t)});class Oi extends Xe{_parse(t){return this._getType(t)===Ee.null?En(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oi.create=(e,t)=>new Oi({innerType:e,typeName:Ve.ZodNullable,...Ue(t)});class Oh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Oh.create=(e,t)=>new Oh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class _h extends Xe{_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 uc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_h.create=(e,t)=>new _h({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class FE extends Xe{_parse(t){if(this._getType(t)!==Ee.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}FE.create=e=>new FE({typeName:Ve.ZodNaN,...Ue(e)});class tH extends Xe{_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 Mh extends Xe{_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"?Le:i.status==="dirty"?(n.dirty(),Ua(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"?Le: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 Mh({in:t,out:n,typeName:Ve.ZodPipeline})}}class Dh extends Xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ki(o)&&(o.value=Object.freeze(o.value)),o);return uc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Dh.create=(e,t)=>new Dh({innerType:e,typeName:Ve.ZodReadonly,...Ue(t)});var Ve;(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"})(Ve||(Ve={})),Br.create,ir.create,fc.create,pc.create,Co.create,Ai.create,hc.create,Hr.create,Oi.create;const nH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},rH=(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]}}},LE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):LE(t),o=structuredClone(e);return rH(o,r,n),o},oH=(e,t)=>e.localeCompare(t),_i={},VE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return $E(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=VE(e._def.innerType);return t==="ZodArray"?n??[]:n}},$E=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,VE(n)])),zE=(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]=zE(i,o):n[r]=o||i)}return n},iH={sort:oH,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},jE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return P3.parse(n.toString(),iH)},Wr=(e,t)=>LE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),qr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Nh=e=>{const t=e.dataset.target;if(!t)return qr(e);const n=document.querySelector(`[data-origin="${t}"]`);return qr(n||e)},aH={state:{},loading:!1,useOnChange:!1},RE=e=>e.dataset.target||e.name,sH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=za.LocalStorage.get(t);return nH(n)?n:{}},clear:()=>{za.LocalStorage.delete(t)},set:n=>za.LocalStorage.set(t,n)}},lH=(e,t,n=aH)=>{const[r,o]=T.useState(null),i=T.useRef({}),[a,s]=T.useState(()=>Re.function(n?.state)?n.state():n?.state??$E(e)??{}),l=T.useCallback(x=>{const S=x.target,E=x.currentTarget;if(S.dataset.optional==="true")return;const w=RE(S),k=Nh(S)||(E?qr(E):""),P=Wr(w,e);if(S.setAttribute("data-initialized","true"),P){const _=P.safeParse(k),F=_.success?void 0:_.error.issues[0]?.message??"";o(V=>gn(V??{},w,F))}},[e]),c=T.useCallback(x=>S=>{const E=S.currentTarget,I=Object.values(i.current).reduce((k,P)=>{const _=P.element,F=P.schema.safeParse(qr(_));if(_.dataset.ignore==="ignore"||F.success)return k;const V=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const N=_.dataset.name||_.name||"";return gn(k,N,V)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,S=_i)=>{const E=Wr(x,e),I=w=>{if(!Zl(w))return;s(P=>gn(P,x,w.toISOString())),o(P=>gn(P,x,void 0));const k=i.current[x].element;if(k){const P=k.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}S?.onChange?.(w)};return{...S,loading:n.loading,name:x,id:x,onChange:I,form:t,date:Re.string(a[x])?new Date(a[x]):a[x],required:S.required??!E.isOptional(),error:Rn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,S=_i)=>{const E=Wr(x,e);return{...S,name:x,id:x,onChange:w=>{const k=w.target.value;s(P=>gn(P,x,k)),S?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),value:Rn(a,x,void 0)??"",required:S.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,S=_i)=>{const E=Wr(x,e);return{...S,name:x,id:x,onChange:w=>{const k=w.target.checked;s(P=>gn(P??{},x,k)),S?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:S.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},p=(x,S=_i)=>{const E=Wr(x,e),I=w=>{w.persist?.();const k=w.target.value;S?.onChange?.(w),s(P=>gn(P,x,k))};return{...S,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Rn(r,x,void 0),required:S.required??!E.isOptional(),value:Rn(a,x,void 0)||S?.value||"",type:Re.instance(E,Ci)?"number":S?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},v=(x,S=_i)=>{const E=Wr(x,e);return{...S,name:x,id:x,onChangeOptions:w=>{s(k=>gn(k,x,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:S.required??!E.isOptional(),value:Rn(a,x,void 0)||S?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},g=(x,S=_i)=>{const E=Wr(x,e),I=E._def.typeName==="ZodNumber";return{...S,name:x,id:x,onChange:k=>{k.persist?.();const P=I?k.target.valueAsNumber:k.target.value;S?.onChange?.(k),s(_=>gn(_,x,P))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:S.required??!E.isOptional(),type:I?"number":S?.type??"text",value:Rn(a,x,void 0)||S?.value||"",ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:E})}};T.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(qr(I)),k=V=>{const N=RE(V.target);if(!N)return!1;const O=V.target,D=Nh(V.target)||(V.relatedTarget?qr(V.relatedTarget):""),z=E.schema.safeParse(D);if(O.setAttribute("value",D),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const C=gn(M,N,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(C)?null:C}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(C=>{if(Re.null(C))return null;const L=gn(C,N,M||void 0);return Re.empty(L)?null:L})}return!1},P=new AbortController,_=I.getAttribute("data-trigger")||"blur";I.addEventListener(_,k,{signal:P.signal});const F=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:F,unsubscribe:()=>P.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const h=x=>S=>{S.preventDefault();const E=S.currentTarget;let I=jE(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(F=>{if(F.tagName==="SELECT"){const V=F;I=gn(I,V.name,V.value)}if(F.tagName==="INPUT"){const V=F,N=Nh(V)||(V?qr(V):"");I=gn(I,V.dataset.target||V.name,N)}});const k=zE(I,a),P=e.safeParse(k),_=()=>{uE(E),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return E.setAttribute("data-json",F),n.interceptor?.clear(),x?.(S,{form:E,event:S,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),E.reportValidity(),x?.(S,{form:E,json:I,event:S,reset:_,setErrors:o,data:I,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(V=>String(V))}))})},y=x=>Ju(a,x)||"",b=x=>({...x,id:t,name:t});return T.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:g,state:a,errors:r,select:d,checkbox:f,onSubmit:h,setState:s,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:v,disabled:r!==null}},cH=e=>e?JSON.parse(e.getAttribute("data-json")):{},uH=e=>{const t=T.useRef(void 0);return T.useEffect(()=>{t.current=e},[e]),t.current},BE={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},HE={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"},WE={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},dH={name:"dark",zIndex:WE,rounded:BE,spacing:HE,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%)",disabled:"hsla(240, 4%, 33%)",muted:{DEFAULT:"hsla(210, 10%, 28%)",foreground:"hsla(210, 12%, 46%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},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(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",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%)"}}}},fH={rounded:BE,spacing:HE,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:WE,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:{DEFAULT:"hsla(210, 30%, 86%)",foreground:"hsla(210, 15%, 20%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},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%)"}}}},pH=dH,hH=fH,mH=e=>{const t=T.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...ds,...e.tweaks},parser:e.parser||ls.hsla,map:{...us,...e.map}}),[e]);return m.jsx(Kr.Provider,{value:t,children:e.children})};ie.Alert=R$,ie.AnimatedList=k$,ie.AnimatedListItem=C$,ie.Autocomplete=I4,ie.Button=ro,ie.Calendar=WS,ie.Card=Hl,ie.Checkbox=$p,ie.ColType=gi,ie.Collapse=lS,ie.CommandPalette=E3,ie.ComponentsProvider=mH,ie.Context=Kr,ie.DatePicker=XR,ie.Description=pz,ie.Dict=zn,ie.Dropdown=mi,ie.Empty=Y1,ie.Expand=vz,ie.FileUpload=v4,ie.Form=TC,ie.Info=hz,ie.Input=Wo,ie.InputFeedback=ly,ie.InputField=Xi,ie.Loading=gz,ie.Menu=J$,ie.MenuItem=Q$,ie.Modal=jp,ie.MultiSelect=N4,ie.Notifications=h3,ie.PageHeader=mz,ie.PageTitle=gS,ie.Paragraph=fz,ie.Polymorph=ln,ie.Progress=qR,ie.Radiobox=ez,ie.RenderOnView=z4,ie.Select=oo,ie.Slider=p_,ie.Spinner=vS,ie.Stats=B$,ie.StatsCard=T$,ie.Step=D$,ie.Steps=N$,ie.Switch=h_,ie.Tab=$$,ie.Table=S$,ie.Tabs=L$,ie.Tag=ts,ie.TaskList=dz,ie.Textarea=tz,ie.Timeline=UR,ie.TimelineItem=Ql,ie.Toolbar=GR,ie.Tooltip=td,ie.TransferList=V4,ie.Wizard=Sz,ie.createColumns=qV,ie.createCssProperties=fI,ie.createDesignTokens=_g,ie.createFormStorage=sH,ie.createOptionCols=Op,ie.createStyles=cI,ie.createTheme=dI,ie.createTokenStyles=pI,ie.css=Pe,ie.defaultDarkTheme=pH,ie.defaultLightTheme=hH,ie.defaultTranslations=us,ie.defaultTweaks=ds,ie.dispatchInput=cg,ie.formReset=uE,ie.formToJson=jE,ie.getCoords=bC,ie.getJsonForm=cH,ie.getModalScrollerRef=ZV,ie.getRemainingSize=$i,ie.getSchemaShape=Wr,ie.hasVerticalScroll=ug,ie.initializeInputDataset=Vi,ie.isChildVisible=dg,ie.isMobile=sy,ie.isReactComponent=yC,ie.isReactFC=du,ie.isSsr=Cr,ie.mergeRefs=sr,ie.negate=PP,ie.noop=Ho,ie.parsers=ls,ie.path=Ju,ie.reduceTokens=yr,ie.safeRegex=ed,ie.splitInto=ay,ie.useColorParser=J1,ie.useForm=lH,ie.useLocale=sl,ie.useNotification=u3,ie.usePrevious=uH,ie.useReactive=nS,ie.useStableRef=Pr,ie.useStepContext=tS,ie.useSwipe=$S,ie.useTablePreferences=YV,ie.useTranslations=Pt,ie.uuid=Bo,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
|
|
14
|
+
`),()=>{T.contains(x)&&T.removeChild(x)}},[t]),m.jsx(jN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const BN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=_n(HN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const g of u.values())if(!g)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,g)=>u.set(g,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(RN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),m.jsx(ul.Provider,{value:p,children:e})};function HN(){return new Map}function z0(e=!0){const t=S.useContext(ul);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 El=e=>e.key||"";function j0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const fn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=z0(a),f=S.useMemo(()=>j0(e),[e]),p=a&&!u?[]:f.map(El),v=S.useRef(!0),g=S.useRef(f),h=_n(()=>new Map),y=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);cl(()=>{v.current=!1,g.current=f;for(let C=0;C<T.length;C++){const P=El(T[C]);p.includes(P)?(h.delete(P),y.current.delete(P)):h.get(P)!==!0&&h.set(P,!1)}},[T,p.length,p.join("-")]);const I=[];if(f!==b){let C=[...f];for(let P=0;P<T.length;P++){const _=T[P],F=El(_);p.includes(F)||(C.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(C=I),E(j0(C)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.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:w}=S.useContext(ra);return m.jsx(m.Fragment,{children:T.map(C=>{const P=El(C),_=a&&!u?!1:f===T||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),h.has(P))h.set(P,!0);else return;let V=!0;h.forEach(N=>{N||(V=!1)}),V&&(w?.(),E(g.current),a&&d?.(),r&&r())};return m.jsx(BN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:C},P)})})},WN=S.createContext(null);function qN(){const e=S.useRef(!1);return cl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function UN(){const e=qN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const R0=e=>e===!0,GN=e=>R0(e===!0)||e==="id",YN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(ra),o=S.useContext(WN),[i,a]=UN(),s=S.useRef(null),l=r.id||o;s.current===null&&(GN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:R0(n)&&r.group||L0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(ra.Provider,{value:c,children:e})},B0=S.createContext({strict:!1}),H0={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"]};let W0=!1;function KN(){if(W0)return;const e={};for(const t in H0)e[t]={isEnabled:n=>H0[t].some(r=>!!n[r])};Mx(e),W0=!0}function q0(){return KN(),_D()}function ZN(e){const t=q0();for(const n in e)t[n]={...t[n],...e[n]};Mx(t)}const XN=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 Cl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XN.has(e)}let U0=e=>!Cl(e);function G0(e){typeof e=="function"&&(U0=t=>t.startsWith("on")?!Cl(t):e(t))}try{G0(require("@emotion/is-prop-valid").default)}catch{}function QN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(U0(o)||n===!0&&Cl(o)||!t&&!Cl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Nf({children:e,isValidProp:t,...n}){t&&G0(t),n={...S.useContext(ai),...n},n.isStatic=_n(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(ai.Provider,{value:r,children:e})}const kl=S.createContext({});function JN(e,t){if(yl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ma(n)?n:void 0,animate:ma(r)?r:void 0}}return e.inherit!==!1?t:{}}function e2(e){const{initial:t,animate:n}=JN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[Y0(t),Y0(n)])}function Y0(e){return Array.isArray(e)?e.join(" "):e}const Ff=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function K0(e,t,n){for(const r in t)!jt(t[r])&&!Ux(r,n)&&(e[r]=t[r])}function t2({transformTemplate:e},t){return S.useMemo(()=>{const n=Ff();return Af(n,t,e),Object.assign({},n.vars,n.style)},[t])}function n2(e,t){const n=e.style||{},r={};return K0(r,n,e),Object.assign(r,t2(e,t)),r}function r2(e,t){const n={},r=n2(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 Z0=()=>({...Ff(),attrs:{}});function o2(e,t,n,r){const o=S.useMemo(()=>{const i=Z0();return Yx(i,t,Zx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};K0(i,e.style,e),o.style={...i,...o.style}}return o}const i2=["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 Lf(e){return typeof e!="string"||e.includes("-")?!1:!!(i2.indexOf(e)>-1||/[A-Z]/u.test(e))}function a2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Lf(e)?o2:r2)(t,r,o,e),c=QN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>jt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function s2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:l2(n,r,o,e),renderState:t()}}function l2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Sl(i[f]);let{initial:a,animate:s}=e;const l=yl(e),c=Ox(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"&&!vl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=cf(e,f[p]);if(v){const{transitionEnd:g,transition:h,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[b]=x)}for(const b in g)o[b]=g[b]}}}return o}const X0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(ul),i=()=>s2(e,t,r,o);return n?i():_n(i)},c2=X0({scrapeMotionValuesFromProps:Of,createRenderState:Ff}),u2=X0({scrapeMotionValuesFromProps:Xx,createRenderState:Z0}),d2=Symbol.for("motionComponentSymbol");function f2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const Q0=S.createContext({});function ba(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function p2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(B0),l=S.useContext(ul),c=S.useContext(ai).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(Q0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&h2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[cx],g=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return cl(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),g.current=!1),d.enteringChildren=void 0)}),d}function h2(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:J0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ba(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function J0(e){if(e)return e.options.allowProjection!==!1?e.projection:J0(e.parent)}function Vf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&ZN(r);const i=n?n==="svg":Lf(e),a=i?u2:c2;function s(c,u){let d;const f={...S.useContext(ai),...c,layoutId:m2(c)},{isStatic:p}=f,v=e2(c),g=a(c,p);if(!p&&ob){g2(f,r);const h=v2(f);d=h.MeasureLayout,v.visualElement=p2(e,g,f,o,h.ProjectionNode,i)}return m.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?m.jsx(d,{visualElement:v.visualElement,...f}):null,a2(e,c,f2(g,v.visualElement,u),g,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[d2]=e,l}function m2({layoutId:e}){const t=S.useContext(ra).id;return t&&e!==void 0?t+"-"+e:e}function g2(e,t){const n=S.useContext(B0).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?Ko(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function v2(e){const t=q0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function y2(e,t){if(typeof Proxy>"u")return Vf;const n=new Map,r=(i,a)=>Vf(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&Ad(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Vf(a,void 0,e,t)),n.get(a))})}const b2=(e,t)=>t.isSVG??Lf(e)?new Qx(t):new Gx(t,{allowProjection:e!==S.Fragment});class x2 extends Fr{constructor(t){super(t),t.animationState||(t.animationState=QD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vl(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 w2=0;class S2 extends Fr{constructor(){super(...arguments),this.id=w2++}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 T2={animation:{Feature:x2},exit:{Feature:S2}};function xa(e){return{point:{x:e.pageX,y:e.pageY}}}const E2=e=>t=>bf(t)&&e(t,xa(t));function wa(e,t,n,r){return ya(e,t,E2(n),r)}const ew=({current:e})=>e?e.ownerDocument.defaultView:null,tw=(e,t)=>Math.abs(e-t);function C2(e,t){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}const nw=new Set(["auto","scroll"]);class rw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=zf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,g=C2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!g)return;const{point:h}=p,{timestamp:y}=Kt;this.history.push({...h,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=$f(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:g,onSessionEnd:h,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=zf(p.type==="pointercancel"?this.lastMoveEventInfo:$f(v,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),h&&h(p,b)},!bf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=xa(t),c=$f(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,zf(c,this.history)),this.removeListeners=ia(wa(this.contextWindow,"pointermove",this.handlePointerMove),wa(this.contextWindow,"pointerup",this.handlePointerUp),wa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(nw.has(r.overflowX)||nw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),mr(this.updatePoint)}}function $f(e,t){return t?{point:t(e.point)}:e}function ow(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zf({point:e},t){return{point:e,delta:ow(e,iw(t)),offset:ow(e,k2(t)),velocity:I2(t,.1)}}function k2(e){return e[0]}function iw(e){return e[e.length-1]}function I2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=iw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=bn(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 A2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function aw(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 P2(e,{top:t,left:n,bottom:r,right:o}){return{x:aw(e.x,n,o),y:aw(e.y,t,r)}}function sw(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 O2(e,t){return{x:sw(e.x,t.x),y:sw(e.y,t.y)}}function _2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Zo(t.min,t.max-r,e.min):r>o&&(n=Zo(e.min,e.max-o,t.min)),Kn(0,1,n)}function M2(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 jf=.35;function D2(e=jf){return e===!1?e=0:e===!0&&(e=jf),{x:lw(e,"left","right"),y:lw(e,"top","bottom")}}function lw(e,t,n){return{min:cw(e,t),max:cw(e,n)}}function cw(e,t){return typeof e=="number"?e:e[t]||0}const N2=new WeakMap;class F2{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=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(xa(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:g}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Zn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[y];T&&(b=en(T)*(parseFloat(b)/100))}}this.originPoint[y]=b}),g&>.postRender(()=>g(d,f)),df(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:g,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=L2(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>xn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new rw(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:ew(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&>.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Il(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=A2(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&&ba(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P2(r.layoutBox,t):this.constraints=!1,this.elastic=D2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=M2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ba(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=FD(r,o.root,this.visualElement.getTransformPagePoint());let a=O2(o.layout.layoutBox,i);if(n){const s=n(MD(a));this.hasMutatedConstraints=!!s,s&&(a=Fx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=xn(u=>{if(!Il(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return df(this.visualElement,t),r.start(lf(t,r,0,n,this.visualElement,!1))}stopAnimation(){xn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xn(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){xn(n=>{const{drag:r}=this.getProps();if(!Il(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],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ba(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};xn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=_2({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(),xn(a=>{if(!Il(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;N2.set(this.visualElement,this);const t=this.visualElement.current,n=wa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&Tx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ba(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()),gt.read(r);const a=ya(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(xn(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=jf,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Il(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function L2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class V2 extends Fr{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new F2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const uw=e=>(t,n)=>{e&>.postRender(()=>e(t,n))};class $2 extends Fr{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new rw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ew(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:uw(t),onStart:uw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&>.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=wa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Rf=!1;class z2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Rf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Tl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,Rf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Rf=!0,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 dw(e){const[t,n]=z0(),r=S.useContext(ra);return m.jsx(z2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Q0),isPresent:t,safeToRemove:n})}const j2={pan:{Feature:$2},drag:{Feature:V2,ProjectionNode:V0,MeasureLayout:dw}};function fw(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&>.postRender(()=>i(t,xa(t)))}class R2 extends Fr{mount(){const{current:t}=this.node;t&&(this.unmount=bD(t,(n,r)=>(fw(this.node,r,"Start"),o=>fw(this.node,o,"End"))))}unmount(){}}class B2 extends Fr{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=ia(ya(this.node.current,"focus",()=>this.onFocus()),ya(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function pw(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&>.postRender(()=>i(t,xa(t)))}class H2 extends Fr{mount(){const{current:t}=this.node;t&&(this.unmount=SD(t,(n,r)=>(pw(this.node,r,"Start"),(o,{success:i})=>pw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bf=new WeakMap,Hf=new WeakMap,W2=e=>{const t=Bf.get(e.target);t&&t(e)},q2=e=>{e.forEach(W2)};function U2({root:e,...t}){const n=e||document;Hf.has(n)||Hf.set(n,{});const r=Hf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(q2,{root:e,...t})),r[o]}function G2(e,t,n){const r=U2(t);return Bf.set(e,n),r.observe(e),()=>{Bf.delete(e),r.unobserve(e)}}const Y2={some:0,all:1};class K2 extends Fr{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:Y2[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(),f=c?u:d;f&&f(l)};return G2(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(Z2(t,n))&&this.startObserver()}unmount(){}}function Z2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const X2={...T2,...{inView:{Feature:K2},tap:{Feature:H2},focus:{Feature:B2},hover:{Feature:R2}},...j2,...{layout:{ProjectionNode:V0,MeasureLayout:dw}}},Be=y2(X2,b2);function Q2(e){return S.useEffect(()=>()=>e(),[])}function mo(e){const t=_n(()=>fo(e)),{isStatic:n}=S.useContext(ai);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function hw(e,t){const n=mo(t()),r=()=>n.set(t());return r(),cl(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),mr(r)}}),n}function J2(e){pa.current=[],e();const t=hw(pa.current,e);return pa.current=void 0,t}function eF(e,t,n,r){if(typeof e=="function")return J2(e);const i=typeof t=="function"?t:CD(t,n,r);return Array.isArray(e)?mw(e,i):mw([e],([a])=>i(a))}function mw(e,t){const n=_n(()=>[]);return hw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Wf(e){return typeof e=="object"&&!Array.isArray(e)}function gw(e,t,n,r){return e==null?[]:typeof e=="string"&&Wf(t)?vx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function tF(e,t,n){return e*(t+1)}function vw(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 nF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(oa(e,o),r--)}}function rF(e,t,n,r,o,i){nF(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:xb(n,a)})}function oF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function iF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const aF="easeInOut",sF=20;function lF(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,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,vw(d,v.at,u,c));continue}let[g,h,y={}]=v;y.at!==void 0&&(d=vw(d,y.at,u,c));let b=0;const x=(T,E,I,w=0,C=0)=>{const P=cF(T),{delay:_=0,times:F=Wb(P),type:V=t.type||"keyframes",repeat:N,repeatType:O,repeatDelay:D=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:k}=E;const L=typeof _=="function"?_(w,C):_,$=P.length,B=rf(V)?V:o?.[V||"keyframes"];if($<=2&&B){let J=100;if($===2&&fF(P)){const Y=P[1]-P[0];J=Math.abs(Y)}const re={...t,...z};k!==void 0&&(re.duration=Mn(k));const ee=zb(re,J,B);M=ee.ease,k=ee.duration}k??(k=i);const q=d+L;F.length===1&&F[0]===0&&(F[1]=1);const G=F.length-P.length;if(G>0&&Hb(F,G),P.length===1&&P.unshift(null),N){dn(N<sF,"Repeat count too high, must be less than 20","repeat-count-high"),k=tF(k,N);const J=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let Y=0;Y<N;Y++){P.push(...J);for(let K=0;K<J.length;K++)F.push(re[K]+(Y+1)),M.push(K===0?"linear":xb(ee,K-1))}oF(F,N)}const W=q+k;rF(I,P,M,F,q,W),b=Math.max(L+k,b),f=Math.max(W,f)};if(jt(g)){const T=yw(g,s);x(h,y,bw("default",T))}else{const T=gw(g,h,r,l),E=T.length;for(let I=0;I<E;I++){h=h,y=y;const w=T[I],C=yw(w,s);for(const P in h)x(h[P],uF(y,P),bw(P,C),I,E)}}u=d,d+=b}return s.forEach((p,v)=>{for(const g in p){const h=p[g];h.sort(iF);const y=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:C,value:P,easing:_}=h[w];y.push(P),b.push(Zo(0,f,C)),x.push(_||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(aF)),b[b.length-1]!==1&&(b.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const T=a.get(v);T.keyframes[g]=y;const{type:E,...I}=t;T.transition[g]={...I,duration:f,ease:x,times:b,...n}}}),a}function yw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function bw(e,t){return t[e]||(t[e]=[]),t[e]}function cF(e){return Array.isArray(e)?e:[e]}function uF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const dF=e=>typeof e=="number",fF=e=>e.every(dF);function pF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wf(e)&&!kx(e)?new Qx(t):new Gx(t);n.mount(e),ha.set(e,n)}function hF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new BD(t);n.mount(e),ha.set(e,n)}function mF(e,t){return jt(e)||typeof e=="number"||typeof e=="string"&&!Wf(t)}function xw(e,t,n,r){const o=[];if(mF(e,t))o.push(E0(e,Wf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=gw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?pF:hF;ha.has(l)||c(l);const u=ha.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...pf(u,{...t,transition:d},{}))}}return o}function gF(e,t,n){const r=[];return lF(e,t,n,{spring:da}).forEach(({keyframes:i,transition:a},s)=>{r.push(...xw(s,i,a))}),r}function vF(e){return Array.isArray(e)&&e.some(Array.isArray)}function ww(e){function t(n,r,o){let i=[],a;if(vF(n))i=gF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=xw(n,r,c,e)}const s=new BM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{oa(e.animations,s)})),s}return t}const Sw=ww();function yF(){const e=_n(()=>({current:null,animations:[]})),t=_n(()=>ww(e));return Q2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class bF{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)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const xF=()=>new bF;function wF(){return _n(xF)}const Tw=S.createContext(null);function SF(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=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?b_(e,o,o+i):e}function TF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=_n(()=>Be[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,g)=>{const h=l.findIndex(y=>v===y.value);h!==-1?l[h].layout=g[n]:l.push({value:v,layout:g[n]}),l.sort(CF)},updateOrder:(v,g,h)=>{if(c.current)return;const y=SF(l,v,g,h);l!==y&&(c.current=!0,r(y.map(EF).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return m.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:m.jsx(Tw.Provider,{value:d,children:e})})}const Ew=S.forwardRef(TF);function EF(e){return e.value}function CF(e,t){return e.layout.min-t.layout.min}const Al=50,Cw=25,kF=new Set(["auto","scroll"]),Sa=new WeakMap,Ta=new WeakMap;let Ea=null;function IF(){if(Ea){const e=qf(Ea,"y");e&&(Ta.delete(e),Sa.delete(e));const t=qf(Ea,"x");t&&t!==e&&(Ta.delete(t),Sa.delete(t)),Ea=null}}function AF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return kF.has(r)}function qf(e,t){let n=e?.parentElement;for(;n;){if(AF(n,t))return n;n=n.parentElement}return null}function PF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Al){const l=1-a/Al;return{amount:-Cw*l*l,edge:"start"}}else if(s<Al){const l=1-s/Al;return{amount:Cw*l*l,edge:"end"}}return{amount:0,edge:null}}function OF(e,t,n,r){if(!e)return;Ea=e;const o=qf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=PF(i,o,n);if(s===null){Ta.delete(o),Sa.delete(o);return}if(Ta.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Ta.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;Sa.set(o,u)}if(a>0){const c=Sa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function kw(e,t=0){return jt(e)?e:mo(t)}function _F({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=_n(()=>Be[r]),u=S.useContext(Tw),d={x:kw(t.x),y:kw(t.y)},f=eF([d.x,d.y],([y,b])=>y||b?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:g,groupRef:h}=u;return m.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,b)=>{const{velocity:x,point:T}=b,E=d[p].get();g(n,E,x[p]),OF(h.current,T[p],p,x[p]),o&&o(y,b)},onDragEnd:(y,b)=>{IF(),i&&i(y,b)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const Iw=S.forwardRef(_F);var Pl={exports:{}},Uf={},Ol={exports:{}},Gf={};var Aw;function MF(){if(Aw)return Gf;Aw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=f,l(g)&&h({inst:g})},[d,p,f]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Gf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Gf}var Yf={};var Pw;function DF(){return Pw||(Pw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){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=v();if(!d){var h=v();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:v}});var y=h[0].inst,b=h[1];return l(function(){y.value=g,y.getSnapshot=v,n(y)&&b({inst:y})},[p,g,v]),s(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}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,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Yf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Yf}var Ow;function _w(){return Ow||(Ow=1,process.env.NODE_ENV==="production"?Ol.exports=MF():Ol.exports=DF()),Ol.exports}var Mw;function NF(){if(Mw)return Uf;Mw=1;var e=S,t=_w();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 Uf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&g.hasValue){var w=g.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Uf}var Kf={};var Dw;function FF(){return Dw||(Dw=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=_w(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Kf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&g.hasValue){var w=g.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var h=o(c,v[0],v[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())})()),Kf}var Nw;function LF(){return Nw||(Nw=1,process.env.NODE_ENV==="production"?Pl.exports=NF():Pl.exports=FF()),Pl.exports}LF();var si=function(){return si=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},si.apply(this,arguments)};function Ca(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 Fw(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 li=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},VF=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},$F=function(e){return Object.entries(e)},Lw=function(e){return e instanceof Promise},Vw=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)},si(si({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},zF=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,Fw([],Ca(a),!1)),u=function(d,f){return n(function(p){return Vw(d,p,i,f)})};return Lw(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))}},jF=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,Fw([],Ca(a),!1)),c=function(u){return n(function(d){return Vw(u,d,i,o.current)})};return Lw(l)?l.then(function(u){return c(u)}):c(l)}},Zf=function(e,t,n){var r,o,i,a=Ca(S.useState(function(){return e}),2),s=a[0],l=a[1],c=li(s),u=li((r=n?.props)!==null&&r!==void 0?r:{}),d=li(t),f=li((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=li((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),g=VF(s),h=li(g),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var T=y.current;f.current.forEach(function(E){E(s,g,T)})}},[s,f,g]);var b=Ca(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:v.current,previousState:function(){return h.current}});return $F(E).reduce(function(I,w){var C,P=Ca(w,2),_=P[0],F=P[1];return si(si({},I),(C={},C[_]=n?.debug?zF(_,F,l,T,y,p.current):jF(_,F,l,T,y,p.current),C))},{})}),1),x=b[0];return[s,x,u.current]},RF=Object.defineProperty,$w=Object.getOwnPropertySymbols,BF=Object.prototype.hasOwnProperty,HF=Object.prototype.propertyIsEnumerable,zw=(e,t,n)=>t in e?RF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WF=(e,t)=>{for(var n in t||(t={}))BF.call(t,n)&&zw(e,n,t[n]);if($w)for(var n of $w(t))HF.call(t,n)&&zw(e,n,t[n]);return e},Xf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},qF=(e,t,n,r)=>Ml(Xf,e,t,n,r),ci=e=>typeof e=="object",Lr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ci(e)&&!ci(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=>Lr(e[r],t[r]))},UF=(e,t)=>(ci(e)||Array.isArray(e))&&t?e[t]:e,GF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,_l=e=>/[0-9.]+/.test(e),jw=e=>["string","number"].includes(typeof e),Rw=e=>e==null||e?.length===0||e==="",Bw={eq:Lr,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:Rw,notEmpty:e=>!Rw(e),in:(e,t)=>Xf(t,n=>Lr(e,n)),notIn:(e,t)=>Hw(t,n=>!Lr(e,n))},YF=e=>{if(e in Bw)return Bw[e];throw new Error("Linq - Symbol not found")},ui=(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},Ml=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=YF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},KF=(e,t,n,r)=>Ml(ui,e,t,n,r),Hw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},ZF=(e,t,n,r)=>Ml(Hw,e,t,n,r),Ww=e=>{if(e===null)return null;const t=WF({},e);return Object.keys(t).forEach(n=>t[n]=ci(e[n])?Ww(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},qw=(e,t)=>{if(ci(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Lr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Lr(t,r))return!0}return!1},XF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},QF=e=>ui(e,(t,n,r)=>ci(t)?n===r.findIndex(o=>Lr(o,t)):n===r.indexOf(t)),JF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Uw=(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())},eL=(e,t)=>Uw(e,n=>n[t]),Gw=(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},tL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},nL=(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 _l(e)&&_l(t)?r.map(a=>Number.parseInt(a)):r},Qf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&_l(e)&&_l(t)){const o=[],[i,a]=tL(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return nL(e,t,r)},rL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Qf(r,o,1):Qf(r,i,Number.parseInt(o,10))}return jw(e)&&jw(t)?Qf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Jf=(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},Yw=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},oL=(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)},iL=(e,t,n,r)=>Ml(oL,e,t,n,r),Kw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(GF(t))},Zw=(e=>(e.Asc="asc",e.Desc="desc",e))(Zw||{}),aL=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),sL=(e,t)=>e.sort(aL(t)),lL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ui(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},cL=class Hh{constructor(t=[]){this.array=t}static Range(...t){return rL(...t)}static New(t){return new Hh(t)}Where(t,n,r){return this.array=KF(this.array,t,n,r),this}Some(t,n,r){return qF(this.array,t,n,r)}All(t,n,r){return ZF(this.array,t,n,r)}Reverse(){return this.array=Yw(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=iL(this.array,t,n,r),this}Distinct(){return this.array=QF(this.array),this}First(t){return t===void 0?this.array[0]:JF(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?Jf((n,r)=>n+r,0,this.array):Jf((n,r)=>n+UF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return eL(this.array,t)}GroupWith(t){return Uw(this.array,t)}Except(t){return ui(this.array,n=>!qw(t,n))}Intersect(t){return ui(this.array,n=>qw(t,n))}OrderBy(t,n){let r;return r=t?Kw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Yw(r):r,this}Includes(t){return Xf(this.array,n=>Lr(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 Jf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Gw(this.array,n=>[t,n]))}Zip(t,n){return Gw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ui(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Hh(Ww(this.array))}ToObject(t){return XF(this.array,t)}Sort(t){return Array.isArray(t)?sL(this.array,t):Kw(this.array,t)}Unique(t){return lL(this.array,t)}},Xw=cL;const Dl=0,Vr=1,di=2,Qw=4;function Jw(e){return()=>e}function uL(e){e()}function ka(e,t){return n=>e(t(n))}function e1(e,t){return()=>e(t)}function dL(e,t){return n=>e(t,n)}function ep(e){return e!==void 0}function fL(...e){return()=>{e.map(uL)}}function fi(){}function Nl(e,t){return t(e),e}function pL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Vr,t)}function ze(e,t){e(Dl,t)}function tp(e){e(di)}function Tt(e){return e(Qw)}function Ie(e,t){return st(e,dL(t,Dl))}function Fn(e,t){const n=e(Vr,r=>{n(),t(r)});return n}function t1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function n1(e,t){return e===t}function xt(e=n1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Me(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ue(e,...t){const n=hL(...t);return((r,o)=>{switch(r){case di:tp(e);return;case Vr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function go(e){return t=>n=>{e>0?e--:t(n)}}function gr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...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);st(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 hL(...e){return t=>e.reduceRight(pL,t)}function mL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Vr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),fi);case di:r(),n=null;return}}}function he(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Dl:t=o;break;case Vr:{o(t);break}case Qw:return t}return n(r,o)})}function Qt(e,t){return Nl(he(t),n=>Ie(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Dl:e.slice().forEach(r=>{r(n)});return;case di:e.splice(0,e.length);return;case Vr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function pn(e){return Nl(Ke(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:gL(),singleton:n}}const gL=()=>Symbol();function vL(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 Vt(...e){const t=Ke(),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);st(i,l=>{n[a]=l,r=r|s,r===o&&ze(t,n)})}),function(i,a){switch(i){case di:{tp(t);return}case Vr:return r===o&&a(n),st(t,a)}}}function De(e,t=n1){return ue(e,xt(t))}function np(...e){return function(t,n){switch(t){case di:return;case Vr:return fL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const yL={0:"debug",3:"error",1:"log",2:"warn"},bL=()=>typeof globalThis>"u"?window:globalThis,$r=Qe(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=bL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[yL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return rp(e,t,n).callbackRef}function rp(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 r1(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=xL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i?.(s?o1("column-gap",getComputedStyle(u).columnGap,o):o1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return rp(c,n,l)}function xL(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},sn.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 o1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function op(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,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=rp(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 tn=Qe(()=>{const e=Ke(),t=Ke(),n=he(0),r=Ke(),o=he(0),i=Ke(),a=Ke(),s=he(0),l=he(0),c=he(0),u=he(0),d=Ke(),f=Ke(),p=he(!1),v=he(!1),g=he(!1);return Ie(ue(e,be(({scrollTop:h})=>h)),t),Ie(ue(e,be(({scrollHeight:h})=>h)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ia={lvl:0};function i1(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 ft(e){return e===Ia}function Aa(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Aa(e.l,t):Aa(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function hn(e,t,n){return ft(e)?l1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?c1(Rt(e,{l:hn(e.l,t,n)})):c1(Rt(e,{r:hn(e.r,t,n)}))}function pi(){return Ia}function hi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return wL(ap(e,r,n))}function ip(e,t){if(ft(e))return Ia;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=s1(r);return Fl(Rt(e,{k:i,l:a1(r),v:a}))}}else return t<n?Fl(Rt(e,{l:ip(r,t)})):Fl(Rt(e,{r:ip(o,t)}))}function vo(e){return ft(e)?[]:[...vo(e.l),{k:e.k,v:e.v},...vo(e.r)]}function ap(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ap(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ap(i,t,n))),s}function Fl(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(sp(t))return u1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(sp(e))return lp(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=sp(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:lp(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return l1(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 a1(e){return ft(e.r)?e.l:Fl(Rt(e,{r:a1(e.r)}))}function sp(e){return ft(e)||e.lvl>e.r.lvl}function s1(e){return ft(e.r)?[e.k,e.v]:s1(e.r)}function l1(e,t,n,r=Ia,o=Ia){return{k:e,l:r,lvl:n,r:o,v:t}}function c1(e){return lp(u1(e))}function u1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function lp(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function wL(e){return i1(e,({k:t,v:n})=>({index:t,value:n}))}function d1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Pa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const cp=Qe(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function f1(e,t,n){return e[Ll(e,t,n)]}function Ll(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 SL(e,t,n,r){const o=Ll(e,t,r),i=Ll(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Vl(e){return!ft(e.groupOffsetTree)}function up({index:e},t){return t===e?0:t<e?-1:1}function TL(){return{groupIndices:[],groupOffsetTree:pi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:pi()}}function EL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=hn(e,0,i);continue}const s=hi(e,a-1,o+1);if(s.some(_L(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=ip(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=hn(e,o+1,f));c&&(e=hn(e,a,i))}return[e,n]}function CL(e){return typeof e.groupIndex<"u"}function kL({offset:e},t){return t===e?0:t<e?-1:1}function Oa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=f1(t,e,up),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function p1(e,t){if(!Vl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function h1(e,t,n){if(CL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=p1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function IL(e,t,n,r=0){return r>0&&(t=Math.max(t,f1(e,r,up).offset)),i1(SL(e,t,n,kL),OL)}function AL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,g)=>hn(hn(v,g,f),g+1,p),a)}else[a,s]=EL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=dp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>hn(f,p,Oa(p,d,o)),pi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function PL(e){return vo(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 m1(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 dp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Ll(o,t-1,up),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of hi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function OL(e){return{index:e.index,value:e}}function _L(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 ML={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Qt(r,0),i=Ke(),a=Ke(),s=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),p=he((w,C)=>Vn(w,ML[C])),v=he(void 0),g=he(0),h=TL(),y=Qt(ue(n,He(l,e,g),Qn(AL,h),xt()),h),b=Qt(ue(l,xt(),Qn((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ue(l,Me(w=>w.length>0),He(y,g),be(([w,C,P])=>{const _=w.reduce((F,V,N)=>hn(F,V,Oa(V,C.offsetTree,P)||N),pi());return{...C,groupIndices:w,groupOffsetTree:_}})),y),Ie(ue(r,He(y),Me(([w,{lastIndex:C}])=>w<C),be(([w,{lastIndex:C,lastSize:P}])=>[{endIndex:C,size:P,startIndex:w}])),n),Ie(c,u);const x=Qt(ue(c,be(w=>w===void 0)),!0);Ie(ue(u,Me(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const C=Tt(d),P=Tt(l).length>0;return C?P?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ue(f,Me(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const C=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const V=w[F];V!==P&&(C.push({endIndex:F-1,size:P,startIndex:_}),P=V,_=F)}return C.push({endIndex:w.length-1,size:P,startIndex:_}),C})),n),Ie(ue(l,He(d,u),Me(([,w,C])=>w!==void 0&&C!==void 0),be(([w,C,P])=>{const _=[];for(let F=0;F<w.length;F++){const V=w[F],N=w[F+1];_.push({startIndex:V,endIndex:V,size:C}),N!==void 0&&_.push({startIndex:V+1,endIndex:N-1,size:P})}return _})),n);const T=pn(ue(n,He(y),Qn(({sizes:w},[C,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:h}),be(w=>w.changed)));st(ue(s,Qn((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:C}=Tt(y);if(w>0)ze(t,!0),ze(i,w+m1(w,C));else if(w<0){const P=Tt(b);P.length>0&&(w-=m1(-w,P)),ze(a,w)}}),st(ue(s,He(e)),([w,C])=>{w<0&&C("`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},sn.ERROR)});const E=pn(i);Ie(ue(i,He(y),be(([w,C])=>{const P=C.groupIndices.length>0,_=[],F=C.lastSize;if(P){const V=Aa(C.sizeTree,0);let N=0,O=0;for(;N<w;){const z=C.groupIndices[O],M=C.groupIndices.length===O+1?1/0:C.groupIndices[O+1]-z-1;_.push({endIndex:z,size:V,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,N+=M+1}const D=vo(C.sizeTree);return N!==w&&D.shift(),D.reduce((z,{k:M,v:k})=>{let L=z.ranges;return z.prevSize!==0&&(L=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:k,ranges:L}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return vo(C.sizeTree).reduce((V,{k:N,v:O})=>({prevIndex:N+w,prevSize:O,ranges:[...V.ranges,{endIndex:N+w-1,size:V.prevSize,startIndex:V.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=pn(ue(a,He(y,g),be(([w,{offsetTree:C},P])=>{const _=-w;return Oa(_,C,P)})));return Ie(ue(a,He(y,g),be(([w,C,P])=>{if(C.groupIndices.length>0){if(ft(C.sizeTree))return C;let _=pi();const F=Tt(b);let V=0,N=0,O=0;for(;V<-w;){O=F[N];const D=F[N+1]-O-1;N++,V+=D+1}if(_=vo(C.sizeTree).reduce((D,{k:z,v:M})=>hn(D,Math.max(0,z+w),M),_),V!==-w){const D=Aa(C.sizeTree,O);_=hn(_,0,D);const z=Ln(C.sizeTree,-w+1)[1];_=hn(_,1,z)}return{...C,sizeTree:_,...dp(C.offsetTree,0,_,P)}}else{const _=vo(C.sizeTree).reduce((F,{k:V,v:N})=>hn(F,Math.max(0,V+w),N),pi());return{...C,sizeTree:_,...dp(C.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:E,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:g,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:T,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt($r,cp),{singleton:!0});function DL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const g1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),a=Ke(),s=pn(ue(i,be(DL)));return Ie(ue(s,be(l=>l.totalCount)),n),Ie(ue(s,be(l=>l.groupIndices)),e),Ie(ue(Vt(o,t,r),Me(([l,c])=>Vl(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),zr=Qe(([{log:e}])=>{const t=he(!1),n=pn(ue(t,Me(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt($r),{singleton:!0}),NL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function v1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!NL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const _a=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:f}])=>{const p=Ke(),v=Ke(),g=he(0);let h=null,y=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),ze(l,!1)}return Ie(ue(p,He(n,d,r,g,s,a,f),He(e,i,o),be(([[T,E,I,w,C,P,_,F],V,N,O])=>{const D=v1(T),{align:z,behavior:M,offset:k}=D,L=w-1,$=h1(D,E,L);let B=Oa($,E.offsetTree,V)+P;z==="end"?(B+=N+Ln(E.sizeTree,$)[1]-I+O,$===L&&(B+=_)):z==="center"?B+=(N+Ln(E.sizeTree,$)[1]-I+O)/2:B-=C,k&&(B+=k);const q=G=>{x(),G?(F("retrying to scroll to",{location:T},sn.DEBUG),ze(p,T)):(ze(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(x(),M==="smooth"){let G=!1;b=st(t,W=>{G=G||W}),h=Fn(u,()=>{q(G)})}else h=Fn(ue(t,FL(150)),q);return y=setTimeout(()=>{x()},1200),ze(l,!0),F("scrolling from index to",{behavior:M,index:$,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:g}},bt(er,tn,$r),{singleton:!0});function FL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function fp(e,t){e==0?t():requestAnimationFrame(()=>{fp(e-1,t)})}function pp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ma=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=he(!0),l=he(0),c=he(!0);return Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),s),Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),c),st(ue(Vt(t,a),He(s,n,e,c),Me(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||ep(p))&&!d&&!v),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),fp(4,()=>{Fn(r,()=>{ze(s,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,_a,zr),{singleton:!0});function y1(e,t){return Math.abs(e-t)<1.01}const Da="up",Na="down",LL="none",VL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},$L=0,Fa=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=he(!1),s=he(!0),l=Ke(),c=Ke(),u=he(4),d=he($L),f=Qt(ue(np(ue(De(o),go(1),Xn(!0)),ue(De(o),go(1),Xn(!1),t1(100))),xt()),!1),p=Qt(ue(np(ue(n,Xn(!0)),ue(n,Xn(!1),t1(200))),xt()),!1);Ie(ue(Vt(De(o),De(d)),be(([b,x])=>b<=x),xt()),s),Ie(ue(s,gr(50)),c);const v=pn(ue(Vt(r,De(i),De(t),De(e),De(u)),Qn((b,[{scrollHeight:x,scrollTop:T},E,I,w,C])=>{const P=T+E-x>-C,_={scrollHeight:x,scrollTop:T,viewportHeight:E};if(P){let V,N;return T>b.state.scrollTop?(V="SCROLLED_DOWN",N=b.state.scrollTop-T):(V="SIZE_DECREASED",N=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:N,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":E<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},VL),xt((b,x)=>b&&b.atBottom===x.atBottom))),g=Qt(ue(r,Qn((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if(y1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const I=x-(T+E)<1;return b.scrollTop!==T&&I?{changed:!0,jump:b.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Me(b=>b.changed),be(b=>b.jump)),0);Ie(ue(v,be(b=>b.atBottom)),a),Ie(ue(a,gr(50)),l);const h=he(Na);Ie(ue(r,be(({scrollTop:b})=>b),xt(),Qn((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Da:Na,prevScrollTop:x},{direction:Na,prevScrollTop:0}),be(b=>b.direction)),h),Ie(ue(r,gr(50),Xn(LL)),h);const y=he(0);return Ie(ue(f,Me(b=>!b),Xn(0)),y),Ie(ue(o,gr(100),He(f),Me(([b,x])=>x),Qn(([b,x],[T])=>[x,T],[0,0]),be(([b,x])=>x-b)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},bt(tn)),La="top",Va="bottom",b1="none";function x1(e,t,n){return typeof e=="number"?n===Da&&t===La||n===Na&&t===Va?e:0:n===Da?t===La?e.main:e.reverse:t===Va?e.main:e.reverse}function w1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const hp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),a=he(0),s=he(0),l=he(0),c=Qt(ue(Vt(De(r),De(o),De(n),De(i,Pa),De(l),De(a),De(t),De(e),De(s)),be(([u,d,f,[p,v],g,h,y,b,x])=>{const T=u-b,E=h+y,I=Math.max(f-T,0);let w=b1;const C=w1(x,La),P=w1(x,Va);return p-=b,p+=f+y,v+=f+y,v-=b,p>u+E-C&&(w=Da),v<u-I+d+P&&(w=Na),w!==b1?[Math.max(T-f-x1(g,La,w)-C,0),T-I-y+d+x1(g,Va,w)+P]:null}),Me(u=>u!=null),xt(Pa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function zL(e,t,n){if(Vl(t)){const r=p1(e,t);return[{index:Ln(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 mp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function $l(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,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:T1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:T1(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function S1(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=pp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return $l(c,[],s,o,n,r)}function T1(e,t,n){if(e.length===0)return[];if(!Vl(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=hi(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}function E1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const yo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const g=he([]),h=he(0),y=Ke(),b=he(0);Ie(i.topItemsIndexes,g);const x=Qt(ue(Vt(p,v,De(l,Pa),De(o),De(r),De(c),u,De(g),De(t),De(n),De(b),e),Me(([w,C,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!C&&!F}),be(([,,[w,C],P,_,F,V,N,O,D,z,M])=>{var k,L,$,B;const q=_,{offsetTree:G,sizeTree:W}=q,J=Tt(h);if(P===0)return{...mp,totalCount:P};if(w===0&&C===0)return J===0?{...mp,totalCount:P}:S1(J,F,_,O,D,M||[]);if(ft(W))return J>0?null:$l(zL(pp(F,P),q,M),[],P,D,q,O);const re=[];if(N.length>0){const se=N[0],ae=N[N.length-1];let Q=0;for(const le of hi(W,se,ae)){const te=le.value,fe=Math.max(le.start,se),pe=Math.min(le.end,ae);for(let ve=fe;ve<=pe;ve++)re.push({data:M?.[ve],index:ve,offset:Q,size:te}),Q+=te}}if(!V)return $l([],re,P,D,q,O);const ee=N.length>0?N[N.length-1]+1:0,Y=IL(G,w,C,ee);if(Y.length===0)return null;const K=P-1,X=Nl([],se=>{for(const ae of Y){const Q=ae.value;let le=Q.offset,te=ae.start;const fe=Q.size;if(Q.offset<w){te+=Math.floor((w-Q.offset+D)/(fe+D));const ve=te-ae.start;le+=ve*fe+ve*D}te<ee&&(le+=(ee-te)*fe,te=ee);const pe=Math.min(ae.end,K);for(let ve=te;ve<=pe&&!(le>=C);ve++)se.push({data:M?.[ve],index:ve,offset:le,size:fe}),le+=fe+D}}),de=E1(z,La),H=E1(z,Va);if(X.length>0&&(de>0||H>0)){const se=X[0],ae=X[X.length-1];if(de>0&&se.index>ee){const Q=Math.min(de,se.index-ee),le=[];let te=se.offset;for(let fe=se.index-1;fe>=se.index-Q;fe--){const pe=(L=(k=hi(W,fe,fe)[0])==null?void 0:k.value)!=null?L:se.size;te-=pe+D,le.unshift({data:M?.[fe],index:fe,offset:te,size:pe})}X.unshift(...le)}if(H>0&&ae.index<K){const Q=Math.min(H,K-ae.index);let le=ae.offset+ae.size+D;for(let te=ae.index+1;te<=ae.index+Q;te++){const fe=(B=($=hi(W,te,te)[0])==null?void 0:$.value)!=null?B:ae.size;X.push({data:M?.[te],index:te,offset:le,size:fe}),le+=fe+D}}}return $l(X,re,P,D,q,O)}),Me(w=>w!==null),xt()),mp);Ie(ue(e,Me(ep),be(w=>w?.length)),o),Ie(ue(x,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ue(x,be(w=>[w.top,w.bottom])),a),Ie(ue(x,be(w=>w.items)),y);const T=pn(ue(x,Me(({items:w})=>w.length>0),He(o,e),Me(([{items:w},C])=>w[w.length-1].originalIndex===C-1),be(([,w,C])=>[w-1,C]),xt(Pa),be(([w])=>w))),E=pn(ue(x,gr(200),Me(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),be(({items:w})=>w[0].index),xt())),I=pn(ue(x,Me(({items:w})=>w.length>0),be(({items:w})=>{let C=0,P=w.length-1;for(;w[C].type==="group"&&C<P;)C++;for(;w[P].type==="group"&&P>C;)P--;return{endIndex:w[P].index,startIndex:w[C].index}}),xt(d1)));return{endReached:T,initialItemCount:h,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:g,...f}},bt(er,g1,hp,Ma,_a,Fa,zr,cp),{singleton:!0}),C1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),a=Qt(ue(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(De(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,yo),{singleton:!0}),jL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Qt(ue(Vt(n,e,t),Me(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),gr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,C1),{singleton:!0}),k1=Qe(()=>({context:he(null)})),RL=({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,I1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ie(ue(u,He(t,l,n,i,o,r,s),He(e),be(([[d,f,p,v,g,h,y,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=RL,done:w,...C}=d,P=h1(d,f,v-1),_=Oa(P,f.offsetTree,x)+g+h,F=_+Ln(f.sizeTree,P)[1],V=b+h,N=b+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:T,behavior:E,...C},viewportBottom:N,viewportTop:V});return O?w&&Fn(ue(a,Me(D=>!D),go(Tt(a)?1:2)),w):w?.(),O}),Me(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,_a,yo,$r),{singleton:!0});function A1(e){return e?e==="smooth"?"smooth":"auto":!1}const BL=(e,t)=>typeof e=="function"?A1(e(t)):t&&A1(e),HL=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:f},{scrollIntoView:p}])=>{const v=he(!1),g=Ke();let h=null;function y(E){ze(a,{align:"end",behavior:E,index:"LAST"})}st(ue(Vt(ue(De(t),go(1)),l),He(De(v),i,s,d),be(([[E,I],w,C,P,_])=>{let F=I&&P,V="auto";return F&&(V=BL(w,C||_),F=F&&!!V),{followOutputBehavior:V,shouldFollow:F,totalCount:E}}),Me(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E)}):h=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E),h=null})});function b(E){const I=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ue(Vt(De(v),t,c),Me(([E,,I])=>E&&I),Qn(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),Me(({refreshed:E})=>E),He(v,t)),([,E])=>{Tt(s)&&b(E!==!1)}),st(g,()=>{b(Tt(v)!==!1)}),st(Vt(De(v),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=he(null),T=Ke();return Ie(np(ue(De(r),be(E=>{var I;return(I=E?.length)!=null?I:0})),ue(De(t))),T),st(ue(Vt(ue(T,go(1)),l),He(De(x),s,d,f),be(([[E,I],w,C,P,_])=>I&&C&&w?.({context:_,totalCount:E,scrollingInProgress:P})),Me(E=>!!E),gr(0)),E=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,E)}):h=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,E),h=null})}),{autoscrollToBottom:g,followOutput:v,scrollIntoViewOnChange:x}},bt(er,Fa,_a,Ma,zr,$r,tn,k1,I1)),WL=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ue(s,He(i),Me(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>S1(l,c,u,d,f,p))),a),{}),bt(er,Ma,yo,zr),{singleton:!0}),qL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return st(ue(e,He(r),Me(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ue(n,go(1),Me(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(zr,tn,yo),{singleton:!0}),P1=Qe(([{scrollVelocity:e}])=>{const t=he(!1),n=Ke(),r=he(!1);return Ie(ue(e,He(r,t,n),Me(([o,i])=>!!i),be(([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}),xt()),t),st(ue(Vt(t,e,n),He(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Fa),{singleton:!0}),gp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=he(!1),a=he(void 0);return Ie(ue(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ue(t,He(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),UL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ke(),u=he(void 0),d=he(null),f=he(null);return Ie(s,d),Ie(l,f),st(ue(c,He(t,r,a,d,f,n)),([p,v,g,h,y,b,x])=>{const T=PL(v.sizeTree);h&&y!==null&&b!==null&&(g=y.scrollTop-b.offsetTop),g-=x,p({ranges:T,scrollTop:g})}),Ie(ue(u,Me(ep),be(GL)),o),Ie(ue(i,He(u),Me(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,Ma,zr,gp));function GL(e){return{align:"start",index:0,offset:e.scrollTop}}const YL=Qe(([{topItemsIndexes:e}])=>{const t=he(0);return Ie(ue(t,Me(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(yo));function O1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const KL=O1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ZL=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:f},{log:p},{recalcInProgress:v}])=>{const g=pn(ue(l,He(a),Qn(([,y,b,x],[{bottom:T,items:E,offsetBottom:I,totalCount:w},C])=>{const P=T+I;let _=0;return b===w&&y.length>0&&E.length>0&&(E[0].originalIndex===0&&y[0].originalIndex===0||(_=P-x,_!==0&&(_+=C))),[_,E,w,P]},[0,[],0,0]),Me(([y])=>y!==0),He(r,s,n,o,p,v),Me(([,y,b,x,,,T])=>!T&&!x&&y!==0&&b===Da),be(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function h(y){y>0?(ze(t,{behavior:"auto",top:-y}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-y}))}return st(ue(g,He(e,i)),([y,b,x])=>{x&&KL()?ze(e,b-y):h(-y)}),st(ue(Vt(Qt(i,!1),e,v),Me(([y,b,x])=>!y&&!x&&b!==0),be(([y,b])=>b),gr(1)),h),Ie(ue(d,be(y=>({top:-y}))),t),st(ue(c,He(f,u),be(([y,{groupIndices:b,lastSize:x,sizeTree:T},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(y);{let w=0;const C=Aa(T,0);let P=0,_=0;for(;P<y;){P++,w+=C;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;P+F>y&&(w-=C,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{ze(e,y),requestAnimationFrame(()=>{ze(t,{top:y}),requestAnimationFrame(()=>{ze(e,0),ze(v,!1)})})}),{deviation:e}},bt(tn,Fa,yo,er,$r,cp)),XL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(hp,WL,zr,P1,C1,qL,jL,gp,I1,$r,k1)),_1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:g,scrolledToInitialItem:h},y,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:C},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:V,rangeChanged:N,...O}=T;return Ie(N,P.scrollSeekRangeChanged),Ie(ue(P.windowViewportRect,be(D=>D.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:g,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:V,totalCount:f,...x,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:N,...O,...P,...y,sizes:u,...b}},bt(er,Ma,tn,UL,HL,yo,_a,ZL,YL,g1,XL));function QL(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 zl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function vp(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,y){h.propsReady&&ze(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];ze(x,y[b])}for(const b of o)if(b in y){const x=h[t.optional[b]];ze(x,y[b])}h.propsReady&&ze(h.propsReady,!0)}function c(h){return i.reduce((y,b)=>(y[b]=x=>{const T=h[t.methods[b]];ze(T,x)},y),{})}function u(h){return a.reduce((y,b)=>(y[b]=mL(h[t.events[b]]),y),{})}const d=S.forwardRef((h,y)=>{const{children:b,...x}=h,[T]=S.useState(()=>Nl(vL(e),w=>{l(w,x)})),[E]=S.useState(e1(u,T));zl(()=>{for(const w of a)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(tp)}},[x,E,T]),zl(()=>{l(T,x)}),S.useImperativeHandle(y,Jw(c(T)));const I=n;return m.jsx(s.Provider,{value:T,children:n?m.jsx(I,{...QL([...r,...o,...a],x),children:b}):b})}),f=h=>{const y=S.useContext(s);return S.useCallback(b=>{ze(y[h],b)},[y,h])},p=h=>{const y=S.useContext(s)[h],b=S.useCallback(x=>st(y,x),[y]);return S.useSyncExternalStore(b,()=>Tt(y),()=>Tt(y))},v=h=>{const y=S.useContext(s)[h],[b,x]=S.useState(e1(Tt,y));return zl(()=>st(y,T=>{T!==b&&x(Jw(T))}),[y,b]),b},g=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(h,y)=>{const b=S.useContext(s)[h];zl(()=>st(b,y),[y,b])},useEmitterValue:g,usePublisher:f}}const jl=S.createContext(void 0),M1=S.createContext(void 0),D1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function yp(e){return"self"in e}function JL(e){return"body"in e}function N1(e,t,n,r=fi,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,g;const h=f.target;if(JL(h)||yp(h)){const b=yp(h)?h:h.defaultView;g=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,v=i?b.innerWidth:b.innerHeight}else g=i?h.scrollLeft:h.scrollTop,p=i?h.scrollWidth:h.scrollHeight,v=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(g,0),viewportHeight:v})};f.suppressFlushSync?y():Li.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let g,h,y;yp(p)?(h=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),g=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(h=p[i?"scrollWidth":"scrollHeight"],g=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const b=h-g;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),y1(g,h)||f.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const bp="-webkit-sticky",F1="sticky",xp=O1(()=>{if(typeof document>"u")return F1;const e=document.createElement("div");return e.style.position=bp,e.style.position===bp?bp:F1});function wp(e){return e}const eV=Qe(()=>{const e=he(s=>`Item ${s}`),t=he(s=>`Group ${s}`),n=he({}),r=he(wp),o=he("div"),i=he(fi),a=(s,l=null)=>Qt(ue(n,be(c=>c[s]),xt()),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")}}),tV=Qe(([e,t])=>({...e,...t}),bt(_1,eV)),nV=({height:e})=>m.jsx("div",{style:{height:e}}),rV={overflowAnchor:"none",position:xp(),zIndex:1},L1={overflowAnchor:"none"},oV={...L1,display:"inline-block",height:"100%"},V1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=wn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=wn("gap"),g=Fe("horizontalDirection"),{callbackRef:h}=r1(n,f,d,e?fi:s,p,v,o,g,Fe("skipAnimationFrameInResizeObserver")),[y,b]=S.useState(0);Ep("deviation",O=>{y!==O&&b(O)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||nV,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),C=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),V=Fe("initialItemFinalLocationReached"),N=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...wt(x,c)}):m.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:N,children:(e?t.topItems:t.items).map(O=>{const D=O.originalIndex,z=C(D+t.firstItemIndex,O.data,c);return P?S.createElement(T,{...wt(T,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":D,"data-item-index":O.index,"data-known-size":O.size,key:z,style:rV},u(O.index,c)):S.createElement(I,{...wt(I,c),...$1(I,O.data),"data-index":D,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:g?oV:L1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),iV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},aV={outline:"none",overflowX:"auto",position:"relative"},mi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),sV={position:xp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function $1(e,t){return{item:typeof e=="string"?void 0:t}}const lV=S.memo(function(){const e=Fe("HeaderComponent"),t=wn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),cV=S.memo(function(){const e=Fe("FooterComponent"),t=wn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null});function Sp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=N1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),m.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?aV:iV,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function Tp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=N1(s,c,l,v,f);return D1(()=>{var b;return h.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",y),e("scrollBy",g),m.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const uV=({children:e})=>{const t=S.useContext(jl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:mi(o),children:e})},dV=({children:e})=>{const t=S.useContext(jl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Fe("customScrollParent"),i=op(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("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:mi(a),children:e})},fV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...sV,marginTop:`${n}px`},o=Fe("context");return m.jsx(t,{style:r,...wt(t,o),children:e})},pV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return m.jsxs(r||t?gV:mV,{...e,context:o,children:[n&&m.jsx(fV,{children:m.jsx(V1,{showTopList:!0})}),m.jsxs(r||t?dV:uV,{children:[m.jsx(lV,{}),m.jsx(V1,{}),m.jsx(cV,{})]})]})}),{Component:hV,useEmitter:Ep,useEmitterValue:Fe,usePublisher:wn}=vp(tV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",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"}},pV),mV=Sp({useEmitter:Ep,useEmitterValue:Fe,usePublisher:wn}),gV=Tp({useEmitter:Ep,useEmitterValue:Fe,usePublisher:wn}),Cp=hV,vV=Qe(()=>{const e=he(c=>m.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),a=he(wp),s=he(fi),l=(c,u=null)=>Qt(ue(i,be(d=>d[c]),xt()),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")}}),yV=Qe(([e,t])=>({...e,...t}),bt(_1,vV)),bV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),xV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),wV={overflowAnchor:"none"},z1={position:xp(),zIndex:2,overflowAnchor:"none"},j1=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),a=je("fixedHeaderHeight"),s=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||bV,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((g,h,y)=>(y===0?g.push(h.size):g.push(g[y-1]+h.size),g),[]),v=(e?t.topItems:t.items).map(g=>{const h=g.originalIndex,y=n(h+r,g.data,o),b=e?h===0?0:p[h-1]:0;return i?S.createElement(u,{...wt(u,o),height:g.size,index:g.index,key:y,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...wt(d,o),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,key:y,style:{...z1,top:a}},c(g.index,o)):S.createElement(f,{...wt(f,o),...$1(f,g.data),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:y,style:e?{...z1,top:a+b}:wV},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:v})}),SV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=r1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);kp("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const g=je("EmptyPlaceholder"),h=je("FillerRow")||xV,y=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),T=je("context");if(x===0&&g)return m.jsx(g,{...wt(g,T)});const E=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+b+p-E,w=e.offsetBottom,C=I>0?m.jsx(h,{context:T,height:I},"padding-top"):null,P=w>0?m.jsx(h,{context:T,height:w},"padding-bottom"):null;return m.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,T),children:[C,t&&m.jsx(j1,{showTopList:!0}),m.jsx(j1,{}),P]})}),TV=({children:e})=>{const t=S.useContext(jl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:mi(!1),children:e})},EV=({children:e})=>{const t=S.useContext(jl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=op(n,o,je("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:mi(!1),children:e})},CV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?AV:IV,d=n||t?EV:TV,f=je("TableComponent"),p=je("TableHeadComponent"),v=je("TableFooterComponent"),g=i?m.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,h=a?m.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...wt(u,s),children:m.jsx(d,{children:m.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[g,m.jsx(SV,{},"TableBody"),h]})})})}),{Component:kV,useEmitter:kp,useEmitterValue:je,usePublisher:$n}=vp(yV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",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"}},CV),IV=Sp({useEmitter:kp,useEmitterValue:je,usePublisher:$n}),AV=Tp({useEmitter:kp,useEmitterValue:je,usePublisher:$n}),PV=kV,R1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},OV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:B1,floor:Rl,max:$a,min:Ip,round:H1}=Math;function W1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function _V(e){return{...OV,items:e}}function Bl(e,t){return e&&e.width===t.width&&e.height===t.height}function MV(e,t){return e&&e.column===t.column&&e.row===t.row}const DV=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},f,p,{didMount:v,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=he(0),w=he(0),C=he(R1),P=he({height:0,width:0}),_=he({height:0,width:0}),F=Ke(),V=Ke(),N=he(0),O=he(null),D=he({column:0,row:0}),z=Ke(),M=Ke(),k=he(!1),L=he(0),$=he(!0),B=he(!1),q=he(!1);st(ue(v,He(L),Me(([Y,K])=>!!K)),()=>{ze($,!1)}),st(ue(Vt(v,$,_,P,L,B),Me(([Y,K,X,de,,H])=>Y&&!K&&X.height!==0&&de.height!==0&&!H)),([,,,,Y])=>{ze(B,!0),fp(1,()=>{ze(F,Y)}),Fn(ue(c),()=>{ze(t,[0,0]),ze($,!0)})}),Ie(ue(M,Me(Y=>Y!=null&&Y.scrollTop>0),Xn(0)),w),st(ue(v,He(M),Me(([,Y])=>Y!=null)),([,Y])=>{Y&&(ze(P,Y.viewport),ze(_,Y.item),ze(D,Y.gap),Y.scrollTop>0&&(ze(k,!0),Fn(ue(c,go(1)),K=>{ze(k,!1)}),ze(l,{top:Y.scrollTop})))}),Ie(ue(P,be(({height:Y})=>Y)),d),Ie(ue(Vt(De(P,Bl),De(_,Bl),De(D,(Y,K)=>Y&&Y.column===K.column&&Y.row===K.row),De(c)),be(([Y,K,X,de])=>({gap:X,item:K,scrollTop:de,viewport:Y}))),z),Ie(ue(Vt(De(I),r,De(D,MV),De(_,Bl),De(P,Bl),De(O),De(w),De(k),De($),De(L)),Me(([,,,,,,,Y])=>!Y),be(([Y,[K,X],de,H,se,ae,Q,,le,te])=>{const{column:fe,row:pe}=de,{height:ve,width:Ae}=H,{width:me}=se;if(Q===0&&(Y===0||me===0))return R1;if(Ae===0){const qe=pp(te,Y),pt=qe+Math.max(Q-1,0);return _V(W1(qe,pt,ae))}const oe=q1(me,Ae,fe);let j,R;le?K===0&&X===0&&Q>0?(j=0,R=Q-1):(j=oe*Rl((K+pe)/(ve+pe)),R=oe*B1((X+pe)/(ve+pe))-1,R=Ip(Y-1,$a(R,oe-1)),j=Ip(R,$a(0,j))):(j=0,R=-1);const ne=W1(j,R,ae),{bottom:ce,top:xe}=U1(se,de,H,ne),ke=B1(Y/oe),_e=ke*ve+(ke-1)*pe-ce;return{bottom:ce,itemHeight:ve,items:ne,itemWidth:Ae,offsetBottom:_e,offsetTop:xe,top:xe}})),C),Ie(ue(O,Me(Y=>Y!==null),be(Y=>Y.length)),I),Ie(ue(Vt(P,_,C,D),Me(([Y,K,{items:X}])=>X.length>0&&K.height!==0&&Y.height!==0),be(([Y,K,{items:X},de])=>{const{bottom:H,top:se}=U1(Y,de,K,X);return[se,H]}),xt(Pa)),t);const G=he(!1);Ie(ue(c,He(G),be(([Y,K])=>K||Y!==0)),G);const W=pn(ue(Vt(C,I),Me(([{items:Y}])=>Y.length>0),He(G),Me(([[Y,K],X])=>{const de=Y.items[Y.items.length-1].index===K-1;return(X||Y.bottom>0&&Y.itemHeight>0&&Y.offsetBottom===0&&Y.items.length===K)&&de}),be(([[,Y]])=>Y-1),xt())),J=pn(ue(De(C),Me(({items:Y})=>Y.length>0&&Y[0].index===0),Xn(0),xt())),re=pn(ue(De(C),He(k),Me(([{items:Y},K])=>Y.length>0&&!K),be(([{items:Y}])=>({endIndex:Y[Y.length-1].index,startIndex:Y[0].index})),xt(d1),gr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ue(F,He(P,_,I,D),be(([Y,K,X,de,H])=>{const se=v1(Y),{align:ae,behavior:Q,offset:le}=se;let te=se.index;te==="LAST"&&(te=de-1),te=$a(0,te,Ip(de-1,te));let fe=Ap(K,H,X,te);return ae==="end"?fe=H1(fe-K.height+X.height):ae==="center"&&(fe=H1(fe-K.height/2+X.height/2)),le&&(fe+=le),{behavior:Q,top:fe}})),l);const ee=Qt(ue(C,be(Y=>Y.offsetBottom+Y.bottom)),0);return Ie(ue(T,be(Y=>({height:Y.visibleHeight,width:Y.visibleWidth}))),P),{customScrollParent:h,data:O,deviation:N,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T,...p,gridState:C,horizontalDirection:q,initialTopMostItemIndex:L,totalListHeight:ee,...f,endReached:W,propsReady:g,rangeChanged:re,startReached:J,stateChanged:z,stateRestoreInProgress:k,...E}},bt(hp,tn,Fa,P1,zr,gp,$r));function q1(e,t,n){return $a(1,Rl((e+n)/(Rl(t)+n)))}function U1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Ap(e,t,n,r[0].index);return{bottom:Ap(e,t,n,r[r.length-1].index)+o,top:i}}function Ap(e,t,n,r){const o=q1(e.width,n.width,t.column),i=Rl(r/o),a=i*n.height+$a(0,i-1)*t.row;return a>0?a+t.row:a}const NV=Qe(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(wp),a=he("div"),s=he(fi),l=(d,f=null)=>Qt(ue(t,be(p=>p[d]),xt()),f),c=he(!1),u=he(!1);return Ie(De(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")}}),FV=Qe(([e,t])=>({...e,...t}),bt(DV,NV)),LV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=Sn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),g=Sn("reportReadyState"),h=Jn(S.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const x=y.firstChild;if(x){const{height:T,width:E}=x.getBoundingClientRect();d({height:T,width:E})}f({column:Y1("column-gap",getComputedStyle(y).columnGap,p),row:Y1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return D1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),v?null:m.jsx(l,{className:t,ref:h,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const b=o(y.index,y.data,u);return i?m.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),VV=S.memo(function(){const e=Et("HeaderComponent"),t=Sn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),$V=S.memo(function(){const e=Et("FooterComponent"),t=Sn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),zV=({children:e})=>{const t=S.useContext(M1),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=Jn(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:mi(!1),children:e})},jV=({children:e})=>{const t=S.useContext(M1),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=Et("customScrollParent"),i=op(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:mi(!1),children:e})},RV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?HV:BV,o=n||t?jV:zV,i=Et("context");return m.jsx(r,{...e,...wt(r,i),children:m.jsxs(o,{children:[m.jsx(VV,{}),m.jsx(LV,{}),m.jsx($V,{})]})})}),{useEmitter:G1,useEmitterValue:Et,usePublisher:Sn}=vp(FV,{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"}},RV),BV=Sp({useEmitter:G1,useEmitterValue:Et,usePublisher:Sn}),HV=Tp({useEmitter:G1,useEmitterValue:Et,usePublisher:Sn});function Y1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const K1=e=>{const t=e.Icon??_g,n=Pt();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})]})},Pp=m.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),za=e=>m.jsx(ln,{...e,as:e.as||"span",className:Pe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function WV(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 qV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>WV(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 p-3 border-t-muted text-sm 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(ln,{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(ln,{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(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},UV=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})})},GV=(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=td(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=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(UV,{children:m.jsx(f,{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?Pp:c?m.jsx(S.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},gi=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(()=>[zo(10),Ns({fallbackAxisSideDirection:"end"}),Ds(),Wu({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:to,onOpenChange:(v,g)=>{const h=g?.relatedTarget;h&&h.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=Ro(l),u=Ir(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return m.jsxs(S.Fragment,{children:[m.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(oo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[m.jsx(qu,{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-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Op={},Z1;function YV(){return Z1||(Z1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const b=y.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((y,b)=>({...y,[b]:o(b,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,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(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 y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=f.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},p=h=>{const y=new Set,b=x=>{h().removeItem(x);const T=i(h());y.forEach(E=>E(T))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),b),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),y.forEach(E=>E(h()))}}},v=p(()=>window.sessionStorage),g=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=g,e.SessionStorage=v,e.createStorage=p})(Op)),Op}var ja=YV();const _p=e=>e.headerLabel??e.thead??e.id,Mp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var vi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(vi||{});const Dp=e=>e.type==="number"?e.valueAsNumber:e.value,KV=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},ZV={},XV=(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})},QV=(e,t,n=ZV)=>{const r=Ar()?null:ja.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Zf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:XV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Ar()||ja.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},JV=e=>{const t=_r(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]},e$=()=>Ar()?void 0:document.querySelector('[data-component="modal-body"]'),t$=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),n$=(e,t)=>e.toSorted(t$(t)),X1=(e,t,n)=>({label:t,id:Ho(),type:n,value:e.id}),r$=e=>{const t=Pt(),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,X1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},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(gi,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(Ag,{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(io,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(io,{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(ls,{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(wu,{size:14})," ",t.tableSortAddButton]})})]})})})},o$=e=>{const t=Pt(),[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=X1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=_p(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(Xk,{size:14}):null,n==="desc"?m.jsx(Zk,{size:14}):null,n==="undefined"?m.jsx(Ag,{size:14}):null]})},Q1=S.createContext({}),i$=Q1.Provider,a$=()=>S.useContext(Q1),Np=(e,t,n,r={})=>{const o=e.id,i=e.type??vi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Ho(),operation:l,label:_p(e),name:o,type:i,value:"",...r}},Fp=()=>{const e=Pt(),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(()=>({[vi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[vi.Boolean]:[t.is,t.isNot],[vi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},s$=e=>{const t=Pt(),n=Fp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Np(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return Np(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},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=Dp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return m.jsx(S.Fragment,{children:m.jsx(gi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(sI,{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(io,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(io,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(qo,{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(ls,{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(wu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},l$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Fp(),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=Dp(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(io,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(qo,{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(ls,{className:"text-danger",size:14})})]})},c$={top:0,left:0,right:0,bottom:-1},u$=e=>{const t=Cu(),n=Pt(),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=Fp(),l=o?uI:dI,c=S.useRef(null),u=g=>{const h=g.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==h))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const h=new AbortController;return g.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(g=>e.header.id===g.value),p=f?.type?f.type===Zw.Asc?"ascending":"descending":"none",v=_p(e.header);return m.jsxs(Iw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,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(gi,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),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:v})]}),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(l$,{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(Np(e.header,s.options,s.operations))),children:[m.jsx(wu,{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(o$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(Be.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:c$,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=>{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,b=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+b)}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 y=c.current.getBoundingClientRect().width,b=h.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},d$=e=>{const[t,n]=JV(e.setCols);return m.jsx(Ew,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(fn,{children:e.headers.map((r,o)=>m.jsx(u$,{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}`))})})},f$=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(fn,{children:n.children})})),p$=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??""}`})),h$=S.forwardRef(({context:e,...t},n)=>{const r=a$(),o={...t?.style,top:Re.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"})}),m$=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??""}`})}),g$=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),v$={TableRow:m$,TableFoot:g$,TableHead:h$,Table:p$,TableBody:f$},y$=[0,0,0,0,0,0,0,0,0,0],b$=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Pp:m.jsx(K1,{})}),x$=()=>m.jsx(S.Fragment,{}),w$=[],J1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=_r(a),v=_r(u.loadingMore),g=S.useMemo(()=>{if(u.loading)return y$;if(c)return u.rows;const b=new Xw(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():n$(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[v,p]);const h=g.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return m.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[m.jsx(PV,{components:v$,context:y,totalCount:g.length,itemContent:h?x$:GV,data:h?w$:g,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(d$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),h?m.jsx(b$,{loading:u.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?m.jsx(qV,{...l}):null]})},S$=({item:e,onPointerDown:t})=>{const n=mo(0);return m.jsxs(Iw,{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(aI,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},T$=e=>{const t=Pt(),n=Mp(e.cols),r=wF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Xw(e.rows).GroupBy(u),v=e.cols.find(g=>g.id===u);e.setGroups(DC(p).map((g,h)=>{const y=p[g];return{...v,groupId:Ho(),groupKey:u,index:h,rows:y,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(S.Fragment,{children:m.jsxs(gi,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(fI,{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(io,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(pr,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(ls,{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(YN,{children:m.jsx(Ew,{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(S$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},E$=e=>m.jsx("header",{className:"mb-1 min-w-full",children:m.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[m.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[m.jsx("span",{children:m.jsx(s$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(r$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(T$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[m.jsxs("span",{children:[m.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","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 p-0 whitespace-pre",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=Dp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),C$=(e,t)=>typeof t=="function"?t(e):t,Hl=(e,t,n)=>e===t?void 0:n?.(t),k$=e=>{const t=Cu(),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(()=>Mp(e.cols),[e.cols]),[i,a]=Zf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:C$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Hl(l?.filters??[],s.filters??[],e.setFilters),Hl(l?.sorters??[],s.sorters??[],e.setSorters),Hl(l?.groups??[],s.groups??[],e.setGroups),Hl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),m.jsx(i$,{value:n,children:m.jsxs(fn,{initial:!1,children:[r?m.jsx(E$,{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(J1,{...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(J1,{...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}`))})]})})},Wl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>m.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Pe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-3",i),children:[e?m.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",a),children:e}):o,m.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",s.className),children:t?m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(za,{className:"w-full"}),m.jsx(za,{className:"w-8/12"}),m.jsx(za,{className:"w-10/12"}),m.jsx(za,{className:"w-1/2"})]}):n})]});Wl.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:Re.string(o.title)?o.title:void 0,className:Pe("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 I$=e=>{const t=e.interactive??!0,n=e.Icon??br;return m.jsx(Wl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center 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:Pe("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(za,{className:"h-10"}):m.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},A$=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(dr,{children:m.jsx(Nf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(fn,{presenceAffectsLayout:!0,children:[e?m.jsx(Be.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(Xu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(oo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(Be.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(Do,{})})}),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]})})}),P$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=Ro(o),s=fr(o,{role:"dialog"}),l=Ir(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return m.jsxs(S.Fragment,{children:[m.jsx(A$,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,g=`${r}-${p}`,h=()=>n({...v,id:g}),y=v.leading;return m.jsx(Be.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(Be.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(S.Fragment,{children:[v.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:v.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:v.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?m.jsx(y,{open:h}):null]})})]})})})},g)})})]})},O$=e=>m.jsx(S.Fragment,{children:e.children}),eS=()=>{const e=S.useContext(Xr);return e?e.parser:cs.hsla},Lp=.3,ql={duration:Lp,type:"tween",ease:"easeInOut"},tS=S.createContext(null),Vp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},yi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},_$=e=>m.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx(Be.path,{className:"currentColor",initial:yi.initial,animate:yi.animate,transition:Vp,d:"M18 6 6 18"}),m.jsx(Be.path,{className:"currentColor",initial:yi.initial,animate:yi.animate,transition:Vp,d:"m6 6 12 12"})]}),M$=e=>m.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:m.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:yi.animate,initial:yi.initial,transition:Vp})}),D$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},N$={duration:.6,delay:.2,type:"tween",ease:"circOut"},F$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",L$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,nS=()=>S.useContext(tS),V$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=eS(),s=nS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=L$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=F$(e,l,n);return s?.steps&&100/s?.steps,m.jsxs(S.Fragment,{children:[m.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),m.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[m.jsx(Be.div,{variants:D$,transition:N$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),m.jsx(Be.div,{initial:!1,animate:u,transition:ql,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:ql,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:ql,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:ql,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:m.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?m.jsx(M$,{className:"size-6 text-primary-foreground"}):u==="error"?m.jsx(_$,{className:"size-6 text-danger-foreground"}):m.jsx(S.Fragment,{children:m.jsx("span",{children:e})})})}),m.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:m.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},$$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Lp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Lp,steps:S.Children.count(e.children)};return m.jsx(tS.Provider,{value:o,children:m.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},rS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},oS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},iS=S.createContext(""),z$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",$p=(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(!z$(a))return a}return n==="backward"?$p(e,e.length-1,"backward"):$p(e,-1,"forward")},aS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=$p(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},sS={[oS.ArrowLeft]:(e,t)=>aS(t,"backward"),[oS.ArrowRight]:(e,t)=>aS(t,"forward")},j$=e=>{const[t,n]=rS(e.active),r=S.useRef(null),o=_r(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(Re.keyof(sS,c)){const u=sS[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(iS.Provider,{value:t,children:m.jsx(Wl,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[m.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",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:Pe("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(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},R$=()=>S.useContext(iS),B$=e=>{const t=R$();return m.jsx(S.Fragment,{children:e.id===t?e.children:null})},lS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},H$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},cS=e=>m.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lS,exit:lS.false,transition:H$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),W$=Ao("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"}}),q$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx(fn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?m.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx(cS,{"data-open":!!i,open:!!i,children:m.jsx(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Pe(W$({theme:n}),t),children:m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",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(Do,{size:20})}):null,m.jsxs("div",{className:Pe("flex gap-2 items-center",a.title?"":"w-fit"),children:[!r&&n==="success"?m.jsx(bu,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(br,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(Tu,{"aria-hidden":"true",size:20}):null,r]}),a.title?m.jsx("h4",{className:"col-start-2 text-lg font-semibold tracking-3 text-balance",children:a.title}):null,m.jsx("div",{className:"col-start-2 w-full",children:a.children})]})})})}):null})}),U$=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:Pe("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]}),G$=Symbol.for("react.lazy");function uS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Y$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=uS(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():uS(e[o],null)}}}}const Ul=A[" use ".trim().toString()];function K$(e){return typeof e=="object"&&e!==null&&"then"in e}function dS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===G$&&"_payload"in e&&K$(e._payload)}function Z$(e){const t=X$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;dS(i)&&typeof Ul=="function"&&(i=Ul(i._payload));const s=A.Children.toArray(i),l=s.find(J$);if(l){const c=l.props.children,u=s.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return m.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const fS=Z$("Slot");function X$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(dS(o)&&typeof Ul=="function"&&(o=Ul(o._payload)),A.isValidElement(o)){const a=tz(o),s=ez(i,o.props);return o.type!==A.Fragment&&(s.ref=r?Y$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const Q$=Symbol("radix.slottable");function J$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q$}function ez(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 tz(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)}const pS=(e="")=>Pe("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),zp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),hS=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),[f,p]=S.useState(!1),[v,g]=S.useState(null),h=S.useRef([]),y=S.useRef([]),b=S.useContext(zp),x=Er(),T=Cr(),E=iP(),I=Ev(),w=x!==null,{floatingStyles:C,refs:P,context:_}=Gn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:to,placement:w?"right":"bottom-start",middleware:[zo({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ns(),Ds()]}),F=fr(_,{role:"menu"}),V=Ir(_,{bubbles:!0}),N=Nv(_,{move:!1,enabled:n,delay:{open:oy},handleClose:ry({blockPointerEvents:!0,requireIntent:!1})}),O=Ro(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=Ws(_,{loop:!0,activeIndex:v,nested:w,listRef:h,onNavigate:g}),z=OP(_,{activeIndex:v,listRef:y,resetMs:MP,onMatch:u?g:void 0}),{getReferenceProps:M,getFloatingProps:k,getItemProps:L}=Yn([N,O,F,V,D,z]);S.useEffect(()=>{if(!T)return;const B=()=>d(!1),q=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",B),T.events.on("menuopen",q),()=>{T.events.off("click",B),T.events.off("menuopen",q)}},[T,E,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:E})},[T,u,E,x]);const $=o?l.className:Pe(pS(l.className));return m.jsxs(aP,{id:E,children:[m.jsx(S.Fragment,{children:l.asChild?m.jsx(fS,{...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:s,className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[s,w&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(yu,{size:14})]})]})}),m.jsx(zp.Provider,{value:{activeIndex:v,setActiveIndex:g,getItemProps:L,setHasFocusInside:p,isOpen:u},children:m.jsx(JA,{elementsRef:h,labelsRef:y,children:u&&m.jsx(dr,{children:m.jsx(oo,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:m.jsx(t,{...k(),ref:P.setFloating,style:{...l.style,...C},className:Pe("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})})})})})]})}),nz=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(zp),s=Ev({label:n?null:e}),l=Cr(),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:sr(s.ref,i),className:pS(`${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]})}),rz=S.forwardRef((e,t)=>Er()===null?m.jsx(sP,{children:m.jsx(hS,{...e,isParent:!0,ref:t})}):m.jsx(hS,{...e,isParent:!1,ref:t})),jp=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:Pe("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:Pe("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:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),oz=({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:Pe("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]}),iz=uy("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
15
|
+
`);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)}),az=(e,t)=>Ar()?t:window.matchMedia(e).matches,sz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(az(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},lz=()=>S.useContext(Xr).floatingRef??void 0,mS=S.createContext(async()=>!1),cz=()=>S.useContext(mS),Tn="500ms",uz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Tn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Tn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Tn}},dz={enter:{x:"0%",opacity:1,animationDuration:Tn},exit:{x:["0%","30%"],opacity:0,animationDuration:Tn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Tn}},Rp={drawer:e=>e==="left"?uz:dz,sheet:{enter:{opacity:1,y:"0%",animationDuration:Tn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Tn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Tn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Tn},enter:{opacity:1,scale:[1.05,1],animationDuration:Tn},initial:{opacity:.5,scale:.95,animationDuration:Tn,transition:{duration:.5,ease:"easeInOut"}}}},fz=Ao("z-floating border border-floating-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"}}),gS={top:0,left:0,right:0,bottom:0},vS=e=>e*.6,pz=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),f=window.outerHeight,p=vS(f);return d>=p?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(Be.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:gS,whileDrag:{cursor:"grabbing"},className:Pe("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})},Gl={drawer:"right",sheet:"none",dialog:"none"},hz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Gl.drawer:Gl[o]:t?Gl[o]:Gl.sheet},mz=[],yS=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:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=mz,...E},I)=>{const w=lz(),C=S.useRef(null),P=S.useRef(null),_=S.useId(),F=S.useId(),V=sz("(min-width: 64rem)"),N=hz(V,p,h,y),O=V||p?Rp[h]:Rp.sheet,D=typeof O=="function"?O(N):O,z=V||p?h:"sheet",M=z!=="dialog",k=Gn({open:e,onOpenChange:a,strategy:"fixed"}),L=Ro(k.context,{}),$=fr(k.context,{role:"dialog"}),B=Ir(k.context,{bubbles:!0,escapeKey:!0,outsidePress:ae=>{const Q=ae.target;return b&&!!Q?.isConnected}}),q=Yn([L,B,$].concat(T)),G=o,W=mo(void 0),J=mo(void 0),re=S.useRef(!1),ee=S.useRef(0);S.useEffect(()=>{W.set(void 0),J.set(void 0)},[z,W,J]);const Y=()=>a(!1);S.useImperativeHandle(I,()=>({context:k.context,floating:P.current}),[k.context,P]);const X=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:gS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ae,Q)=>{const te=k.refs.floating.current.getBoundingClientRect(),fe=W.get()||te.height,pe=Math.abs(fe-Q.delta.y),ve=window.outerHeight,Ae=vS(ve);return pe>=Ae?W.set(pe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>W.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},de=mo(void 0),H=mo(void 0),se=r?fS:Be.button;return m.jsxs(S.Fragment,{children:[o?m.jsx(se,{ref:k.refs.setReference,...q.getReferenceProps(),layoutId:v,type:"button",children:G}):null,m.jsx(Nf,{reducedMotion:d?"user":"always",children:m.jsx(dr,{preserveTabOrder:!0,root:w,children:m.jsx(fn,{mode:"wait",propagate:!0,children:e?m.jsx(Xu,{lockScroll:!0,className:Pe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",g),children:m.jsx(oo,{guards:!0,modal:!0,closeOnFocusOut:x,context:k.context,children:m.jsx(fn,{propagate:!0,children:m.jsxs(Be.div,{...E,...t?{"aria-labelledby":_,"aria-describedby":F}:{"aria-label":s},...q.getFloatingProps({"aria-modal":e,ref:sr(k.refs.setFloating,P),className:Pe(fz({position:N,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:D,"data-component":"modal",style:z==="drawer"?{width:W}:{height:W,y:J},children:[M&&u?m.jsx(pz,{onChange:a,value:W,sheet:z==="sheet",position:N,parent:k.refs.floating}):null,t?m.jsx(Be.header,{...X,className:"relative w-full isolate",children:t?m.jsx("h2",{id:_,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(Be.section,{ref:C,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(H.set(void 0),de.set(void 0),re.current){const ae=J.get()||0,Q=window.innerHeight*.2;ae>Q?(await Sw(J,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):Sw(J,0,{type:"spring",bounce:0,duration:.3}),re.current=!1}},onTouchStart:ae=>{const Q=ae.changedTouches[0];de.set(Q.pageY),H.set(Q.pageY),re.current=!1},onTouchMove:ae=>{const le=ae.changedTouches[0].pageY,te=H.get()||le,fe=C.current?.scrollTop||0;if(!re.current&&fe<=0&&le>te&&z==="sheet"&&(re.current=!0,ee.current=le),re.current){const pe=le-ee.current;pe<0?J.set(pe*.2):J.set(pe)}H.set(le)},children:i}),n?m.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?m.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:m.jsx("button",{type:"button",onClick:Y,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:m.jsx(Do,{})})}):null]})})})}):null})})})]})});let bS=async()=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);const Bp=Object.assign(yS,{confirm:e=>bS(e)}),xS=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,a]=S.useState(()=>{}),s=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{a(()=>d)})),[]);S.useEffect(()=>{bS=s},[s]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return m.jsxs(mS.Provider,{value:s,children:[e,m.jsx(yS,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:m.jsxs("div",{className:"flex gap-2 justify-end",children:[m.jsx(pr,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),m.jsx(pr,{theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:m.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},gz=e=>{const[t,n]=yF();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:ED(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},vz=e=>m.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),yz=e=>m.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),bz=e=>m.jsx("div",{className:Pe(`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:Pe(e.disabled?"text-disabled":"",e.row?"text-base w-fit":"w-full text-lg"),children:e.children})]})}),wS=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})]}),xz=e=>m.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[m.jsx("div",{children:m.jsx(wS,{title:e.title,children:e.description})}),m.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),SS=e=>m.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),wz=()=>m.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:m.jsx(SS,{})}),Sz=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}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ro(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=Ir(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(pr,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(Be.span,{layoutId:o,children:e.trigger})}),m.jsx(fn,{children:i?m.jsx(dr,{root:t,children:m.jsx(oo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Tz=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},Ez=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},Cz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),kz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,Iz=({steps:e,active:t=!1,onClose:n=Wo,onFinish:r=Wo,onChange:o=Wo,labels:i})=>{const a=Pt(),[s,l]=S.useState(0),c=e[s],[u,d]=S.useState(null),[f,p]=S.useState(Cz()),[v,g]=S.useState(!1),h=S.useRef(null),{width:y,height:b}=Ez(),x={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:T,floatingStyles:E,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:to,middleware:[zo(10),Ns(),Ds(),Wu({element:h})]}),{getFloatingProps:w}=Yn([fr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{g(!1)},[s,t]),S.useEffect(()=>{if(!t||!c)return;const V=kz(c.element);V?(c.onEnter?.(),setTimeout(()=>{p(V.getBoundingClientRect()),T.setReference(V),d(V)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const V=()=>p(u.getBoundingClientRect());return V(),window.addEventListener("scroll",V,{capture:!0,passive:!0}),window.addEventListener("resize",V,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",V,{capture:!0}),window.removeEventListener("resize",V,{capture:!0})}},[u,y,b]),Tz(u,V=>{p(V.target.getBoundingClientRect())});const C=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l(V=>V+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l(V=>V-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return m.jsx(dr,{children:m.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[m.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("defs",{children:m.jsxs("mask",{id:"driver-mask",children:[m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),m.jsx(Be.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>g(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),m.jsx(fn,{mode:"wait",children:c&&v&&m.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:m.jsxs(Be.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-floating-background border-floating-border",children:[u&&m.jsx(qu,{ref:h,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&m.jsx("h3",{children:c.title}),c.description&&m.jsx(S.Fragment,{children:c.description}),m.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[m.jsx(pr,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),m.jsxs("div",{className:"flex gap-2",children:[F&&m.jsx(pr,{size:"small",theme:"ghost-muted",onClick:P,children:x.previous}),m.jsx(pr,{size:"small",onClick:C,children:_?x.next:x.finish})]})]}),m.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},TS=6048e5,Az=864e5,Pz=6e4,Oz=36e5,_z=1e3,ES=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ES in e?e[ES](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Yl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function CS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(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 bi(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=Je(e,n?.in),d=o||r?CS(u,o+r*12):u,f=a||i?Yl(d,a+i*7):d,p=l+s*60,g=(c+p*60)*1e3;return ut(e,+f+g)}let Mz={};function bo(){return Mz}function tr(e,t){const n=bo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(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 xi(e,t){return tr(e,{...t,weekStartsOn:1})}function kS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=xi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=xi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kl(e){const t=Je(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 Zl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function xo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function Dz(e,t,n){const[r,o]=Zl(n?.in,e,t),i=xo(r),a=xo(o),s=+i-Kl(i),l=+a-Kl(a);return Math.round((s-l)/Az)}function Nz(e,t){const n=kS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xi(r)}function Fz(e){return ut(e,Date.now())}function Lz(e,t,n){const[r,o]=Zl(n?.in,e,t);return+xo(r)==+xo(o)}function Vz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Xl(e){return!(!Vz(e)&&typeof e!="number"||isNaN(+Je(e)))}function $z(e,t){const[n,r]=Zl(e,t.start,t.end);return{start:n,end:r}}function IS(e,t){const{start:n,end:r}=$z(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(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function AS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function zz(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function jz(e,t){const n=bo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(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 Rz={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"}},Bz=(e,t,n)=>{let r;const o=Rz[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 Hp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Hz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uz={date:Hp({formats:Hz,defaultWidth:"full"}),time:Hp({formats:Wz,defaultWidth:"full"}),dateTime:Hp({formats:qz,defaultWidth:"full"})},Gz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Yz=(e,t,n,r)=>Gz[e];function Ra(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 Kz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xz={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"]},Qz={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"]},Jz={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"}},ej={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"}},tj={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:Ra({values:Kz,defaultWidth:"wide"}),quarter:Ra({values:Zz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ra({values:Xz,defaultWidth:"wide"}),day:Ra({values:Qz,defaultWidth:"wide"}),dayPeriod:Ra({values:Jz,defaultWidth:"wide",formattingValues:ej,defaultFormattingWidth:"wide"})};function Ba(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)?rj(s,d=>d.test(a)):nj(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 nj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oj(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 ij=/^(\d+)(th|st|nd|rd)?/i,aj=/\d+/i,sj={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},lj={any:[/^b/i,/^(a|c)/i]},cj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uj={any:[/1/i,/2/i,/3/i,/4/i]},dj={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},fj={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]},pj={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},hj={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]},mj={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},gj={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}},vj={ordinalNumber:oj({matchPattern:ij,parsePattern:aj,valueCallback:e=>parseInt(e,10)}),era:Ba({matchPatterns:sj,defaultMatchWidth:"wide",parsePatterns:lj,defaultParseWidth:"any"}),quarter:Ba({matchPatterns:cj,defaultMatchWidth:"wide",parsePatterns:uj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ba({matchPatterns:dj,defaultMatchWidth:"wide",parsePatterns:fj,defaultParseWidth:"any"}),day:Ba({matchPatterns:pj,defaultMatchWidth:"wide",parsePatterns:hj,defaultParseWidth:"any"}),dayPeriod:Ba({matchPatterns:mj,defaultMatchWidth:"any",parsePatterns:gj,defaultParseWidth:"any"})},PS={code:"en-US",formatDistance:Bz,formatLong:Uz,formatRelative:Yz,localize:tj,match:vj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yj(e,t){const n=Je(e,t?.in);return Dz(n,zz(n))+1}function OS(e,t){const n=Je(e,t?.in),r=+xi(n)-+Nz(n);return Math.round(r/TS)+1}function Wp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=bo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function bj(e,t){const n=bo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Wp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function _S(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+bj(n,t);return Math.round(r/TS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const jr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(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];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},wi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MS={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"});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 jr.y(e,t)},Y:function(e,t,n,r){const o=Wp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=kS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(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 dt(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"});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 dt(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"});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 jr.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"});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 dt(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=_S(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=OS(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):jr.d(e,t)},D:function(e,t,n){const r=yj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(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"});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 dt(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"});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 dt(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"});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 dt(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"});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"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=wi.noon:r===0?o=wi.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"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=wi.evening:r>=12?o=wi.afternoon:r>=4?o=wi.morning:o=wi.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"});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 jr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):jr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jr.s(e,t)},S:function(e,t){return jr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return NS(r);case"XXXX":case"XX":return wo(r);default:return wo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return NS(r);case"xxxx":case"xx":return wo(r);default:return wo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+DS(r,":");default:return"GMT"+wo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+DS(r,":");default:return"GMT"+wo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function DS(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+dt(i,2)}function NS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):wo(e,t)}function wo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const FS=(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"});default:return t.date({width:"full"})}},LS=(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"});default:return t.time({width:"full"})}},qp={p:LS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return FS(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;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",FS(r,t)).replace("{{time}}",LS(o,t))}},xj=/^D+$/,wj=/^Y+$/,Sj=["D","DD","YY","YYYY"];function VS(e){return xj.test(e)}function $S(e){return wj.test(e)}function Up(e,t,n){const r=Tj(e,t,n);if(console.warn(r),Sj.includes(e))throw new RangeError(r)}function Tj(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 Ej=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Cj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kj=/^'([^]*?)'?$/,Ij=/''/g,Aj=/[a-zA-Z]/;function Gp(e,t,n){const r=bo(),o=r.locale??PS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Xl(s))throw new RangeError("Invalid time value");let l=t.match(Cj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=qp[d];return f(u,o.formatLong)}return u}).join("").match(Ej).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Pj(u)};if(MS[d])return{isToken:!0,value:u};if(d.match(Aj))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;($S(d)||VS(d))&&Up(d,t,String(e));const f=MS[d[0]];return f(s,d,o.localize,c)}).join("")}function Pj(e){const t=e.match(kj);return t?t[1].replace(Ij,"'"):e}function Oj(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function _j(){return Object.assign({},bo())}function Mj(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function Dj(e,t){return+Je(e)>+Je(t)}function Nj(e,t){return+Je(e)<+Je(t)}function Fj(e,t){const n=Lj(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Lj(e){return typeof e=="function"&&e.prototype?.constructor===e}const Vj=10;class zS{subPriority=0;validate(t,n){return!0}}class $j extends zS{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 zj extends zS{priority=Vj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Fj(t,this.context))}}class ot{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new $j(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class jj extends ot{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"});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 Dt={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}/},nr={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 Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(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*Oz+i*Pz+a*_z),rest:t.slice(n[0].length)}}function jS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Ql(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Yp(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function RS(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 BS(e){return e%400===0||e%4===0&&e%100!==0}class Rj extends ot{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 Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(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=RS(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 Bj extends ot{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Wp(t,o);if(r.isTwoDigitYear){const s=RS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(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),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Hj extends ot{priority=130;parse(t,n){return Ql(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),xi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Wj extends ot{priority=130;parse(t,n){return Ql(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 qj extends ot{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(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"});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 Uj extends ot{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(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"});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 Gj extends ot{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 Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(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"});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 Yj extends ot{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(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"});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 Kj(e,t,n){const r=Je(e,n?.in),o=_S(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class Zj extends ot{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Kj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Xj(e,t,n){const r=Je(e,n?.in),o=OS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Qj extends ot{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return xi(Xj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Jj=[31,28,31,30,31,30,31,31,30,31,30,31],eR=[31,29,31,30,31,30,31,31,30,31,30,31];class tR extends ot{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=BS(r),i=t.getMonth();return o?n>=1&&n<=eR[i]:n>=1&&n<=Jj[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 nR extends ot{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return BS(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 Kp(e,t,n){const r=bo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(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 Yl(i,u,n)}class rR extends ot{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"});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=Kp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class oR extends ot{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 Nt(_t(n.length,t),i);case"eo":return Nt(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"});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=Kp(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 iR extends ot{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 Nt(_t(n.length,t),i);case"co":return Nt(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"});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=Kp(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 aR(e,t,n){const r=Je(e,n?.in),o=Mj(r,n),i=t-o;return Yl(r,i,n)}class sR extends ot{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(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 Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(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=aR(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 lR extends ot{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"});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(Yp(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class cR extends ot{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"});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(Yp(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class uR extends ot{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"});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(Yp(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class dR extends ot{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 fR extends ot{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 pR extends ot{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 hR extends ot{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(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 mR extends ot{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(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 gR extends ot{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(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 vR extends ot{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class yR extends ot{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Kl(t)-r)}incompatibleTokens=["t","T","x"]}class bR extends ot{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Kl(t)-r)}incompatibleTokens=["t","T","X"]}class xR extends ot{priority=40;parse(t){return jS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class wR extends ot{priority=20;parse(t){return jS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const SR={G:new jj,y:new Rj,Y:new Bj,R:new Hj,u:new Wj,Q:new qj,q:new Uj,M:new Gj,L:new Yj,w:new Zj,I:new Qj,d:new tR,D:new nR,E:new rR,e:new oR,c:new iR,i:new sR,a:new lR,b:new cR,B:new uR,h:new dR,H:new fR,K:new pR,k:new hR,m:new mR,s:new gR,S:new vR,X:new yR,x:new bR,t:new xR,T:new wR},TR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ER=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CR=/^'([^]*?)'?$/,kR=/''/g,IR=/\S/,AR=/[a-zA-Z]/;function PR(e,t,n,r){const o=()=>ut(n,NaN),i=_j(),a=i.locale??PS,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new zj(r?.in,n)],d=t.match(ER).map(h=>{const y=h[0];if(y in qp){const b=qp[y];return b(h,a.formatLong)}return h}).join("").match(TR),f=[];for(let h of d){$S(h)&&Up(h,t,e),VS(h)&&Up(h,t,e);const y=h[0],b=SR[y];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${h}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);f.push({token:y,fullToken:h});const T=b.run(e,h,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(y.match(AR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(h==="''"?h="'":y==="'"&&(h=OR(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&IR.test(e))return o();const p=u.map(h=>h.priority).sort((h,y)=>y-h).filter((h,y,b)=>b.indexOf(h)===y).map(h=>u.filter(y=>y.priority===h).sort((y,b)=>b.subPriority-y.subPriority)).map(h=>h[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const g={};for(const h of p){if(!h.validate(v,c))return o();const y=h.set(v,g,c);Array.isArray(y)?(v=y[0],Object.assign(g,y[1])):v=y}return v}function OR(e){return e.match(CR)[1].replace(kR,"'")}function _R(e,t,n){const[r,o]=Zl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function MR(e,t){return Lz(ut(e,e),Fz(e))}function DR(e,t,n){return Yl(e,-t,n)}function NR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Oj(a);return r.setMonth(t,Math.min(i,s)),r}function FR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=NR(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 LR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function VR(e,t,n){return CS(e,-t,n)}function Ha(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=VR(e,o+r*12,n),d=DR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const $R=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function zR(e,t){return S.useRef($R(e,t)).current}function HS(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 jR=/^(?<hour>\d\d):(?<min>\d\d)$/,RR={type:"spring",bounce:.3,duration:.6},WS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),qS={enter:WS(1),exit:WS(-1),middle:{x:"0%",opacity:1}},US={exit:{visibility:"hidden"}},BR=e=>{const t=tr(AS(e));return IS({start:t,end:bi(t,{days:41})})},GS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),HR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=AS(new Date(1970,o,1).setMonth(o)),a=GS(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Zp={ArrowLeft:(e,t)=>t==="days"?Ha(e,{days:1}):Ha(e,{months:1}),ArrowRight:(e,t)=>t==="days"?bi(e,{days:1}):bi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ha(e,{weeks:1}):Ha(e,{years:1}),ArrowDown:(e,t)=>t==="days"?bi(e,{weeks:1}):bi(e,{years:1})},YS=(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)},So=e=>e.getFullYear().toString().padStart(4,"0"),WR=(e,t,n)=>e===void 0||n===void 0?!1:Dj(t,e)&&Nj(t,n),qR=e=>{const t=Pt();return m.jsx(Be.tbody,{layout:!0,variants:qS,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.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?xo(e.date).toISOString():void 0),l=MR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=_R(i,e.stateDate),d=!u||c,f=e.rangeMode?WR(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:Pe("relative",Re.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:Pe(`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":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Re.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}`)})})},UR=()=>xo(new Date),KS=({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:f="date",datetimeTitle:p,...v})=>{const g=S.useRef(Ho()),h=Pt(),y=ll(o),b=S.useRef(null),{date:x,range:T}=v,E=x||new Date,I=S.useRef(null),[w,C]=Zf({date:E,isAnimating:!1,year:So(E),direction:void 0,range:{from:T?.from,to:T?.to},months:HR(g.current,E,y),selectMode:l?"from":void 0,week:IS({start:tr(E),end:jz(E)})},M=>({onChangeYear:k=>({year:k}),onExitComplete:()=>(YS(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:k=>{const L=k(M.state().date);return{date:L,year:So(L)}},nextMonth:k=>{k&&(I.current=k.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=bi(L.date,{months:1});return{date:$,isAnimating:!0,direction:1,year:So($)}},previousMonth:k=>{k&&(I.current=k.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=Ha(L.date,{months:1});return{date:$,isAnimating:!0,direction:-1,year:So($)}},onSelectDate:k=>{const L=M.state(),$=k.currentTarget.dataset.range==="true",B=k.currentTarget.dataset.date||"",q=new Date(B);return{date:q,year:So(q),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:$?{from:L.selectMode==="from"?q:L.range.from,to:L.selectMode==="to"?q:L.range.to}:L.range}},onChangeMonth:k=>{const L=k.target.value,B=Array.from(k.target.options).find(G=>G.value===L),q=M.state();if(B){const G=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+G),{...q,date:W,year:So(W)}}return q},onKeyDown:k=>{const L=k.key,$=M.state();if(L in Zp){(L==="ArrowUp"||L==="ArrowDown")&&k.preventDefault();const B=M.state().date,q=Re.keyof(Zp,L)?Zp[L](B,k.shiftKey?"month":"days"):null;if(q!==null)return YS(k.target,b,q),{...$,date:q,year:So(q)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,k,L)=>((L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&L.props.onChangeMonth?.(M.date),M),(M,k,L)=>(L.method==="onChangeYear"&&L.props.onChangeYear?.(M.date),M),(M,k,L)=>{const $=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&$&&t?(c?.(M.range),M):($&&t&&c?.(M.date),M)}]}),P=BR(w.date),_=sy(P,7),F=w.date.toISOString(),V=GS(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[F,t]);const N=zR(M=>C.date(k=>LR(new Date(k),+M)),1200),O=M=>{const k=M.currentTarget.value;C.onChangeYear(k),s?.(new Date(k)),N(k)},D=HS((M,k)=>(M.preventDefault(),k==="right"?C.previousMonth():C.nextMonth()),10),z=()=>{const M=UR();C.date(()=>M),c?.(M)};return m.jsx(Nf,{transition:RR,children:m.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:D.onTouchEnd,onTouchStart:D.onTouchStart,className:Pe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(fn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:m.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:US,onClick:C.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(eI,{className:"h-4 w-4"})}),m.jsx(Be.span,{layout:!0,variants:qS,custom:w.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:w.months}),m.jsx(Cg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:US,onClick:C.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(yu,{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(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[m.jsx("thead",{children:m.jsx("tr",{children:w.week.map(M=>m.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),m.jsx(qR,{zip:_,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},V)})}),f==="datetime"?m.jsx("section",{className:"grid items-center my-4",children:m.jsx(qo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Gp(x,"HH:mm"):void 0,title:p||h.calendarDatetimeTitle,onChange:M=>{const k=M.target.value,L=jR.exec(k);if(!L)return;const $=L.groups.hour,B=L.groups.min,q=FR(w.date,{hours:Number($),minutes:Number(B),seconds:0});C.date(()=>q),c?.(q)}})}):null,m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Xp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xp.displayName="ProgressRootContext");function GR(){const e=A.useContext(Xp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Pr(51));return e}let Qp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const ZS={status(e){return e==="progressing"?{[Qp.progressing]:""}:e==="complete"?{[Qp.complete]:""}:e==="indeterminate"?{[Qp.indeterminate]:""}:null}};function YR(e,t,n){return e==null?"":n?Go(e,t,n):Go(e/100,t,{style:"percent"})}function KR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const XS=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=KR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=id(r);let g="indeterminate";Number.isFinite(l)&&(g=l===a?"complete":"progressing");const h=YR(l,i,v.current),y=A.useMemo(()=>({status:g}),[g]),b={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(h,l),role:"progressbar"},x=A.useMemo(()=>({formattedValue:h,max:a,min:s,setLabelId:p,state:y,status:g,value:l}),[h,a,s,p,y,g,l]),T=an("div",t,{state:y,ref:n,props:[b,d],stateAttributesMapping:ZS});return m.jsx(Xp.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(XS.displayName="ProgressRoot");const QS=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=GR(),u=Number.isFinite(l)&&l!==null?tl(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:ZS})});process.env.NODE_ENV!=="production"&&(QS.displayName="ProgressIndicator");const ZR=e=>m.jsxs(XS,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(QS,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Re.number(e.percent)?m.jsx("p",{className:Pe("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]}),Jl=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})]});Jl.Icon=function(t){return m.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Jl.Body=function(t){return m.jsx(ln,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},Jl.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(ln,{...t,type:"button"})})};const XR=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),QR=e=>m.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),JS=new Date(1970,11,31),Jp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},eT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},JR={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")},eh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},eB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},tB={day:"numeric",month:"numeric",year:"numeric"},nB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=ll(t),d=S.useId(),f=Pt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?eB:tB),[u,s]),[v,g]=S.useState(e||void 0),[h,y]=S.useState(!1),b=eh(p,JS).flatMap(V=>Re.keyof(Jp,V.type)?Jp[V.type](V.value):[]),x=S.useMemo(()=>eh(p,JS).reduce((V,N)=>V+(Re.keyof(eT,N.type)?eT[N.type](N.value):""),""),[p]),T=e?.toISOString(),[E,I]=S.useState(v?eh(p,v).reduce((V,N)=>V+(Re.keyof(Jp,N.type)?JR[N.type](v,N.value):""),""):""),w=V=>{const N=V.target.value;if(I(N),b.length===N.length&&b.every((D,z)=>{const M=N.charAt(z);return typeof D=="string"?M===D:D.test(M)})){const D=PR(N,x,new Date),z=s==="datetime"?D:xo(D);return g(z),r?.(z)}return g(void 0),r?.(void 0)};S.useEffect(()=>{Xl(e)&&(g(e),I(Gp(e,x)))},[T,x]);const C=V=>(g(V),r?.(V),i&&y(!1),I(V?Gp(V,x):"")),P=Xl(v),_=P?v.toISOString():void 0,F=m.jsx(KS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:P?v:void 0});return m.jsx(S.Fragment,{children:m.jsx(qo,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":_,formNoValidate:!h,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:h?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:a?m.jsxs(S.Fragment,{children:[m.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),m.jsx(gi,{open:h,onChange:y,buttonProps:{"aria-describedby":d},trigger:m.jsxs("span",{"aria-labelledby":d,children:[m.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),m.jsx(Jk,{})]}),children:F})]}):null})})}),rB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],oB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],iB=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],aB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],tT=(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},nT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},sB=e=>typeof e=="number"?Math.log(e):nT(e)*Math.log(10),lB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},rT=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},cB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function uB(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,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?aB:iB:t.binary?oB:rB,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return rT(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=cB(t);let l;if(e<1){const c=tT(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?sB(e)/Math.log(1024):nT(e)/3),n.length-1);if(e=lB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=tT(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return rT(l,t.fixedWidth)}var ec={exports:{}},tc={exports:{}},lt={};var oT;function dB(){if(oT)return lt;oT=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case u:case v:case p:case a:return E;default:return I}}case n:return I}}}function T(E){return x(E)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(E){return T(E)||x(E)===l},lt.isConcurrentMode=T,lt.isContextConsumer=function(E){return x(E)===s},lt.isContextProvider=function(E){return x(E)===a},lt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},lt.isForwardRef=function(E){return x(E)===u},lt.isFragment=function(E){return x(E)===r},lt.isLazy=function(E){return x(E)===v},lt.isMemo=function(E){return x(E)===p},lt.isPortal=function(E){return x(E)===n},lt.isProfiler=function(E){return x(E)===i},lt.isStrictMode=function(E){return x(E)===o},lt.isSuspense=function(E){return x(E)===d},lt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===p||E.$$typeof===a||E.$$typeof===s||E.$$typeof===u||E.$$typeof===h||E.$$typeof===y||E.$$typeof===b||E.$$typeof===g)},lt.typeOf=x,lt}var ct={};var iT;function fB(){return iT||(iT=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===v||H.$$typeof===p||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===h||H.$$typeof===y||H.$$typeof===b||H.$$typeof===g)}function T(H){if(typeof H=="object"&&H!==null){var se=H.$$typeof;switch(se){case t:var ae=H.type;switch(ae){case l:case c:case r:case i:case o:case d:return ae;default:var Q=ae&&ae.$$typeof;switch(Q){case s:case u:case v:case p:case a:return Q;default:return se}}case n:return se}}}var E=l,I=c,w=s,C=a,P=t,_=u,F=r,V=v,N=p,O=n,D=i,z=o,M=d,k=!1;function L(H){return k||(k=!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.")),$(H)||T(H)===l}function $(H){return T(H)===c}function B(H){return T(H)===s}function q(H){return T(H)===a}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function W(H){return T(H)===u}function J(H){return T(H)===r}function re(H){return T(H)===v}function ee(H){return T(H)===p}function Y(H){return T(H)===n}function K(H){return T(H)===i}function X(H){return T(H)===o}function de(H){return T(H)===d}ct.AsyncMode=E,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=C,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=V,ct.Memo=N,ct.Portal=O,ct.Profiler=D,ct.StrictMode=z,ct.Suspense=M,ct.isAsyncMode=L,ct.isConcurrentMode=$,ct.isContextConsumer=B,ct.isContextProvider=q,ct.isElement=G,ct.isForwardRef=W,ct.isFragment=J,ct.isLazy=re,ct.isMemo=ee,ct.isPortal=Y,ct.isProfiler=K,ct.isStrictMode=X,ct.isSuspense=de,ct.isValidElementType=x,ct.typeOf=T})()),ct}var aT;function sT(){return aT||(aT=1,process.env.NODE_ENV==="production"?tc.exports=dB():tc.exports=fB()),tc.exports}var th,lT;function pB(){if(lT)return th;lT=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 th=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 f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},th}var nh,cT;function rh(){if(cT)return nh;cT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return nh=e,nh}var oh,uT;function dT(){return uT||(uT=1,oh=Function.call.bind(Object.prototype.hasOwnProperty)),oh}var ih,fT;function hB(){if(fT)return ih;fT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=rh(),n={},r=dT();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 f=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 f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}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 p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ih=o,ih}var ah,pT;function mB(){if(pT)return ah;pT=1;var e=sT(),t=pB(),n=rh(),r=dT(),o=hB(),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 ah=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:x,element:T(),elementType:E(),instanceOf:I,node:_(),objectOf:C,oneOf:w,oneOfType:P,shape:V,exact:N};function v($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function g($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h($){if(process.env.NODE_ENV!=="production")var B={},q=0;function G(J,re,ee,Y,K,X,de){if(Y=Y||f,X=X||ee,de!==n){if(l){var H=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 H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=Y+":"+ee;!B[se]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+Y+"`. 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."),B[se]=!0,q++)}}return re[ee]==null?J?re[ee]===null?new g("The "+K+" `"+X+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new g("The "+K+" `"+X+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:$(re,ee,Y,K,X)}var W=G.bind(null,!1);return W.isRequired=G.bind(null,!0),W}function y($){function B(q,G,W,J,re,ee){var Y=q[G],K=z(Y);if(K!==$){var X=M(Y);return new g("Invalid "+J+" `"+re+"` of type "+("`"+X+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return h(B)}function b(){return h(a)}function x($){function B(q,G,W,J,re){if(typeof $!="function")return new g("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=q[G];if(!Array.isArray(ee)){var Y=z(ee);return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var K=0;K<ee.length;K++){var X=$(ee,K,W,J,re+"["+K+"]",n);if(X instanceof Error)return X}return null}return h(B)}function T(){function $(B,q,G,W,J){var re=B[q];if(!s(re)){var ee=z(re);return new g("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return h($)}function E(){function $(B,q,G,W,J){var re=B[q];if(!e.isValidElementType(re)){var ee=z(re);return new g("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return h($)}function I($){function B(q,G,W,J,re){if(!(q[G]instanceof $)){var ee=$.name||f,Y=L(q[G]);return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return h(B)}function w($){if(!Array.isArray($))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 B(q,G,W,J,re){for(var ee=q[G],Y=0;Y<$.length;Y++)if(v(ee,$[Y]))return null;var K=JSON.stringify($,function(de,H){var se=M(H);return se==="symbol"?String(H):H});return new g("Invalid "+J+" `"+re+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+K+"."))}return h(B)}function C($){function B(q,G,W,J,re){if(typeof $!="function")return new g("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var K in ee)if(r(ee,K)){var X=$(ee,K,W,J,re+"."+K,n);if(X instanceof Error)return X}return null}return h(B)}function P($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var q=$[B];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(q)+" at index "+B+"."),a}function G(W,J,re,ee,Y){for(var K=[],X=0;X<$.length;X++){var de=$[X],H=de(W,J,re,ee,Y,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&K.push(H.data.expectedType)}var se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+ee+" `"+Y+"` supplied to "+("`"+re+"`"+se+"."))}return h(G)}function _(){function $(B,q,G,W,J){return O(B[q])?null:new g("Invalid "+W+" `"+J+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return h($)}function F($,B,q,G,W){return new g(($||"React class")+": "+B+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function V($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var K in $){var X=$[K];if(typeof X!="function")return F(W,J,re,K,M(X));var de=X(ee,K,W,J,re+"."+K,n);if(de)return de}return null}return h(B)}function N($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var K=t({},q[G],$);for(var X in K){var de=$[X];if(r($,X)&&typeof de!="function")return F(W,J,re,X,M(de));if(!de)return new g("Invalid "+J+" `"+re+"` key `"+X+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
|
|
16
|
+
Valid keys: `+JSON.stringify(Object.keys($),null," "));var H=de(ee,X,W,J,re+"."+X,n);if(H)return H}return null}return h(B)}function O($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(O);if($===null||s($))return!0;var B=d($);if(B){var q=B.call($),G;if(B!==$.entries){for(;!(G=q.next()).done;)if(!O(G.value))return!1}else for(;!(G=q.next()).done;){var W=G.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function D($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(B,$)?"symbol":B}function M($){if(typeof $>"u"||$===null)return""+$;var B=z($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function k($){var B=M($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function L($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},ah}var sh,hT;function gB(){if(hT)return sh;hT=1;var e=rh();function t(){}function n(){}return n.resetWarningCache=t,sh=function(){function r(a,s,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}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},sh}var mT;function vB(){if(mT)return ec.exports;if(mT=1,process.env.NODE_ENV!=="production"){var e=sT(),t=!0;ec.exports=mB()(e.isElement,t)}else ec.exports=gB()();return ec.exports}var yB=vB();const vt=Zh(yB);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;const bB=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 Si(e,t,n){const r=xB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&gT(r,"path",i),gT(r,"relativePath",i),r}function xB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=bB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function gT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const wB=[".DS_Store","Thumbs.db"];function SB(e){return To(this,void 0,void 0,function*(){return nc(e)&&TB(e.dataTransfer)?IB(e.dataTransfer,e.type):EB(e)?CB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?kB(e):[]})}function TB(e){return nc(e)}function EB(e){return nc(e)&&nc(e.target)}function nc(e){return typeof e=="object"&&e!==null}function CB(e){return lh(e.target.files).map(t=>Si(t))}function kB(e){return To(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Si(n))})}function IB(e,t){return To(this,void 0,void 0,function*(){if(e.items){const n=lh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(AB));return vT(yT(r))}return vT(lh(e.files).map(n=>Si(n)))})}function vT(e){return e.filter(t=>wB.indexOf(t.name)===-1)}function lh(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 AB(e){if(typeof e.webkitGetAsEntry!="function")return bT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?xT(t):bT(e,t)}function yT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?yT(n):[n]],[])}function bT(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,Si(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Si(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function PB(e){return To(this,void 0,void 0,function*(){return e.isDirectory?xT(e):OB(e)})}function xT(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(PB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function OB(e){return To(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Si(r,e.fullPath);t(o)},r=>{n(r)})})})}var rc={},wT;function _B(){return wT||(wT=1,rc.__esModule=!0,rc.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}),rc}var MB=_B();const ch=Zh(MB);function ST(e){return FB(e)||NB(e)||kT(e)||DB()}function DB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FB(e){if(Array.isArray(e))return uh(e)}function TT(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 ET(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TT(Object(n),!0).forEach(function(r){CT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wa(e,t){return $B(e)||VB(e,t)||kT(e,t)||LB()}function LB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kT(e,t){if(e){if(typeof e=="string")return uh(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 uh(e,t)}}function uh(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 VB(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 $B(e){if(Array.isArray(e))return e}var zB=typeof ch=="function"?ch:ch.default,jB="file-invalid-type",RB="file-too-large",BB="file-too-small",HB="too-many-files",WB=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:jB,message:"File type must be ".concat(r)}},IT=function(t){return{code:RB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},AT=function(t){return{code:BB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},qB={code:HB,message:"Too many files"};function PT(e,t){var n=e.type==="application/x-moz-file"||zB(e,t);return[n,n?null:WB(t)]}function OT(e,t,n){if(Eo(e.size))if(Eo(t)&&Eo(n)){if(e.size>n)return[!1,IT(n)];if(e.size<t)return[!1,AT(t)]}else{if(Eo(t)&&e.size<t)return[!1,AT(t)];if(Eo(n)&&e.size>n)return[!1,IT(n)]}return[!0,null]}function Eo(e){return e!=null}function UB(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=PT(l,n),u=Wa(c,1),d=u[0],f=OT(l,r,o),p=Wa(f,1),v=p[0],g=s?s(l):null;return d&&v&&!g})}function oc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ic(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 _T(e){e.preventDefault()}function GB(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YB(e){return e.indexOf("Edge/")!==-1}function KB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return GB(e)||YB(e)}function or(){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!oc(r)&&s&&s.apply(void 0,[r].concat(i)),oc(r)})}}function ZB(){return"showOpenFilePicker"in window}function XB(e){if(Eo(e)){var t=Object.entries(e).filter(function(n){var r=Wa(n,2),o=r[0],i=r[1],a=!0;return MT(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(DT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Wa(r,2),i=o[0],a=o[1];return ET(ET({},n),{},CT({},i,a))},{});return[{description:"Files",accept:t}]}return e}function QB(e){if(Eo(e))return Object.entries(e).reduce(function(t,n){var r=Wa(n,2),o=r[0],i=r[1];return[].concat(ST(t),[o],ST(i))},[]).filter(function(t){return MT(t)||DT(t)}).join(",")}function JB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function e4(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function MT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function DT(e){return/^.*\.[\w]+$/.test(e)}var t4=["children"],n4=["open"],r4=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],o4=["refKey","onChange","onClick"];function i4(e){return l4(e)||s4(e)||NT(e)||a4()}function a4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l4(e){if(Array.isArray(e))return fh(e)}function dh(e,t){return d4(e)||u4(e,t)||NT(e,t)||c4()}function c4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
20
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NT(e,t){if(e){if(typeof e=="string")return fh(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 fh(e,t)}}function fh(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 u4(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 d4(e){if(Array.isArray(e))return e}function FT(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 At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(n),!0).forEach(function(r){ph(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ac(e,t){if(e==null)return{};var n=f4(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 f4(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 hh=S.forwardRef(function(e,t){var n=e.children,r=ac(e,t4),o=VT(r),i=o.open,a=ac(o,n4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(At(At({},a),{},{open:i})))});hh.displayName="Dropzone";var LT={disabled:!1,getFilesFromEvent:SB,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};hh.defaultProps=LT,hh.propTypes={children:vt.func,accept:vt.objectOf(vt.arrayOf(vt.string)),multiple:vt.bool,preventDropOnDocument:vt.bool,noClick:vt.bool,noKeyboard:vt.bool,noDrag:vt.bool,noDragEventsBubbling:vt.bool,minSize:vt.number,maxSize:vt.number,maxFiles:vt.number,disabled:vt.bool,getFilesFromEvent:vt.func,onFileDialogCancel:vt.func,onFileDialogOpen:vt.func,useFsAccessApi:vt.bool,autoFocus:vt.bool,onDragEnter:vt.func,onDragLeave:vt.func,onDragOver:vt.func,onDrop:vt.func,onDropAccepted:vt.func,onDropRejected:vt.func,onError:vt.func,validator:vt.func};var mh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function VT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=At(At({},LT),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,f=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,P=t.validator,_=S.useMemo(function(){return QB(n)},[n]),F=S.useMemo(function(){return XB(n)},[n]),V=S.useMemo(function(){return typeof h=="function"?h:$T},[h]),N=S.useMemo(function(){return typeof g=="function"?g:$T},[g]),O=S.useRef(null),D=S.useRef(null),z=S.useReducer(p4,mh),M=dh(z,2),k=M[0],L=M[1],$=k.isFocused,B=k.isFileDialogActive,q=S.useRef(typeof window<"u"&&window.isSecureContext&&y&&ZB()),G=function(){!q.current&&B&&setTimeout(function(){if(D.current){var R=D.current.files;R.length||(L({type:"closeDialog"}),N())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[D,B,N,q]);var W=S.useRef([]),J=function(R){O.current&&O.current.contains(R.target)||(R.preventDefault(),W.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",_T,!1),document.addEventListener("drop",J,!1)),function(){x&&(document.removeEventListener("dragover",_T),document.removeEventListener("drop",J))}},[O,x]),S.useEffect(function(){return!r&&b&&O.current&&O.current.focus(),function(){}},[O,b,r]);var re=S.useCallback(function(j){C?C(j):console.error(j)},[C]),ee=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[].concat(i4(W.current),[j.target]),ic(j)&&Promise.resolve(o(j)).then(function(R){if(!(oc(j)&&!w)){var ne=R.length,ce=ne>0&&UB({files:R,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:P}),xe=ne>0&&!ce;L({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(R){return re(R)})},[o,c,re,w,_,a,i,s,l,P]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=ic(j);if(R&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return R&&d&&d(j),!1},[d,w]),K=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=W.current.filter(function(ce){return O.current&&O.current.contains(ce)}),ne=R.indexOf(j.target);ne!==-1&&R.splice(ne,1),W.current=R,!(R.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ic(j)&&u&&u(j))},[O,u,w]),X=S.useCallback(function(j,R){var ne=[],ce=[];j.forEach(function(xe){var ke=PT(xe,_),_e=dh(ke,2),qe=_e[0],pt=_e[1],ht=OT(xe,a,i),$t=dh(ht,2),$e=$t[0],U=$t[1],Z=P?P(xe):null;if(qe&&$e&&!Z)ne.push(xe);else{var Oe=[pt,U];Z&&(Oe=Oe.concat(Z)),ce.push({file:xe,errors:Oe.filter(function(Ge){return Ge})})}}),(!s&&ne.length>1||s&&l>=1&&ne.length>l)&&(ne.forEach(function(xe){ce.push({file:xe,errors:[qB]})}),ne.splice(0)),L({acceptedFiles:ne,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(ne,ce,R),ce.length>0&&v&&v(ce,R),ne.length>0&&p&&p(ne,R)},[L,s,_,a,i,l,f,p,v,P]),de=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[],ic(j)&&Promise.resolve(o(j)).then(function(R){oc(j)&&!w||X(R,j)}).catch(function(R){return re(R)}),L({type:"reset"})},[o,X,re,w]),H=S.useCallback(function(){if(q.current){L({type:"openDialog"}),V();var j={multiple:s,types:F};window.showOpenFilePicker(j).then(function(R){return o(R)}).then(function(R){X(R,null),L({type:"closeDialog"})}).catch(function(R){JB(R)?(N(R),L({type:"closeDialog"})):e4(R)?(q.current=!1,D.current?(D.current.value=null,D.current.click()):re(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."))):re(R)});return}D.current&&(L({type:"openDialog"}),V(),D.current.value=null,D.current.click())},[L,V,N,y,X,re,F,s]),se=S.useCallback(function(j){!O.current||!O.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),H())},[O,H]),ae=S.useCallback(function(){L({type:"focus"})},[]),Q=S.useCallback(function(){L({type:"blur"})},[]),le=S.useCallback(function(){T||(KB()?setTimeout(H,0):H())},[T,H]),te=function(R){return r?null:R},fe=function(R){return E?null:te(R)},pe=function(R){return I?null:te(R)},ve=function(R){w&&R.stopPropagation()},Ae=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.role,xe=j.onKeyDown,ke=j.onFocus,_e=j.onBlur,qe=j.onClick,pt=j.onDragEnter,ht=j.onDragOver,$t=j.onDragLeave,$e=j.onDrop,U=ac(j,r4);return At(At(ph({onKeyDown:fe(or(xe,se)),onFocus:fe(or(ke,ae)),onBlur:fe(or(_e,Q)),onClick:te(or(qe,le)),onDragEnter:pe(or(pt,ee)),onDragOver:pe(or(ht,Y)),onDragLeave:pe(or($t,K)),onDrop:pe(or($e,de)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},ne,O),!r&&!E?{tabIndex:0}:{}),U)}},[O,se,ae,Q,le,ee,Y,K,de,E,I,r]),me=S.useCallback(function(j){j.stopPropagation()},[]),oe=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.onChange,xe=j.onClick,ke=ac(j,o4),_e=ph({accept:_,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:te(or(ce,de)),onClick:te(or(xe,me)),tabIndex:-1},ne,D);return At(At({},_e),ke)}},[D,n,s,de,r]);return At(At({},k),{},{isFocused:$&&!r,getRootProps:Ae,getInputProps:oe,rootRef:O,inputRef:D,open:te(H)})}function p4(e,t){switch(t.type){case"focus":return At(At({},e),{},{isFocused:!0});case"blur":return At(At({},e),{},{isFocused:!1});case"openDialog":return At(At({},mh),{},{isFileDialogActive:!0});case"closeDialog":return At(At({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return At(At({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return At(At({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return At({},mh);default:return e}}function $T(){}const zT=S.createContext([null,()=>{}]),h4=()=>S.useContext(zT),m4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,g4={csv:Su,xls:Su,mov:Og,mp4:Og,xlsx:Su,pdf:Pg,txt:Pg,json:rI,mp3:Qk},v4=e=>{const[,t]=h4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:m4(l),size:uB(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=g4[e.file.name.split(".").at(-1)]??_g,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(Do,{size:16})})})]})},y4=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(v4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),jT=e=>{const t=Pt(),n=e.dragging?oI:iI;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})]})]})},b4=e=>e.isDragActive?m.jsx(jT,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(y4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(S.Fragment,{children:e.idle}),x4=m.jsx(jT,{dragging:!1}),w4=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]})},S4=({idle:e=x4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Pt(),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:f,getInputProps:p,isDragActive:v}=VT({onDrop:d});return m.jsxs(zT.Provider,{value:a,children:[m.jsx(Bp,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(w4,{item:a[0]}):null}),m.jsxs("div",{...f(),"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",{...p(o),name:o.name,id:o.name}),m.jsx(b4,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},RT=()=>window.matchMedia("@media (pointer: coarse)"),T4=()=>{const e=S.useRef(Ar()?null:RT()),[t,n]=S.useState(Ar()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?RT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},BT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=T4(),o=S.useRef(Ar()?"":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||ly())return;document.documentElement.style.padding=fg(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(NC(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?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},E4=(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]},HT=(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},WT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},qT=(e,t)=>{const n=HT(t,WT.basic,e);return n!==void 0&&n!==e?n:HT(t,WT.extend,e)},UT=e=>e.replace(/[^0-9]/g,""),sc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),GT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?UT(e).includes(UT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?E4(e,t)!==null:!1,C4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>GT(e,o,n,r)):GT(e,t,n,r),gh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(sc):sc(`${i.value}`)}));return e.forEach(i=>{const a=qT(i,t);o.forEach(s=>{const l=qT(i,s.key);if(!l)return;const c=sc(`${s.value}`.toLocaleLowerCase()).trim(),u=sc(`${l}`.toLocaleLowerCase()).trim();if(C4(u,c,s.score,s.match))return void r.set(a,i);Re.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},k4=e=>m.jsx(S.Fragment,{children:e.children}),I4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},A4=[],P4=S.forwardRef(function(t,n){return m.jsx(Be.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:m.jsx(fn,{children:t.children})})}),O4=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),_4={List:P4,Item:O4},Ti=40,M4=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:f=!1,required:p=!1,dynamicOption:v=!1,...g},h)=>{const y=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=g.value??g.defaultValue??"",E=Pt(),[I,w]=S.useState(()=>Math.min(320,Ti*o.length)),[C,P]=S.useState(!1),[_,F]=S.useState(""),[V,N]=S.useState(T),[O,D]=S.useState(()=>o.find(R=>R.value===T)?.label??T),[z,M]=S.useState(null),k=S.useRef(A4),L=BT(C,"block-only"),$=v&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=()=>Li.flushSync(()=>P(!0)),q=_?gh($,"value",[{key:"value",value:_},{key:"label",value:_}]):$,G=()=>{P(!1),w(0)},W=q.filter(R=>R.hidden!==!0),J=v?void 0:`^(${o.map(R=>`${nd(R.value)}${R.label?"|"+nd(R.label):""}`).join("|")})$`,{x:re,y:ee,strategy:Y,refs:K,context:X,placement:de}=Gn({open:C,transform:!0,onOpenChange:P,placement:"bottom-start",whileElementsMounted:to,middleware:[zo(4),Sv({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),wv({padding:10,elementContext:"reference",apply(R){const ce=R.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,xe=zi(K.reference.current,window.innerHeight),ke=Math.min(ce<Ti?xe:ce,xe,R.availableHeight),_e=W.length===0?Ti:Math.min(ke,xe,ce),qe=`${b.current.getBoundingClientRect().width}px`;Object.assign(R.elements.floating.style,{width:qe,maxWidth:qe,height:_e})}})]}),H=ey(X,I4),{getReferenceProps:se,getFloatingProps:ae,getItemProps:Q}=Yn([fr(X,{role:"listbox"}),Ir(X),Ws(X,{cols:0,listRef:k,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(g.value){const R=o.find(ne=>ne.value===g.value);R&&(D(R.label??R.value),N(g.value))}},[g.value,o.length]),S.useEffect(()=>{if(!C)return w(0);const R=K.reference;if(R.current===null)return;const ne=zi(R.current,window.innerHeight);setTimeout(()=>w(Math.min(ne,W.length*Ti)),100)},[_,C,K.reference,W.length]),S.useEffect(()=>{const R=K.reference.current;if(R)return $i(R)},[]);const le=(R,ne)=>{N(R.value);const ce=K.reference.current;if(!ce)return;ce?.setAttribute("data-value",R.value),ce.value=R.value;const xe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(xe),g.onChange&&g.onChange(xe),D(R.label??""),G(),F(""),M(ne)},te=R=>{const ne=R.target.value;return F(ne),!C&&ne===""?P(!0):(R.target.name=g.name||"",ne?P(!0):g.onChange?.(R))},fe=()=>{B(),F(""),K.reference.current?.focus()},pe=()=>{M(R=>R===null?0:R),B(),F("")},ve=()=>{K.reference.current?.setAttribute("data-value",""),F(""),N(""),D(""),dg(K.reference.current),G()},Ae=g.id||g.name,me=`${Ae}-shadow`,oe=W.length===0,j=de==="top"||de==="top-start";return m.jsxs(Qi,{...g,left:e,error:t,ref:b,form:g.form,loading:r,name:g.name,feedback:C&&j?g.title:d,hideLeft:f,required:p,title:g.title,container:i,rightLabel:a,interactive:s,id:me,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:fe,children:[m.jsx(vu,{size:20}),m.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),V?m.jsx("button",{type:"button",onClick:ve,className:"p-2 transition-colors md:p-1 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.jsx("input",{"data-shadow":"true",...se({...g,onFocus:pe,pattern:J,onChange:te,id:me,name:me,ref:K.setReference,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),G();if(C){if(R.key==="ArrowDown"){let ne=Re.number(z)?z+1:0;return ne>W.length-1&&(ne=0),x.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="ArrowUp"){let ne=Re.number(z)?z-1:W.length-1;return ne<0&&(ne=W.length-1),x.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="Enter"){if(z!==null&&W[z])return R.preventDefault(),le(W[z],z);if(W.length===1)return R.preventDefault(),le(W[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Ae,"data-target":Ae,required:p,value:C?_:o.length===0?"":O||V,"aria-autocomplete":"list",autoComplete:"off",className:Pe("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:Ae,name:Ae,type:"hidden","data-origin":Ae,ref:h,required:p,defaultValue:g.value||V||void 0}),m.jsx(dr,{preserveTabOrder:!0,children:C?m.jsx(oo,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(Be.div,{...ae({ref:sr(L,K.setFloating),style:{...H.styles,left:re,top:ee??0,position:Y,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:oe?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",j?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!C)return w(0);const ne=K.floating.current.querySelectorAll("li").item(0),ce=(ne?ne.getBoundingClientRect().height:Ti)*W.length;return Li.flushSync(()=>w(ce+2))},children:[oe?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,m.jsx(Cp,{overscan:40,ref:x,hidden:oe,data:W,style:{height:I},defaultItemHeight:Ti,components:_4,scrollerRef:R=>{y.current=R},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(R,ne)=>{const ce=ne.Render??k4,xe=V===ne.value||V===ne.label,ke=z===R,_e=ne.label??ne.value;return m.jsx("button",{"data-value":ne.value,...Q({ref:qe=>{k.current[R]=qe},role:"option",type:"button","aria-checked":xe,"aria-current":xe,"aria-selected":xe,"aria-busy":ne.disabled,onClick:()=>le(ne,R),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${xe?"bg-primary-hover text-primary-foreground":""} ${ke?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(ce,{...g,label:ne.label,value:ne.value,children:_e})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(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 zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const YT=40,D4=e=>m.jsx(S.Fragment,{children:e.children}),N4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},KT=[],F4=S.forwardRef(function(t,n){return m.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:m.jsx(fn,{children:t.children})})}),L4=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),V4={List:F4,Item:L4},$4=e=>{const t=Pt(),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(ns,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},z4=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:f=!1,required:p=!1,dynamicOption:v=!1,onChangeOptions:g,...h},y)=>{const b=S.useMemo(()=>new zn(r.map(oe=>[oe.value,oe])),[r]),x=S.useRef(null),T=S.useRef(null),E=h.value??h.defaultValue??KT,I=Pt(),[w,C]=S.useState(0),[P,_]=S.useState(!1),[F,V]=S.useState(""),[N,O]=S.useState(()=>{const oe=new zn;return E.forEach(j=>{const R=b.get(j);return R?oe.set(j,R):void 0}),oe}),D=S.useMemo(()=>Array.from(N.keys()),[N]),[z,M]=S.useState(()=>{const oe=new Set(E);return r.reduce((j,R)=>oe.has(R.value)?[...j,R.label??R.value]:j,[])??E}),[k,L]=S.useState(null),$=S.useRef(KT),B=v&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,q=F.length===0?B:gh(B,"value",[{key:"value",value:F},{key:"label",value:F}]),G=BT(P,"block-only"),W=q.filter(oe=>oe.hidden!==!0),J=W.length===0,{x:re,y:ee,strategy:Y,refs:K,context:X}=Gn({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:to,middleware:[zo(4),wv({padding:10,elementContext:"reference",apply(oe){const R=oe.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ne=zi(K.reference.current,window.innerHeight),ce=Math.min(R<YT?ne:R,ne,oe.availableHeight),xe=W.length===0?YT:Math.min(ce,ne,R),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:ke,maxWidth:ke,height:xe})}})]}),de=ey(X,N4),{getReferenceProps:H,getFloatingProps:se,getItemProps:ae}=Yn([fr(X,{role:"listbox"}),Ir(X),Ws(X,{cols:0,listRef:$,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:oe=>L(j=>oe??j)})]);S.useEffect(()=>{if(!P)return C(0);const oe=K.reference;if(oe.current===null)return;const j=zi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(j,W.length*40)),100)},[F,P,K.reference]),S.useEffect(()=>{h.value&&O(new zn(h.value.map(oe=>[oe,b.get(oe)])))},[h.value,b]),S.useEffect(()=>{const oe=K.reference.current;if(oe)return $i(oe)},[]);const Q=(oe,j)=>{const R=N.clone(xe=>xe.has(oe.value)?xe.remove(oe.value):xe.set(oe.value,oe));O(R);const ne=K.reference.current;if(!ne)return;const ce=R.map(xe=>xe.value);ne?.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),M(xe=>xe.concat(oe.label??"")),V(""),L(j)},le=oe=>{const j=oe.target.value;return V(j),!P&&j===""?_(!0):(oe.target.name=h.name||"",j?_(!0):void 0)},te=()=>{_(!0),V(""),K.reference.current?.focus()},fe=()=>{_(!0),V("")},pe=()=>{K.reference.current?.setAttribute("data-value","[]"),V(""),_(!1),O(new zn),g?.([])},ve=h.id||h.name,Ae=N.map((oe,j)=>m.jsx(ns,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:R=>{R.preventDefault(),R.stopPropagation(),Q(oe,j)},children:m.jsx(Do,{size:14})}),children:oe.label??oe.value},`MultiSelect-${oe.value}-x`)),me={height:J?"0":N.size===0?w-49:w-86};return m.jsxs(Qi,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:f,required:p,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 gap-0.5 items-center",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:te,children:[m.jsx(vu,{size:20}),m.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),N?m.jsx("button",{type:"button",onClick:pe,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",{...H({...h,onFocus:fe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),className:Pe("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:[D.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),m.jsx($4,{label:c,children:Ae})]}),m.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:p,defaultValue:h.value||D||void 0}),m.jsx(dr,{preserveTabOrder:!0,children:P?m.jsx(Xu,{lockScroll:!0,children:m.jsx(oo,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...se({ref:K.setFloating,style:{...de.styles,top:ee??0,position:Y,left:re,height:w-(D.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[m.jsx("input",{autoFocus:!0,value:F,onChange:le,title:h.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:oe=>{if(oe.key==="ArrowDown"){let j=k+1;return j>W.length-1&&(j=0),T.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="ArrowUp"){let j=k-1;return j<0&&(j=W.length-1),T.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="Escape")return oe.currentTarget.blur(),_(!1);if(oe.key==="Enter"){if(k!==null&&W[k])return oe.preventDefault(),Q(W[k],k);if(W.length===1)return oe.preventDefault(),Q(W[0],0)}}}),J?m.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:m.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:s||I.autocompleteEmpty})}):null,J?null:m.jsx(Be.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:J?"auto":w},style:me,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return C(0);const j=K.floating.current.querySelectorAll("li").item(0),R=(j?j.getBoundingClientRect().height:40)*W.length;return Li.flushSync(()=>C(R+2))},children:m.jsx(Cp,{ref:T,hidden:J,data:W,components:V4,style:me,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(oe,j)=>{const R=j.Render??D4,ne=N.has(j.value)||N.has(j.label??""),ce=k===oe,xe=j.label??j.value;return m.jsxs("button",{"data-value":j.value,...ae({ref:ke=>{$.current[oe]=ke},role:"option",type:"button","aria-checked":ne,"aria-current":ne,"aria-selected":ne,"aria-busy":j.disabled,onClick:()=>Q(j,oe)}),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 ${ne||ce?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx(jp,{onChange:Wo,checked:ne,"aria-checked":ne,onClick:ke=>{ke.stopPropagation(),Q(j,oe)}}),m.jsx(R,{...h,label:j.label,value:j.value,children:xe})]})}})}),m.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:N.size===0?m.jsx(ns,{theme:"muted",size:"small",children:I.autocompleteEmpty}):Ae})]})})}):null})]})}),j4=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},R4={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"})})},B4=e=>{const t=S.useRef(null),n=j4(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(qo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(Cp,{height:n,useWindowScroll:!0,data:e.source,components:R4,itemContent:(r,o)=>m.jsx(S.Fragment,{children:m.jsx(jp,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(pr,{children:m.jsx(yu,{})})}),m.jsx("div",{})]})};function H4(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 W4=({children:e,...t})=>{const n=_r(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:H4(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})};let ZT=0;function q4(e){return ZT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${ZT}`}const qa=0;class lc{static create(){return new lc}currentId=qa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qa,n()},t)}isStarted(){return this.currentId!==qa}clear=()=>{this.currentId!==qa&&(clearTimeout(this.currentId),this.currentId=qa)};disposeEffect=()=>this.clear}const cc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(cc.displayName="ToastContext");function vh(){const e=A.useContext(cc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Pr(73));return e}function yh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const XT=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,s]=A.useState([]),[l,c]=A.useState(!1),[u,d]=A.useState(!1),[f,p]=A.useState(null);a.length===0&&(l&&c(!1),u&&d(!1));const v=l||u,g=A.useRef(new Map),h=A.useRef(null),y=A.useRef(!0),b=A.useRef(!1);function x(N){const O=so(In(h.current));if(!h.current||!Or(h.current,O)||!md(O))return;const D=a.findIndex(k=>k.id===N);let z=null,M=D+1;for(;M<a.length;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M+=1}if(!z)for(M=D-1;M>=0;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M-=1}z?z.ref?.current?.focus():f?.focus({preventScroll:!0})}const T=Ye(()=>{b.current||(b.current=!0,g.current.forEach(N=>{if(N.timeout){N.timeout.clear();const O=Date.now()-N.start,D=N.delay-O;N.remaining=D>0?D:0}}))}),E=Ye(()=>{b.current&&(b.current=!1,g.current.forEach((N,O)=>{N.remaining=N.remaining>0?N.remaining:N.delay,N.timeout??=lc.create(),N.timeout.start(N.remaining,()=>{g.current.delete(O),N.callback()}),N.start=Date.now()}))}),I=Ye(N=>{s(z=>{const M=z.map(L=>L.id===N?{...L,transitionStatus:"ending",height:0}:L),k=M.filter(L=>L.transitionStatus!=="ending");return M.map(L=>{if(L.transitionStatus==="ending")return L;const $=k.indexOf(L)>=o;return{...L,limited:$}})});const O=g.current.get(N);O&&O.timeout&&(O.timeout.clear(),g.current.delete(N)),a.find(z=>z.id===N)?.onClose?.(),x(N),a.length===1&&(c(!1),d(!1))}),w=Ye(N=>{s(D=>D.filter(z=>z.id!==N)),a.find(D=>D.id===N)?.onRemove?.()}),C=Ye((N,O,D)=>{const z=Date.now(),M=y.current&&!l&&!u,k=M?lc.create():void 0;k?.start(O,()=>{g.current.delete(N),D()}),g.current.set(N,{timeout:k,start:M?z:0,delay:O,remaining:O,callback:D})}),P=Ye(N=>{const O=N.id||q4("toast"),D={...N,id:O,transitionStatus:"starting"};s(M=>{const k=[D,...M],L=k.filter($=>$.transitionStatus!=="ending");if(L.length>o){const $=L.length-o,B=L.slice(-$);return k.map(q=>B.some(G=>G.id===q.id)?{...q,limited:!0}:{...q,limited:!1})}return k.map($=>({...$,limited:!1}))});const z=D.timeout??r;return D.type!=="loading"&&z>0&&C(O,z,()=>I(O)),(l||u||!y.current)&&T(),O}),_=Ye((N,O)=>{const D=a.find(W=>W.id===N)??null,z=D?{...D,...O}:null;if(jn.flushSync(()=>{s(W=>W.map(J=>J.id===N?{...J,...O}:J))}),!z)return;const M=z.timeout??r,k=D?.timeout??r,L=Object.hasOwn(O,"timeout"),$=z.transitionStatus!=="ending"&&z.type!=="loading"&&M>0,B=g.current.has(N),q=k!==M,G=D?.type==="loading";if(!$&&B){g.current.get(N)?.timeout?.clear(),g.current.delete(N);return}if($&&(!B||q||L||G)){const W=g.current.get(N);W&&(W.timeout?.clear(),g.current.delete(N)),C(N,M,()=>I(N)),(l||u||!y.current)&&T()}}),F=Ye((N,O)=>{const D=yh(O.loading),z=P({...D,type:"loading"}),M=N.then(k=>{const L=yh(O.success,k);return _(z,{...L,type:"success",timeout:L.timeout}),k}).catch(k=>{const L=yh(O.error,k);return _(z,{...L,type:"error",timeout:L.timeout}),Promise.reject(k)});return{}.hasOwnProperty.call(O,"setPromise")&&O.setPromise(M),M});A.useEffect(function(){return i?i[" subscribe"](({action:D,options:z})=>{const M=z.id;D==="promise"&&z.promise?F(z.promise,z):D==="update"&&M?_(M,z):D==="close"&&M?I(M):P(z)}):void 0},[P,_,C,r,i,F,I]);const V=A.useMemo(()=>({toasts:a,setToasts:s,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:v,add:P,close:I,remove:w,update:_,promise:F,pauseTimers:T,resumeTimers:E,prevFocusElement:f,setPrevFocusElement:p,viewportRef:h,scheduleTimer:C,windowFocusedRef:y}),[P,I,u,l,v,T,f,F,w,E,C,a,_]);return m.jsx(cc.Provider,{value:V,children:n})};process.env.NODE_ENV!=="production"&&(XT.displayName="ToastProvider");const Ei=A.forwardRef(function(t,n){const[r,o]=A.useState();St(()=>{pO&&o("button")},[]);const i={tabIndex:0,role:r};return m.jsx("span",{...t,ref:n,style:el,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ei.displayName="FocusGuard");const QT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(QT.displayName="ToastViewportContext");let U4=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const JT=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{toasts:s,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:v,setPrevFocusElement:g,expanded:h,focused:y}=vh(),b=A.useRef(!1),x=A.useRef(!1),T=s.length,E=s[0]?.height??0,I=A.useMemo(()=>s.some(k=>k.transitionStatus==="ending"),[s]);A.useEffect(()=>{if(!f.current)return;function k($){T!==0&&$.key==="F6"&&$.target!==f.current&&($.preventDefault(),g(so(In(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const L=qt(f.current);return L.addEventListener("keydown",k),()=>{L.removeEventListener("keydown",k)}},[l,d,g,T,f]),A.useEffect(()=>{if(!f.current||!T)return;const k=qt(f.current);function L(B){B.target===k&&(p.current=!1,l())}function $(B){if(B.relatedTarget||B.target===k)return;const q=pd(B),G=so(In(f.current));(!Or(f.current,q)||!md(G))&&c(),setTimeout(()=>{p.current=!0})}return k.addEventListener("blur",L,!0),k.addEventListener("focus",$,!0),()=>{k.removeEventListener("blur",L,!0),k.removeEventListener("focus",$,!0)}},[l,c,f,p,d,T]),A.useEffect(()=>{const k=f.current;if(!k||T===0)return;const L=In(k);function $(B){if(B.pointerType!=="touch")return;const q=pd(B);Or(k,q)||(c(),u(!1),d(!1))}return L.addEventListener("pointerdown",$,!0),()=>{L.removeEventListener("pointerdown",$,!0)}},[T,c,d,u,f]);function w(k){f.current&&(b.current=!0,k.relatedTarget===f.current?s[0]?.ref?.current?.focus():v?.focus({preventScroll:!0}))}function C(k){k.key==="Tab"&&k.shiftKey&&k.target===f.current&&(k.preventDefault(),v?.focus({preventScroll:!0}),c())}A.useEffect(()=>{!p.current||I||!x.current||(c(),u(!1),x.current=!1)},[I,c,u,p]);function P(){l(),u(!0),x.current=!1}function _(){s.some(k=>k.transitionStatus==="ending")?x.current=!0:(c(),u(!1))}function F(){if(b.current){b.current=!1;return}y||md(In(f.current).activeElement)&&(d(!0),l())}function V(k){!y||Or(f.current,k.relatedTarget)||(d(!1),c())}const N={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:V,onKeyDown:C,onClick:F},O=A.useMemo(()=>({expanded:h}),[h]),D=an("div",t,{ref:[n,f],state:O,props:[N,{style:{[U4.frontmostHeight]:E?`${E}px`:void 0}},a,{children:m.jsxs(A.Fragment,{children:[T>0&&v&&m.jsx(Ei,{onFocus:w}),i,T>0&&v&&m.jsx(Ei,{onFocus:w})]})}]}),z=A.useMemo(()=>({viewportRef:f}),[f]),M=A.useMemo(()=>s.filter(k=>k.priority==="high"),[s]);return m.jsxs(QT.Provider,{value:z,children:[T>0&&v&&m.jsx(Ei,{onFocus:w}),D,!y&&M.length>0&&m.jsx("div",{style:el,children:M.map(k=>m.jsxs("div",{role:"alert","aria-atomic":!0,children:[m.jsx("div",{children:k.title}),m.jsx("div",{children:k.description})]},k.id))})]})});process.env.NODE_ENV!=="production"&&(JT.displayName="ToastViewport");function G4(e){return yy(19)?e:e?"true":void 0}const bh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(bh.displayName="ToastRootContext");function Ci(){const e=A.useContext(bh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Pr(66));return e}let xh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Y4={[xh.startingStyle]:""},K4={[xh.endingStyle]:""},Z4={transitionStatus(e){return e==="starting"?Y4:e==="ending"?K4:null}};function X4(e){return e==null?e:"current"in e?e.current:e}function Q4(e,t=!1,n=!0){const r=qy();return Ye((o,i=null)=>{r.cancel();function a(){jn.flushSync(o)}const s=X4(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=xh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;a()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function J4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ye(o),a=Q4(r,n,!1);A.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}let Co=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const e3={...Z4,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Ua=40,t3=10,Rr=.5,n3=1;function eE(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function r3(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const s=a[1].split(", ").map(parseFloat);s.length===6?(r=s[4],o=s[5],i=Math.sqrt(s[0]*s[0]+s[1]*s[1])):s.length===16&&(r=s[12],o=s[13],i=s[0])}}return{x:r,y:o,scale:i}}const tE=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...s}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(a)?a:[a]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:v,setToasts:g,pauseTimers:h,expanded:y,setHovering:b}=vh(),[x,T]=A.useState(void 0),[E,I]=A.useState(!1),[w,C]=A.useState(!1),[P,_]=A.useState(!1),[F,V]=A.useState({x:0,y:0}),[N,O]=A.useState({x:0,y:0,scale:1}),[D,z]=A.useState(),[M,k]=A.useState(),[L,$]=A.useState(null),B=A.useRef(null),q=A.useRef({x:0,y:0}),G=A.useRef({x:0,y:0,scale:1}),W=A.useRef(void 0),J=A.useRef(0),re=A.useRef(!1),ee=A.useRef({x:0,y:0}),Y=A.useRef(!1),K=A.useMemo(()=>d.indexOf(r),[r,d]),X=A.useMemo(()=>d.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,d]),de=A.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((j,R)=>j+(R.height||0),0),[d,r]);J4({open:r.transitionStatus!=="ending",ref:B,onComplete(){r.transitionStatus==="ending"&&v(r.id)}});const H=Ye((j=!1)=>{const R=B.current;if(!R)return;const ne=R.style.height;R.style.height="auto";const ce=R.offsetHeight;R.style.height=ne;function xe(){g(ke=>ke.map(_e=>_e.id===r.id?{..._e,ref:B,height:ce,transitionStatus:void 0}:_e))}j?jn.flushSync(xe):xe()});St(H,[H]);function se(j,R){let ne=j,ce=R;return!c.includes("left")&&!c.includes("right")?ne=j>0?j**Rr:-(Math.abs(j)**Rr):(!c.includes("right")&&j>0&&(ne=j**Rr),!c.includes("left")&&j<0&&(ne=-(Math.abs(j)**Rr))),!c.includes("up")&&!c.includes("down")?ce=R>0?R**Rr:-(Math.abs(R)**Rr):(!c.includes("down")&&R>0&&(ce=R**Rr),!c.includes("up")&&R<0&&(ce=-(Math.abs(R)**Rr))),{x:ne,y:ce}}function ae(j){if(j.button!==0)return;j.pointerType==="touch"&&h();const R=pd(j.nativeEvent);if(!(R&&R.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(re.current=!1,W.current=void 0,J.current=0,q.current={x:j.clientX,y:j.clientY},ee.current=q.current,B.current){const ce=r3(B.current);G.current=ce,O(ce),V({x:ce.x,y:ce.y})}b(!0),I(!0),C(!1),$(null),Y.current=!0,B.current?.setPointerCapture(j.pointerId)}}function Q(j){if(!E)return;j.preventDefault(),Y.current&&(q.current={x:j.clientX,y:j.clientY},Y.current=!1);const{clientY:R,clientX:ne,movementX:ce,movementY:xe}=j;(xe<0&&R>ee.current.y||xe>0&&R<ee.current.y)&&(ee.current={x:ee.current.x,y:R}),(ce<0&&ne>ee.current.x||ce>0&&ne<ee.current.x)&&(ee.current={x:ne,y:ee.current.y});const ke=ne-q.current.x,_e=R-q.current.y,qe=R-ee.current.y,pt=ne-ee.current.x;if(!w&&Math.sqrt(ke*ke+_e*_e)>=n3&&(C(!0),L===null)){const Oe=c.includes("left")||c.includes("right"),Ge=c.includes("up")||c.includes("down");if(Oe&&Ge){const Ze=Math.abs(ke),Ne=Math.abs(_e);$(Ze>Ne?"horizontal":"vertical")}}let ht;if(!W.current)L==="vertical"?_e>0?ht="down":_e<0&&(ht="up"):L==="horizontal"?ke>0?ht="right":ke<0&&(ht="left"):Math.abs(ke)>=Math.abs(_e)?ht=ke>0?"right":"left":ht=_e>0?"down":"up",ht&&c.includes(ht)&&(W.current=ht,J.current=eE(ht,ke,_e),T(ht));else{const Z=W.current,Oe=eE(Z,pt,qe);Oe>Ua?(re.current=!1,T(Z)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&J.current-Oe>=t3&&(re.current=!0)}const $t=se(ke,_e);let $e=G.current.x,U=G.current.y;L==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=$t.x):(L==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=$t.x),(c.includes("up")||c.includes("down"))&&(U+=$t.y)),V({x:$e,y:U})}function le(j){if(!E)return;if(I(!1),C(!1),$(null),B.current?.releasePointerCapture(j.pointerId),re.current){V({x:N.x,y:N.y}),T(void 0);return}let R=!1;const ne=F.x-N.x,ce=F.y-N.y;let xe;for(const ke of c){switch(ke){case"right":ne>Ua&&(R=!0,xe="right");break;case"left":ne<-Ua&&(R=!0,xe="left");break;case"down":ce>Ua&&(R=!0,xe="down");break;case"up":ce<-Ua&&(R=!0,xe="up");break}if(R)break}R?(T(xe),_(!0),p(r.id)):(V({x:N.x,y:N.y}),T(void 0))}function te(j){if(j.key==="Escape"){if(!B.current||!Or(B.current,so(In(B.current))))return;p(r.id)}}A.useEffect(()=>{if(!u)return;const j=B.current;if(!j)return;function R(ne){Or(j,ne.target)&&ne.preventDefault()}return j.addEventListener("touchmove",R,{passive:!1}),()=>{j.removeEventListener("touchmove",R)}},[u]);function fe(){if(!E&&F.x===N.x&&F.y===N.y&&!P)return{[Co.swipeMovementX]:"0px",[Co.swipeMovementY]:"0px"};const j=F.x-N.x,R=F.y-N.y;return{transition:E?"none":void 0,transform:E?`translateX(${F.x}px) translateY(${F.y}px) scale(${N.scale})`:void 0,[Co.swipeMovementX]:`${j}px`,[Co.swipeMovementY]:`${R}px`}}const pe=r.priority==="high",ve={role:pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":M,"aria-hidden":pe&&!f?!0:void 0,onPointerDown:u?ae:void 0,onPointerMove:u?Q:void 0,onPointerUp:u?le:void 0,onKeyDown:te,inert:G4(r.limited),style:{...fe(),[Co.index]:r.transitionStatus==="ending"?K:X,[Co.offsetY]:`${de}px`,[Co.height]:r.height?`${r.height}px`:void 0}},Ae=A.useMemo(()=>({rootRef:B,toast:r,titleId:D,setTitleId:z,descriptionId:M,setDescriptionId:k,swiping:E,swipeDirection:x,recalculateHeight:H,index:K,visibleIndex:X,expanded:y}),[r,D,M,E,x,H,K,X,y]),me=A.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:Ae.swiping,swipeDirection:Ae.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,Ae.swiping,Ae.swipeDirection]),oe=an("div",t,{ref:[n,Ae.rootRef],state:me,stateAttributesMapping:e3,props:[ve,s]});return m.jsx(bh.Provider,{value:Ae,children:oe})});process.env.NODE_ENV!=="production"&&(tE.displayName="ToastRoot");const nE=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:s,recalculateHeight:l}=Ci(),c=A.useRef(null);St(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const v=new ResizeObserver(()=>l(!0)),g=new MutationObserver(()=>l(!0));return v.observe(p),g.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{v.disconnect(),g.disconnect()}},[l]);const u=a>0,d=A.useMemo(()=>({expanded:s,behind:u}),[s,u]);return an("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(nE.displayName="ToastContent");const rE=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ci(),c=a??l.description,u=!!c,d=qs(i),{setDescriptionId:f}=Ci();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("p",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(rE.displayName="ToastDescription");const oE=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ci(),c=a??l.title,u=!!c,d=qs(i),{setTitleId:f}=Ci();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("h2",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(oE.displayName="ToastTitle");let wh;process.env.NODE_ENV!=="production"&&(wh=new Set);function iE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");wh.has(t)||(wh.add(t),console.error(`Base UI: ${t}`))}}const aE=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(aE.displayName="CompositeRootContext");function o3(e=!1){const t=A.useContext(aE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Pr(16));return t}function i3(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,i,o])}}function a3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=o3(!0)!==void 0,s=Ye(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=i3({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||iE("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&iE("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=A.useCallback(()=>{const f=i.current;s3(f)&&a&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,a]);St(c,[c]);const u=A.useCallback((f={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:y,...b}=f;return cd({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}p?.(T)},onMouseDown(T){t||v?.(T)},onKeyDown(T){if(t||(dd(T),h?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!s()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&p?.(T))},onKeyUp(T){t||(dd(T),g?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&p?.(T)},onPointerDown(T){if(t){T.preventDefault();return}y?.(T)}},o?void 0:{role:"button"},l,b)},[t,l,o,s]),d=Ye(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function s3(e){return Ot(e)&&e.tagName==="BUTTON"}const sE=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...s}=t,{close:l,expanded:c}=vh(),{toast:u}=Ci(),[d,f]=A.useState(!1),{getButtonProps:p,buttonRef:v}=a3({disabled:i,native:a}),g=A.useMemo(()=>({type:u.type}),[u.type]);return an("button",t,{ref:[n,v],state:g,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!=="production"&&(sE.displayName="ToastClose");function l3(e){return`data-base-ui-${e}`}const Sh=A.createContext(null);process.env.NODE_ENV!=="production"&&(Sh.displayName="PortalContext");const c3=()=>A.useContext(Sh),u3=l3("portal");function lE(e={}){const{ref:t,container:n,componentProps:r=Pn,elementProps:o,elementState:i}=e,a=qs(),l=c3()?.portalNode,[c,u]=A.useState(null),[d,f]=A.useState(null),p=Ye(y=>{y!==null&&f(y)}),v=A.useRef(null);St(()=>{if(n===null){v.current&&(v.current=null,f(null),u(null));return}if(a==null)return;const y=(n&&(hs(n)?n:n.current))??l??document.body;if(y==null){v.current&&(v.current=null,f(null),u(null));return}v.current!==y&&(v.current=y,f(null),u(y))},[n,l,a]);const g=an("div",r,{ref:[t,p],state:i,props:[{id:a,[u3]:""},o]});return{portalNode:d,portalSubtree:c&&g?jn.createPortal(g,c):null}}const d3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=lE({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),v=A.useRef(null),[g,h]=A.useState(null),y=g?.modal,b=g?.open,x=typeof s=="boolean"?s:!!g&&!g.modal&&g.open&&!!c;A.useEffect(()=>{if(!c||y)return;function E(I){c&&I.relatedTarget&&yd(I)&&(I.type==="focusin"?Dy:LO)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,y]),A.useEffect(()=>{!c||b||Dy(c)},[b,c]);const T=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:v,portalNode:c,setFocusManagerState:h}),[c]);return m.jsxs(A.Fragment,{children:[u,m.jsxs(Sh.Provider,{value:T,children:[x&&c&&m.jsx(Ei,{"data-type":"outside",ref:d,onFocus:E=>{if(yd(E,c))p.current?.focus();else{const I=g?g.domReference:null;FO(I)?.focus()}}}),x&&c&&m.jsx("span",{"aria-owns":c.id,style:RP}),c&&jn.createPortal(r,c),x&&c&&m.jsx(Ei,{"data-type":"outside",ref:f,onFocus:E=>{if(yd(E,c))v.current?.focus();else{const I=g?g.domReference:null;NO(I)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Uo(WP,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(d3.displayName="FloatingPortal");const cE=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...s}=t,{portalNode:l,portalSubtree:c}=lE({container:o,ref:n,componentProps:t,elementProps:s});return!c&&!l?null:m.jsxs(A.Fragment,{children:[c,l&&jn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(cE.displayName="FloatingPortalLite");const f3=cE;function uE(){const e=A.useContext(cc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Pr(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return A.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const p3=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},h3=Ao("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",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",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-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"}},defaultVariants:{theme:"default"}}),m3={default:br,info:br,warn:Tu,muted:br,danger:Tu,success:bu,secondary:br},dE=S.createContext(()=>{throw new Error("Not implemented")}),g3=()=>S.useContext(dE);function v3(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=h3({theme:r}),i=n?lI:m3[r]||br;return m.jsx(tE,{toast:e.toast,swipeDirection:"right",children:m.jsx(Be.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto list-none w-full",children:m.jsx(nE,{className:Pe(o,"shadow-lg"),children:m.jsxs("div",{className:"flex items-start gap-3 p-4",children:[m.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:m.jsx(i,{className:"size-4"})}),m.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?m.jsx(oE,{className:"truncate font-semibold leading-tight tracking-tight select-text"}):null,m.jsx(rE,{className:"text-xs font-medium opacity-90 select-text leading-relaxed line-clamp-2"})]}),t&&!n?m.jsx(sE,{className:"shrink-0 -mr-1 -mt-1 p-1.5 rounded-lg text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:m.jsx(Do,{className:"size-3.5"})}):null]})})})})}function y3({max:e=5}){const t=S.useRef(null),n=p3(t),r=uE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),a=o.length-i.length;return m.jsxs(JT,{ref:t,className:"fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 outline-none pointer-events-none overflow-visible",children:[m.jsx(fn,{mode:"popLayout",initial:!1,children:i.map(s=>m.jsx(v3,{toast:s},s.id))}),!n&&a>0&&m.jsxs(Be.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"self-center px-3 py-1 text-[10px] font-bold tracking-wider uppercase bg-card-background/80 backdrop-blur shadow-sm border border-card-border rounded-full text-foreground/50 pointer-events-auto cursor-default transition-all hover:bg-card-background hover:text-foreground/80",children:["+",a," more"]})]})}function b3({children:e,max:t=5}){const n=uE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,a)=>{const s={theme:a?.theme,closable:a?.closable,loading:a?.loading};if(a?.id&&n.toasts.find(u=>u.id===a.id))return n.update(a.id,{description:i,title:a.title,timeout:a.timeout,data:s}),{close:()=>n.close(a.id),clear:r};const l=n.add({description:i,id:a?.id,title:a?.title,timeout:a?.timeout,data:s});return{close:()=>n.close(l),clear:r}},[n,r]);return m.jsxs(dE.Provider,{value:o,children:[e,m.jsx(f3,{children:m.jsx(y3,{max:t})})]})}function x3({children:e,max:t=5,timeout:n=5e3}){return m.jsx(XT,{limit:t,timeout:n,children:m.jsx(b3,{max:t,children:e})})}const w3=/Mac|iPod|iPhone|iPad/,uc=()=>w3.test(navigator.userAgent),S3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?uc()?"Meta":"Control":n==="Hyper"?uc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),fE=e=>e.map(t=>t.trim()).join("+");class T3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=fE(S3(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=fE(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 E3=e=>(e=e.trim(),e==="Alt"?uc()?m.jsx(cI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?uc()?m.jsx(nI,{"aria-label":"Command",size:12}):"Ctrl":e),C3=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex text-sm 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:E3(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},k3=e=>m.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:fu(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),I3=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:m.jsx(k3,{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:Pe("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 gap-2 items-center",children:[o.Icon?o.Icon:null,m.jsx("span",{children:fu(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx(C3,{value:o.shortcut}):null]})}),A3=(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:Re.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=gh(o,"title",n),a=r.filter(s=>Re.function(s.enabled)?s.enabled({text:t}):!1);return zn.unique(i.concat(a),s=>s.title)},P3=[0,0,0,0,0],pE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=pE(n.items);if(r)return r}return null},O3=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),a=Pt(),s=_r(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:to,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),p=A3(f,r),v=Ws(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=p[T];return E?E.type==="group":!1},onNavigate:T=>{Re.number(T)&&(pg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Re.number(T)?T:e.open?E??0:null)}}),{getItemProps:g,getReferenceProps:h,getFloatingProps:y}=Yn([v]),b=r===""?f:[{type:"group",title:"Results",items:[]},...p.filter(T=>T.type!=="group")];S.useEffect(()=>{const T=new T3;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,I=>E.action({event:I,setText:o,text:s.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,s]);const x=e.Icon??xu;return m.jsx(S.Fragment,{children:m.jsxs(Bp,{...y(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[m.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[m.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?m.jsx(x,{Default:xu,text:r,size:16}):m.jsx(xu,{size:16})}),m.jsx("input",{...h({ref:d.refs.setReference,onKeyDown:T=>{const E=Re.number(l)?b[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=pE(p);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[m.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:a.commandPaletteLoading}),P3.map((T,E)=>m.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Pp},`${t}-${E}-skeleton-index`))]}):m.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[b.map((T,E)=>S.createElement(I3,{...g({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),b.length===1?m.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:a.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(l)?m.jsx(e.Preview,{command:b[l],text:r}):null]}),e.footer?m.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border",children:e.footer}):null]})})},_3=["INPUT","SELECT"],hE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{_3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Th,mE;function Eh(){if(mE)return Th;mE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Th={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Th}var Ch,gE;function vE(){if(gE)return Ch;gE=1;var e=Eh(),t=qm(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var C=w.pop(),P=C.obj[C.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);C.obj[C.prop]=_}}},d=function(w,C){for(var P=C&&C.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function I(w,C,P){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w))w.push(C);else if(w&&typeof w=="object")if(a(w)){var _=s(w)+1;w[_]=C,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0);else return[w,C];return w}if(!w||typeof w!="object"){if(a(C)){for(var F=Object.keys(C),V=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},N=0;N<F.length;N++){var O=parseInt(F[N],10);V[O+1]=C[F[N]]}return i(V,s(C)+1)}return[w].concat(C)}var D=w;return r(w)&&!r(C)&&(D=d(w,P)),r(w)&&r(C)?(C.forEach(function(z,M){if(n.call(w,M)){var k=w[M];k&&typeof k=="object"&&z&&typeof z=="object"?w[M]=I(k,z,P):w.push(z)}else w[M]=z}),w):Object.keys(C).reduce(function(z,M){var k=C[M];return n.call(z,M)?z[M]=I(z[M],k,P):z[M]=k,z},D)},p=function(w,C){return Object.keys(C).reduce(function(P,_){return P[_]=C[_],P},w)},v=function(I,w,C){var P=I.replace(/\+/g," ");if(C==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},g=1024,h=function(w,C,P,_,F){if(w.length===0)return w;var V=w;if(typeof w=="symbol"?V=Symbol.prototype.toString.call(w):typeof w!="string"&&(V=String(w)),P==="iso-8859-1")return escape(V).replace(/%u[0-9a-f]{4}/gi,function(L){return"%26%23"+parseInt(L.slice(2),16)+"%3B"});for(var N="",O=0;O<V.length;O+=g){for(var D=V.length>=g?V.slice(O,O+g):V,z=[],M=0;M<D.length;++M){var k=D.charCodeAt(M);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||F===e.RFC1738&&(k===40||k===41)){z[z.length]=D.charAt(M);continue}if(k<128){z[z.length]=c[k];continue}if(k<2048){z[z.length]=c[192|k>>6]+c[128|k&63];continue}if(k<55296||k>=57344){z[z.length]=c[224|k>>12]+c[128|k>>6&63]+c[128|k&63];continue}M+=1,k=65536+((k&1023)<<10|D.charCodeAt(M)&1023),z[z.length]=c[240|k>>18]+c[128|k>>12&63]+c[128|k>>6&63]+c[128|k&63]}N+=z.join("")}return N},y=function(w){for(var C=[{obj:{o:w},prop:"o"}],P=[],_=0;_<C.length;++_)for(var F=C[_],V=F.obj[F.prop],N=Object.keys(V),O=0;O<N.length;++O){var D=N[O],z=V[D];typeof z=="object"&&z!==null&&P.indexOf(z)===-1&&(C.push({obj:V,prop:D}),P.push(z))}return u(C),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,C,P,_){if(a(w)){var F=s(w)+1;return w[F]=C,l(w,F),w}var V=[].concat(w,C);return V.length>P?i(d(V,{plainObjects:_}),V.length-1):V},E=function(w,C){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(C(w[_]));return P}return C(w)};return Ch={arrayToObject:d,assign:p,combine:T,compact:y,decode:v,encode:h,isBuffer:x,isOverflow:a,isRegExp:b,maybeMap:E,merge:f},Ch}var kh,yE;function M3(){if(yE)return kh;yE=1;var e=qm(),t=vE(),n=Eh(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},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"},f={},p=function g(h,y,b,x,T,E,I,w,C,P,_,F,V,N,O,D,z,M){for(var k=h,L=M,$=0,B=!1;(L=L.get(f))!==void 0&&!B;){var q=L.get(h);if($+=1,typeof q<"u"){if(q===$)throw new RangeError("Cyclic object value");B=!0}typeof L.get(f)>"u"&&($=0)}if(typeof P=="function"?k=P(y,k):k instanceof Date?k=V(k):b==="comma"&&i(k)&&(k=t.maybeMap(k,function(Q){return Q instanceof Date?V(Q):Q})),k===null){if(E)return C&&!D?C(y,u.encoder,z,"key",N):y;k=""}if(d(k)||t.isBuffer(k)){if(C){var G=D?y:C(y,u.encoder,z,"key",N);return[O(G)+"="+O(C(k,u.encoder,z,"value",N))]}return[O(y)+"="+O(String(k))]}var W=[];if(typeof k>"u")return W;var J;if(b==="comma"&&i(k))D&&C&&(k=t.maybeMap(k,C)),J=[{value:k.length>0?k.join(",")||null:void 0}];else if(i(P))J=P;else{var re=Object.keys(k);J=_?re.sort(_):re}var ee=w?String(y).replace(/\./g,"%2E"):String(y),Y=x&&i(k)&&k.length===1?ee+"[]":ee;if(T&&i(k)&&k.length===0)return Y+"[]";for(var K=0;K<J.length;++K){var X=J[K],de=typeof X=="object"&&X&&typeof X.value<"u"?X.value:k[X];if(!(I&&de===null)){var H=F&&w?String(X).replace(/\./g,"%2E"):String(X),se=i(k)?typeof b=="function"?b(Y,H):Y:Y+(F?"."+H:"["+H+"]");M.set(h,$);var ae=e();ae.set(f,M),s(W,g(de,se,b,x,T,E,I,w,b==="comma"&&D&&i(k)?null:C,P,_,F,V,N,O,D,z,ae))}}return W},v=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 y=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 b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var E;if(h.arrayFormat in o?E=h.arrayFormat:"indices"in h?E=h.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:y,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:b,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 kh=function(g,h){var y=g,b=v(h),x,T;typeof b.filter=="function"?(T=b.filter,y=T("",y)):i(b.filter)&&(T=b.filter,x=T);var E=[];if(typeof y!="object"||y===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(y)),b.sort&&x.sort(b.sort);for(var C=e(),P=0;P<x.length;++P){var _=x[P],F=y[_];b.skipNulls&&F===null||s(E,p(F,_,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,C))}var V=E.join(b.delimiter),N=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?N+="utf8=%26%2310003%3B&":N+="utf8=%E2%9C%93&"),V.length>0?N+V:""},kh}var Ih,bE;function D3(){if(bE)return Ih;bE=1;var e=vE(),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(v,g){return String.fromCharCode(parseInt(g,10))})},i=function(p,v,g){if(p&&typeof p=="string"&&v.comma&&p.indexOf(",")>-1)return p.split(",");if(v.throwOnLimitExceeded&&g>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,g){var h={__proto__:null},y=g.ignoreQueryPrefix?v.replace(/^\?/,""):v;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=g.parameterLimit===1/0?void 0:g.parameterLimit,x=y.split(g.delimiter,g.throwOnLimitExceeded?b+1:b);if(g.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var T=-1,E,I=g.charset;if(g.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===s?I="utf-8":x[E]===a&&(I="iso-8859-1"),T=E,E=x.length);for(E=0;E<x.length;++E)if(E!==T){var w=x[E],C=w.indexOf("]="),P=C===-1?w.indexOf("="):C+1,_,F;if(P===-1?(_=g.decoder(w,r.decoder,I,"key"),F=g.strictNullHandling?null:""):(_=g.decoder(w.slice(0,P),r.decoder,I,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),g,n(h[_])?h[_].length:0),function(N){return g.decoder(N,r.decoder,I,"value")}))),F&&g.interpretNumericEntities&&I==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var V=t.call(h,_);V&&g.duplicates==="combine"?h[_]=e.combine(h[_],F,g.arrayLimit,g.plainObjects):(!V||g.duplicates==="last")&&(h[_]=F)}}return h},c=function(p,v,g,h){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");y=Array.isArray(v)&&v[b]?v[b].length:0}for(var x=h?v:i(v,g,y),T=p.length-1;T>=0;--T){var E,I=p[T];if(I==="[]"&&g.parseArrays)e.isOverflow(x)?E=x:E=g.allowEmptyArrays&&(x===""||g.strictNullHandling&&x===null)?[]:e.combine([],x,g.arrayLimit,g.plainObjects);else{E=g.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,C=g.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(C,10);!g.parseArrays&&C===""?E={0:x}:!isNaN(P)&&I!==C&&String(P)===C&&P>=0&&g.parseArrays&&P<=g.arrayLimit?(E=[],E[P]=x):C!=="__proto__"&&(E[C]=x)}x=E}return x},u=function(v,g){var h=g.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(g.depth<=0)return!g.plainObjects&&t.call(Object.prototype,h)&&!g.allowPrototypes?void 0:[h];var y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=y.exec(h),T=x?h.slice(0,x.index):h,E=[];if(T){if(!g.plainObjects&&t.call(Object.prototype,T)&&!g.allowPrototypes)return;E.push(T)}for(var I=0;(x=b.exec(h))!==null&&I<g.depth;){I+=1;var w=x[1].slice(1,-1);if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(x[1])}if(x){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+h.slice(x.index)+"]")}return E},d=function(v,g,h,y){if(v){var b=u(v,h);if(b)return c(b,g,h,y)}},f=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var g=typeof v.charset>"u"?r.charset:v.charset,h=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:g,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:h,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return Ih=function(p,v){var g=f(v);if(p===""||p===null||typeof p>"u")return g.plainObjects?{__proto__:null}:{};for(var h=typeof p=="string"?l(p,g):p,y=g.plainObjects?{__proto__:null}:{},b=Object.keys(h),x=0;x<b.length;++x){var T=b[x],E=d(T,h[T],g,typeof p=="string");y=e.merge(y,E,g)}return g.allowSparse===!0?y:e.compact(y)},Ih}var Ah,xE;function N3(){if(xE)return Ah;xE=1;var e=M3(),t=D3(),n=Eh();return Ah={formats:n,parse:t,stringify:e},Ah}var F3=N3(),et;(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})(et||(et={}));var wE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wE||(wE={}));const Ee=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Br=e=>{switch(typeof e){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return Number.isNaN(e)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(e)?Ee.array:e===null?Ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ee.promise:typeof Map<"u"&&e instanceof Map?Ee.map:typeof Set<"u"&&e instanceof Set?Ee.set:typeof Date<"u"&&e instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ge=et.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 vr 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 vr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.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()}}vr.create=e=>new vr(e);const Ph=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.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}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.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 ge.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 ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let L3=Ph;function V3(){return L3}const $3=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 ye(e,t){const n=V3(),r=$3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ph?void 0:Ph].filter(o=>!!o)});e.common.issues.push(r)}class mn{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 Le;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 mn.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 Le;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 Le=Object.freeze({status:"aborted"}),Ga=e=>({status:"dirty",value:e}),En=e=>({status:"valid",value:e}),SE=e=>e.status==="aborted",TE=e=>e.status==="dirty",ki=e=>e.status==="valid",dc=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ce||(Ce={}));class Hr{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 EE=(e,t)=>{if(ki(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 vr(e.common.issues);return this._error=n,this._error}}};function Ue(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 Xe{get description(){return this._def.description}_getType(t){return Br(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new mn,ctx:{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dc(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:Br(t)},o=this._parseSync({data:t,path:r.path,parent:r});return EE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ki(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=>ki(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:Br(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(dc(o)?o:Promise.resolve(o));return EE(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:ge.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 Oi({schema:this,typeName:Ve.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 qr.create(this,this._def)}nullable(){return _i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this)}promise(){return mc.create(this,this._def)}or(t){return pc.create([this,t],this._def)}and(t){return hc.create(this,t,this._def)}transform(t){return new Oi({...Ue(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Mh({...Ue(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new sH({typeName:Ve.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dh({...Ue(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Nh.create(this,t)}readonly(){return Fh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const z3=/^c[^\s-]{8,}$/i,j3=/^[0-9a-z]+$/,R3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,B3=/^[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,H3=/^[a-z0-9_-]{21}$/i,W3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,q3=/^[-+]?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)?)??$/,U3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,G3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oh;const Y3=/^(?:(?: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])$/,K3=/^(?:(?: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])$/,Z3=/^(([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]))$/,X3=/^(([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])$/,Q3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,CE="((\\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])))",eH=new RegExp(`^${CE}$`);function kE(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 tH(e){return new RegExp(`^${kE(e)}$`)}function nH(e){let t=`${CE}T${kE(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 rH(e,t){return!!((t==="v4"||!t)&&Y3.test(e)||(t==="v6"||!t)&&Z3.test(e))}function oH(e,t){if(!W3.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 iH(e,t){return!!((t==="v4"||!t)&&K3.test(e)||(t==="v6"||!t)&&X3.test(e))}class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ee.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.string,received:i.parsedType}),Le}const r=new mn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.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),ye(o,{code:ge.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?ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")U3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Oh||(Oh=new RegExp(G3,"u")),Oh.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")B3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")H3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")z3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")j3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")R3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:ge.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),ye(o,{validation:"regex",code:ge.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),ye(o,{code:ge.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),ye(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?nH(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?eH.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?tH(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?rH(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?oH(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?iH(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?J3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ko({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ce.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,...Ce.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,...Ce.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ce.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ko({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ko({...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}}ko.create=e=>new ko({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ue(e)});function aH(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 Ii extends Xe{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)!==Ee.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.number,received:i.parsedType}),Le}let r;const o=new mn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.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),ye(r,{code:ge.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),ye(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?aH(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,o){return new Ii({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(o)}]})}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.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"&&et.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)}}Ii.create=e=>new Ii({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class Ya extends Xe{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)!==Ee.bigint)return this._getInvalidInput(t);let r;const o=new mn;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),ye(r,{code:ge.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),ye(r,{code:ge.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),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,o){return new Ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(o)}]})}_addCheck(t){return new Ya({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.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}}Ya.create=e=>new Ya({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class IE extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ee.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.boolean,received:r.parsedType}),Le}return En(t.data)}}IE.create=e=>new IE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class fc extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ee.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_date}),Le}const r=new mn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.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),ye(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.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}}fc.create=e=>new fc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ue(e)});class AE extends Xe{_parse(t){if(this._getType(t)!==Ee.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.symbol,received:r.parsedType}),Le}return En(t.data)}}AE.create=e=>new AE({typeName:Ve.ZodSymbol,...Ue(e)});class PE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.undefined,received:r.parsedType}),Le}return En(t.data)}}PE.create=e=>new PE({typeName:Ve.ZodUndefined,...Ue(e)});class OE extends Xe{_parse(t){if(this._getType(t)!==Ee.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.null,received:r.parsedType}),Le}return En(t.data)}}OE.create=e=>new OE({typeName:Ve.ZodNull,...Ue(e)});class _E extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return En(t.data)}}_E.create=e=>new _E({typeName:Ve.ZodAny,...Ue(e)});class ME extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return En(t.data)}}ME.create=e=>new ME({typeName:Ve.ZodUnknown,...Ue(e)});class Wr extends Xe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.never,received:n.parsedType}),Le}}Wr.create=e=>new Wr({typeName:Ve.ZodNever,...Ue(e)});class DE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.void,received:r.parsedType}),Le}return En(t.data)}}DE.create=e=>new DE({typeName:Ve.ZodVoid,...Ue(e)});class ir extends Xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ee.array)return ye(n,{code:ge.invalid_type,expected:Ee.array,received:n.parsedType}),Le;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ye(n,{code:a?ge.too_big:ge.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&&(ye(n,{code:ge.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&&(ye(n,{code:ge.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 Hr(n,a,n.path,s)))).then(a=>mn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Hr(n,a,n.path,s)));return mn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ir({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new ir({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new ir({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}}ir.create=(e,t)=>new ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ue(t)});function Ai(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qr.create(Ai(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof ir?new ir({...e._def,type:Ai(e.element)}):e instanceof qr?qr.create(Ai(e.unwrap())):e instanceof _i?_i.create(Ai(e.unwrap())):e instanceof Io?Io.create(e.items.map(t=>Ai(t))):e}class Bt extends Xe{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=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ee.object){const c=this._getOrReturnCtx(t);return ye(c,{code:ge.invalid_type,expected:Ee.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Wr&&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 Hr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Wr){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&&(ye(o,{code:ge.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 Hr(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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>mn.mergeObjectSync(r,c)):mn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Bt({...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:Ce.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Ai(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof qr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return VE(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Wr.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Wr.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Wr.create(),typeName:Ve.ZodObject,...Ue(t)});class pc extends Xe{_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 vr(s.ctx.common.issues));return ye(n,{code:ge.invalid_union,unionErrors:a}),Le}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 vr(l));return ye(n,{code:ge.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}pc.create=(e,t)=>new pc({options:e,typeName:Ve.ZodUnion,...Ue(t)});function _h(e,t){const n=Br(e),r=Br(t);if(e===t)return{valid:!0,data:e};if(n===Ee.object&&r===Ee.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=_h(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ee.array&&r===Ee.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=_h(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ee.date&&r===Ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class hc extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(SE(i)||SE(a))return Le;const s=_h(i.value,a.value);return s.valid?((TE(i)||TE(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ge.invalid_intersection_types}),Le)};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}))}}hc.create=(e,t,n)=>new hc({left:e,right:t,typeName:Ve.ZodIntersection,...Ue(n)});class Io extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.array)return ye(r,{code:ge.invalid_type,expected:Ee.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ye(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ge.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 Hr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>mn.mergeArray(n,a)):mn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Io({...this._def,rest:t})}}Io.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Io({items:e,typeName:Ve.ZodTuple,rest:null,...Ue(t)})};class NE extends Xe{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!==Ee.map)return ye(r,{code:ge.invalid_type,expected:Ee.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Hr(r,s,r.path,[c,"key"])),value:i._parse(new Hr(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 Le;(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 Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}NE.create=(e,t,n)=>new NE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ue(n)});class Ka extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.set)return ye(r,{code:ge.invalid_type,expected:Ee.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:ge.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&&(ye(r,{code:ge.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 Le;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 Hr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ka({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new Ka({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ka.create=(e,t)=>new Ka({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ue(t)});class FE extends Xe{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})}}FE.create=(e,t)=>new FE({getter:e,typeName:Ve.ZodLazy,...Ue(t)});class LE extends Xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}LE.create=(e,t)=>new LE({value:e,typeName:Ve.ZodLiteral,...Ue(t)});function VE(e,t){return new Pi({values:e,typeName:Ve.ZodEnum,...Ue(t)})}class Pi extends Xe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:et.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Le}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 ye(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Le}return En(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 Pi.create(t,{...this._def,...n})}exclude(t,n=this._def){return Pi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Pi.create=VE;class $E extends Xe{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ee.string&&r.parsedType!==Ee.number){const o=et.objectValues(n);return ye(r,{expected:et.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return ye(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Le}return En(t.data)}get enum(){return this._def.values}}$E.create=(e,t)=>new $E({values:e,typeName:Ve.ZodNativeEnum,...Ue(t)});class mc extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ee.promise&&n.common.async===!1)return ye(n,{code:ge.invalid_type,expected:Ee.promise,received:n.parsedType}),Le;const r=n.parsedType===Ee.promise?n.data:Promise.resolve(n.data);return En(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mc.create=(e,t)=>new mc({type:e,typeName:Ve.ZodPromise,...Ue(t)});class Oi extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.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=>{ye(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 Le;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Ga(l.value):l});{if(n.value==="aborted")return Le;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Le:s.status==="dirty"||n.value==="dirty"?Ga(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"?Le:(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"?Le:(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(!ki(a))return Le;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=>ki(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Le);et.assertNever(o)}}Oi.create=(e,t,n)=>new Oi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ue(n)}),Oi.createWithPreprocess=(e,t,n)=>new Oi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ue(n)});class qr extends Xe{_parse(t){return this._getType(t)===Ee.undefined?En(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qr.create=(e,t)=>new qr({innerType:e,typeName:Ve.ZodOptional,...Ue(t)});class _i extends Xe{_parse(t){return this._getType(t)===Ee.null?En(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_i.create=(e,t)=>new _i({innerType:e,typeName:Ve.ZodNullable,...Ue(t)});class Mh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Mh.create=(e,t)=>new Mh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class Dh extends Xe{_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 dc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dh.create=(e,t)=>new Dh({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class zE extends Xe{_parse(t){if(this._getType(t)!==Ee.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}zE.create=e=>new zE({typeName:Ve.ZodNaN,...Ue(e)});class sH extends Xe{_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 Nh extends Xe{_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"?Le:i.status==="dirty"?(n.dirty(),Ga(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"?Le: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 Nh({in:t,out:n,typeName:Ve.ZodPipeline})}}class Fh extends Xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ki(o)&&(o.value=Object.freeze(o.value)),o);return dc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Fh.create=(e,t)=>new Fh({innerType:e,typeName:Ve.ZodReadonly,...Ue(t)});var Ve;(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"})(Ve||(Ve={})),Wr.create,ir.create,pc.create,hc.create,Io.create,Pi.create,mc.create,qr.create,_i.create;const lH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},cH=(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]}}},jE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):jE(t),o=structuredClone(e);return cH(o,r,n),o},uH=(e,t)=>e.localeCompare(t),Mi={},RE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return BE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=RE(e._def.innerType);return t==="ZodArray"?n??[]:n}},BE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,RE(n)])),HE=(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]=HE(i,o):n[r]=o||i)}return n},dH={sort:uH,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},WE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return F3.parse(n.toString(),dH)},Ur=(e,t)=>jE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Gr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Lh=e=>{const t=e.dataset.target;if(!t)return Gr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Gr(n||e)},fH={state:{},loading:!1,useOnChange:!1},qE=e=>e.dataset.target||e.name,pH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ja.LocalStorage.get(t);return lH(n)?n:{}},clear:()=>{ja.LocalStorage.delete(t)},set:n=>ja.LocalStorage.set(t,n)}},hH=(e,t,n=fH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??BE(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=qE(T),C=Lh(T)||(E?Gr(E):""),P=Ur(w,e);if(T.setAttribute("data-initialized","true"),P){const _=P.safeParse(C),F=_.success?void 0:_.error.issues[0]?.message??"";o(V=>gn(V??{},w,F))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((C,P)=>{const _=P.element,F=P.schema.safeParse(Gr(_));if(_.dataset.ignore==="ignore"||F.success)return C;const V=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const N=_.dataset.name||_.name||"";return gn(C,N,V)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Mi)=>{const E=Ur(x,e),I=w=>{if(!Xl(w))return;s(P=>gn(P,x,w.toISOString())),o(P=>gn(P,x,void 0));const C=i.current[x].element;if(C){const P=C.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,date:Re.string(a[x])?new Date(a[x]):a[x],required:T.required??!E.isOptional(),error:Rn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Mi)=>{const E=Ur(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.value;s(P=>gn(P,x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),value:Rn(a,x,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,T=Mi)=>{const E=Ur(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.checked;s(P=>gn(P??{},x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},p=(x,T=Mi)=>{const E=Ur(x,e),I=w=>{w.persist?.();const C=w.target.value;T?.onChange?.(w),s(P=>gn(P,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(a,x,void 0)||T?.value||"",type:Re.instance(E,Ii)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},v=(x,T=Mi)=>{const E=Ur(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{s(C=>gn(C,x,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(a,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},g=(x,T=Mi)=>{const E=Ur(x,e),I=E._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const P=I?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(_=>gn(_,x,P))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Rn(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:E})}};S.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(Gr(I)),C=V=>{const N=qE(V.target);if(!N)return!1;const O=V.target,D=Lh(V.target)||(V.relatedTarget?Gr(V.relatedTarget):""),z=E.schema.safeParse(D);if(O.setAttribute("value",D),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const k=gn(M,N,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(k)?null:k}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(k=>{if(Re.null(k))return null;const L=gn(k,N,M||void 0);return Re.empty(L)?null:L})}return!1},P=new AbortController,_=I.getAttribute("data-trigger")||"blur";I.addEventListener(_,C,{signal:P.signal});const F=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:F,unsubscribe:()=>P.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const h=x=>T=>{T.preventDefault();const E=T.currentTarget;let I=WE(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(F=>{if(F.tagName==="SELECT"){const V=F;I=gn(I,V.name,V.value)}if(F.tagName==="INPUT"){const V=F,N=Lh(V)||(V?Gr(V):"");I=gn(I,V.dataset.target||V.name,N)}});const C=HE(I,a),P=e.safeParse(C),_=()=>{hE(E),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return E.setAttribute("data-json",F),n.interceptor?.clear(),x?.(T,{form:E,event:T,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),E.reportValidity(),x?.(T,{form:E,json:I,event:T,reset:_,setErrors:o,data:I,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(V=>String(V))}))})},y=x=>td(a,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:g,state:a,errors:r,select:d,checkbox:f,onSubmit:h,setState:s,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:v,disabled:r!==null}},mH=e=>e?JSON.parse(e.getAttribute("data-json")):{},gH=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},UE={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},GE={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","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"},YE={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},vH={name:"dark",zIndex:YE,rounded:UE,spacing:GE,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%)",disabled:"hsla(240, 4%, 33%)",muted:{DEFAULT:"hsla(210, 10%, 28%)",foreground:"hsla(210, 12%, 46%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},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(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",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,40%,10%)"},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%)"}}}},yH={rounded:UE,spacing:GE,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:YE,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:{DEFAULT:"hsla(210, 30%, 86%)",foreground:"hsla(210, 15%, 20%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},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%)"}}}},bH=vH,xH=yH,wH=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...fs,...e.tweaks},parser:e.parser||cs.hsla,map:{...ds,...e.map}}),[e]);return m.jsx(Xr.Provider,{value:t,children:m.jsx(xS,{children:e.children})})};ie.Alert=q$,ie.AnimatedList=P$,ie.AnimatedListItem=O$,ie.Autocomplete=M4,ie.Button=pr,ie.Calendar=KS,ie.Card=Wl,ie.Checkbox=jp,ie.ColType=vi,ie.Collapse=cS,ie.CommandPalette=O3,ie.ComponentsProvider=wH,ie.Context=Xr,ie.DatePicker=nB,ie.Description=yz,ie.Dict=zn,ie.Dropdown=gi,ie.Empty=K1,ie.Expand=Sz,ie.FileUpload=S4,ie.Form=Ik,ie.Info=bz,ie.Input=qo,ie.InputFeedback=cy,ie.InputField=Qi,ie.Loading=wz,ie.Menu=rz,ie.MenuItem=nz,ie.Modal=Bp,ie.ModalConfirmProvider=xS,ie.MultiSelect=z4,ie.Notifications=x3,ie.PageHeader=xz,ie.PageTitle=wS,ie.Paragraph=vz,ie.Polymorph=ln,ie.Progress=ZR,ie.Radiobox=oz,ie.RenderOnView=W4,ie.Select=io,ie.Slider=v_,ie.Spinner=SS,ie.Stats=U$,ie.StatsCard=I$,ie.Step=V$,ie.Steps=$$,ie.Switch=y_,ie.Tab=B$,ie.Table=k$,ie.Tabs=j$,ie.Tag=ns,ie.TaskList=gz,ie.Textarea=iz,ie.Timeline=XR,ie.TimelineItem=Jl,ie.Toolbar=QR,ie.Tooltip=rd,ie.TransferList=B4,ie.Wizard=Iz,ie.createColumns=KV,ie.createCssProperties=gI,ie.createDesignTokens=Mg,ie.createFormStorage=pH,ie.createOptionCols=Mp,ie.createStyles=pI,ie.createTheme=mI,ie.createTokenStyles=vI,ie.css=Pe,ie.defaultDarkTheme=bH,ie.defaultLightTheme=xH,ie.defaultTranslations=ds,ie.defaultTweaks=fs,ie.dispatchInput=dg,ie.formReset=hE,ie.formToJson=WE,ie.getCoords=Tk,ie.getJsonForm=mH,ie.getModalScrollerRef=e$,ie.getRemainingSize=zi,ie.getSchemaShape=Ur,ie.hasVerticalScroll=fg,ie.initializeInputDataset=$i,ie.isChildVisible=pg,ie.isMobile=ly,ie.isReactComponent=Sk,ie.isReactFC=fu,ie.isSsr=Ar,ie.mergeRefs=sr,ie.negate=DP,ie.noop=Wo,ie.parsers=cs,ie.path=td,ie.reduceTokens=xr,ie.safeRegex=nd,ie.splitInto=sy,ie.useColorParser=eS,ie.useConfirm=cz,ie.useForm=hH,ie.useLocale=ll,ie.useNotification=g3,ie.usePrevious=gH,ie.useReactive=rS,ie.useStableRef=_r,ie.useStepContext=nS,ie.useSwipe=HS,ie.useTablePreferences=QV,ie.useTranslations=Pt,ie.uuid=Ho,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
|
|
21
21
|
//# sourceMappingURL=index.umd.js.map
|