@g4rcez/components 0.2.3 → 0.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/index.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var dS=Object.defineProperty;var fS=(e,t,n)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>fS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ha=require("react-dom");function Ry(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 k=Ry(E),Xs=Ry(ha);function Py(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=Py(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ay(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Py(e))&&(r&&(r+=" "),r+=t);return r}const Hp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wp=Ay,ti=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Hp(u)||Hp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Wp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var qp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Iy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?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 Vl,Up;function ni(){return Up||(Up=1,Vl=TypeError),Vl}const hS={},mS=Object.freeze(Object.defineProperty({__proto__:null,default:hS},Symbol.toStringTag,{value:"Module"})),gS=pS(mS);var $l,Yp;function Qs(){if(Yp)return $l;Yp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,R=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,F=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function j(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||S.call(/e/,q))return q;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var Xe=H<0?-A(-H):A(H);if(Xe!==H){var ot=String(Xe),_e=y.call(q,ot.length+1);return b.call(ot,Ve,"$&_")+"."+b.call(b.call(_e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(q,Ve,"$&_")}var z=gS,M=z.custom,$=Se(M)?M:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$l=function H(q,Ve,Xe,ot){var _e=Ve||{};if(ae(_e,"quoteStyle")&&!ae(J,_e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ae(_e,"maxStringLength")&&(typeof _e.maxStringLength=="number"?_e.maxStringLength<0&&_e.maxStringLength!==1/0:_e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var er=ae(_e,"customInspect")?_e.customInspect:!0;if(typeof er!="boolean"&&er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ae(_e,"indent")&&_e.indent!==null&&_e.indent!==" "&&!(parseInt(_e.indent,10)===_e.indent&&_e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ae(_e,"numericSeparator")&&typeof _e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cr=_e.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return ze(q,_e);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var Zt=String(q);return Cr?j(q,Zt):Zt}if(typeof q=="bigint"){var tr=String(q)+"n";return Cr?j(q,tr):tr}var Ol=typeof _e.depth>"u"?5:_e.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=Ol&&Ol>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var co=Xn(_e,Xe);if(typeof ot>"u")ot=[];else if(le(ot,q)>=0)return"[Circular]";function pn(uo,_a,uS){if(_a&&(ot=I.call(ot),ot.push(_a)),uS){var Bp={depth:_e.depth};return ae(_e,"quoteStyle")&&(Bp.quoteStyle=_e.quoteStyle),H(uo,Bp,Xe+1,ot)}return H(uo,_e,Xe+1,ot)}if(typeof q=="function"&&!W(q)){var jp=K(q),Np=Jn(q,pn);return"[Function"+(jp?": "+jp:" (anonymous)")+"]"+(Np.length>0?" { "+R.call(Np,", ")+" }":"")}if(Se(q)){var Fp=P?b.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(q);return typeof q=="object"&&!P?ut(Fp):Fp}if(Re(q)){for(var bi="<"+w.call(String(q.nodeName)),Ml=q.attributes||[],Ia=0;Ia<Ml.length;Ia++)bi+=" "+Ml[Ia].name+"="+ee(Z(Ml[Ia].value),"double",_e);return bi+=">",q.childNodes&&q.childNodes.length&&(bi+="..."),bi+="</"+w.call(String(q.nodeName))+">",bi}if(Y(q)){if(q.length===0)return"[]";var Dl=Jn(q,pn);return co&&!Tn(Dl)?"["+Qn(Dl,co)+"]":"[ "+R.call(Dl,", ")+" ]"}if(G(q)){var jl=Jn(q,pn);return!("cause"in Error.prototype)&&"cause"in q&&!D.call(q,"cause")?"{ ["+String(q)+"] "+R.call(C.call("[cause]: "+pn(q.cause),jl),", ")+" }":jl.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+R.call(jl,", ")+" }"}if(typeof q=="object"&&er){if($&&typeof q[$]=="function"&&z)return z(q,{depth:Ol-Xe});if(er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var Lp=[];return r&&r.call(q,function(uo,_a){Lp.push(pn(_a,q,!0)+" => "+pn(uo,q))}),fn("Map",n.call(q),Lp,co)}if(X(q)){var Vp=[];return s&&s.call(q,function(uo){Vp.push(pn(uo,q))}),fn("Set",a.call(q),Vp,co)}if(oe(q))return Ot("WeakMap");if(ce(q))return Ot("WeakSet");if(be(q))return Ot("WeakRef");if(B(q))return ut(pn(Number(q)));if(Ie(q))return ut(pn(O.call(q)));if(ye(q))return ut(m.call(q));if(ie(q))return ut(pn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof qp<"u"&&q===qp)return"{ [object globalThis] }";if(!L(q)&&!W(q)){var Nl=Jn(q,pn),$p=F?F(q)===Object.prototype:q instanceof Object||q.constructor===Object,Fl=q instanceof Object?"":"null prototype",zp=!$p&&_&&Object(q)===q&&_ in q?y.call(ve(q),8,-1):Fl?"Object":"",cS=$p||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Ll=cS+(zp||Fl?"["+R.call(C.call([],zp||[],Fl||[]),": ")+"] ":"");return Nl.length===0?Ll+"{}":co?Ll+"{"+Qn(Nl,co)+"}":Ll+"{ "+R.call(Nl,", ")+" }"}return String(q)};function ee(H,q,Ve){var Xe=Ve.quoteStyle||q,ot=J[Xe];return ot+H+ot}function Z(H){return b.call(String(H),/"/g,"&quot;")}function U(H){return!_||!(typeof H=="object"&&(_ in H||typeof H[_]<"u"))}function Y(H){return ve(H)==="[object Array]"&&U(H)}function L(H){return ve(H)==="[object Date]"&&U(H)}function W(H){return ve(H)==="[object RegExp]"&&U(H)}function G(H){return ve(H)==="[object Error]"&&U(H)}function ie(H){return ve(H)==="[object String]"&&U(H)}function B(H){return ve(H)==="[object Number]"&&U(H)}function ye(H){return ve(H)==="[object Boolean]"&&U(H)}function Se(H){if(P)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!V)return!1;try{return V.call(H),!0}catch{}return!1}function Ie(H){if(!H||typeof H!="object"||!O)return!1;try{return O.call(H),!0}catch{}return!1}var Le=Object.prototype.hasOwnProperty||function(H){return H in this};function ae(H,q){return Le.call(H,q)}function ve(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=v.call(h.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function le(H,q){if(H.indexOf)return H.indexOf(q);for(var Ve=0,Xe=H.length;Ve<Xe;Ve++)if(H[Ve]===q)return Ve;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function oe(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function be(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ce(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Re(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function ze(H,q){if(H.length>q.maxStringLength){var Ve=H.length-q.maxStringLength,Xe="... "+Ve+" more character"+(Ve>1?"s":"");return ze(y.call(H,0,q.maxStringLength),q)+Xe}var ot=te[q.quoteStyle||"single"];ot.lastIndex=0;var _e=b.call(b.call(H,ot,"\\$1"),/[\x00-\x1f]/g,xt);return ee(_e,"single",q)}function xt(H){var q=H.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Ve?"\\"+Ve:"\\x"+(q<16?"0":"")+T.call(q.toString(16))}function ut(H){return"Object("+H+")"}function Ot(H){return H+" { ? }"}function fn(H,q,Ve,Xe){var ot=Xe?Qn(Ve,Xe):R.call(Ve,", ");return H+" ("+q+") {"+ot+"}"}function Tn(H){for(var q=0;q<H.length;q++)if(le(H[q],`
2
- `)>=0)return!1;return!0}function Xn(H,q){var Ve;if(H.indent===" ")Ve=" ";else if(typeof H.indent=="number"&&H.indent>0)Ve=R.call(Array(H.indent+1)," ");else return null;return{base:Ve,prev:R.call(Array(q+1),Ve)}}function Qn(H,q){if(H.length===0)return"";var Ve=`
3
- `+q.prev+q.base;return Ve+R.call(H,","+Ve)+`
4
- `+q.prev}function Jn(H,q){var Ve=Y(H),Xe=[];if(Ve){Xe.length=H.length;for(var ot=0;ot<H.length;ot++)Xe[ot]=ae(H,ot)?q(H[ot],H):""}var _e=typeof N=="function"?N(H):[],er;if(P){er={};for(var Cr=0;Cr<_e.length;Cr++)er["$"+_e[Cr]]=_e[Cr]}for(var Zt in H)ae(H,Zt)&&(Ve&&String(Number(Zt))===Zt&&Zt<H.length||P&&er["$"+Zt]instanceof Symbol||(S.call(/[^\w$]/,Zt)?Xe.push(q(Zt,H)+": "+q(H[Zt],H)):Xe.push(Zt+": "+q(H[Zt],H))));if(typeof N=="function")for(var tr=0;tr<_e.length;tr++)D.call(H,_e[tr])&&Xe.push("["+q(_e[tr])+"]: "+q(H[_e[tr]],H));return Xe}return $l}var zl,Gp;function vS(){if(Gp)return zl;Gp=1;var e=Qs(),t=ni(),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 zl=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},zl}var Bl,Kp;function _y(){return Kp||(Kp=1,Bl=Object),Bl}var Hl,Zp;function yS(){return Zp||(Zp=1,Hl=Error),Hl}var Wl,Xp;function xS(){return Xp||(Xp=1,Wl=EvalError),Wl}var ql,Qp;function bS(){return Qp||(Qp=1,ql=RangeError),ql}var Ul,Jp;function wS(){return Jp||(Jp=1,Ul=ReferenceError),Ul}var Yl,eh;function SS(){return eh||(eh=1,Yl=SyntaxError),Yl}var Gl,th;function TS(){return th||(th=1,Gl=URIError),Gl}var Kl,nh;function ES(){return nh||(nh=1,Kl=Math.abs),Kl}var Zl,rh;function CS(){return rh||(rh=1,Zl=Math.floor),Zl}var Xl,oh;function kS(){return oh||(oh=1,Xl=Math.max),Xl}var Ql,ih;function RS(){return ih||(ih=1,Ql=Math.min),Ql}var Jl,ah;function PS(){return ah||(ah=1,Jl=Math.pow),Jl}var ec,sh;function AS(){return sh||(sh=1,ec=Math.round),ec}var tc,lh;function IS(){return lh||(lh=1,tc=Number.isNaN||function(t){return t!==t}),tc}var nc,ch;function _S(){if(ch)return nc;ch=1;var e=IS();return nc=function(n){return e(n)||n===0?n:n<0?-1:1},nc}var rc,uh;function OS(){return uh||(uh=1,rc=Object.getOwnPropertyDescriptor),rc}var oc,dh;function Oy(){if(dh)return oc;dh=1;var e=OS();if(e)try{e([],"length")}catch{e=null}return oc=e,oc}var ic,fh;function MS(){if(fh)return ic;fh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ic=e,ic}var ac,ph;function DS(){return ph||(ph=1,ac=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}),ac}var sc,hh;function jS(){if(hh)return sc;hh=1;var e=typeof Symbol<"u"&&Symbol,t=DS();return sc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},sc}var lc,mh;function My(){return mh||(mh=1,lc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),lc}var cc,gh;function Dy(){if(gh)return cc;gh=1;var e=_y();return cc=e.getPrototypeOf||null,cc}var uc,vh;function NS(){if(vh)return uc;vh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return uc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},uc}var dc,yh;function Js(){if(yh)return dc;yh=1;var e=NS();return dc=Function.prototype.bind||e,dc}var fc,xh;function Bd(){return xh||(xh=1,fc=Function.prototype.call),fc}var pc,bh;function jy(){return bh||(bh=1,pc=Function.prototype.apply),pc}var hc,wh;function FS(){return wh||(wh=1,hc=typeof Reflect<"u"&&Reflect&&Reflect.apply),hc}var mc,Sh;function LS(){if(Sh)return mc;Sh=1;var e=Js(),t=jy(),n=Bd(),r=FS();return mc=r||e.call(n,t),mc}var gc,Th;function Ny(){if(Th)return gc;Th=1;var e=Js(),t=ni(),n=Bd(),r=LS();return gc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},gc}var vc,Eh;function VS(){if(Eh)return vc;Eh=1;var e=Ny(),t=Oy(),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 vc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,vc}var yc,Ch;function $S(){if(Ch)return yc;Ch=1;var e=My(),t=Dy(),n=VS();return yc=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,yc}var xc,kh;function zS(){if(kh)return xc;kh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Js();return xc=n.call(e,t),xc}var bc,Rh;function Hd(){if(Rh)return bc;Rh=1;var e,t=_y(),n=yS(),r=xS(),o=bS(),i=wS(),a=SS(),s=ni(),l=TS(),c=ES(),u=CS(),d=kS(),p=RS(),f=PS(),m=AS(),g=_S(),h=Function,v=function(W){try{return h('"use strict"; return ('+W+").constructor;")()}catch{}},y=Oy(),b=MS(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,S=jS()(),C=$S(),R=Dy(),I=My(),A=jy(),O=Bd(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%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%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":V,"%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%":O,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":R,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var _=C(C(W));P["%Error.prototype%"]=_}var D=function W(G){var ie;if(G==="%AsyncFunction%")ie=v("async function () {}");else if(G==="%GeneratorFunction%")ie=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(G==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ie=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var ye=W("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[G]=ie,ie},F={__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"]},j=Js(),z=zS(),M=j.call(O,Array.prototype.concat),$=j.call(A,Array.prototype.splice),J=j.call(O,String.prototype.replace),te=j.call(O,String.prototype.slice),ee=j.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(G){var ie=te(G,0,1),B=te(G,-1);if(ie==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return J(G,Z,function(Se,Ie,Le,ae){ye[ye.length]=Le?J(ae,U,"$1"):Ie||Se}),ye},L=function(G,ie){var B=G,ye;if(z(F,B)&&(ye=F[B],B="%"+ye[0]+"%"),z(P,B)){var Se=P[B];if(Se===N&&(Se=D(B)),typeof Se>"u"&&!ie)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:ye,name:B,value:Se}}throw new a("intrinsic "+G+" does not exist!")};return bc=function(G,ie){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Y(G),ye=B.length>0?B[0]:"",Se=L("%"+ye+"%",ie),Ie=Se.name,Le=Se.value,ae=!1,ve=Se.alias;ve&&(ye=ve[0],$(B,M([0,1],ve)));for(var K=1,le=!0;K<B.length;K+=1){var Q=B[K],oe=te(Q,0,1),be=te(Q,-1);if((oe==='"'||oe==="'"||oe==="`"||be==='"'||be==="'"||be==="`")&&oe!==be)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!le)&&(ae=!0),ye+="."+Q,Ie="%"+ye+"%",z(P,Ie))Le=P[Ie];else if(Le!=null){if(!(Q in Le)){if(!ie)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&K+1>=B.length){var X=y(Le,Q);le=!!X,le&&"get"in X&&!("originalValue"in X.get)?Le=X.get:Le=Le[Q]}else le=z(Le,Q),Le=Le[Q];le&&!ae&&(P[Ie]=Le)}}return Le},bc}var wc,Ph;function Fy(){if(Ph)return wc;Ph=1;var e=Hd(),t=Ny(),n=t([e("%String.prototype.indexOf%")]);return wc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},wc}var Sc,Ah;function Ly(){if(Ah)return Sc;Ah=1;var e=Hd(),t=Fy(),n=Qs(),r=ni(),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 Sc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},Sc}var Tc,Ih;function BS(){if(Ih)return Tc;Ih=1;var e=Hd(),t=Fy(),n=Qs(),r=Ly(),o=ni(),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 Tc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,Tc}var Ec,_h;function HS(){if(_h)return Ec;_h=1;var e=ni(),t=Qs(),n=vS(),r=Ly(),o=BS(),i=o||r||n;return Ec=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},Ec}var Oh=e=>Array.isArray(e),Cc=e=>e===void 0,kc=e=>e===null,WS=Function.bind.call(Function.call,Object.prototype.toString),qS=e=>!!e&&WS(e)==="[object Error]"||e instanceof Error,Vy=(e,t)=>e instanceof t,US=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},YS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Vy(e,Date),nt={array:Oh,date:YS,empty:e=>kc(e)||Cc(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:Vy,isError:qS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>kc(e)||Cc(e),null:kc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Oh(e)&&typeof e=="object",primitive:US,string:e=>typeof e=="string",undefined:Cc},GS=e=>Object.keys(e),kr=(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};const Wd="-",KS=e=>{const t=XS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Wd);return s[0]===""&&s.length!==1&&s.shift(),$y(s,t)||ZS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},$y=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$y(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Wd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Mh=/^\[(.+)\]$/,ZS=e=>{if(Mh.test(e)){const t=Mh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},XS=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)_u(n[o],r,o,t);return r},_u=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Dh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(QS(o)){_u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{_u(a,Dh(t,i),n,r)})})},Dh=(e,t)=>{let n=e;return t.split(Wd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},QS=e=>e.isThemeGetter,JS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Ou="!",Mu=":",eT=Mu.length,tT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===Mu){i.push(o.slice(l,m)),l=m+eT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=nT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Mu,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},nT=e=>e.endsWith(Ou)?e.substring(0,e.length-1):e.startsWith(Ou)?e.substring(1):e,rT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},oT=e=>({cache:JS(e.cacheSize),parseClassName:tT(e),sortModifiers:rT(e),...KS(e)}),iT=/\s+/,aT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(iT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),b=f?y+Ou:y,T=b+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function sT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zy(t))&&(r&&(r+=" "),r+=n);return r}const zy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zy(e[r]))&&(n&&(n+=" "),n+=t);return n};function lT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=oT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=aT(l,n);return o(l,u),u}return function(){return i(sT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},By=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cT=/^\d+\/\d+$/,uT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dT=/\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$/,fT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>cT.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Rr=e=>!!e&&Number.isInteger(Number(e)),jh=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),nr=e=>uT.test(e),mT=()=>!0,gT=e=>dT.test(e)&&!fT.test(e),qd=()=>!1,vT=e=>pT.test(e),yT=e=>hT.test(e),xT=e=>!he(e)&&!me(e),bT=e=>ri(e,Uy,qd),he=e=>By.test(e),Pr=e=>ri(e,Yy,gT),Rc=e=>ri(e,_T,Fe),wT=e=>ri(e,Wy,qd),ST=e=>ri(e,qy,yT),TT=e=>ri(e,qd,vT),me=e=>Hy.test(e),Oa=e=>oi(e,Yy),ET=e=>oi(e,OT),CT=e=>oi(e,Wy),kT=e=>oi(e,Uy),RT=e=>oi(e,qy),PT=e=>oi(e,MT,!0),ri=(e,t,n)=>{const r=By.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{const r=Hy.exec(e);return r?r[1]?t(r[1]):n:!1},Wy=e=>e==="position",AT=new Set(["image","url"]),qy=e=>AT.has(e),IT=new Set(["length","size","percentage"]),Uy=e=>IT.has(e),Yy=e=>e==="length",_T=e=>e==="number",OT=e=>e==="family-name",MT=e=>e==="shadow",DT=()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),p=At("drop-shadow"),f=At("blur"),m=At("perspective"),g=At("aspect"),h=At("ease"),v=At("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[me,he,l],C=()=>[fo,"full","auto",...S()],R=()=>[Rr,"none","subgrid",me,he],I=()=>["auto",{span:["full",Rr,me,he]},me,he],A=()=>[Rr,"auto",me,he],O=()=>["auto","min","max","fr",me,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...S()],_=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],D=()=>[e,me,he],F=()=>[jh,Pr],j=()=>["","none","full",c,me,he],z=()=>["",Fe,Oa,Pr],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,me,he],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me,he],ee=()=>["none",Fe,me,he],Z=()=>["none",Fe,me,he],U=()=>[Fe,me,he],Y=()=>[fo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[mT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[xT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",Fe],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,he,me,g]}],container:["container"],columns:[{columns:[Fe,he,me,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:[...b(),he,me]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Rr,"auto",me,he]}],basis:[{basis:[fo,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,fo,"auto","initial","none",he]}],grow:[{grow:["",Fe,me,he]}],shrink:[{shrink:["",Fe,me,he]}],order:[{order:[Rr,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[s,"screen",..._()]}],"min-w":[{"min-w":[s,"screen","none",..._()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},..._()]}],h:[{h:["screen",..._()]}],"min-h":[{"min-h":["screen","none",..._()]}],"max-h":[{"max-h":["screen",..._()]}],"font-size":[{text:["base",n,Oa,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,Rc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jh,he]}],"font-family":[{font:[ET,he,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,me,he]}],"line-clamp":[{"line-clamp":[Fe,"none",me,Rc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",me,Pr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Fe,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),CT,wT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",kT,bT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rr,me,he],radial:["",me,he],conic:[Rr,me,he]},RT,ST]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,me,he]}],"outline-w":[{outline:["",Fe,Oa,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,PT,TT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",me,he,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Fe,Pr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[Fe,me,he]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",me,he]}],blur:[{blur:J()}],brightness:[{brightness:[Fe,me,he]}],contrast:[{contrast:[Fe,me,he]}],"drop-shadow":[{"drop-shadow":["","none",p,me,he]}],grayscale:[{grayscale:["",Fe,me,he]}],"hue-rotate":[{"hue-rotate":[Fe,me,he]}],invert:[{invert:["",Fe,me,he]}],saturate:[{saturate:[Fe,me,he]}],sepia:[{sepia:["",Fe,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Fe,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",me,he]}],ease:[{ease:["linear","initial",h,me,he]}],delay:[{delay:[Fe,me,he]}],animate:[{animate:["none",v,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,me,he]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",me,he]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",me,he]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Fe,Oa,Pr,Rc]}],stroke:[{stroke:["none",...D()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},jT=lT(DT),el=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},NT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),FT=e=>nt.function(e),je=(...e)=>jT(Ay(e)),Gy=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ma=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Ky=e=>e.scrollHeight>e.clientHeight,LT="span",cn=E.forwardRef(function(t,n){const r=t.as||LT;return x.jsx(r,{ref:n,...t,as:void 0})}),VT=ti("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"},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-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Oo=E.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 x.jsxs(cn,{...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:je(VT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Mo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function $T(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 zT=({children:e,...t})=>{const n=Mo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:$T(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},BT=ti("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),HT=ti("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),Ud=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:je(HT({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:BT({theme:n})}):null,r,s.children]})}),Yi=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yd=typeof window<"u",tl=Yd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class WT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function qT({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
1
+ "use strict";var dS=Object.defineProperty;var fS=(e,t,n)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>fS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ha=require("react-dom");function ky(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 R=ky(E),Xs=ky(ha);function Py(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=Py(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ay(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Py(e))&&(r&&(r+=" "),r+=t);return r}const Hp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wp=Ay,ti=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Hp(u)||Hp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Wp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var qp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Iy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?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 Vl,Up;function ni(){return Up||(Up=1,Vl=TypeError),Vl}const hS={},mS=Object.freeze(Object.defineProperty({__proto__:null,default:hS},Symbol.toStringTag,{value:"Module"})),gS=pS(mS);var $l,Yp;function Qs(){if(Yp)return $l;Yp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,F=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function j(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||S.call(/e/,q))return q;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var Xe=H<0?-A(-H):A(H);if(Xe!==H){var ot=String(Xe),_e=y.call(q,ot.length+1);return b.call(ot,Ve,"$&_")+"."+b.call(b.call(_e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(q,Ve,"$&_")}var z=gS,M=z.custom,$=Se(M)?M:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$l=function H(q,Ve,Xe,ot){var _e=Ve||{};if(ae(_e,"quoteStyle")&&!ae(J,_e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ae(_e,"maxStringLength")&&(typeof _e.maxStringLength=="number"?_e.maxStringLength<0&&_e.maxStringLength!==1/0:_e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var er=ae(_e,"customInspect")?_e.customInspect:!0;if(typeof er!="boolean"&&er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ae(_e,"indent")&&_e.indent!==null&&_e.indent!==" "&&!(parseInt(_e.indent,10)===_e.indent&&_e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ae(_e,"numericSeparator")&&typeof _e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cr=_e.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return ze(q,_e);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var Zt=String(q);return Cr?j(q,Zt):Zt}if(typeof q=="bigint"){var tr=String(q)+"n";return Cr?j(q,tr):tr}var Ol=typeof _e.depth>"u"?5:_e.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=Ol&&Ol>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var co=Xn(_e,Xe);if(typeof ot>"u")ot=[];else if(le(ot,q)>=0)return"[Circular]";function pn(uo,_a,uS){if(_a&&(ot=I.call(ot),ot.push(_a)),uS){var Bp={depth:_e.depth};return ae(_e,"quoteStyle")&&(Bp.quoteStyle=_e.quoteStyle),H(uo,Bp,Xe+1,ot)}return H(uo,_e,Xe+1,ot)}if(typeof q=="function"&&!W(q)){var jp=K(q),Np=Jn(q,pn);return"[Function"+(jp?": "+jp:" (anonymous)")+"]"+(Np.length>0?" { "+k.call(Np,", ")+" }":"")}if(Se(q)){var Fp=P?b.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(q);return typeof q=="object"&&!P?ut(Fp):Fp}if(ke(q)){for(var bi="<"+w.call(String(q.nodeName)),Ml=q.attributes||[],Ia=0;Ia<Ml.length;Ia++)bi+=" "+Ml[Ia].name+"="+ee(Z(Ml[Ia].value),"double",_e);return bi+=">",q.childNodes&&q.childNodes.length&&(bi+="..."),bi+="</"+w.call(String(q.nodeName))+">",bi}if(Y(q)){if(q.length===0)return"[]";var Dl=Jn(q,pn);return co&&!Tn(Dl)?"["+Qn(Dl,co)+"]":"[ "+k.call(Dl,", ")+" ]"}if(G(q)){var jl=Jn(q,pn);return!("cause"in Error.prototype)&&"cause"in q&&!D.call(q,"cause")?"{ ["+String(q)+"] "+k.call(C.call("[cause]: "+pn(q.cause),jl),", ")+" }":jl.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+k.call(jl,", ")+" }"}if(typeof q=="object"&&er){if($&&typeof q[$]=="function"&&z)return z(q,{depth:Ol-Xe});if(er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var Lp=[];return r&&r.call(q,function(uo,_a){Lp.push(pn(_a,q,!0)+" => "+pn(uo,q))}),fn("Map",n.call(q),Lp,co)}if(X(q)){var Vp=[];return s&&s.call(q,function(uo){Vp.push(pn(uo,q))}),fn("Set",a.call(q),Vp,co)}if(oe(q))return Ot("WeakMap");if(ce(q))return Ot("WeakSet");if(be(q))return Ot("WeakRef");if(B(q))return ut(pn(Number(q)));if(Ie(q))return ut(pn(O.call(q)));if(ye(q))return ut(m.call(q));if(ie(q))return ut(pn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof qp<"u"&&q===qp)return"{ [object globalThis] }";if(!L(q)&&!W(q)){var Nl=Jn(q,pn),$p=F?F(q)===Object.prototype:q instanceof Object||q.constructor===Object,Fl=q instanceof Object?"":"null prototype",zp=!$p&&_&&Object(q)===q&&_ in q?y.call(ve(q),8,-1):Fl?"Object":"",cS=$p||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Ll=cS+(zp||Fl?"["+k.call(C.call([],zp||[],Fl||[]),": ")+"] ":"");return Nl.length===0?Ll+"{}":co?Ll+"{"+Qn(Nl,co)+"}":Ll+"{ "+k.call(Nl,", ")+" }"}return String(q)};function ee(H,q,Ve){var Xe=Ve.quoteStyle||q,ot=J[Xe];return ot+H+ot}function Z(H){return b.call(String(H),/"/g,"&quot;")}function U(H){return!_||!(typeof H=="object"&&(_ in H||typeof H[_]<"u"))}function Y(H){return ve(H)==="[object Array]"&&U(H)}function L(H){return ve(H)==="[object Date]"&&U(H)}function W(H){return ve(H)==="[object RegExp]"&&U(H)}function G(H){return ve(H)==="[object Error]"&&U(H)}function ie(H){return ve(H)==="[object String]"&&U(H)}function B(H){return ve(H)==="[object Number]"&&U(H)}function ye(H){return ve(H)==="[object Boolean]"&&U(H)}function Se(H){if(P)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!V)return!1;try{return V.call(H),!0}catch{}return!1}function Ie(H){if(!H||typeof H!="object"||!O)return!1;try{return O.call(H),!0}catch{}return!1}var Le=Object.prototype.hasOwnProperty||function(H){return H in this};function ae(H,q){return Le.call(H,q)}function ve(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=v.call(h.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function le(H,q){if(H.indexOf)return H.indexOf(q);for(var Ve=0,Xe=H.length;Ve<Xe;Ve++)if(H[Ve]===q)return Ve;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function oe(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function be(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ce(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function ke(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function ze(H,q){if(H.length>q.maxStringLength){var Ve=H.length-q.maxStringLength,Xe="... "+Ve+" more character"+(Ve>1?"s":"");return ze(y.call(H,0,q.maxStringLength),q)+Xe}var ot=te[q.quoteStyle||"single"];ot.lastIndex=0;var _e=b.call(b.call(H,ot,"\\$1"),/[\x00-\x1f]/g,xt);return ee(_e,"single",q)}function xt(H){var q=H.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Ve?"\\"+Ve:"\\x"+(q<16?"0":"")+T.call(q.toString(16))}function ut(H){return"Object("+H+")"}function Ot(H){return H+" { ? }"}function fn(H,q,Ve,Xe){var ot=Xe?Qn(Ve,Xe):k.call(Ve,", ");return H+" ("+q+") {"+ot+"}"}function Tn(H){for(var q=0;q<H.length;q++)if(le(H[q],`
2
+ `)>=0)return!1;return!0}function Xn(H,q){var Ve;if(H.indent===" ")Ve=" ";else if(typeof H.indent=="number"&&H.indent>0)Ve=k.call(Array(H.indent+1)," ");else return null;return{base:Ve,prev:k.call(Array(q+1),Ve)}}function Qn(H,q){if(H.length===0)return"";var Ve=`
3
+ `+q.prev+q.base;return Ve+k.call(H,","+Ve)+`
4
+ `+q.prev}function Jn(H,q){var Ve=Y(H),Xe=[];if(Ve){Xe.length=H.length;for(var ot=0;ot<H.length;ot++)Xe[ot]=ae(H,ot)?q(H[ot],H):""}var _e=typeof N=="function"?N(H):[],er;if(P){er={};for(var Cr=0;Cr<_e.length;Cr++)er["$"+_e[Cr]]=_e[Cr]}for(var Zt in H)ae(H,Zt)&&(Ve&&String(Number(Zt))===Zt&&Zt<H.length||P&&er["$"+Zt]instanceof Symbol||(S.call(/[^\w$]/,Zt)?Xe.push(q(Zt,H)+": "+q(H[Zt],H)):Xe.push(Zt+": "+q(H[Zt],H))));if(typeof N=="function")for(var tr=0;tr<_e.length;tr++)D.call(H,_e[tr])&&Xe.push("["+q(_e[tr])+"]: "+q(H[_e[tr]],H));return Xe}return $l}var zl,Gp;function vS(){if(Gp)return zl;Gp=1;var e=Qs(),t=ni(),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 zl=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},zl}var Bl,Kp;function _y(){return Kp||(Kp=1,Bl=Object),Bl}var Hl,Zp;function yS(){return Zp||(Zp=1,Hl=Error),Hl}var Wl,Xp;function xS(){return Xp||(Xp=1,Wl=EvalError),Wl}var ql,Qp;function bS(){return Qp||(Qp=1,ql=RangeError),ql}var Ul,Jp;function wS(){return Jp||(Jp=1,Ul=ReferenceError),Ul}var Yl,eh;function SS(){return eh||(eh=1,Yl=SyntaxError),Yl}var Gl,th;function TS(){return th||(th=1,Gl=URIError),Gl}var Kl,nh;function ES(){return nh||(nh=1,Kl=Math.abs),Kl}var Zl,rh;function CS(){return rh||(rh=1,Zl=Math.floor),Zl}var Xl,oh;function RS(){return oh||(oh=1,Xl=Math.max),Xl}var Ql,ih;function kS(){return ih||(ih=1,Ql=Math.min),Ql}var Jl,ah;function PS(){return ah||(ah=1,Jl=Math.pow),Jl}var ec,sh;function AS(){return sh||(sh=1,ec=Math.round),ec}var tc,lh;function IS(){return lh||(lh=1,tc=Number.isNaN||function(t){return t!==t}),tc}var nc,ch;function _S(){if(ch)return nc;ch=1;var e=IS();return nc=function(n){return e(n)||n===0?n:n<0?-1:1},nc}var rc,uh;function OS(){return uh||(uh=1,rc=Object.getOwnPropertyDescriptor),rc}var oc,dh;function Oy(){if(dh)return oc;dh=1;var e=OS();if(e)try{e([],"length")}catch{e=null}return oc=e,oc}var ic,fh;function MS(){if(fh)return ic;fh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ic=e,ic}var ac,ph;function DS(){return ph||(ph=1,ac=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}),ac}var sc,hh;function jS(){if(hh)return sc;hh=1;var e=typeof Symbol<"u"&&Symbol,t=DS();return sc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},sc}var lc,mh;function My(){return mh||(mh=1,lc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),lc}var cc,gh;function Dy(){if(gh)return cc;gh=1;var e=_y();return cc=e.getPrototypeOf||null,cc}var uc,vh;function NS(){if(vh)return uc;vh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return uc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},uc}var dc,yh;function Js(){if(yh)return dc;yh=1;var e=NS();return dc=Function.prototype.bind||e,dc}var fc,xh;function Bd(){return xh||(xh=1,fc=Function.prototype.call),fc}var pc,bh;function jy(){return bh||(bh=1,pc=Function.prototype.apply),pc}var hc,wh;function FS(){return wh||(wh=1,hc=typeof Reflect<"u"&&Reflect&&Reflect.apply),hc}var mc,Sh;function LS(){if(Sh)return mc;Sh=1;var e=Js(),t=jy(),n=Bd(),r=FS();return mc=r||e.call(n,t),mc}var gc,Th;function Ny(){if(Th)return gc;Th=1;var e=Js(),t=ni(),n=Bd(),r=LS();return gc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},gc}var vc,Eh;function VS(){if(Eh)return vc;Eh=1;var e=Ny(),t=Oy(),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 vc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,vc}var yc,Ch;function $S(){if(Ch)return yc;Ch=1;var e=My(),t=Dy(),n=VS();return yc=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,yc}var xc,Rh;function zS(){if(Rh)return xc;Rh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Js();return xc=n.call(e,t),xc}var bc,kh;function Hd(){if(kh)return bc;kh=1;var e,t=_y(),n=yS(),r=xS(),o=bS(),i=wS(),a=SS(),s=ni(),l=TS(),c=ES(),u=CS(),d=RS(),p=kS(),f=PS(),m=AS(),g=_S(),h=Function,v=function(W){try{return h('"use strict"; return ('+W+").constructor;")()}catch{}},y=Oy(),b=MS(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,S=jS()(),C=$S(),k=Dy(),I=My(),A=jy(),O=Bd(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%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%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":V,"%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%":O,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var _=C(C(W));P["%Error.prototype%"]=_}var D=function W(G){var ie;if(G==="%AsyncFunction%")ie=v("async function () {}");else if(G==="%GeneratorFunction%")ie=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(G==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ie=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var ye=W("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[G]=ie,ie},F={__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"]},j=Js(),z=zS(),M=j.call(O,Array.prototype.concat),$=j.call(A,Array.prototype.splice),J=j.call(O,String.prototype.replace),te=j.call(O,String.prototype.slice),ee=j.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(G){var ie=te(G,0,1),B=te(G,-1);if(ie==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return J(G,Z,function(Se,Ie,Le,ae){ye[ye.length]=Le?J(ae,U,"$1"):Ie||Se}),ye},L=function(G,ie){var B=G,ye;if(z(F,B)&&(ye=F[B],B="%"+ye[0]+"%"),z(P,B)){var Se=P[B];if(Se===N&&(Se=D(B)),typeof Se>"u"&&!ie)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:ye,name:B,value:Se}}throw new a("intrinsic "+G+" does not exist!")};return bc=function(G,ie){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Y(G),ye=B.length>0?B[0]:"",Se=L("%"+ye+"%",ie),Ie=Se.name,Le=Se.value,ae=!1,ve=Se.alias;ve&&(ye=ve[0],$(B,M([0,1],ve)));for(var K=1,le=!0;K<B.length;K+=1){var Q=B[K],oe=te(Q,0,1),be=te(Q,-1);if((oe==='"'||oe==="'"||oe==="`"||be==='"'||be==="'"||be==="`")&&oe!==be)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!le)&&(ae=!0),ye+="."+Q,Ie="%"+ye+"%",z(P,Ie))Le=P[Ie];else if(Le!=null){if(!(Q in Le)){if(!ie)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&K+1>=B.length){var X=y(Le,Q);le=!!X,le&&"get"in X&&!("originalValue"in X.get)?Le=X.get:Le=Le[Q]}else le=z(Le,Q),Le=Le[Q];le&&!ae&&(P[Ie]=Le)}}return Le},bc}var wc,Ph;function Fy(){if(Ph)return wc;Ph=1;var e=Hd(),t=Ny(),n=t([e("%String.prototype.indexOf%")]);return wc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},wc}var Sc,Ah;function Ly(){if(Ah)return Sc;Ah=1;var e=Hd(),t=Fy(),n=Qs(),r=ni(),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 Sc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},Sc}var Tc,Ih;function BS(){if(Ih)return Tc;Ih=1;var e=Hd(),t=Fy(),n=Qs(),r=Ly(),o=ni(),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 Tc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,Tc}var Ec,_h;function HS(){if(_h)return Ec;_h=1;var e=ni(),t=Qs(),n=vS(),r=Ly(),o=BS(),i=o||r||n;return Ec=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},Ec}var Oh=e=>Array.isArray(e),Cc=e=>e===void 0,Rc=e=>e===null,WS=Function.bind.call(Function.call,Object.prototype.toString),qS=e=>!!e&&WS(e)==="[object Error]"||e instanceof Error,Vy=(e,t)=>e instanceof t,US=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},YS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Vy(e,Date),tt={array:Oh,date:YS,empty:e=>Rc(e)||Cc(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:Vy,isError:qS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Rc(e)||Cc(e),null:Rc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Oh(e)&&typeof e=="object",primitive:US,string:e=>typeof e=="string",undefined:Cc},GS=e=>Object.keys(e),Rr=(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};const Wd="-",KS=e=>{const t=XS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Wd);return s[0]===""&&s.length!==1&&s.shift(),$y(s,t)||ZS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},$y=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$y(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Wd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Mh=/^\[(.+)\]$/,ZS=e=>{if(Mh.test(e)){const t=Mh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},XS=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)_u(n[o],r,o,t);return r},_u=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Dh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(QS(o)){_u(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{_u(a,Dh(t,i),n,r)})})},Dh=(e,t)=>{let n=e;return t.split(Wd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},QS=e=>e.isThemeGetter,JS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Ou="!",Mu=":",eT=Mu.length,tT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===Mu){i.push(o.slice(l,m)),l=m+eT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=nT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Mu,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},nT=e=>e.endsWith(Ou)?e.substring(0,e.length-1):e.startsWith(Ou)?e.substring(1):e,rT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},oT=e=>({cache:JS(e.cacheSize),parseClassName:tT(e),sortModifiers:rT(e),...KS(e)}),iT=/\s+/,aT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(iT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),b=f?y+Ou:y,T=b+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function sT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zy(t))&&(r&&(r+=" "),r+=n);return r}const zy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zy(e[r]))&&(n&&(n+=" "),n+=t);return n};function lT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=oT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=aT(l,n);return o(l,u),u}return function(){return i(sT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},By=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cT=/^\d+\/\d+$/,uT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dT=/\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$/,fT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>cT.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),kr=e=>!!e&&Number.isInteger(Number(e)),jh=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),nr=e=>uT.test(e),mT=()=>!0,gT=e=>dT.test(e)&&!fT.test(e),qd=()=>!1,vT=e=>pT.test(e),yT=e=>hT.test(e),xT=e=>!he(e)&&!me(e),bT=e=>ri(e,Uy,qd),he=e=>By.test(e),Pr=e=>ri(e,Yy,gT),kc=e=>ri(e,_T,Fe),wT=e=>ri(e,Wy,qd),ST=e=>ri(e,qy,yT),TT=e=>ri(e,qd,vT),me=e=>Hy.test(e),Oa=e=>oi(e,Yy),ET=e=>oi(e,OT),CT=e=>oi(e,Wy),RT=e=>oi(e,Uy),kT=e=>oi(e,qy),PT=e=>oi(e,MT,!0),ri=(e,t,n)=>{const r=By.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{const r=Hy.exec(e);return r?r[1]?t(r[1]):n:!1},Wy=e=>e==="position",AT=new Set(["image","url"]),qy=e=>AT.has(e),IT=new Set(["length","size","percentage"]),Uy=e=>IT.has(e),Yy=e=>e==="length",_T=e=>e==="number",OT=e=>e==="family-name",MT=e=>e==="shadow",DT=()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),p=At("drop-shadow"),f=At("blur"),m=At("perspective"),g=At("aspect"),h=At("ease"),v=At("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[me,he,l],C=()=>[fo,"full","auto",...S()],k=()=>[kr,"none","subgrid",me,he],I=()=>["auto",{span:["full",kr,me,he]},me,he],A=()=>[kr,"auto",me,he],O=()=>["auto","min","max","fr",me,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...S()],_=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],D=()=>[e,me,he],F=()=>[jh,Pr],j=()=>["","none","full",c,me,he],z=()=>["",Fe,Oa,Pr],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,me,he],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me,he],ee=()=>["none",Fe,me,he],Z=()=>["none",Fe,me,he],U=()=>[Fe,me,he],Y=()=>[fo,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[mT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[xT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",Fe],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,he,me,g]}],container:["container"],columns:[{columns:[Fe,he,me,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:[...b(),he,me]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[kr,"auto",me,he]}],basis:[{basis:[fo,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,fo,"auto","initial","none",he]}],grow:[{grow:["",Fe,me,he]}],shrink:[{shrink:["",Fe,me,he]}],order:[{order:[kr,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[s,"screen",..._()]}],"min-w":[{"min-w":[s,"screen","none",..._()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},..._()]}],h:[{h:["screen",..._()]}],"min-h":[{"min-h":["screen","none",..._()]}],"max-h":[{"max-h":["screen",..._()]}],"font-size":[{text:["base",n,Oa,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,kc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jh,he]}],"font-family":[{font:[ET,he,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,me,he]}],"line-clamp":[{"line-clamp":[Fe,"none",me,kc]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",me,Pr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Fe,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),CT,wT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",RT,bT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kr,me,he],radial:["",me,he],conic:[kr,me,he]},kT,ST]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,me,he]}],"outline-w":[{outline:["",Fe,Oa,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,PT,TT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",me,he,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Fe,Pr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[Fe,me,he]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",me,he]}],blur:[{blur:J()}],brightness:[{brightness:[Fe,me,he]}],contrast:[{contrast:[Fe,me,he]}],"drop-shadow":[{"drop-shadow":["","none",p,me,he]}],grayscale:[{grayscale:["",Fe,me,he]}],"hue-rotate":[{"hue-rotate":[Fe,me,he]}],invert:[{invert:["",Fe,me,he]}],saturate:[{saturate:[Fe,me,he]}],sepia:[{sepia:["",Fe,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Fe,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",me,he]}],ease:[{ease:["linear","initial",h,me,he]}],delay:[{delay:[Fe,me,he]}],animate:[{animate:["none",v,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,me,he]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",me,he]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",me,he]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Fe,Oa,Pr,kc]}],stroke:[{stroke:["none",...D()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},jT=lT(DT),el=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},NT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),FT=e=>tt.function(e),je=(...e)=>jT(Ay(e)),Gy=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ma=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Ky=e=>e.scrollHeight>e.clientHeight,LT="span",cn=E.forwardRef(function(t,n){const r=t.as||LT;return x.jsx(r,{ref:n,...t,as:void 0})}),VT=ti("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"},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-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Oo=E.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 x.jsxs(cn,{...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:je(VT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Mo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function $T(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 zT=({children:e,...t})=>{const n=Mo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:$T(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},BT=ti("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),HT=ti("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),Ud=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:je(HT({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:BT({theme:n})}):null,r,s.children]})}),Yi=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yd=typeof window<"u",tl=Yd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class WT extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function qT({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
5
5
  [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
@@ -9,7 +9,7 @@
9
9
  ${p}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(f)}},[t]),x.jsx(WT,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const UT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(YT),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(qT,{isPresent:n,anchorX:s,children:e})),x.jsx(nl.Provider,{value:d,children:e})};function YT(){return new Map}function Zy(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ma=e=>e.key||"";function Nh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const vr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Zy(a),u=E.useMemo(()=>Nh(e),[e]),d=a&&!l?[]:u.map(Ma),p=E.useRef(!0),f=E.useRef(u),m=bn(()=>new Map),[g,h]=E.useState(u),[v,y]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const S=Ma(v[w]);d.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let S=0;S<v.length;S++){const C=v[S],R=Ma(C);d.includes(R)||(w.splice(S,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),y(Nh(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=E.useContext(Yi);return x.jsx(x.Fragment,{children:v.map(w=>{const S=Ma(w),C=a&&!l?!1:u===v||d.includes(S),R=()=>{if(m.has(S))m.set(S,!0);else return;let I=!0;m.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),y(f.current),a&&(c==null||c()),r&&r())};return x.jsx(UT,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:R,anchorX:s,children:w},S)})})},GT=E.createContext(null),Yt=e=>e;let ii=Yt,dn=Yt;process.env.NODE_ENV!=="production"&&(ii=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const KT={useManualTiming:!1},Da=["read","resolveKeyframes","update","preRender","render","postRender"];function ZT(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.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 XT=40;function Xy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Da.reduce((v,y)=>(v[y]=ZT(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,XT),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Da.reduce((v,y)=>{const b=a[y];return v[y]=(T,w=!1,S=!1)=>(n||m(),b.schedule(T,w,S)),v},{}),cancel:v=>{for(let y=0;y<Da.length;y++)a[Da[y]].cancel(v)},state:o,steps:a}}const{schedule:Je,cancel:Wn,state:Mt,steps:Pc}=Xy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);function QT(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function JT(){const e=QT(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Je.postRender(r),[r]),t]}const eE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Fh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(eE);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 Qy=e=>e===!0,tE=e=>Qy(e===!0)||e==="id",nE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Yi),o=E.useContext(GT),[i,a]=JT(),s=E.useRef(null),l=r.id||o;s.current===null&&(tE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Qy(n)&&r.group||Fh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Yi.Provider,{value:c,children:e})},Jy=E.createContext({strict:!1}),Lh={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"]},jo={};for(const e in Lh)jo[e]={isEnabled:t=>Lh[e].some(n=>!!t[n])};function rE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const oE=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 cs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oE.has(e)}let ex=e=>!cs(e);function tx(e){e&&(ex=t=>t.startsWith("on")?!cs(t):e(t))}try{tx(require("@emotion/is-prop-valid").default)}catch{}function iE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ex(o)||n===!0&&cs(o)||!t&&!cs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function aE({children:e,isValidProp:t,...n}){t&&tx(t),n={...E.useContext(Do),...n},n.isStatic=bn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Do.Provider,{value:r,children:e})}const Vh=new Set;function rl(e,t,n){e||Vh.has(t)||(console.warn(t),Vh.add(t))}function sE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gi(e){return typeof e=="string"||Array.isArray(e)}const Gd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kd=["initial",...Gd];function al(e){return il(e.animate)||Kd.some(t=>Gi(e[t]))}function nx(e){return!!(al(e)||e.variants)}function lE(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gi(n)?n:void 0,animate:Gi(r)?r:void 0}}return e.inherit!==!1?t:{}}function cE(e){const{initial:t,animate:n}=lE(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[$h(t),$h(n)])}function $h(e){return Array.isArray(e)?e.join(" "):e}const uE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dE(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):xo(n)&&(n.current=r))},[t])}const{schedule:Zd}=Xy(queueMicrotask,!1),Xd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fE="framerAppearId",rx="data-"+Xd(fE),ox=E.createContext({});function pE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),l=E.useContext(Jy),c=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(ox);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&hE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[rx],h=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Zd.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),h.current=!1))}),p}function hE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ix(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&xo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ix(e){if(e)return e.options.allowProjection!==!1?e.projection:ix(e.parent)}function mE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&rE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:gE(c)},{isStatic:f}=p,m=cE(c),g=r(c,f);if(!f&&Yd){vE(p,e);const h=yE(p);d=h.MeasureLayout,m.visualElement=pE(o,g,p,t,h.ProjectionNode)}return x.jsxs(ol.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,dE(g,m.visualElement,u),g,f,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[uE]=o,l}function gE({layoutId:e}){const t=E.useContext(Yi).id;return t&&e!==void 0?t+"-"+e:e}function vE(e,t){const n=E.useContext(Jy).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?ii(!1,r):dn(!1,r)}}function yE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ax=e=>t=>typeof t=="string"&&t.startsWith(e),Qd=ax("--"),xE=ax("var(--"),Jd=e=>xE(e)?bE.test(e.split("/*")[0].trim()):!1,bE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ki={};function wE(e){for(const t in e)Ki[t]=e[t],Qd(t)&&(Ki[t].isCSSVariable=!0)}const ai=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eo=new Set(ai);function sx(e,{layout:t,layoutId:n}){return eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ki[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),lx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zi={...si,transform:e=>qn(0,1,e)},ja={...si,default:1},ga=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=ga("deg"),_n=ga("%"),we=ga("px"),SE=ga("vh"),TE=ga("vw"),zh={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(e*100)},EE={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},CE={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:ja,scaleX:ja,scaleY:ja,scaleZ:ja,skew:or,skewX:or,skewY:or,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Zi,originX:zh,originY:zh,originZ:we},Bh={...si,transform:Math.round},ef={...EE,...CE,zIndex:Bh,size:we,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Bh},kE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RE=ai.length;function PE(e,t,n){let r="",o=!0;for(let i=0;i<RE;i++){const a=ai[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=lx(s,ef[a]);if(!l){o=!1;const u=kE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function tf(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(eo.has(l)){a=!0;continue}else if(Qd(l)){o[l]=c;continue}else{const u=lx(c,ef[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=PE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const nf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cx(e,t,n){for(const r in t)!Pt(t[r])&&!sx(r,n)&&(e[r]=t[r])}function AE({transformTemplate:e},t){return E.useMemo(()=>{const n=nf();return tf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IE(e,t){const n=e.style||{},r={};return cx(r,n,e),Object.assign(r,AE(e,t)),r}function _E(e,t){const n={},r=IE(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 OE=["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 rf(e){return typeof e!="string"||e.includes("-")?!1:!!(OE.indexOf(e)>-1||/[A-Z]/u.test(e))}const ME={offset:"stroke-dashoffset",array:"stroke-dasharray"},DE={offset:"strokeDashoffset",array:"strokeDasharray"};function jE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ME:DE;e[i.offset]=we.transform(-r);const a=we.transform(t),s=we.transform(n);e[i.array]=`${a} ${s}`}function Hh(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function NE(e,t,n){const r=Hh(t,e.x,e.width),o=Hh(n,e.y,e.height);return`${r} ${o}`}function of(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(tf(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=NE(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&jE(p,a,s,l,!1)}const ux=()=>({...nf(),attrs:{}}),af=e=>typeof e=="string"&&e.toLowerCase()==="svg";function FE(e,t,n,r){const o=E.useMemo(()=>{const i=ux();return of(i,t,af(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};cx(i,e.style,e),o.style={...i,...o.style}}return o}function LE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(rf(n)?FE:_E)(r,i,a,n),c=iE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Wh(e){const t=[{},{}];return e==null||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]=Wh(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]=Wh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Du=e=>Array.isArray(e),VE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),$E=e=>Du(e)?e[e.length-1]||0:e;function es(e){const t=Pt(e)?e.get():e;return VE(t)?t.toValue():t}function zE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:BE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const dx=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>zE(e,t,r,o);return n?i():bn(i)};function BE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=es(i[p]);let{initial:a,animate:s}=e;const l=al(e),c=nx(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"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=sf(e,p[f]);if(m){const{transitionEnd:g,transition:h,...v}=m;for(const y in v){let b=v[y];if(Array.isArray(b)){const T=u?b.length-1:0;b=b[T]}b!==null&&(o[y]=b)}for(const y in g)o[y]=g[y]}}}return o}function lf(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||sx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const HE={useVisualState:dx({scrapeMotionValuesFromProps:lf,createRenderState:nf})};function fx(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function px(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const hx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mx(e,t,n,r){px(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(hx.has(o)?o:Xd(o),t.attrs[o])}function gx(e,t,n){const r=lf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ai.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const qh=["x","y","width","height","cx","cy","r"],WE={useVisualState:dx({scrapeMotionValuesFromProps:gx,createRenderState:ux,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(eo.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<qh.length;s++){const l=qh[s];e[l]!==t[l]&&(a=!0)}a&&Je.read(()=>{fx(n,r),Je.render(()=>{of(r,o,af(n.tagName),e.transformTemplate),mx(n,r)})})}})};function qE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...rf(r)?WE:HE,preloadedFeatures:e,useRender:LE(o),createVisualElement:t,Component:r};return mE(a)}}function Xi(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}function cf(e,t){return e?e[t]||e.default||e:void 0}const vx=new Set(["width","height","top","left","right","bottom",...ai]);function uf(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function UE([...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}class df{constructor(){this.subscriptions=[]}add(t){return uf(this.subscriptions,t),()=>sl(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}}function yx(e,t){return t?e*(1e3/t):0}let ts;function YE(){ts=void 0}const On={now:()=>(ts===void 0&&On.set(Mt.isProcessing||KT.useManualTiming?Mt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(YE)}},Uh=30,GE=e=>!isNaN(parseFloat(e)),Mi={current:void 0};class KE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=On.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=GE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 df);const r=this.events[t].add(n);return t==="change"?()=>{r(),Je.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Mi.current&&Mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Uh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Uh);return yx(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new KE(e,t)}function ZE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function XE(e,t){const n=Xi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=$E(i[a]);ZE(e,a,s)}}function QE(e){return!!(Pt(e)&&e.add)}function ju(e,t){const n=e.getValue("willChange");if(QE(n))return n.add(t)}function xx(e){return e.props[rx]}function ff(e){let t;return()=>(t===void 0&&(t=e()),t)}const JE=ff(()=>window.ScrollTimeline!==void 0);class eC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(JE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bx extends eC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function ll(e){return typeof e=="function"}function Yh(e,t){e.timeline=t,e.onfinish=null}const pf=e=>Array.isArray(e)&&typeof e[0]=="number",tC={linearEasing:void 0};function nC(e,t){const n=ff(e);return()=>{var r;return(r=tC[t])!==null&&r!==void 0?r:n()}}const us=nC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Wr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Sx(e){return!!(typeof e=="function"&&us()||!e||typeof e=="string"&&(e in Nu||us())||pf(e)||Array.isArray(e)&&e.every(Sx))}const ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ki([0,.65,.55,1]),circOut:ki([.55,0,1,.45]),backIn:ki([.31,.01,.66,-.59]),backOut:ki([.33,1.53,.69,.99])};function Tx(e,t){if(e)return typeof e=="function"&&us()?wx(e,t):pf(e)?ki(e):Array.isArray(e)?e.map(n=>Tx(n,t)||Nu.easeOut):Nu[e]}const Ex=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rC=1e-7,oC=12;function iC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Ex(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>rC&&++s<oC);return a}function va(e,t,n,r){if(e===t&&n===r)return Yt;const o=i=>iC(i,0,1,e,n);return i=>i===0||i===1?i:Ex(o(i),t,r)}const Cx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kx=e=>t=>1-e(1-t),Rx=va(.33,1.53,.69,.99),hf=kx(Rx),Px=Cx(hf),Ax=e=>(e*=2)<1?.5*hf(e):.5*(2-Math.pow(2,-10*(e-1))),mf=e=>1-Math.sin(Math.acos(e)),Ix=kx(mf),_x=Cx(mf),Ox=e=>/^0[^.\s]+$/u.test(e);function aC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ox(e):!0}const Di=e=>Math.round(e*1e5)/1e5,gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sC(e){return e==null}const lC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vf=(e,t)=>n=>!!(typeof n=="string"&&lC.test(n)&&n.startsWith(e)||t&&!sC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Mx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(gf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},cC=e=>qn(0,255,e),Ac={...si,transform:e=>Math.round(cC(e))},Fr={test:vf("rgb","red"),parse:Mx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ac.transform(e)+", "+Ac.transform(t)+", "+Ac.transform(n)+", "+Di(Zi.transform(r))+")"};function uC(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 Fu={test:vf("#"),parse:uC,transform:Fr.transform},bo={test:vf("hsl","hue"),parse:Mx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(Di(t))+", "+_n.transform(Di(n))+", "+Di(Zi.transform(r))+")"},Nt={test:e=>Fr.test(e)||Fu.test(e)||bo.test(e),parse:e=>Fr.test(e)?Fr.parse(e):bo.test(e)?bo.parse(e):Fu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):bo.transform(e)},dC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(dC))===null||n===void 0?void 0:n.length)||0)>0}const Dx="number",jx="color",pC="var",hC="var(",Gh="${}",mC=/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 Qi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(mC,l=>(Nt.test(l)?(r.color.push(i),o.push(jx),n.push(Nt.parse(l))):l.startsWith(hC)?(r.var.push(i),o.push(pC),n.push(l)):(r.number.push(i),o.push(Dx),n.push(parseFloat(l))),++i,Gh)).split(Gh);return{values:n,split:s,indexes:r,types:o}}function Nx(e){return Qi(e).values}function Fx(e){const{split:t,types:n}=Qi(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===Dx?i+=Di(o[a]):s===jx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const gC=e=>typeof e=="number"?0:e;function vC(e){const t=Nx(e);return Fx(e)(t.map(gC))}const dr={test:fC,parse:Nx,createTransformer:Fx,getAnimatableNone:vC},yC=new Set(["brightness","contrast","saturate","opacity"]);function xC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gf)||[];if(!r)return e;const o=n.replace(r,"");let i=yC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const bC=/\b([a-z-]*)\(.*?\)/gu,Lu={...dr,getAnimatableNone:e=>{const t=e.match(bC);return t?t.map(xC).join(" "):e}},wC={...ef,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Lu,WebkitFilter:Lu},Lx=e=>wC[e];function Vx(e,t){let n=Lx(e);return n!==Lu&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SC=new Set(["auto","none","0"]);function TC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!SC.has(i)&&Qi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Vx(n,o)}const Lr=e=>e*180/Math.PI,Vu=e=>{const t=Lr(Math.atan2(e[1],e[0]));return $u(t)},EC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vu,rotateZ:Vu,skewX:e=>Lr(Math.atan(e[1])),skewY:e=>Lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$u=e=>(e=e%360,e<0&&(e+=360),e),Kh=Vu,Zh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zh,scaleY:Xh,scale:e=>(Zh(e)+Xh(e))/2,rotateX:e=>$u(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>$u(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Kh,rotate:Kh,skewX:e=>Lr(Math.atan(e[4])),skewY:e=>Lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qh(e){return e.includes("scale")?1:0}function zu(e,t){if(!e||e==="none")return Qh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=CC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=EC,o=s}if(!o)return Qh(t);const i=r[t],a=o[1].split(",").map(RC);return typeof i=="function"?i(a):a[i]}const kC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return zu(n,t)};function RC(e){return parseFloat(e.trim())}const Jh=e=>e===si||e===we,PC=new Set(["x","y","z"]),AC=ai.filter(e=>!PC.has(e));function IC(e){const t=[];return AC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>zu(t,"x"),y:(e,{transform:t})=>zu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Br=new Set;let Bu=!1,Hu=!1;function $x(){if(Hu){const e=Array.from(Br).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=IC(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])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Hu=!1,Bu=!1,Br.forEach(e=>e.complete()),Br.clear()}function zx(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hu=!0)})}function _C(){zx(),$x()}class yf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Br.add(this),Bu||(Bu=!0,Je.read(zx),Je.resolveKeyframes($x))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Br.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Br.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function MC(e){const t=OC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const DC=4;function Hx(e,t,n=1){dn(n<=DC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=MC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Bx(a)?parseFloat(a):a}return Jd(o)?Hx(o,t,n+1):o}const Wx=e=>t=>t.test(e),jC={test:e=>e==="auto",parse:e=>e},qx=[si,we,_n,or,TE,SE,jC],em=e=>qx.find(Wx(e));class Ux extends yf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Jd(c))){const u=Hx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!vx.has(r)||t.length!==2)return;const[o,i]=t,a=em(o),s=em(i);if(a!==s)if(Jh(a)&&Jh(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)aC(t[o])&&r.push(o);r.length&&TC(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=Fo[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(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const tm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function NC(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 FC(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=tm(o,t),s=tm(i,t);return ii(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:NC(e)||(n==="spring"||ll(n))&&r}const LC=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(LC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const VC=40;class Yx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>VC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&_C(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!FC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ds=2e4;function xf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ds;)t+=n,r=e.next(t);return t>=ds?1/0:t}const it=(e,t,n)=>e+(t-e)*n;function Ic(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 $C({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=Ic(l,s,e+1/3),i=Ic(l,s,e),a=Ic(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function fs(e,t){return n=>n>0?t:e}const _c=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},zC=[Fu,Fr,bo],BC=e=>zC.find(t=>t.test(e));function nm(e){const t=BC(e);if(ii(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===bo&&(n=$C(n)),n}const rm=(e,t)=>{const n=nm(e),r=nm(t);if(!n||!r)return fs(e,t);const o={...n};return i=>(o.red=_c(n.red,r.red,i),o.green=_c(n.green,r.green,i),o.blue=_c(n.blue,r.blue,i),o.alpha=it(n.alpha,r.alpha,i),Fr.transform(o))},HC=(e,t)=>n=>t(e(n)),ya=(...e)=>e.reduce(HC),Wu=new Set(["none","hidden"]);function WC(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qC(e,t){return n=>it(e,t,n)}function bf(e){return typeof e=="number"?qC:typeof e=="string"?Jd(e)?fs:Nt.test(e)?rm:GC:Array.isArray(e)?Gx:typeof e=="object"?Nt.test(e)?rm:UC:fs}function Gx(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>bf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function UC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=bf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function YC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const GC=(e,t)=>{const n=dr.createTransformer(t),r=Qi(e),o=Qi(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?Wu.has(e)&&!o.values.length||Wu.has(t)&&!r.values.length?WC(e,t):ya(Gx(YC(r,o),o.values),n):(ii(!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.`),fs(e,t))};function Kx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):bf(e)(e,t)}const KC=5;function Zx(e,t,n){const r=Math.max(t-KC,0);return yx(n-e(r),t-r)}const ft={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},om=.001;function ZC({duration:e=ft.duration,bounce:t=ft.bounce,velocity:n=ft.velocity,mass:r=ft.mass}){let o,i;ii(e<=yn(ft.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(ft.minDamping,ft.maxDamping,a),e=qn(ft.minDuration,ft.maxDuration,Mn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=qu(c,a),m=Math.exp(-d);return om-p/f*m},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=qu(Math.pow(c,2),a);return(-o(c)+om>0?-1:1)*((p-f)*m)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=QC(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:ft.stiffness,damping:ft.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const XC=12;function QC(e,t,n){let r=n;for(let o=1;o<XC;o++)r=r-e(r)/t(r);return r}function qu(e,t){return e*Math.sqrt(1-t*t)}const JC=["duration","bounce"],ek=["stiffness","damping","mass"];function im(e,t){return t.some(n=>e[n]!==void 0)}function tk(e){let t={velocity:ft.velocity,stiffness:ft.stiffness,damping:ft.damping,mass:ft.mass,isResolvedFromDuration:!1,...e};if(!im(e,ek)&&im(e,JC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ft.mass,stiffness:o,damping:i}}else{const n=ZC(e);t={...t,...n,mass:ft.mass},t.isResolvedFromDuration=!0}return t}function wf(e=ft.visualDuration,t=ft.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=tk({...n,velocity:-Mn(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=Mn(Math.sqrt(l/u)),y=Math.abs(h)<5;r||(r=y?ft.restSpeed.granular:ft.restSpeed.default),o||(o=y?ft.restDelta.granular:ft.restDelta.default);let b;if(g<1){const w=qu(v,g);b=S=>{const C=Math.exp(-g*v*S);return a-C*((m+g*v*h)/w*Math.sin(w*S)+h*Math.cos(w*S))}}else if(g===1)b=w=>a-Math.exp(-v*w)*(h+(m+v*h)*w);else{const w=v*Math.sqrt(g*g-1);b=S=>{const C=Math.exp(-g*v*S),R=Math.min(w*S,300);return a-C*((m+g*v*h)*Math.sinh(R)+w*h*Math.cosh(R))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const S=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?yn(m):Zx(b,w,S));const R=Math.abs(C)<=r,I=Math.abs(a-S)<=o;s.done=R&&I}return s.value=s.done?a:S,s},toString:()=>{const w=Math.min(xf(T),ds),S=wx(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function am({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=R=>s!==void 0&&R<s||l!==void 0&&R>l,m=R=>s===void 0?l:l===void 0||Math.abs(s-R)<Math.abs(l-R)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const y=R=>-g*Math.exp(-R/r),b=R=>v+y(R),T=R=>{const I=y(R),A=b(R);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let w,S;const C=R=>{f(p.value)&&(w=R,S=wf({keyframes:[p.value,m(p.value)],velocity:Zx(b,R,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:R=>{let I=!1;return!S&&w===void 0&&(I=!0,T(R),C(R)),w!==void 0&&R>=w?S.next(R-w):(!I&&T(R),p)}}}const nk=va(.42,0,1,1),rk=va(0,0,.58,1),Xx=va(.42,0,.58,1),Qx=e=>Array.isArray(e)&&typeof e[0]!="number",sm={linear:Yt,easeIn:nk,easeInOut:Xx,easeOut:rk,circIn:mf,circInOut:_x,circOut:Ix,backIn:hf,backInOut:Px,backOut:Rx,anticipate:Ax},Uu=e=>{if(pf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return va(t,n,r,o)}else if(typeof e=="string")return dn(sm[e]!==void 0,`Invalid easing type '${e}'`),sm[e];return e};function ok(e,t,n){const r=[],o=n||Kx,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]||Yt:t;s=ya(l,s)}r.push(s)}return r}function Jx(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"),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=ok(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Wr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(qn(e[0],e[i-1],u)):c}function eb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(it(n,1,o))}}function tb(e){const t=[0];return eb(t,e.length-1),t}function ik(e,t){return e.map(n=>n*t)}function ak(e,t){return e.map(()=>t||Xx).splice(0,e.length-1)}function ji({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Qx(r)?r.map(Uu):Uu(r),i={done:!1,value:t[0]},a=ik(n&&n.length===t.length?n:tb(t),e),s=Jx(a,t,{ease:Array.isArray(o)?o:ak(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const sk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Je.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:On.now()}},lk={decay:am,inertia:am,tween:ji,keyframes:ji,spring:wf},ck=e=>e/100;class Sf extends Yx{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||yf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:lk[n]||ji;let l,c;process.env.NODE_ENV!=="production"&&s!==ji&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==ji&&typeof t[0]!="number"&&(l=ya(ck,Kx(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=xf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,T=i;if(f){const R=Math.min(this.currentTime,u)/d;let I=Math.floor(R),A=R%1;!A&&R>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(A=1-A,g&&(A-=g/d)):m==="mirror"&&(T=a)),b=qn(0,1,A)*d}const w=y?{done:!1,value:l[0]}:T.next(b);s&&(w.value=s(w.value));let{done:S}=w;!y&&c!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&o!==void 0&&(w.value=cl(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=sk,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const uk=new Set(["opacity","clipPath","filter","transform"]);function dk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Tx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const fk=ff(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ps=10,pk=2e4;function hk(e){return ll(e.type)||e.type==="spring"||!Sx(e.ease)}function mk(e,t){const n=new Sf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<pk;)r=n.sample(i),o.push(r.value),i+=ps;return{times:void 0,keyframes:o,duration:i-ps,ease:"linear"}}const nb={anticipate:Ax,backInOut:Px,circInOut:_x};function gk(e){return e in nb}class lm extends Yx{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Ux(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&us()&&gk(i)&&(i=nb[i]),hk(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=mk(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=dk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Yh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Yt;const{animation:r}=n;Yh(r,t)}return Yt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new Sf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=yn(this.time);c.setWithVelocity(m.sample(g-ps).value,m.sample(g).value,ps)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return fk()&&r&&uk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const vk={type:"spring",stiffness:500,damping:25,restSpeed:10},yk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xk={type:"keyframes",duration:.8},bk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wk=(e,{keyframes:t})=>t.length>2?xk:eo.has(e)?e.startsWith("scale")?yk(t[1]):vk:bk;function Sk({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 Tf=(e,t,n,r={},o,i)=>a=>{const s=cf(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};Sk(s)||(u={...u,...wk(e,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return Je.update(()=>{u.onUpdate(p),u.onComplete()}),new bx([])}return!i&&lm.supports(u)?new lm(u):new Sf(u)};function Tk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ef(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&Tk(u,d))continue;const m={delay:n,...cf(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=xx(e);if(v){const y=window.MotionHandoffAnimation(v,d,Je);y!==null&&(m.startTime=y,g=!0)}}ju(e,d),p.start(Tf(d,p,f,e.shouldReduceMotion&&vx.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{Je.update(()=>{s&&XE(e,s)})}),c}function Yu(e,t,n={}){var r;const o=Xi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Ef(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Ek(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Ek(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(Ck).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Yu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Ck(e,t){return e.sortNodePosition(t)}function kk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Yu(e,t,n);else{const o=typeof t=="function"?Xi(e,t,n.custom):t;r=Promise.all(Ef(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function rb(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 Rk=Kd.length;function ob(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ob(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Rk;n++){const r=Kd[n],o=e.props[r];(Gi(o)||o===!1)&&(t[r]=o)}return t}const Pk=[...Gd].reverse(),Ak=Gd.length;function Ik(e){return t=>Promise.all(t.map(({animation:n,options:r})=>kk(e,n,r)))}function _k(e){let t=Ik(e),n=cm(),r=!0;const o=l=>(c,u)=>{var d;const p=Xi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=ob(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<Ak;h++){const v=Pk[h],y=n[v],b=c[v]!==void 0?c[v]:u[v],T=Gi(b),w=v===l?y.isActive:null;w===!1&&(m=h);let S=b===u[v]&&b!==c[v]&&T;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...f},!y.isActive&&w===null||!b&&!y.prevProp||il(b)||typeof b=="boolean")continue;const C=Ok(y.prevProp,b);let R=C||v===l&&y.isActive&&!S&&T||h>m&&T,I=!1;const A=Array.isArray(b)?b:[b];let O=A.reduce(o(v),{});w===!1&&(O={});const{prevResolvedValues:N={}}=y,V={...N,...O},P=F=>{R=!0,p.has(F)&&(I=!0,p.delete(F)),y.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in V){const j=O[F],z=N[F];if(f.hasOwnProperty(F))continue;let M=!1;Du(j)&&Du(z)?M=!rb(j,z):M=j!==z,M?j!=null?P(F):p.add(F):j!==void 0&&p.has(F)?P(F):y.protectedKeys[F]=!0}y.prevProp=b,y.prevResolvedValues=O,y.isActive&&(f={...f,...O}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(S&&C)||I)&&d.push(...A.map(F=>({animation:F,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Xi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),h[v]=y??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=cm(),r=!0}}}function Ok(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rb(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cm(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class yr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Mk extends yr{constructor(t){super(t),t.animationState||(t.animationState=_k(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Dk=0;class jk extends yr{constructor(){super(...arguments),this.id=Dk++}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 Nk={animation:{Feature:Mk},exit:{Feature:jk}},mn={x:!1,y:!1};function ib(){return mn.x||mn.y}function Fk(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Ji(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Cf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xa(e){return{point:{x:e.pageX,y:e.pageY}}}const Lk=e=>t=>Cf(t)&&e(t,xa(t));function Ni(e,t,n,r){return Ji(e,t,Lk(n),r)}function ab({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Vk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $k(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const sb=1e-4,zk=1-sb,Bk=1+sb,lb=.01,Hk=0-lb,Wk=0+lb;function zt(e){return e.max-e.min}function qk(e,t,n){return Math.abs(e-t)<=n}function um(e,t,n,r=.5){e.origin=r,e.originPoint=it(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zk&&e.scale<=Bk||isNaN(e.scale))&&(e.scale=1),(e.translate>=Hk&&e.translate<=Wk||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){um(e.x,t.x,n.x,r?r.originX:void 0),um(e.y,t.y,n.y,r?r.originY:void 0)}function dm(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function Uk(e,t,n){dm(e.x,t.x,n.x),dm(e.y,t.y,n.y)}function fm(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Li(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}const pm=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:pm(),y:pm()}),hm=()=>({min:0,max:0}),mt=()=>({x:hm(),y:hm()});function an(e){return[e("x"),e("y")]}function Oc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Oc(e)||!Oc(t)||!Oc(n)}function _r(e){return Gu(e)||cb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cb(e){return mm(e.x)||mm(e.y)}function mm(e){return e&&e!=="0%"}function hs(e,t,n){const r=e-n,o=t*r;return n+o}function gm(e,t,n,r,o){return o!==void 0&&(e=hs(e,o,r)),hs(e,n,r)+t}function Ku(e,t=0,n=1,r,o){e.min=gm(e.min,t,n,r,o),e.max=gm(e.max,t,n,r,o)}function ub(e,{x:t,y:n}){Ku(e.x,t.translate,t.scale,t.originPoint),Ku(e.y,n.translate,n.scale,n.originPoint)}const vm=.999999999999,ym=1.0000000000001;function Yk(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&&To(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,ub(e,a)),r&&_r(i.latestValues)&&To(e,i.latestValues))}t.x<ym&&t.x>vm&&(t.x=1),t.y<ym&&t.y>vm&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function xm(e,t,n,r,o=.5){const i=it(e.min,e.max,o);Ku(e,t,n,i,r)}function To(e,t){xm(e.x,t.x,t.scaleX,t.scale,t.originX),xm(e.y,t.y,t.scaleY,t.scale,t.originY)}function db(e,t){return ab($k(e.getBoundingClientRect(),t))}function Gk(e,t,n){const r=db(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const fb=({current:e})=>e?e.ownerDocument.defaultView:null,bm=(e,t)=>Math.abs(e-t);function Kk(e,t){const n=bm(e.x,t.x),r=bm(e.y,t.y);return Math.sqrt(n**2+r**2)}class pb{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Dc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=Kk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Mt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mc(p,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Dc(d.type==="pointercancel"?this.lastMoveEventInfo:Mc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Cf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=xa(t),s=Mc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Dc(s,this.history)),this.removeListeners=ya(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Mc(e,t){return t?{point:t(e.point)}:e}function wm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Dc({point:e},t){return{point:e,delta:wm(e,hb(t)),offset:wm(e,Zk(t)),velocity:Xk(t,.1)}}function Zk(e){return e[0]}function hb(e){return e[e.length-1]}function Xk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=hb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Qk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?it(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?it(n,e,r.max):Math.min(e,n)),e}function Sm(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 Jk(e,{top:t,left:n,bottom:r,right:o}){return{x:Sm(e.x,n,o),y:Sm(e.y,t,r)}}function Tm(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 eR(e,t){return{x:Tm(e.x,t.x),y:Tm(e.y,t.y)}}function tR(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),qn(0,1,n)}function nR(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 Zu=.35;function rR(e=Zu){return e===!1?e=0:e===!0&&(e=Zu),{x:Em(e,"left","right"),y:Em(e,"top","bottom")}}function Em(e,t,n){return{min:Cm(e,t),max:Cm(e,n)}}function Cm(e,t){return typeof e=="number"?e:e[t]||0}const oR=new WeakMap;class iR{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=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xa(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fk(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(h=>{let v=this.getAxisMotionValue(h).get()||0;if(_n.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[h];b&&(v=zt(b)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Je.postRender(()=>m(u,d)),ju(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=aR(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>an(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new pb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:fb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Je.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Na(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Qk(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&xo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Jk(o.layoutBox,n):this.constraints=!1,this.elastic=rR(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=nR(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(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.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Gk(r,o.root,this.visualElement.getTransformPagePoint());let a=eR(o.layout.layoutBox,i);if(n){const s=n(Vk(a));this.hasMutatedConstraints=!!s,s&&(a=ab(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=an(u=>{if(!Na(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ju(this.visualElement,t),r.start(Tf(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.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){an(n=>{const{drag:r}=this.getProps();if(!Na(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-it(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=tR({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(),an(a=>{if(!Na(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(it(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;oR.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();xo(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()),Je.read(r);const a=Ji(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(an(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=Zu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Na(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sR extends yr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new iR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const km=e=>(t,n)=>{e&&Je.postRender(()=>e(t,n))};class lR extends yr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new pb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:km(t),onStart:km(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Je.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Rm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=Rm(e,t.target.x),r=Rm(e,t.target.y);return`${n}% ${r}%`}},cR={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=it(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class uR extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;wE(dR),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Je.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mb(e){const[t,n]=Zy(),r=E.useContext(Yi);return x.jsx(uR,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(ox),isPresent:t,safeToRemove:n})}const dR={borderRadius:{...wi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wi,borderTopRightRadius:wi,borderBottomLeftRadius:wi,borderBottomRightRadius:wi,boxShadow:cR};function gb(e,t,n){const r=Pt(e)?e:No(e);return r.start(Tf("",r,t,n)),r.animation}function vb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const fR=(e,t)=>e.depth-t.depth;class pR{constructor(){this.children=[],this.isDirty=!1}add(t){uf(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fR),this.isDirty=!1,this.children.forEach(t)}}function hR(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return Je.read(r,!0),()=>Wn(r)}const yb=["TopLeft","TopRight","BottomLeft","BottomRight"],mR=yb.length,Pm=e=>typeof e=="string"?parseFloat(e):e,Am=e=>typeof e=="number"||we.test(e);function gR(e,t,n,r,o,i){o?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,vR(r)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,yR(r))):i&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<mR;a++){const s=`border${yb[a]}Radius`;let l=Im(t,s),c=Im(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Am(l)===Am(c)?(e[s]=Math.max(it(Pm(l),Pm(c),r),0),(_n.test(c)||_n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,r))}function Im(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const vR=xb(0,.5,Ix),yR=xb(.5,.95,Yt);function xb(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function _m(e,t){e.min=t.min,e.max=t.max}function rn(e,t){_m(e.x,t.x),_m(e.y,t.y)}function Om(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Mm(e,t,n,r,o){return e-=t,e=hs(e,1/n,r),o!==void 0&&(e=hs(e,1/o,r)),e}function xR(e,t=0,n=1,r=.5,o,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=it(i.min,i.max,r);e===i&&(s-=t),e.min=Mm(e.min,t,n,s,o),e.max=Mm(e.max,t,n,s,o)}function Dm(e,t,[n,r,o],i,a){xR(e,t[n],t[r],t[o],t.scale,i,a)}const bR=["x","scaleX","originX"],wR=["y","scaleY","originY"];function jm(e,t,n,r){Dm(e.x,t,bR,n?n.x:void 0,r?r.x:void 0),Dm(e.y,t,wR,n?n.y:void 0,r?r.y:void 0)}function Nm(e){return e.translate===0&&e.scale===1}function bb(e){return Nm(e.x)&&Nm(e.y)}function Fm(e,t){return e.min===t.min&&e.max===t.max}function SR(e,t){return Fm(e.x,t.x)&&Fm(e.y,t.y)}function Lm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wb(e,t){return Lm(e.x,t.x)&&Lm(e.y,t.y)}function Vm(e){return zt(e.x)/zt(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TR{constructor(){this.members=[]}add(t){uf(this.members,t),t.scheduleRender()}remove(t){if(sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ER(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),m&&(r+=`skewY(${m}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 jc=["","X","Y","Z"],CR={visibility:"hidden"},zm=1e3;let kR=0;function Nc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Sb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Je,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Sb(r)}function Tb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=kR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AR),this.nodes.forEach(DR),this.nodes.forEach(jR),this.nodes.forEach(IR)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new pR)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new df),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,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=vb(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=hR(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Hm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||$R,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!wb(this.targetLayout,m),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...cf(g,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else p||Hm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Wn(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(NR),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&&Sb(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(Bm);return}this.isUpdating||this.nodes.forEach(OR),this.isUpdating=!1,this.nodes.forEach(MR),this.nodes.forEach(RR),this.nodes.forEach(PR),this.clearAllSnapshots();const s=On.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Pc.update.process(Mt),Pc.preRender.process(Mt),Pc.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_R),this.sharedNodes.forEach(FR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),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){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&&!bb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||_r(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)),zR(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return mt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(BR))){const{scroll:u}=this.root;u&&(So(l.x,u.offset.x),So(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=mt();if(rn(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(l,a),So(l.x,d.offset.x),So(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=mt();rn(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&&To(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),_r(u.latestValues)&&To(l,u.latestValues)}return _r(this.latestValues)&&To(l,this.latestValues),l}removeTransform(a){const s=mt();rn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!_r(c.latestValues))continue;Gu(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();rn(u,d),jm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return _r(this.latestValues)&&jm(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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Uk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),ub(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||cb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;Yk(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=mt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Om(this.prevProjectionDelta.x,this.projectionDelta.x),Om(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!$m(this.projectionDelta.x,this.prevProjectionDelta.x)||!$m(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wo(),this.projectionDelta=wo(),this.projectionDeltaWithTransform=wo()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=wo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=mt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),v=!h||h.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(VR));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const w=T/1e3;Wm(d.x,a.x,w),Wm(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),LR(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&SR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=mt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,gR(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=gb(0,zm,{...a,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(zm),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&&Eb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();const d=zt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=zt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}rn(s,l),To(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new TR),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(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.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&&Nc("z",a,c,this.animationValues);for(let u=0;u<jc.length;u++)Nc(`rotate${jc[u]}`,a,c,this.animationValues),Nc(`skew${jc[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return CR;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=es(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=es(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!_r(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=ER(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Ki){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:y}=Ki[g],b=c.transform==="none"?p[g]:h(p[g],d);if(v){const T=v.length;for(let w=0;w<T;w++)c[v[w]]=b}else y?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?es(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Bm),this.root.sharedNodes.clear()}}}function RR(e){e.updateLayout()}function PR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Eb(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=wo();Fi(s,r,n.layoutBox);const l=wo();a?Fi(l,e.applyTransform(o,!0),n.measuredBox):Fi(l,r,n.layoutBox);const c=!bb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const m=mt();Li(m,n.layoutBox,p.layoutBox);const g=mt();Li(g,r,f.layoutBox),wb(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AR(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 IR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _R(e){e.clearSnapshot()}function Bm(e){e.clearMeasurements()}function OR(e){e.isLayoutDirty=!1}function MR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DR(e){e.resolveTargetDelta()}function jR(e){e.calcProjection()}function NR(e){e.resetSkewAndRotation()}function FR(e){e.removeLeadSnapshot()}function Wm(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qm(e,t,n,r){e.min=it(t.min,n.min,r),e.max=it(t.max,n.max,r)}function LR(e,t,n,r){qm(e.x,t.x,n.x,r),qm(e.y,t.y,n.y,r)}function VR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $R={duration:.45,ease:[.4,0,.1,1]},Um=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ym=Um("applewebkit/")&&!Um("chrome/")?Math.round:Yt;function Gm(e){e.min=Ym(e.min),e.max=Ym(e.max)}function zR(e){Gm(e.x),Gm(e.y)}function Eb(e,t,n){return e==="position"||e==="preserve-aspect"&&!qk(Vm(t),Vm(n),.2)}function BR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const HR=Tb({attachResizeListener:(e,t)=>Ji(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fc={current:void 0},Cb=Tb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fc.current){const e=new HR({});e.mount(window),e.setOptions({layoutScroll:!0}),Fc.current=e}return Fc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),WR={pan:{Feature:lR},drag:{Feature:sR,ProjectionNode:Cb,MeasureLayout:mb}};function kb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Rb(e,t){const n=kb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Km(e){return!(e.pointerType==="touch"||ib())}function qR(e,t,n={}){const[r,o,i]=Rb(e,n),a=s=>{if(!Km(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Km(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Zm(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&&Je.postRender(()=>i(t,xa(t)))}class UR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=qR(t,(n,r)=>(Zm(this.node,r,"Start"),o=>Zm(this.node,o,"End"))))}unmount(){}}class YR extends yr{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=ya(Ji(this.node.current,"focus",()=>this.onFocus()),Ji(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Pb=(e,t)=>t?e===t?!0:Pb(e,t.parentElement):!1,GR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function KR(e){return GR.has(e.tagName)||e.tabIndex!==-1}const Ri=new WeakSet;function Xm(e){return t=>{t.key==="Enter"&&e(t)}}function Lc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Xm(()=>{if(Ri.has(n))return;Lc(n,"down");const o=Xm(()=>{Lc(n,"up")}),i=()=>Lc(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 Qm(e){return Cf(e)&&!ib()}function XR(e,t,n={}){const[r,o,i]=Rb(e,n),a=s=>{const l=s.currentTarget;if(!Qm(s)||Ri.has(l))return;Ri.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Qm(f)||!Ri.has(l))&&(Ri.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Pb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>ZR(c,o)),!KR(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Jm(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&&Je.postRender(()=>i(t,xa(t)))}class QR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=XR(t,(n,r)=>(Jm(this.node,r,"Start"),(o,{success:i})=>Jm(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xu=new WeakMap,Vc=new WeakMap,JR=e=>{const t=Xu.get(e.target);t&&t(e)},eP=e=>{e.forEach(JR)};function tP({root:e,...t}){const n=e||document;Vc.has(n)||Vc.set(n,{});const r=Vc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(eP,{root:e,...t})),r[o]}function nP(e,t,n){const r=tP(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}const rP={some:0,all:1};class oP extends yr{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:rP[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=c?u:d;p&&p(l)};return nP(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(iP(t,n))&&this.startObserver()}unmount(){}}function iP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const aP={inView:{Feature:oP},tap:{Feature:QR},focus:{Feature:YR},hover:{Feature:UR}},sP={layout:{ProjectionNode:Cb,MeasureLayout:mb}},Qu={current:null},Ab={current:!1};function lP(){if(Ab.current=!0,!!Yd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Qu.current=e.matches;e.addListener(t),t()}else Qu.current=!1}const cP=[...qx,Nt,dr],uP=e=>cP.find(Wx(e)),ea=new WeakMap;function dP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,No(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,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const eg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ib{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=yf,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=On.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Je.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=al(n),this.isVariantNode=nx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];l[f]!==void 0&&Pt(m)&&m.set(l[f],!1)}}mount(t){this.current=t,ea.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)),Ab.current||lP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qu.current,process.env.NODE_ENV!=="production"&&rl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Wn(this.notifyUpdate),Wn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=eo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Je.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jo){const n=jo[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):mt()}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<eg.length;r++){const o=eg[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=dP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Bx(o)||Ox(o))?o=parseFloat(o):!uP(o)&&dr.test(n)&&(o=Vx(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=sf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new df),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _b extends Ib{constructor(){super(...arguments),this.KeyframeResolver=Ux}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fP(e){return window.getComputedStyle(e)}class Ob extends _b{constructor(){super(...arguments),this.type="html",this.renderInstance=px}readValueFromInstance(t,n){if(eo.has(n))return kC(t,n);{const r=fP(t),o=(Qd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return db(t,n)}build(t,n,r){tf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lf(t,n,r)}}class Mb extends _b{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&fx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(eo.has(n)){const r=Lx(n);return r&&r.default||0}return n=hx.has(n)?n:Xd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Je.postRender(this.updateDimensions)}build(t,n,r){of(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){mx(t,n,r,o)}mount(t){this.isSVGTag=af(t.tagName),super.mount(t)}}const pP=(e,t)=>rf(e)?new Mb(t):new Ob(t,{allowProjection:e!==E.Fragment}),hP=qE({...Nk,...aP,...WR,...sP},pP),pt=sE(hP);function mP(e){return E.useEffect(()=>()=>e(),[])}function Lo(e){const t=bn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Db(e,t){const n=Lo(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>Je.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const gP=e=>e&&typeof e=="object"&&e.mix,vP=e=>gP(e)?e.mix:void 0;function yP(...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=Jx(o,i,{mixer:vP(i[0]),...a});return t?s(r):s}function xP(e){Mi.current=[],e();const t=Db(Mi.current,e);return Mi.current=void 0,t}function bP(e,t,n,r){if(typeof e=="function")return xP(e);const o=typeof t=="function"?t:yP(t,n,r);return Array.isArray(e)?tg(e,o):tg([e],([i])=>o(i))}function tg(e,t){const n=bn(()=>[]);return Db(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function wP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(xf(r),ds);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const SP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function jb(e,t){return Qx(e)?e[SP(0,e.length,t)]:e}function kf(e){return typeof e=="object"&&!Array.isArray(e)}function Nb(e,t,n,r){return typeof e=="string"&&kf(t)?kb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function TP(e,t,n){return e*(t+1)}function ng(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function EP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function CP(e,t,n,r,o,i){EP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:it(o,i,r[a]),easing:jb(n,a)})}function kP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function RP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const PP="easeInOut",AP=20;function IP(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const m=e[f];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,ng(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=ng(d,v.at,u,c));let y=0;const b=(T,w,S,C=0,R=0)=>{const I=_P(T),{delay:A=0,times:O=tb(I),type:N="keyframes",repeat:V,repeatType:P,repeatDelay:_=0,...D}=w;let{ease:F=t.ease||"easeOut",duration:j}=w;const z=typeof A=="function"?A(C,R):A,M=I.length,$=ll(N)?N:o==null?void 0:o[N];if(M<=2&&$){let Z=100;if(M===2&&DP(I)){const L=I[1]-I[0];Z=Math.abs(L)}const U={...D};j!==void 0&&(U.duration=yn(j));const Y=wP(U,Z,$);F=Y.ease,j=Y.duration}j??(j=i);const J=d+z;O.length===1&&O[0]===0&&(O[1]=1);const te=O.length-I.length;if(te>0&&eb(O,te),I.length===1&&I.unshift(null),V){dn(V<AP,"Repeat count too high, must be less than 20"),j=TP(j,V);const Z=[...I],U=[...O];F=Array.isArray(F)?[...F]:[F];const Y=[...F];for(let L=0;L<V;L++){I.push(...Z);for(let W=0;W<Z.length;W++)O.push(U[W]+(L+1)),F.push(W===0?"linear":jb(Y,W-1))}kP(O,V)}const ee=J+j;CP(S,I,F,O,J,ee),y=Math.max(z+j,y),p=Math.max(ee,p)};if(Pt(g)){const T=rg(g,s);b(h,v,og("default",T))}else{const T=Nb(g,h,r,l),w=T.length;for(let S=0;S<w;S++){h=h,v=v;const C=T[S],R=rg(C,s);for(const I in h)b(h[I],OP(v,I),og(I,R),S,w)}}u=d,d+=y}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(RP);const v=[],y=[],b=[];for(let w=0;w<h.length;w++){const{at:S,value:C,easing:R}=h[w];v.push(C),y.push(Wr(0,p,S)),b.push(R||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),b.unshift(PP)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const T=a.get(m);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:b,times:y,...n}}}),a}function rg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function og(e,t){return t[e]||(t[e]=[]),t[e]}function _P(e){return Array.isArray(e)?e:[e]}function OP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const MP=e=>typeof e=="number",DP=e=>e.every(MP);function jP(e,t){return e in t}class NP extends Ib{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(jP(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 mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function FP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=vb(e)?new Mb(t):new Ob(t);n.mount(e),ea.set(e,n)}function LP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new NP(t);n.mount(e),ea.set(e,n)}function VP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!kf(t)}function Fb(e,t,n,r){const o=[];if(VP(e,t))o.push(gb(e,kf(t)&&t.default||t,n&&(n.default||n)));else{const i=Nb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?FP:LP;ea.has(l)||c(l);const u=ea.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Ef(u,{...t,transition:d},{}))}}return o}function $P(e,t,n){const r=[];return IP(e,t,n,{spring:wf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Fb(s,i,a))}),r}function zP(e){return Array.isArray(e)&&e.some(Array.isArray)}function BP(e){function t(n,r,o){let i=[];zP(n)?i=$P(n,r,e):i=Fb(n,r,o,e);const a=new bx(i);return e&&e.animations.push(a),a}return t}function HP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>BP(e));return mP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class WP{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const qP=()=>new WP;function UP(){return bn(qP)}function YP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function GP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:YP(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Uu(r)(l/c)*c}return t+l}}const Lb=E.createContext(null);function KP(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=it(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?UE(e,o,o+i):e}function ZP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>pt[t]),l=[],c=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(m=>d===m.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(QP)},updateOrder:(d,p,f)=>{if(c.current)return;const m=KP(l,d,p,f);l!==m&&(c.current=!0,r(m.map(XP).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Lb.Provider,{value:u,children:e})})}const Vb=E.forwardRef(ZP);function XP(e){return e.value}function QP(e,t){return e.layout.min-t.layout.min}function ig(e,t=0){return Pt(e)?e:Lo(t)}function JP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>pt[r]),c=E.useContext(Lb),u={x:ig(t.x),y:ig(t.y)},d=bP([u.x,u.y],([g,h])=>g||h?1:"unset");dn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return x.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&m(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const $b=E.forwardRef(JP);/**
12
+ `),()=>{document.head.removeChild(f)}},[t]),x.jsx(WT,{isPresent:t,childRef:o,sizeRef:i,children:R.cloneElement(e,{ref:o})})}const UT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(YT),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(qT,{isPresent:n,anchorX:s,children:e})),x.jsx(nl.Provider,{value:d,children:e})};function YT(){return new Map}function Zy(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ma=e=>e.key||"";function Nh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const vr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Zy(a),u=E.useMemo(()=>Nh(e),[e]),d=a&&!l?[]:u.map(Ma),p=E.useRef(!0),f=E.useRef(u),m=bn(()=>new Map),[g,h]=E.useState(u),[v,y]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const S=Ma(v[w]);d.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let S=0;S<v.length;S++){const C=v[S],k=Ma(C);d.includes(k)||(w.splice(S,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),y(Nh(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=E.useContext(Yi);return x.jsx(x.Fragment,{children:v.map(w=>{const S=Ma(w),C=a&&!l?!1:u===v||d.includes(S),k=()=>{if(m.has(S))m.set(S,!0);else return;let I=!0;m.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),y(f.current),a&&(c==null||c()),r&&r())};return x.jsx(UT,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},S)})})},GT=E.createContext(null),Yt=e=>e;let ii=Yt,dn=Yt;process.env.NODE_ENV!=="production"&&(ii=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const KT={useManualTiming:!1},Da=["read","resolveKeyframes","update","preRender","render","postRender"];function ZT(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.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 XT=40;function Xy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Da.reduce((v,y)=>(v[y]=ZT(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,XT),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Da.reduce((v,y)=>{const b=a[y];return v[y]=(T,w=!1,S=!1)=>(n||m(),b.schedule(T,w,S)),v},{}),cancel:v=>{for(let y=0;y<Da.length;y++)a[Da[y]].cancel(v)},state:o,steps:a}}const{schedule:Je,cancel:Wn,state:Mt,steps:Pc}=Xy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);function QT(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function JT(){const e=QT(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Je.postRender(r),[r]),t]}const eE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Fh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(eE);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 Qy=e=>e===!0,tE=e=>Qy(e===!0)||e==="id",nE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Yi),o=E.useContext(GT),[i,a]=JT(),s=E.useRef(null),l=r.id||o;s.current===null&&(tE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Qy(n)&&r.group||Fh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Yi.Provider,{value:c,children:e})},Jy=E.createContext({strict:!1}),Lh={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"]},jo={};for(const e in Lh)jo[e]={isEnabled:t=>Lh[e].some(n=>!!t[n])};function rE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const oE=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 cs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oE.has(e)}let ex=e=>!cs(e);function tx(e){e&&(ex=t=>t.startsWith("on")?!cs(t):e(t))}try{tx(require("@emotion/is-prop-valid").default)}catch{}function iE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ex(o)||n===!0&&cs(o)||!t&&!cs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function aE({children:e,isValidProp:t,...n}){t&&tx(t),n={...E.useContext(Do),...n},n.isStatic=bn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Do.Provider,{value:r,children:e})}const Vh=new Set;function rl(e,t,n){e||Vh.has(t)||(console.warn(t),Vh.add(t))}function sE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gi(e){return typeof e=="string"||Array.isArray(e)}const Gd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kd=["initial",...Gd];function al(e){return il(e.animate)||Kd.some(t=>Gi(e[t]))}function nx(e){return!!(al(e)||e.variants)}function lE(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gi(n)?n:void 0,animate:Gi(r)?r:void 0}}return e.inherit!==!1?t:{}}function cE(e){const{initial:t,animate:n}=lE(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[$h(t),$h(n)])}function $h(e){return Array.isArray(e)?e.join(" "):e}const uE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dE(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):xo(n)&&(n.current=r))},[t])}const{schedule:Zd}=Xy(queueMicrotask,!1),Xd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fE="framerAppearId",rx="data-"+Xd(fE),ox=E.createContext({});function pE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),l=E.useContext(Jy),c=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(ox);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&hE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[rx],h=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Zd.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),h.current=!1))}),p}function hE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ix(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&xo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ix(e){if(e)return e.options.allowProjection!==!1?e.projection:ix(e.parent)}function mE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&rE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:gE(c)},{isStatic:f}=p,m=cE(c),g=r(c,f);if(!f&&Yd){vE(p,e);const h=yE(p);d=h.MeasureLayout,m.visualElement=pE(o,g,p,t,h.ProjectionNode)}return x.jsxs(ol.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,dE(g,m.visualElement,u),g,f,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[uE]=o,l}function gE({layoutId:e}){const t=E.useContext(Yi).id;return t&&e!==void 0?t+"-"+e:e}function vE(e,t){const n=E.useContext(Jy).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?ii(!1,r):dn(!1,r)}}function yE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ax=e=>t=>typeof t=="string"&&t.startsWith(e),Qd=ax("--"),xE=ax("var(--"),Jd=e=>xE(e)?bE.test(e.split("/*")[0].trim()):!1,bE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ki={};function wE(e){for(const t in e)Ki[t]=e[t],Qd(t)&&(Ki[t].isCSSVariable=!0)}const ai=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eo=new Set(ai);function sx(e,{layout:t,layoutId:n}){return eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ki[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),lx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zi={...si,transform:e=>qn(0,1,e)},ja={...si,default:1},ga=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=ga("deg"),_n=ga("%"),we=ga("px"),SE=ga("vh"),TE=ga("vw"),zh={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(e*100)},EE={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},CE={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:ja,scaleX:ja,scaleY:ja,scaleZ:ja,skew:or,skewX:or,skewY:or,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Zi,originX:zh,originY:zh,originZ:we},Bh={...si,transform:Math.round},ef={...EE,...CE,zIndex:Bh,size:we,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Bh},RE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kE=ai.length;function PE(e,t,n){let r="",o=!0;for(let i=0;i<kE;i++){const a=ai[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=lx(s,ef[a]);if(!l){o=!1;const u=RE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function tf(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(eo.has(l)){a=!0;continue}else if(Qd(l)){o[l]=c;continue}else{const u=lx(c,ef[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=PE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const nf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cx(e,t,n){for(const r in t)!Pt(t[r])&&!sx(r,n)&&(e[r]=t[r])}function AE({transformTemplate:e},t){return E.useMemo(()=>{const n=nf();return tf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IE(e,t){const n=e.style||{},r={};return cx(r,n,e),Object.assign(r,AE(e,t)),r}function _E(e,t){const n={},r=IE(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 OE=["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 rf(e){return typeof e!="string"||e.includes("-")?!1:!!(OE.indexOf(e)>-1||/[A-Z]/u.test(e))}const ME={offset:"stroke-dashoffset",array:"stroke-dasharray"},DE={offset:"strokeDashoffset",array:"strokeDasharray"};function jE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ME:DE;e[i.offset]=we.transform(-r);const a=we.transform(t),s=we.transform(n);e[i.array]=`${a} ${s}`}function Hh(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function NE(e,t,n){const r=Hh(t,e.x,e.width),o=Hh(n,e.y,e.height);return`${r} ${o}`}function of(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(tf(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=NE(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&jE(p,a,s,l,!1)}const ux=()=>({...nf(),attrs:{}}),af=e=>typeof e=="string"&&e.toLowerCase()==="svg";function FE(e,t,n,r){const o=E.useMemo(()=>{const i=ux();return of(i,t,af(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};cx(i,e.style,e),o.style={...i,...o.style}}return o}function LE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(rf(n)?FE:_E)(r,i,a,n),c=iE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Wh(e){const t=[{},{}];return e==null||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]=Wh(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]=Wh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Du=e=>Array.isArray(e),VE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),$E=e=>Du(e)?e[e.length-1]||0:e;function es(e){const t=Pt(e)?e.get():e;return VE(t)?t.toValue():t}function zE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:BE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const dx=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>zE(e,t,r,o);return n?i():bn(i)};function BE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=es(i[p]);let{initial:a,animate:s}=e;const l=al(e),c=nx(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"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=sf(e,p[f]);if(m){const{transitionEnd:g,transition:h,...v}=m;for(const y in v){let b=v[y];if(Array.isArray(b)){const T=u?b.length-1:0;b=b[T]}b!==null&&(o[y]=b)}for(const y in g)o[y]=g[y]}}}return o}function lf(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||sx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const HE={useVisualState:dx({scrapeMotionValuesFromProps:lf,createRenderState:nf})};function fx(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function px(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const hx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mx(e,t,n,r){px(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(hx.has(o)?o:Xd(o),t.attrs[o])}function gx(e,t,n){const r=lf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ai.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const qh=["x","y","width","height","cx","cy","r"],WE={useVisualState:dx({scrapeMotionValuesFromProps:gx,createRenderState:ux,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(eo.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<qh.length;s++){const l=qh[s];e[l]!==t[l]&&(a=!0)}a&&Je.read(()=>{fx(n,r),Je.render(()=>{of(r,o,af(n.tagName),e.transformTemplate),mx(n,r)})})}})};function qE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...rf(r)?WE:HE,preloadedFeatures:e,useRender:LE(o),createVisualElement:t,Component:r};return mE(a)}}function Xi(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}function cf(e,t){return e?e[t]||e.default||e:void 0}const vx=new Set(["width","height","top","left","right","bottom",...ai]);function uf(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function UE([...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}class df{constructor(){this.subscriptions=[]}add(t){return uf(this.subscriptions,t),()=>sl(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}}function yx(e,t){return t?e*(1e3/t):0}let ts;function YE(){ts=void 0}const On={now:()=>(ts===void 0&&On.set(Mt.isProcessing||KT.useManualTiming?Mt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(YE)}},Uh=30,GE=e=>!isNaN(parseFloat(e)),Mi={current:void 0};class KE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=On.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=GE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 df);const r=this.events[t].add(n);return t==="change"?()=>{r(),Je.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Mi.current&&Mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Uh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Uh);return yx(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new KE(e,t)}function ZE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function XE(e,t){const n=Xi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=$E(i[a]);ZE(e,a,s)}}function QE(e){return!!(Pt(e)&&e.add)}function ju(e,t){const n=e.getValue("willChange");if(QE(n))return n.add(t)}function xx(e){return e.props[rx]}function ff(e){let t;return()=>(t===void 0&&(t=e()),t)}const JE=ff(()=>window.ScrollTimeline!==void 0);class eC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(JE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bx extends eC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function ll(e){return typeof e=="function"}function Yh(e,t){e.timeline=t,e.onfinish=null}const pf=e=>Array.isArray(e)&&typeof e[0]=="number",tC={linearEasing:void 0};function nC(e,t){const n=ff(e);return()=>{var r;return(r=tC[t])!==null&&r!==void 0?r:n()}}const us=nC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Wr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Sx(e){return!!(typeof e=="function"&&us()||!e||typeof e=="string"&&(e in Nu||us())||pf(e)||Array.isArray(e)&&e.every(Sx))}const Ri=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ri([0,.65,.55,1]),circOut:Ri([.55,0,1,.45]),backIn:Ri([.31,.01,.66,-.59]),backOut:Ri([.33,1.53,.69,.99])};function Tx(e,t){if(e)return typeof e=="function"&&us()?wx(e,t):pf(e)?Ri(e):Array.isArray(e)?e.map(n=>Tx(n,t)||Nu.easeOut):Nu[e]}const Ex=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rC=1e-7,oC=12;function iC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Ex(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>rC&&++s<oC);return a}function va(e,t,n,r){if(e===t&&n===r)return Yt;const o=i=>iC(i,0,1,e,n);return i=>i===0||i===1?i:Ex(o(i),t,r)}const Cx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rx=e=>t=>1-e(1-t),kx=va(.33,1.53,.69,.99),hf=Rx(kx),Px=Cx(hf),Ax=e=>(e*=2)<1?.5*hf(e):.5*(2-Math.pow(2,-10*(e-1))),mf=e=>1-Math.sin(Math.acos(e)),Ix=Rx(mf),_x=Cx(mf),Ox=e=>/^0[^.\s]+$/u.test(e);function aC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ox(e):!0}const Di=e=>Math.round(e*1e5)/1e5,gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sC(e){return e==null}const lC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vf=(e,t)=>n=>!!(typeof n=="string"&&lC.test(n)&&n.startsWith(e)||t&&!sC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Mx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(gf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},cC=e=>qn(0,255,e),Ac={...si,transform:e=>Math.round(cC(e))},Fr={test:vf("rgb","red"),parse:Mx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ac.transform(e)+", "+Ac.transform(t)+", "+Ac.transform(n)+", "+Di(Zi.transform(r))+")"};function uC(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 Fu={test:vf("#"),parse:uC,transform:Fr.transform},bo={test:vf("hsl","hue"),parse:Mx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(Di(t))+", "+_n.transform(Di(n))+", "+Di(Zi.transform(r))+")"},Nt={test:e=>Fr.test(e)||Fu.test(e)||bo.test(e),parse:e=>Fr.test(e)?Fr.parse(e):bo.test(e)?bo.parse(e):Fu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):bo.transform(e)},dC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(dC))===null||n===void 0?void 0:n.length)||0)>0}const Dx="number",jx="color",pC="var",hC="var(",Gh="${}",mC=/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 Qi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(mC,l=>(Nt.test(l)?(r.color.push(i),o.push(jx),n.push(Nt.parse(l))):l.startsWith(hC)?(r.var.push(i),o.push(pC),n.push(l)):(r.number.push(i),o.push(Dx),n.push(parseFloat(l))),++i,Gh)).split(Gh);return{values:n,split:s,indexes:r,types:o}}function Nx(e){return Qi(e).values}function Fx(e){const{split:t,types:n}=Qi(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===Dx?i+=Di(o[a]):s===jx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const gC=e=>typeof e=="number"?0:e;function vC(e){const t=Nx(e);return Fx(e)(t.map(gC))}const dr={test:fC,parse:Nx,createTransformer:Fx,getAnimatableNone:vC},yC=new Set(["brightness","contrast","saturate","opacity"]);function xC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gf)||[];if(!r)return e;const o=n.replace(r,"");let i=yC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const bC=/\b([a-z-]*)\(.*?\)/gu,Lu={...dr,getAnimatableNone:e=>{const t=e.match(bC);return t?t.map(xC).join(" "):e}},wC={...ef,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Lu,WebkitFilter:Lu},Lx=e=>wC[e];function Vx(e,t){let n=Lx(e);return n!==Lu&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SC=new Set(["auto","none","0"]);function TC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!SC.has(i)&&Qi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Vx(n,o)}const Lr=e=>e*180/Math.PI,Vu=e=>{const t=Lr(Math.atan2(e[1],e[0]));return $u(t)},EC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vu,rotateZ:Vu,skewX:e=>Lr(Math.atan(e[1])),skewY:e=>Lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$u=e=>(e=e%360,e<0&&(e+=360),e),Kh=Vu,Zh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zh,scaleY:Xh,scale:e=>(Zh(e)+Xh(e))/2,rotateX:e=>$u(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>$u(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Kh,rotate:Kh,skewX:e=>Lr(Math.atan(e[4])),skewY:e=>Lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qh(e){return e.includes("scale")?1:0}function zu(e,t){if(!e||e==="none")return Qh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=CC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=EC,o=s}if(!o)return Qh(t);const i=r[t],a=o[1].split(",").map(kC);return typeof i=="function"?i(a):a[i]}const RC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return zu(n,t)};function kC(e){return parseFloat(e.trim())}const Jh=e=>e===si||e===we,PC=new Set(["x","y","z"]),AC=ai.filter(e=>!PC.has(e));function IC(e){const t=[];return AC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>zu(t,"x"),y:(e,{transform:t})=>zu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Br=new Set;let Bu=!1,Hu=!1;function $x(){if(Hu){const e=Array.from(Br).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=IC(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])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Hu=!1,Bu=!1,Br.forEach(e=>e.complete()),Br.clear()}function zx(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hu=!0)})}function _C(){zx(),$x()}class yf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Br.add(this),Bu||(Bu=!0,Je.read(zx),Je.resolveKeyframes($x))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Br.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Br.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function MC(e){const t=OC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const DC=4;function Hx(e,t,n=1){dn(n<=DC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=MC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Bx(a)?parseFloat(a):a}return Jd(o)?Hx(o,t,n+1):o}const Wx=e=>t=>t.test(e),jC={test:e=>e==="auto",parse:e=>e},qx=[si,we,_n,or,TE,SE,jC],em=e=>qx.find(Wx(e));class Ux extends yf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Jd(c))){const u=Hx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!vx.has(r)||t.length!==2)return;const[o,i]=t,a=em(o),s=em(i);if(a!==s)if(Jh(a)&&Jh(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)aC(t[o])&&r.push(o);r.length&&TC(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=Fo[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(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const tm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function NC(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 FC(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=tm(o,t),s=tm(i,t);return ii(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:NC(e)||(n==="spring"||ll(n))&&r}const LC=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(LC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const VC=40;class Yx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>VC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&_C(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!FC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ds=2e4;function xf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ds;)t+=n,r=e.next(t);return t>=ds?1/0:t}const it=(e,t,n)=>e+(t-e)*n;function Ic(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 $C({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=Ic(l,s,e+1/3),i=Ic(l,s,e),a=Ic(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function fs(e,t){return n=>n>0?t:e}const _c=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},zC=[Fu,Fr,bo],BC=e=>zC.find(t=>t.test(e));function nm(e){const t=BC(e);if(ii(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===bo&&(n=$C(n)),n}const rm=(e,t)=>{const n=nm(e),r=nm(t);if(!n||!r)return fs(e,t);const o={...n};return i=>(o.red=_c(n.red,r.red,i),o.green=_c(n.green,r.green,i),o.blue=_c(n.blue,r.blue,i),o.alpha=it(n.alpha,r.alpha,i),Fr.transform(o))},HC=(e,t)=>n=>t(e(n)),ya=(...e)=>e.reduce(HC),Wu=new Set(["none","hidden"]);function WC(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qC(e,t){return n=>it(e,t,n)}function bf(e){return typeof e=="number"?qC:typeof e=="string"?Jd(e)?fs:Nt.test(e)?rm:GC:Array.isArray(e)?Gx:typeof e=="object"?Nt.test(e)?rm:UC:fs}function Gx(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>bf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function UC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=bf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function YC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const GC=(e,t)=>{const n=dr.createTransformer(t),r=Qi(e),o=Qi(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?Wu.has(e)&&!o.values.length||Wu.has(t)&&!r.values.length?WC(e,t):ya(Gx(YC(r,o),o.values),n):(ii(!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.`),fs(e,t))};function Kx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):bf(e)(e,t)}const KC=5;function Zx(e,t,n){const r=Math.max(t-KC,0);return yx(n-e(r),t-r)}const ft={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},om=.001;function ZC({duration:e=ft.duration,bounce:t=ft.bounce,velocity:n=ft.velocity,mass:r=ft.mass}){let o,i;ii(e<=yn(ft.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(ft.minDamping,ft.maxDamping,a),e=qn(ft.minDuration,ft.maxDuration,Mn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=qu(c,a),m=Math.exp(-d);return om-p/f*m},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=qu(Math.pow(c,2),a);return(-o(c)+om>0?-1:1)*((p-f)*m)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=QC(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:ft.stiffness,damping:ft.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const XC=12;function QC(e,t,n){let r=n;for(let o=1;o<XC;o++)r=r-e(r)/t(r);return r}function qu(e,t){return e*Math.sqrt(1-t*t)}const JC=["duration","bounce"],eR=["stiffness","damping","mass"];function im(e,t){return t.some(n=>e[n]!==void 0)}function tR(e){let t={velocity:ft.velocity,stiffness:ft.stiffness,damping:ft.damping,mass:ft.mass,isResolvedFromDuration:!1,...e};if(!im(e,eR)&&im(e,JC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ft.mass,stiffness:o,damping:i}}else{const n=ZC(e);t={...t,...n,mass:ft.mass},t.isResolvedFromDuration=!0}return t}function wf(e=ft.visualDuration,t=ft.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=tR({...n,velocity:-Mn(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=Mn(Math.sqrt(l/u)),y=Math.abs(h)<5;r||(r=y?ft.restSpeed.granular:ft.restSpeed.default),o||(o=y?ft.restDelta.granular:ft.restDelta.default);let b;if(g<1){const w=qu(v,g);b=S=>{const C=Math.exp(-g*v*S);return a-C*((m+g*v*h)/w*Math.sin(w*S)+h*Math.cos(w*S))}}else if(g===1)b=w=>a-Math.exp(-v*w)*(h+(m+v*h)*w);else{const w=v*Math.sqrt(g*g-1);b=S=>{const C=Math.exp(-g*v*S),k=Math.min(w*S,300);return a-C*((m+g*v*h)*Math.sinh(k)+w*h*Math.cosh(k))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const S=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?yn(m):Zx(b,w,S));const k=Math.abs(C)<=r,I=Math.abs(a-S)<=o;s.done=k&&I}return s.value=s.done?a:S,s},toString:()=>{const w=Math.min(xf(T),ds),S=wx(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function am({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=k=>s!==void 0&&k<s||l!==void 0&&k>l,m=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,v=a===void 0?h:a(h);v!==h&&(g=v-d);const y=k=>-g*Math.exp(-k/r),b=k=>v+y(k),T=k=>{const I=y(k),A=b(k);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let w,S;const C=k=>{f(p.value)&&(w=k,S=wf({keyframes:[p.value,m(p.value)],velocity:Zx(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!S&&w===void 0&&(I=!0,T(k),C(k)),w!==void 0&&k>=w?S.next(k-w):(!I&&T(k),p)}}}const nR=va(.42,0,1,1),rR=va(0,0,.58,1),Xx=va(.42,0,.58,1),Qx=e=>Array.isArray(e)&&typeof e[0]!="number",sm={linear:Yt,easeIn:nR,easeInOut:Xx,easeOut:rR,circIn:mf,circInOut:_x,circOut:Ix,backIn:hf,backInOut:Px,backOut:kx,anticipate:Ax},Uu=e=>{if(pf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return va(t,n,r,o)}else if(typeof e=="string")return dn(sm[e]!==void 0,`Invalid easing type '${e}'`),sm[e];return e};function oR(e,t,n){const r=[],o=n||Kx,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]||Yt:t;s=ya(l,s)}r.push(s)}return r}function Jx(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"),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=oR(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Wr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(qn(e[0],e[i-1],u)):c}function eb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(it(n,1,o))}}function tb(e){const t=[0];return eb(t,e.length-1),t}function iR(e,t){return e.map(n=>n*t)}function aR(e,t){return e.map(()=>t||Xx).splice(0,e.length-1)}function ji({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Qx(r)?r.map(Uu):Uu(r),i={done:!1,value:t[0]},a=iR(n&&n.length===t.length?n:tb(t),e),s=Jx(a,t,{ease:Array.isArray(o)?o:aR(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const sR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Je.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:On.now()}},lR={decay:am,inertia:am,tween:ji,keyframes:ji,spring:wf},cR=e=>e/100;class Sf extends Yx{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||yf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:lR[n]||ji;let l,c;process.env.NODE_ENV!=="production"&&s!==ji&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==ji&&typeof t[0]!="number"&&(l=ya(cR,Kx(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=xf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,T=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(A=1-A,g&&(A-=g/d)):m==="mirror"&&(T=a)),b=qn(0,1,A)*d}const w=y?{done:!1,value:l[0]}:T.next(b);s&&(w.value=s(w.value));let{done:S}=w;!y&&c!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&o!==void 0&&(w.value=cl(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=sR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const uR=new Set(["opacity","clipPath","filter","transform"]);function dR(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Tx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const fR=ff(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ps=10,pR=2e4;function hR(e){return ll(e.type)||e.type==="spring"||!Sx(e.ease)}function mR(e,t){const n=new Sf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<pR;)r=n.sample(i),o.push(r.value),i+=ps;return{times:void 0,keyframes:o,duration:i-ps,ease:"linear"}}const nb={anticipate:Ax,backInOut:Px,circInOut:_x};function gR(e){return e in nb}class lm extends Yx{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Ux(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&us()&&gR(i)&&(i=nb[i]),hR(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=mR(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=dR(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Yh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Yt;const{animation:r}=n;Yh(r,t)}return Yt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new Sf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=yn(this.time);c.setWithVelocity(m.sample(g-ps).value,m.sample(g).value,ps)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return fR()&&r&&uR.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const vR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xR={type:"keyframes",duration:.8},bR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?xR:eo.has(e)?e.startsWith("scale")?yR(t[1]):vR:bR;function SR({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 Tf=(e,t,n,r={},o,i)=>a=>{const s=cf(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};SR(s)||(u={...u,...wR(e,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return Je.update(()=>{u.onUpdate(p),u.onComplete()}),new bx([])}return!i&&lm.supports(u)?new lm(u):new Sf(u)};function TR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ef(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&TR(u,d))continue;const m={delay:n,...cf(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=xx(e);if(v){const y=window.MotionHandoffAnimation(v,d,Je);y!==null&&(m.startTime=y,g=!0)}}ju(e,d),p.start(Tf(d,p,f,e.shouldReduceMotion&&vx.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{Je.update(()=>{s&&XE(e,s)})}),c}function Yu(e,t,n={}){var r;const o=Xi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Ef(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return ER(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function ER(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(CR).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Yu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function CR(e,t){return e.sortNodePosition(t)}function RR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Yu(e,t,n);else{const o=typeof t=="function"?Xi(e,t,n.custom):t;r=Promise.all(Ef(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function rb(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 kR=Kd.length;function ob(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ob(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=Kd[n],o=e.props[r];(Gi(o)||o===!1)&&(t[r]=o)}return t}const PR=[...Gd].reverse(),AR=Gd.length;function IR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>RR(e,n,r)))}function _R(e){let t=IR(e),n=cm(),r=!0;const o=l=>(c,u)=>{var d;const p=Xi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=ob(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<AR;h++){const v=PR[h],y=n[v],b=c[v]!==void 0?c[v]:u[v],T=Gi(b),w=v===l?y.isActive:null;w===!1&&(m=h);let S=b===u[v]&&b!==c[v]&&T;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...f},!y.isActive&&w===null||!b&&!y.prevProp||il(b)||typeof b=="boolean")continue;const C=OR(y.prevProp,b);let k=C||v===l&&y.isActive&&!S&&T||h>m&&T,I=!1;const A=Array.isArray(b)?b:[b];let O=A.reduce(o(v),{});w===!1&&(O={});const{prevResolvedValues:N={}}=y,V={...N,...O},P=F=>{k=!0,p.has(F)&&(I=!0,p.delete(F)),y.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in V){const j=O[F],z=N[F];if(f.hasOwnProperty(F))continue;let M=!1;Du(j)&&Du(z)?M=!rb(j,z):M=j!==z,M?j!=null?P(F):p.add(F):j!==void 0&&p.has(F)?P(F):y.protectedKeys[F]=!0}y.prevProp=b,y.prevResolvedValues=O,y.isActive&&(f={...f,...O}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(S&&C)||I)&&d.push(...A.map(F=>({animation:F,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Xi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),h[v]=y??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=cm(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rb(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cm(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class yr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class MR extends yr{constructor(t){super(t),t.animationState||(t.animationState=_R(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let DR=0;class jR extends yr{constructor(){super(...arguments),this.id=DR++}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 NR={animation:{Feature:MR},exit:{Feature:jR}},mn={x:!1,y:!1};function ib(){return mn.x||mn.y}function FR(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Ji(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Cf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xa(e){return{point:{x:e.pageX,y:e.pageY}}}const LR=e=>t=>Cf(t)&&e(t,xa(t));function Ni(e,t,n,r){return Ji(e,t,LR(n),r)}function ab({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function VR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $R(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const sb=1e-4,zR=1-sb,BR=1+sb,lb=.01,HR=0-lb,WR=0+lb;function zt(e){return e.max-e.min}function qR(e,t,n){return Math.abs(e-t)<=n}function um(e,t,n,r=.5){e.origin=r,e.originPoint=it(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zR&&e.scale<=BR||isNaN(e.scale))&&(e.scale=1),(e.translate>=HR&&e.translate<=WR||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){um(e.x,t.x,n.x,r?r.originX:void 0),um(e.y,t.y,n.y,r?r.originY:void 0)}function dm(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function UR(e,t,n){dm(e.x,t.x,n.x),dm(e.y,t.y,n.y)}function fm(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Li(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}const pm=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:pm(),y:pm()}),hm=()=>({min:0,max:0}),mt=()=>({x:hm(),y:hm()});function an(e){return[e("x"),e("y")]}function Oc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Oc(e)||!Oc(t)||!Oc(n)}function _r(e){return Gu(e)||cb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cb(e){return mm(e.x)||mm(e.y)}function mm(e){return e&&e!=="0%"}function hs(e,t,n){const r=e-n,o=t*r;return n+o}function gm(e,t,n,r,o){return o!==void 0&&(e=hs(e,o,r)),hs(e,n,r)+t}function Ku(e,t=0,n=1,r,o){e.min=gm(e.min,t,n,r,o),e.max=gm(e.max,t,n,r,o)}function ub(e,{x:t,y:n}){Ku(e.x,t.translate,t.scale,t.originPoint),Ku(e.y,n.translate,n.scale,n.originPoint)}const vm=.999999999999,ym=1.0000000000001;function YR(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&&To(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,ub(e,a)),r&&_r(i.latestValues)&&To(e,i.latestValues))}t.x<ym&&t.x>vm&&(t.x=1),t.y<ym&&t.y>vm&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function xm(e,t,n,r,o=.5){const i=it(e.min,e.max,o);Ku(e,t,n,i,r)}function To(e,t){xm(e.x,t.x,t.scaleX,t.scale,t.originX),xm(e.y,t.y,t.scaleY,t.scale,t.originY)}function db(e,t){return ab($R(e.getBoundingClientRect(),t))}function GR(e,t,n){const r=db(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const fb=({current:e})=>e?e.ownerDocument.defaultView:null,bm=(e,t)=>Math.abs(e-t);function KR(e,t){const n=bm(e.x,t.x),r=bm(e.y,t.y);return Math.sqrt(n**2+r**2)}class pb{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Dc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=KR(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Mt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mc(p,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Dc(d.type==="pointercancel"?this.lastMoveEventInfo:Mc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Cf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=xa(t),s=Mc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Dc(s,this.history)),this.removeListeners=ya(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Mc(e,t){return t?{point:t(e.point)}:e}function wm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Dc({point:e},t){return{point:e,delta:wm(e,hb(t)),offset:wm(e,ZR(t)),velocity:XR(t,.1)}}function ZR(e){return e[0]}function hb(e){return e[e.length-1]}function XR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=hb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function QR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?it(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?it(n,e,r.max):Math.min(e,n)),e}function Sm(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 JR(e,{top:t,left:n,bottom:r,right:o}){return{x:Sm(e.x,n,o),y:Sm(e.y,t,r)}}function Tm(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 ek(e,t){return{x:Tm(e.x,t.x),y:Tm(e.y,t.y)}}function tk(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),qn(0,1,n)}function nk(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 Zu=.35;function rk(e=Zu){return e===!1?e=0:e===!0&&(e=Zu),{x:Em(e,"left","right"),y:Em(e,"top","bottom")}}function Em(e,t,n){return{min:Cm(e,t),max:Cm(e,n)}}function Cm(e,t){return typeof e=="number"?e:e[t]||0}const ok=new WeakMap;class ik{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=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xa(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=FR(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(h=>{let v=this.getAxisMotionValue(h).get()||0;if(_n.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[h];b&&(v=zt(b)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Je.postRender(()=>m(u,d)),ju(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=ak(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>an(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new pb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:fb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Je.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Na(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=QR(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&xo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=JR(o.layoutBox,n):this.constraints=!1,this.elastic=rk(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=nk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(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.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=GR(r,o.root,this.visualElement.getTransformPagePoint());let a=ek(o.layout.layoutBox,i);if(n){const s=n(VR(a));this.hasMutatedConstraints=!!s,s&&(a=ab(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=an(u=>{if(!Na(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ju(this.visualElement,t),r.start(Tf(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.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){an(n=>{const{drag:r}=this.getProps();if(!Na(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-it(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=tk({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(),an(a=>{if(!Na(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(it(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;ok.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();xo(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()),Je.read(r);const a=Ji(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(an(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=Zu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Na(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ak(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sk extends yr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new ik(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Rm=e=>(t,n)=>{e&&Je.postRender(()=>e(t,n))};class lk extends yr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new pb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Rm(t),onStart:Rm(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Je.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function km(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=km(e,t.target.x),r=km(e,t.target.y);return`${n}% ${r}%`}},ck={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=it(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class uk extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;wE(dk),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Je.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mb(e){const[t,n]=Zy(),r=E.useContext(Yi);return x.jsx(uk,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(ox),isPresent:t,safeToRemove:n})}const dk={borderRadius:{...wi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wi,borderTopRightRadius:wi,borderBottomLeftRadius:wi,borderBottomRightRadius:wi,boxShadow:ck};function gb(e,t,n){const r=Pt(e)?e:No(e);return r.start(Tf("",r,t,n)),r.animation}function vb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const fk=(e,t)=>e.depth-t.depth;class pk{constructor(){this.children=[],this.isDirty=!1}add(t){uf(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fk),this.isDirty=!1,this.children.forEach(t)}}function hk(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return Je.read(r,!0),()=>Wn(r)}const yb=["TopLeft","TopRight","BottomLeft","BottomRight"],mk=yb.length,Pm=e=>typeof e=="string"?parseFloat(e):e,Am=e=>typeof e=="number"||we.test(e);function gk(e,t,n,r,o,i){o?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,vk(r)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,yk(r))):i&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<mk;a++){const s=`border${yb[a]}Radius`;let l=Im(t,s),c=Im(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Am(l)===Am(c)?(e[s]=Math.max(it(Pm(l),Pm(c),r),0),(_n.test(c)||_n.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,r))}function Im(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const vk=xb(0,.5,Ix),yk=xb(.5,.95,Yt);function xb(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function _m(e,t){e.min=t.min,e.max=t.max}function rn(e,t){_m(e.x,t.x),_m(e.y,t.y)}function Om(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Mm(e,t,n,r,o){return e-=t,e=hs(e,1/n,r),o!==void 0&&(e=hs(e,1/o,r)),e}function xk(e,t=0,n=1,r=.5,o,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=it(i.min,i.max,r);e===i&&(s-=t),e.min=Mm(e.min,t,n,s,o),e.max=Mm(e.max,t,n,s,o)}function Dm(e,t,[n,r,o],i,a){xk(e,t[n],t[r],t[o],t.scale,i,a)}const bk=["x","scaleX","originX"],wk=["y","scaleY","originY"];function jm(e,t,n,r){Dm(e.x,t,bk,n?n.x:void 0,r?r.x:void 0),Dm(e.y,t,wk,n?n.y:void 0,r?r.y:void 0)}function Nm(e){return e.translate===0&&e.scale===1}function bb(e){return Nm(e.x)&&Nm(e.y)}function Fm(e,t){return e.min===t.min&&e.max===t.max}function Sk(e,t){return Fm(e.x,t.x)&&Fm(e.y,t.y)}function Lm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wb(e,t){return Lm(e.x,t.x)&&Lm(e.y,t.y)}function Vm(e){return zt(e.x)/zt(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Tk{constructor(){this.members=[]}add(t){uf(this.members,t),t.scheduleRender()}remove(t){if(sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ek(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),m&&(r+=`skewY(${m}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 jc=["","X","Y","Z"],Ck={visibility:"hidden"},zm=1e3;let Rk=0;function Nc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Sb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Je,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Sb(r)}function Tb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Rk++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ak),this.nodes.forEach(Dk),this.nodes.forEach(jk),this.nodes.forEach(Ik)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new pk)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new df),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,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=vb(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=hk(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Hm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||$k,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!wb(this.targetLayout,m),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...cf(g,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else p||Hm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Wn(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(Nk),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&&Sb(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(Bm);return}this.isUpdating||this.nodes.forEach(Ok),this.isUpdating=!1,this.nodes.forEach(Mk),this.nodes.forEach(kk),this.nodes.forEach(Pk),this.clearAllSnapshots();const s=On.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Pc.update.process(Mt),Pc.preRender.process(Mt),Pc.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_k),this.sharedNodes.forEach(Fk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),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){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&&!bb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||_r(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)),zk(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return mt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(Bk))){const{scroll:u}=this.root;u&&(So(l.x,u.offset.x),So(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=mt();if(rn(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(l,a),So(l.x,d.offset.x),So(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=mt();rn(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&&To(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),_r(u.latestValues)&&To(l,u.latestValues)}return _r(this.latestValues)&&To(l,this.latestValues),l}removeTransform(a){const s=mt();rn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!_r(c.latestValues))continue;Gu(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();rn(u,d),jm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return _r(this.latestValues)&&jm(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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),UR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),ub(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||cb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;YR(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=mt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Om(this.prevProjectionDelta.x,this.projectionDelta.x),Om(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!$m(this.projectionDelta.x,this.prevProjectionDelta.x)||!$m(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wo(),this.projectionDelta=wo(),this.projectionDeltaWithTransform=wo()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=wo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=mt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),v=!h||h.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(Vk));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const w=T/1e3;Wm(d.x,a.x,w),Wm(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lk(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&Sk(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=mt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,gk(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=gb(0,zm,{...a,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(zm),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&&Eb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();const d=zt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=zt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}rn(s,l),To(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Tk),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(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.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&&Nc("z",a,c,this.animationValues);for(let u=0;u<jc.length;u++)Nc(`rotate${jc[u]}`,a,c,this.animationValues),Nc(`skew${jc[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ck;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=es(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=es(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!_r(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Ek(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Ki){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:y}=Ki[g],b=c.transform==="none"?p[g]:h(p[g],d);if(v){const T=v.length;for(let w=0;w<T;w++)c[v[w]]=b}else y?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?es(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Bm),this.root.sharedNodes.clear()}}}function kk(e){e.updateLayout()}function Pk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Eb(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=wo();Fi(s,r,n.layoutBox);const l=wo();a?Fi(l,e.applyTransform(o,!0),n.measuredBox):Fi(l,r,n.layoutBox);const c=!bb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const m=mt();Li(m,n.layoutBox,p.layoutBox);const g=mt();Li(g,r,f.layoutBox),wb(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Ak(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 Ik(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _k(e){e.clearSnapshot()}function Bm(e){e.clearMeasurements()}function Ok(e){e.isLayoutDirty=!1}function Mk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Dk(e){e.resolveTargetDelta()}function jk(e){e.calcProjection()}function Nk(e){e.resetSkewAndRotation()}function Fk(e){e.removeLeadSnapshot()}function Wm(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qm(e,t,n,r){e.min=it(t.min,n.min,r),e.max=it(t.max,n.max,r)}function Lk(e,t,n,r){qm(e.x,t.x,n.x,r),qm(e.y,t.y,n.y,r)}function Vk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $k={duration:.45,ease:[.4,0,.1,1]},Um=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ym=Um("applewebkit/")&&!Um("chrome/")?Math.round:Yt;function Gm(e){e.min=Ym(e.min),e.max=Ym(e.max)}function zk(e){Gm(e.x),Gm(e.y)}function Eb(e,t,n){return e==="position"||e==="preserve-aspect"&&!qR(Vm(t),Vm(n),.2)}function Bk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Hk=Tb({attachResizeListener:(e,t)=>Ji(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fc={current:void 0},Cb=Tb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fc.current){const e=new Hk({});e.mount(window),e.setOptions({layoutScroll:!0}),Fc.current=e}return Fc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Wk={pan:{Feature:lk},drag:{Feature:sk,ProjectionNode:Cb,MeasureLayout:mb}};function Rb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function kb(e,t){const n=Rb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Km(e){return!(e.pointerType==="touch"||ib())}function qk(e,t,n={}){const[r,o,i]=kb(e,n),a=s=>{if(!Km(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Km(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Zm(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&&Je.postRender(()=>i(t,xa(t)))}class Uk extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=qk(t,(n,r)=>(Zm(this.node,r,"Start"),o=>Zm(this.node,o,"End"))))}unmount(){}}class Yk extends yr{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=ya(Ji(this.node.current,"focus",()=>this.onFocus()),Ji(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Pb=(e,t)=>t?e===t?!0:Pb(e,t.parentElement):!1,Gk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Kk(e){return Gk.has(e.tagName)||e.tabIndex!==-1}const ki=new WeakSet;function Xm(e){return t=>{t.key==="Enter"&&e(t)}}function Lc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Zk=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Xm(()=>{if(ki.has(n))return;Lc(n,"down");const o=Xm(()=>{Lc(n,"up")}),i=()=>Lc(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 Qm(e){return Cf(e)&&!ib()}function Xk(e,t,n={}){const[r,o,i]=kb(e,n),a=s=>{const l=s.currentTarget;if(!Qm(s)||ki.has(l))return;ki.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Qm(f)||!ki.has(l))&&(ki.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Pb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>Zk(c,o)),!Kk(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Jm(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&&Je.postRender(()=>i(t,xa(t)))}class Qk extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=Xk(t,(n,r)=>(Jm(this.node,r,"Start"),(o,{success:i})=>Jm(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xu=new WeakMap,Vc=new WeakMap,Jk=e=>{const t=Xu.get(e.target);t&&t(e)},eP=e=>{e.forEach(Jk)};function tP({root:e,...t}){const n=e||document;Vc.has(n)||Vc.set(n,{});const r=Vc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(eP,{root:e,...t})),r[o]}function nP(e,t,n){const r=tP(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}const rP={some:0,all:1};class oP extends yr{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:rP[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=c?u:d;p&&p(l)};return nP(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(iP(t,n))&&this.startObserver()}unmount(){}}function iP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const aP={inView:{Feature:oP},tap:{Feature:Qk},focus:{Feature:Yk},hover:{Feature:Uk}},sP={layout:{ProjectionNode:Cb,MeasureLayout:mb}},Qu={current:null},Ab={current:!1};function lP(){if(Ab.current=!0,!!Yd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Qu.current=e.matches;e.addListener(t),t()}else Qu.current=!1}const cP=[...qx,Nt,dr],uP=e=>cP.find(Wx(e)),ea=new WeakMap;function dP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,No(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,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const eg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ib{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=yf,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=On.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Je.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=al(n),this.isVariantNode=nx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];l[f]!==void 0&&Pt(m)&&m.set(l[f],!1)}}mount(t){this.current=t,ea.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)),Ab.current||lP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qu.current,process.env.NODE_ENV!=="production"&&rl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Wn(this.notifyUpdate),Wn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=eo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Je.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jo){const n=jo[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):mt()}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<eg.length;r++){const o=eg[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=dP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Bx(o)||Ox(o))?o=parseFloat(o):!uP(o)&&dr.test(n)&&(o=Vx(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=sf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new df),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _b extends Ib{constructor(){super(...arguments),this.KeyframeResolver=Ux}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fP(e){return window.getComputedStyle(e)}class Ob extends _b{constructor(){super(...arguments),this.type="html",this.renderInstance=px}readValueFromInstance(t,n){if(eo.has(n))return RC(t,n);{const r=fP(t),o=(Qd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return db(t,n)}build(t,n,r){tf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lf(t,n,r)}}class Mb extends _b{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&fx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(eo.has(n)){const r=Lx(n);return r&&r.default||0}return n=hx.has(n)?n:Xd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Je.postRender(this.updateDimensions)}build(t,n,r){of(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){mx(t,n,r,o)}mount(t){this.isSVGTag=af(t.tagName),super.mount(t)}}const pP=(e,t)=>rf(e)?new Mb(t):new Ob(t,{allowProjection:e!==E.Fragment}),hP=qE({...NR,...aP,...Wk,...sP},pP),pt=sE(hP);function mP(e){return E.useEffect(()=>()=>e(),[])}function Lo(e){const t=bn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Db(e,t){const n=Lo(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>Je.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const gP=e=>e&&typeof e=="object"&&e.mix,vP=e=>gP(e)?e.mix:void 0;function yP(...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=Jx(o,i,{mixer:vP(i[0]),...a});return t?s(r):s}function xP(e){Mi.current=[],e();const t=Db(Mi.current,e);return Mi.current=void 0,t}function bP(e,t,n,r){if(typeof e=="function")return xP(e);const o=typeof t=="function"?t:yP(t,n,r);return Array.isArray(e)?tg(e,o):tg([e],([i])=>o(i))}function tg(e,t){const n=bn(()=>[]);return Db(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function wP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(xf(r),ds);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const SP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function jb(e,t){return Qx(e)?e[SP(0,e.length,t)]:e}function Rf(e){return typeof e=="object"&&!Array.isArray(e)}function Nb(e,t,n,r){return typeof e=="string"&&Rf(t)?Rb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function TP(e,t,n){return e*(t+1)}function ng(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function EP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function CP(e,t,n,r,o,i){EP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:it(o,i,r[a]),easing:jb(n,a)})}function RP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function kP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const PP="easeInOut",AP=20;function IP(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const m=e[f];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,ng(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=ng(d,v.at,u,c));let y=0;const b=(T,w,S,C=0,k=0)=>{const I=_P(T),{delay:A=0,times:O=tb(I),type:N="keyframes",repeat:V,repeatType:P,repeatDelay:_=0,...D}=w;let{ease:F=t.ease||"easeOut",duration:j}=w;const z=typeof A=="function"?A(C,k):A,M=I.length,$=ll(N)?N:o==null?void 0:o[N];if(M<=2&&$){let Z=100;if(M===2&&DP(I)){const L=I[1]-I[0];Z=Math.abs(L)}const U={...D};j!==void 0&&(U.duration=yn(j));const Y=wP(U,Z,$);F=Y.ease,j=Y.duration}j??(j=i);const J=d+z;O.length===1&&O[0]===0&&(O[1]=1);const te=O.length-I.length;if(te>0&&eb(O,te),I.length===1&&I.unshift(null),V){dn(V<AP,"Repeat count too high, must be less than 20"),j=TP(j,V);const Z=[...I],U=[...O];F=Array.isArray(F)?[...F]:[F];const Y=[...F];for(let L=0;L<V;L++){I.push(...Z);for(let W=0;W<Z.length;W++)O.push(U[W]+(L+1)),F.push(W===0?"linear":jb(Y,W-1))}RP(O,V)}const ee=J+j;CP(S,I,F,O,J,ee),y=Math.max(z+j,y),p=Math.max(ee,p)};if(Pt(g)){const T=rg(g,s);b(h,v,og("default",T))}else{const T=Nb(g,h,r,l),w=T.length;for(let S=0;S<w;S++){h=h,v=v;const C=T[S],k=rg(C,s);for(const I in h)b(h[I],OP(v,I),og(I,k),S,w)}}u=d,d+=y}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(kP);const v=[],y=[],b=[];for(let w=0;w<h.length;w++){const{at:S,value:C,easing:k}=h[w];v.push(C),y.push(Wr(0,p,S)),b.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),b.unshift(PP)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const T=a.get(m);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:b,times:y,...n}}}),a}function rg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function og(e,t){return t[e]||(t[e]=[]),t[e]}function _P(e){return Array.isArray(e)?e:[e]}function OP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const MP=e=>typeof e=="number",DP=e=>e.every(MP);function jP(e,t){return e in t}class NP extends Ib{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(jP(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 mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function FP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=vb(e)?new Mb(t):new Ob(t);n.mount(e),ea.set(e,n)}function LP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new NP(t);n.mount(e),ea.set(e,n)}function VP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Rf(t)}function Fb(e,t,n,r){const o=[];if(VP(e,t))o.push(gb(e,Rf(t)&&t.default||t,n&&(n.default||n)));else{const i=Nb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?FP:LP;ea.has(l)||c(l);const u=ea.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Ef(u,{...t,transition:d},{}))}}return o}function $P(e,t,n){const r=[];return IP(e,t,n,{spring:wf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Fb(s,i,a))}),r}function zP(e){return Array.isArray(e)&&e.some(Array.isArray)}function BP(e){function t(n,r,o){let i=[];zP(n)?i=$P(n,r,e):i=Fb(n,r,o,e);const a=new bx(i);return e&&e.animations.push(a),a}return t}function HP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>BP(e));return mP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class WP{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const qP=()=>new WP;function UP(){return bn(qP)}function YP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function GP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:YP(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Uu(r)(l/c)*c}return t+l}}const Lb=E.createContext(null);function KP(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=it(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?UE(e,o,o+i):e}function ZP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>pt[t]),l=[],c=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(m=>d===m.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(QP)},updateOrder:(d,p,f)=>{if(c.current)return;const m=KP(l,d,p,f);l!==m&&(c.current=!0,r(m.map(XP).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Lb.Provider,{value:u,children:e})})}const Vb=E.forwardRef(ZP);function XP(e){return e.value}function QP(e,t){return e.layout.min-t.layout.min}function ig(e,t=0){return Pt(e)?e:Lo(t)}function JP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>pt[r]),c=E.useContext(Lb),u={x:ig(t.x),y:ig(t.y)},d=bP([u.x,u.y],([g,h])=>g||h?1:"unset");dn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return x.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&m(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const $b=E.forwardRef(JP);/**
13
13
  * @license lucide-react v0.485.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -54,7 +54,7 @@
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const dA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rf=Et("chevron-down",dA);/**
57
+ */const dA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kf=Et("chevron-down",dA);/**
58
58
  * @license lucide-react v0.485.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
@@ -104,12 +104,12 @@
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const CA=[["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"}]],kA=Et("search-check",CA);/**
107
+ */const CA=[["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"}]],RA=Et("search-check",CA);/**
108
108
  * @license lucide-react v0.485.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const RA=[["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"}]],PA=Et("search-x",RA);/**
112
+ */const kA=[["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"}]],PA=Et("search-x",kA);/**
113
113
  * @license lucide-react v0.485.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
@@ -134,7 +134,7 @@
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const NA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ul=Et("x",NA),sg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},FA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Ub=e=>x.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sg,exit:sg.false,transition:FA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:je("aria-hidden:pointer-events-none",e.className),children:e.children}),LA=ti("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"}}),VA=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:je("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Ub,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:je(LA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Hb,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(qb,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(_A,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(ul,{size:20})}):null]})})})}),Yb=6048e5,$A=864e5,zA=6e4,BA=36e5,HA=1e3,lg=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&lg in e?e[lg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ze(e,t){return rt(t||e,e)}function dl(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(t)?rt((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Gb(e,t,n){const r=Ze(e,n==null?void 0:n.in);if(isNaN(t))return rt(e,NaN);if(!t)return r;const o=r.getDate(),i=rt(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 Eo(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=Ze(e,n==null?void 0:n.in),d=o||r?Gb(u,o+r*12):u,p=a||i?dl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return rt(e,+p+g)}let WA={};function to(){return WA}function jn(e,t){var s,l,c,u;const n=to(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 $o(e,t){return jn(e,{...t,weekStartsOn:1})}function Kb(e,t){const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=rt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=$o(o),a=rt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=$o(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ms(e){const t=Ze(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 fl(e,...t){const n=rt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function zo(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function qA(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t),i=zo(r),a=zo(o),s=+i-ms(i),l=+a-ms(a);return Math.round((s-l)/$A)}function UA(e,t){const n=Kb(e,t),r=rt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),$o(r)}function YA(e){return rt(e,Date.now())}function GA(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t);return+zo(r)==+zo(o)}function KA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zb(e){return!(!KA(e)&&typeof e!="number"||isNaN(+Ze(e)))}function ZA(e,t){const[n,r]=fl(e,t.start,t.end);return{start:n,end:r}}function Xb(e,t){const{start:n,end:r}=ZA(t==null?void 0: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(rt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Qb(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function XA(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function QA(e,t){var s,l;const n=to(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 JA={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"}},eI=(e,t,n)=>{let r;const o=JA[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $c(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oI={date:$c({formats:tI,defaultWidth:"full"}),time:$c({formats:nI,defaultWidth:"full"}),dateTime:$c({formats:rI,defaultWidth:"full"})},iI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aI=(e,t,n,r)=>iI[e];function Si(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&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 sI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cI={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"]},uI={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"]},dI={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"}},fI={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"}},pI=(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"},hI={ordinalNumber:pI,era:Si({values:sI,defaultWidth:"wide"}),quarter:Si({values:lI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Si({values:cI,defaultWidth:"wide"}),day:Si({values:uI,defaultWidth:"wide"}),dayPeriod:Si({values:dI,defaultWidth:"wide",formattingValues:fI,defaultFormattingWidth:"wide"})};function Ti(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)?gI(s,d=>d.test(a)):mI(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 mI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function gI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function vI(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 yI=/^(\d+)(th|st|nd|rd)?/i,xI=/\d+/i,bI={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},wI={any:[/^b/i,/^(a|c)/i]},SI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},TI={any:[/1/i,/2/i,/3/i,/4/i]},EI={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},CI={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]},kI={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},RI={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]},PI={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},AI={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}},II={ordinalNumber:vI({matchPattern:yI,parsePattern:xI,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:bI,defaultMatchWidth:"wide",parsePatterns:wI,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:SI,defaultMatchWidth:"wide",parsePatterns:TI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:EI,defaultMatchWidth:"wide",parsePatterns:CI,defaultParseWidth:"any"}),day:Ti({matchPatterns:kI,defaultMatchWidth:"wide",parsePatterns:RI,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:PI,defaultMatchWidth:"any",parsePatterns:AI,defaultParseWidth:"any"})},Jb={code:"en-US",formatDistance:eI,formatLong:oI,formatRelative:aI,localize:hI,match:II,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _I(e,t){const n=Ze(e,t==null?void 0:t.in);return qA(n,XA(n))+1}function e0(e,t){const n=Ze(e,t==null?void 0:t.in),r=+$o(n)-+UA(n);return Math.round(r/Yb)+1}function If(e,t){var u,d,p,f;const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=to(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=rt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=jn(a,t),l=rt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function OI(e,t){var s,l,c,u;const n=to(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=If(e,t),i=rt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function t0(e,t){const n=Ze(e,t==null?void 0:t.in),r=+jn(n,t)-+OI(n,t);return Math.round(r/Yb)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ge(o,t.length)}},po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=If(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ge(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ge(i,t.length)},R:function(e,t){const n=Kb(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(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 Ge(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ge(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ge(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=t0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=e0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=_I(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ge(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ge(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ge(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=po.noon:r===0?o=po.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=po.evening:r>=12?o=po.afternoon:r>=4?o=po.morning:o=po.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return dg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ug(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ug(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function ug(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+Ge(i,2)}function dg(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ge(Math.trunc(r/60),2),i=Ge(r%60,2);return n+o+t+i}const fg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},n0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},MI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",fg(r,t)).replace("{{time}}",n0(o,t))},Ju={p:n0,P:MI},DI=/^D+$/,jI=/^Y+$/,NI=["D","DD","YY","YYYY"];function r0(e){return DI.test(e)}function o0(e){return jI.test(e)}function ed(e,t,n){const r=FI(e,t,n);if(console.warn(r),NI.includes(e))throw new RangeError(r)}function FI(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 LI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$I=/^'([^]*?)'?$/,zI=/''/g,BI=/[a-zA-Z]/;function HI(e,t,n){var u,d,p,f;const r=to(),o=r.locale??Jb,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Ze(e,n==null?void 0:n.in);if(!Zb(s))throw new RangeError("Invalid time value");let l=t.match(VI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Ju[g];return h(m,o.formatLong)}return m}).join("").match(LI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:WI(m)};if(cg[g])return{isToken:!0,value:m};if(g.match(BI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(o0(g)||r0(g))&&ed(g,t,String(e));const h=cg[g[0]];return h(s,g,o.localize,c)}).join("")}function WI(e){const t=e.match($I);return t?t[1].replace(zI,"'"):e}function qI(){return Object.assign({},to())}function UI(e,t){const n=Ze(e,t==null?void 0:t.in).getDay();return n===0?7:n}function YI(e,t){return+Ze(e)>+Ze(t)}function GI(e,t){return+Ze(e)<+Ze(t)}function KI(e,t){const n=ZI(t)?new t(0):rt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function ZI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const XI=10;class i0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class QI extends i0{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 JI extends i0{constructor(n,r){super();de(this,"priority",XI);de(this,"subPriority",-1);this.context=n||(o=>rt(r,o))}set(n,r){return r.timestampIsSet?n:rt(n,KI(n,this.context))}}class We{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new QI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class e_ extends We{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const wt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},kn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function St(e,t){return e&&{value:t(e.value),rest:e.rest}}function ht(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Rn(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*BA+i*zA+a*HA),rest:t.slice(n[0].length)}}function a0(e){return ht(wt.anyDigitsSigned,e)}function yt(e,t){switch(e){case 1:return ht(wt.singleDigit,t);case 2:return ht(wt.twoDigits,t);case 3:return ht(wt.threeDigits,t);case 4:return ht(wt.fourDigits,t);default:return ht(new RegExp("^\\d{1,"+e+"}"),t)}}function gs(e,t){switch(e){case 1:return ht(wt.singleDigitSigned,t);case 2:return ht(wt.twoDigitsSigned,t);case 3:return ht(wt.threeDigitsSigned,t);case 4:return ht(wt.fourDigitsSigned,t);default:return ht(new RegExp("^-?\\d{1,"+e+"}"),t)}}function _f(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function s0(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 l0(e){return e%400===0||e%4===0&&e%100!==0}class t_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return St(yt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=s0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class n_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return St(yt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=If(n,i);if(o.isTwoDigitYear){const l=s0(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}}class r_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return gs(r==="R"?4:r.length,n)}set(n,r,o){const i=rt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),$o(i)}}class o_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class i_ extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return yt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class a_ extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return yt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class s_ extends We{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return St(ht(wt.month,n),i);case"MM":return St(yt(2,n),i);case"Mo":return St(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class l_ extends We{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return St(ht(wt.month,n),i);case"LL":return St(yt(2,n),i);case"Lo":return St(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function c_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=t0(r,n)-t;return r.setDate(r.getDate()-o*7),Ze(r,n==null?void 0:n.in)}class u_ extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ht(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(c_(n,o,i),i)}}function d_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=e0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class f_ extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return ht(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return $o(d_(n,o))}}const p_=[31,28,31,30,31,30,31,31,30,31,30,31],h_=[31,29,31,30,31,30,31,31,30,31,30,31];class m_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ht(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=l0(o),a=n.getMonth();return i?r>=1&&r<=h_[a]:r>=1&&r<=p_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class g_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return ht(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear();return l0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Of(e,t,n){var d,p,f,m;const r=to(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Ze(e,n==null?void 0: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 dl(i,u,n)}class v_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}class y_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return St(yt(r.length,n),a);case"eo":return St(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}class x_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return St(yt(r.length,n),a);case"co":return St(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}function b_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=UI(r,n),i=t-o;return dl(r,i,n)}class w_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return yt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return St(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return St(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return St(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return St(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=b_(n,o),n.setHours(0,0,0,0),n}}class S_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class T_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class E_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class C_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ht(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class k_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ht(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class R_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ht(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class P_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ht(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class A_ extends We{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ht(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class I_ extends We{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ht(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class __ extends We{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return St(yt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class O_ extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Rn(kn.basicOptionalMinutes,n);case"XX":return Rn(kn.basic,n);case"XXXX":return Rn(kn.basicOptionalSeconds,n);case"XXXXX":return Rn(kn.extendedOptionalSeconds,n);case"XXX":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ms(n)-o)}}class M_ extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Rn(kn.basicOptionalMinutes,n);case"xx":return Rn(kn.basic,n);case"xxxx":return Rn(kn.basicOptionalSeconds,n);case"xxxxx":return Rn(kn.extendedOptionalSeconds,n);case"xxx":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ms(n)-o)}}class D_ extends We{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return a0(n)}set(n,r,o){return[rt(n,o*1e3),{timestampIsSet:!0}]}}class j_ extends We{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return a0(n)}set(n,r,o){return[rt(n,o),{timestampIsSet:!0}]}}const N_={G:new e_,y:new t_,Y:new n_,R:new r_,u:new o_,Q:new i_,q:new a_,M:new s_,L:new l_,w:new u_,I:new f_,d:new m_,D:new g_,E:new v_,e:new y_,c:new x_,i:new w_,a:new S_,b:new T_,B:new E_,h:new C_,H:new k_,K:new R_,k:new P_,m:new A_,s:new I_,S:new __,X:new O_,x:new M_,t:new D_,T:new j_},F_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,V_=/^'([^]*?)'?$/,$_=/''/g,z_=/\S/,B_=/[a-zA-Z]/;function H_(e,t,n,r){var h,v,y,b;const o=()=>rt(n,NaN),i=qI(),a=i.locale??Jb,s=i.firstWeekContainsDate??((v=(h=i.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(y=i.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Ze(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new JI(r==null?void 0:r.in,n)],d=t.match(L_).map(T=>{const w=T[0];if(w in Ju){const S=Ju[w];return S(T,a.formatLong)}return T}).join("").match(F_),p=[];for(let T of d){o0(T)&&ed(T,t,e),r0(T)&&ed(T,t,e);const w=T[0],S=N_[w];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);p.push({token:w,fullToken:T});const R=S.run(e,T,a.match,c);if(!R)return o();u.push(R.setter),e=R.rest}else{if(w.match(B_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=W_(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&z_.test(e))return o();const f=u.map(T=>T.priority).sort((T,w)=>w-T).filter((T,w,S)=>S.indexOf(T)===w).map(T=>u.filter(w=>w.priority===T).sort((w,S)=>S.subPriority-w.subPriority)).map(T=>T[0]);let m=Ze(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const T of f){if(!T.validate(m,c))return o();const w=T.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function W_(e){return e.match(V_)[1].replace($_,"'")}function q_(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function U_(e,t){return GA(rt(e,e),YA(e))}function Y_(e,t,n){return dl(e,-t,n)}function G_(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(+r)?rt(e,NaN):(r.setFullYear(t),r)}function K_(e,t,n){return Gb(e,-t,n)}function Pi(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=K_(e,o+r*12,n),d=Y_(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return rt(e,+d-m)}var Tt=function(){return Tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tt.apply(this,arguments)};function Mf(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 td(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}var ta=function(e){return e.replace(new RegExp(" ","g")," ")},c0=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)},Z_=function(e){return e.replace(/^0+([0-9]+)/,"$1")},u0=function(e,t,n){var r=e.length-2,o=Z_(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},d0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},X_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},zc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},Q_=function(e){return e==="money"||e==="currency"},J_=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Fa=function(e,t){var n=c0(d0(e),t.fraction.length),r="".concat(t.currency).concat(u0(n,t.group,t.decimal));return ta(r)},eO=E.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=Mf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=J_(r,i,s);return m.currency=ta("".concat(m.currency.trim()," ")),m.literal=ta(m.literal.trim()),m},[r,i]),p=function(m){var g=Fa(m.target.value,d),h=vs(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),l==null||l(m),h!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=Fa(m,d),h=vs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l==null||l(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Fa(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?Fa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),tO=1,nO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},rO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},La=function(e,t){var n=c0(d0(e),t.fraction.length),r="".concat(u0(n,t.group,t.decimal)," ").concat(t.percentSign);return ta(r)},oO=E.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=Mf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=td(E.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(La(y,d))},[a.value]);var d=E.useMemo(function(){var v=rO(r);return v.percentSign=ta("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-tO,f=function(v){var y,b=s.current;b&&(b.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},m=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var b=y.selectionStart,T=y.selectionEnd,w=b!==T,S=p<b;!w&&S&&f()}i==null||i(v)},g=function(v){var y=La(v.target.value,d),b=vs(y);u(y),v.target.value=y,v.target.setAttribute("data-number",b.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=La(v,d),b=vs(y);u(y),s.current.value=y,s.current.setAttribute("data-number",b.toString());var T=new InputEvent("change",{});o==null||o(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var h=a.defaultValue?La(a.defaultValue,d):void 0;return E.createElement("input",Tt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Ai={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},iO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ys[i];a===void 0?r.push(i.replace(Ai.dots,"\\.").replace(Ai.openParenthesis,"\\(").replace(Ai.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ai.leadingBars,"\\")},Vi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nd(o,n);var i=iO(o);return n?"^".concat(i,"$"):i},aO=function(e){return e.replace(Ai.escape,"\\$&")},nd=function(e,t){var n=e.map(function(r){return typeof r=="string"?aO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ys={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]/}},sO=/\d/,pg="(dd) 9dddd-dddd",hg="(dd) dddd-dddd",mg="ddd.ddd.ddd-dd",gg="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},lO=["2",/[0-3]/,":",/[0-5]/,/\d/],cO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:mg,isoDate:"dddd-dd-dd",cnpj:gg,telephone:hg,cellphone:pg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?mg:gg},int:function(e){return e===void 0&&(e=""),sO.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=rs(e);return t.length<11?hg:pg},time:function(e){var t=rs(e),n=t[0];return n==="2"?lO:cO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Vi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:rs}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function vg(e,t,n,r){var o,i;r===void 0&&(r=ys);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var yg=function(e){return e},uO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Vi(e,n,t));return r.test(n)};function dO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var fO=E.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Mf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=zc(s),h=zc(d),v=zc(u),y=E.useRef(uO(u,i,f.value||f.defaultValue)),b=p??"input",T=td(E.useState(""),2),w=T[0],S=T[1],C=dO(w),R=E.useCallback(function(_,D){var F,j,z=(F=_??D)!==null&&F!==void 0?F:"";if(u===void 0)return z;var M=(j=z==null?void 0:z.toString())!==null&&j!==void 0?j:"";return vg(M,typeof u=="function"?u(M):u,a??yg,c??ys)},[a,u,c]),I=td(E.useState(function(){return R(f.value,f.defaultValue)}),2),A=I[0],O=I[1],N=R(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(A);return Array.isArray(_)?nd(_,i):Vi(u,A,i)}return typeof u=="string"?Vi(u,A,i):nd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var _=R(f.value,f.defaultValue);O(_),m.current!==null&&(m.current.value=_)}},[f.value,u,a,f.defaultValue]);var P=function(_){var D,F,j,z,M,$=_.currentTarget,J=_.target.value;if(v.current===void 0)return O(J),(D=h.current)===null||D===void 0||D.call(h,J),(F=g.current)===null||F===void 0||F.call(g,_),d==null?void 0:d(J);var te=new RegExp(Vi(v.current,J,i)),ee=(j=$.selectionEnd)!==null&&j!==void 0?j:0,Z=function(G,ie,B){if(G.type!=="number")return G.setSelectionRange(ie,B)};if(r&&y.current&&J.length>=A.length)return $.value=A,Z($,ee-1,ee-1);var U=!1;J.length<C.length&&(y.current=!1,U=!0),te.test(J)&&(y.current=!0);var Y=ee,L=J[Y-1],W=vg(J,typeof v.current=="function"?v.current(J):v.current,a??yg,c??ys);for($.value=W,O(W);Y<W.length&&W.charAt(Y-1)!==L;)Y+=1;U?Z($,ee,ee):Z($,Y,Y),_.target.value=W,S(W),(z=h.current)===null||z===void 0||z.call(h,W),(M=g.current)===null||M===void 0||M.call(g,_)};return E.createElement(b,Tt({},f,{ref:m,pattern:V,onChange:P,defaultValue:xg(f.defaultValue)?N:void 0,value:xg(f.value)?R(f.value,f.value):f.value}))}),xg=function(e){return typeof e=="string"},f0=E.forwardRef(function(e,t){return Q_(e.mask)?E.createElement(eO,Tt({},e,{mask:void 0,ref:t})):nO(e.mask)?E.createElement(oO,Tt({},e,{mask:void 0,ref:t})):E.createElement(fO,Tt({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(f0,Tt({},e,t))}};Kt($t.cellTelephone);Kt($t.cellphone);Kt($t.cep);Kt($t.cnpj);Kt($t.color);Kt($t.cpf);Kt($t.cpfCnpj);Kt($t.creditCard);Kt($t.date);Kt($t.int);Kt($t.isoDate);Kt($t.telephone);Kt($t.time);Kt($t.uuid);var p0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&X_($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(f0,Tt({},o,{ref:n}))}),Va={exports:{}},Bc={},$a={exports:{}},Hc={};/**
137
+ */const NA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ul=Et("x",NA),sg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},FA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Ub=e=>x.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sg,exit:sg.false,transition:FA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:je("aria-hidden:pointer-events-none",e.className),children:e.children}),LA=ti("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"}}),VA=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:je("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Ub,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:je(LA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Hb,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(qb,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(_A,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(ul,{size:20})}):null]})})})}),Yb=6048e5,$A=864e5,zA=6e4,BA=36e5,HA=1e3,lg=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&lg in e?e[lg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ze(e,t){return rt(t||e,e)}function dl(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(t)?rt((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Gb(e,t,n){const r=Ze(e,n==null?void 0:n.in);if(isNaN(t))return rt(e,NaN);if(!t)return r;const o=r.getDate(),i=rt(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 Eo(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=Ze(e,n==null?void 0:n.in),d=o||r?Gb(u,o+r*12):u,p=a||i?dl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return rt(e,+p+g)}let WA={};function to(){return WA}function jn(e,t){var s,l,c,u;const n=to(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 $o(e,t){return jn(e,{...t,weekStartsOn:1})}function Kb(e,t){const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=rt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=$o(o),a=rt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=$o(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ms(e){const t=Ze(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 fl(e,...t){const n=rt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function zo(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function qA(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t),i=zo(r),a=zo(o),s=+i-ms(i),l=+a-ms(a);return Math.round((s-l)/$A)}function UA(e,t){const n=Kb(e,t),r=rt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),$o(r)}function YA(e){return rt(e,Date.now())}function GA(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t);return+zo(r)==+zo(o)}function KA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zb(e){return!(!KA(e)&&typeof e!="number"||isNaN(+Ze(e)))}function ZA(e,t){const[n,r]=fl(e,t.start,t.end);return{start:n,end:r}}function Xb(e,t){const{start:n,end:r}=ZA(t==null?void 0: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(rt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Qb(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function XA(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function QA(e,t){var s,l;const n=to(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ze(e,t==null?void 0: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 JA={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"}},eI=(e,t,n)=>{let r;const o=JA[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $c(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oI={date:$c({formats:tI,defaultWidth:"full"}),time:$c({formats:nI,defaultWidth:"full"}),dateTime:$c({formats:rI,defaultWidth:"full"})},iI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aI=(e,t,n,r)=>iI[e];function Si(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&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 sI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cI={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"]},uI={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"]},dI={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"}},fI={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"}},pI=(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"},hI={ordinalNumber:pI,era:Si({values:sI,defaultWidth:"wide"}),quarter:Si({values:lI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Si({values:cI,defaultWidth:"wide"}),day:Si({values:uI,defaultWidth:"wide"}),dayPeriod:Si({values:dI,defaultWidth:"wide",formattingValues:fI,defaultFormattingWidth:"wide"})};function Ti(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)?gI(s,d=>d.test(a)):mI(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 mI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function gI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function vI(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 yI=/^(\d+)(th|st|nd|rd)?/i,xI=/\d+/i,bI={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},wI={any:[/^b/i,/^(a|c)/i]},SI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},TI={any:[/1/i,/2/i,/3/i,/4/i]},EI={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},CI={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]},RI={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},kI={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]},PI={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},AI={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}},II={ordinalNumber:vI({matchPattern:yI,parsePattern:xI,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:bI,defaultMatchWidth:"wide",parsePatterns:wI,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:SI,defaultMatchWidth:"wide",parsePatterns:TI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:EI,defaultMatchWidth:"wide",parsePatterns:CI,defaultParseWidth:"any"}),day:Ti({matchPatterns:RI,defaultMatchWidth:"wide",parsePatterns:kI,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:PI,defaultMatchWidth:"any",parsePatterns:AI,defaultParseWidth:"any"})},Jb={code:"en-US",formatDistance:eI,formatLong:oI,formatRelative:aI,localize:hI,match:II,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _I(e,t){const n=Ze(e,t==null?void 0:t.in);return qA(n,XA(n))+1}function e0(e,t){const n=Ze(e,t==null?void 0:t.in),r=+$o(n)-+UA(n);return Math.round(r/Yb)+1}function If(e,t){var u,d,p,f;const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=to(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=rt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=jn(a,t),l=rt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function OI(e,t){var s,l,c,u;const n=to(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=If(e,t),i=rt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function t0(e,t){const n=Ze(e,t==null?void 0:t.in),r=+jn(n,t)-+OI(n,t);return Math.round(r/Yb)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ge(o,t.length)}},po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=If(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ge(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ge(i,t.length)},R:function(e,t){const n=Kb(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(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 Ge(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ge(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ge(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=t0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=e0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=_I(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ge(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ge(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ge(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=po.noon:r===0?o=po.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=po.evening:r>=12?o=po.afternoon:r>=4?o=po.morning:o=po.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return dg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ug(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ug(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function ug(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+Ge(i,2)}function dg(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ge(Math.trunc(r/60),2),i=Ge(r%60,2);return n+o+t+i}const fg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},n0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},MI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",fg(r,t)).replace("{{time}}",n0(o,t))},Ju={p:n0,P:MI},DI=/^D+$/,jI=/^Y+$/,NI=["D","DD","YY","YYYY"];function r0(e){return DI.test(e)}function o0(e){return jI.test(e)}function ed(e,t,n){const r=FI(e,t,n);if(console.warn(r),NI.includes(e))throw new RangeError(r)}function FI(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 LI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$I=/^'([^]*?)'?$/,zI=/''/g,BI=/[a-zA-Z]/;function HI(e,t,n){var u,d,p,f;const r=to(),o=r.locale??Jb,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Ze(e,n==null?void 0:n.in);if(!Zb(s))throw new RangeError("Invalid time value");let l=t.match(VI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Ju[g];return h(m,o.formatLong)}return m}).join("").match(LI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:WI(m)};if(cg[g])return{isToken:!0,value:m};if(g.match(BI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(o0(g)||r0(g))&&ed(g,t,String(e));const h=cg[g[0]];return h(s,g,o.localize,c)}).join("")}function WI(e){const t=e.match($I);return t?t[1].replace(zI,"'"):e}function qI(){return Object.assign({},to())}function UI(e,t){const n=Ze(e,t==null?void 0:t.in).getDay();return n===0?7:n}function YI(e,t){return+Ze(e)>+Ze(t)}function GI(e,t){return+Ze(e)<+Ze(t)}function KI(e,t){const n=ZI(t)?new t(0):rt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function ZI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const XI=10;class i0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class QI extends i0{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 JI extends i0{constructor(n,r){super();de(this,"priority",XI);de(this,"subPriority",-1);this.context=n||(o=>rt(r,o))}set(n,r){return r.timestampIsSet?n:rt(n,KI(n,this.context))}}class We{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new QI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class e_ extends We{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const wt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Rn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function St(e,t){return e&&{value:t(e.value),rest:e.rest}}function ht(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function kn(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*BA+i*zA+a*HA),rest:t.slice(n[0].length)}}function a0(e){return ht(wt.anyDigitsSigned,e)}function yt(e,t){switch(e){case 1:return ht(wt.singleDigit,t);case 2:return ht(wt.twoDigits,t);case 3:return ht(wt.threeDigits,t);case 4:return ht(wt.fourDigits,t);default:return ht(new RegExp("^\\d{1,"+e+"}"),t)}}function gs(e,t){switch(e){case 1:return ht(wt.singleDigitSigned,t);case 2:return ht(wt.twoDigitsSigned,t);case 3:return ht(wt.threeDigitsSigned,t);case 4:return ht(wt.fourDigitsSigned,t);default:return ht(new RegExp("^-?\\d{1,"+e+"}"),t)}}function _f(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function s0(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 l0(e){return e%400===0||e%4===0&&e%100!==0}class t_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return St(yt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=s0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class n_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return St(yt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=If(n,i);if(o.isTwoDigitYear){const l=s0(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}}class r_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return gs(r==="R"?4:r.length,n)}set(n,r,o){const i=rt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),$o(i)}}class o_ extends We{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class i_ extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return yt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class a_ extends We{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return yt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class s_ extends We{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return St(ht(wt.month,n),i);case"MM":return St(yt(2,n),i);case"Mo":return St(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class l_ extends We{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return St(ht(wt.month,n),i);case"LL":return St(yt(2,n),i);case"Lo":return St(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function c_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=t0(r,n)-t;return r.setDate(r.getDate()-o*7),Ze(r,n==null?void 0:n.in)}class u_ extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ht(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(c_(n,o,i),i)}}function d_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=e0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class f_ extends We{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return ht(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return $o(d_(n,o))}}const p_=[31,28,31,30,31,30,31,31,30,31,30,31],h_=[31,29,31,30,31,30,31,31,30,31,30,31];class m_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ht(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=l0(o),a=n.getMonth();return i?r>=1&&r<=h_[a]:r>=1&&r<=p_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class g_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return ht(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear();return l0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Of(e,t,n){var d,p,f,m;const r=to(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Ze(e,n==null?void 0: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 dl(i,u,n)}class v_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}class y_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return St(yt(r.length,n),a);case"eo":return St(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}class x_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return St(yt(r.length,n),a);case"co":return St(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Of(n,o,i),n.setHours(0,0,0,0),n}}function b_(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=UI(r,n),i=t-o;return dl(r,i,n)}class w_ extends We{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return yt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return St(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return St(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return St(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return St(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=b_(n,o),n.setHours(0,0,0,0),n}}class S_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class T_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class E_ extends We{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(_f(o),0,0,0),n}}class C_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ht(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class R_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ht(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class k_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ht(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class P_ extends We{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ht(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class A_ extends We{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ht(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class I_ extends We{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ht(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class __ extends We{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return St(yt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class O_ extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return kn(Rn.basicOptionalMinutes,n);case"XX":return kn(Rn.basic,n);case"XXXX":return kn(Rn.basicOptionalSeconds,n);case"XXXXX":return kn(Rn.extendedOptionalSeconds,n);case"XXX":default:return kn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ms(n)-o)}}class M_ extends We{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return kn(Rn.basicOptionalMinutes,n);case"xx":return kn(Rn.basic,n);case"xxxx":return kn(Rn.basicOptionalSeconds,n);case"xxxxx":return kn(Rn.extendedOptionalSeconds,n);case"xxx":default:return kn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ms(n)-o)}}class D_ extends We{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return a0(n)}set(n,r,o){return[rt(n,o*1e3),{timestampIsSet:!0}]}}class j_ extends We{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return a0(n)}set(n,r,o){return[rt(n,o),{timestampIsSet:!0}]}}const N_={G:new e_,y:new t_,Y:new n_,R:new r_,u:new o_,Q:new i_,q:new a_,M:new s_,L:new l_,w:new u_,I:new f_,d:new m_,D:new g_,E:new v_,e:new y_,c:new x_,i:new w_,a:new S_,b:new T_,B:new E_,h:new C_,H:new R_,K:new k_,k:new P_,m:new A_,s:new I_,S:new __,X:new O_,x:new M_,t:new D_,T:new j_},F_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,V_=/^'([^]*?)'?$/,$_=/''/g,z_=/\S/,B_=/[a-zA-Z]/;function H_(e,t,n,r){var h,v,y,b;const o=()=>rt(n,NaN),i=qI(),a=i.locale??Jb,s=i.firstWeekContainsDate??((v=(h=i.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(y=i.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Ze(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new JI(r==null?void 0:r.in,n)],d=t.match(L_).map(T=>{const w=T[0];if(w in Ju){const S=Ju[w];return S(T,a.formatLong)}return T}).join("").match(F_),p=[];for(let T of d){o0(T)&&ed(T,t,e),r0(T)&&ed(T,t,e);const w=T[0],S=N_[w];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);p.push({token:w,fullToken:T});const k=S.run(e,T,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match(B_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=W_(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&z_.test(e))return o();const f=u.map(T=>T.priority).sort((T,w)=>w-T).filter((T,w,S)=>S.indexOf(T)===w).map(T=>u.filter(w=>w.priority===T).sort((w,S)=>S.subPriority-w.subPriority)).map(T=>T[0]);let m=Ze(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const T of f){if(!T.validate(m,c))return o();const w=T.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function W_(e){return e.match(V_)[1].replace($_,"'")}function q_(e,t,n){const[r,o]=fl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function U_(e,t){return GA(rt(e,e),YA(e))}function Y_(e,t,n){return dl(e,-t,n)}function G_(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(+r)?rt(e,NaN):(r.setFullYear(t),r)}function K_(e,t,n){return Gb(e,-t,n)}function Pi(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=K_(e,o+r*12,n),d=Y_(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return rt(e,+d-m)}var Tt=function(){return Tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tt.apply(this,arguments)};function Mf(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 td(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}var ta=function(e){return e.replace(new RegExp(" ","g")," ")},c0=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)},Z_=function(e){return e.replace(/^0+([0-9]+)/,"$1")},u0=function(e,t,n){var r=e.length-2,o=Z_(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},d0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},X_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},zc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},Q_=function(e){return e==="money"||e==="currency"},J_=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Fa=function(e,t){var n=c0(d0(e),t.fraction.length),r="".concat(t.currency).concat(u0(n,t.group,t.decimal));return ta(r)},eO=E.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=Mf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=J_(r,i,s);return m.currency=ta("".concat(m.currency.trim()," ")),m.literal=ta(m.literal.trim()),m},[r,i]),p=function(m){var g=Fa(m.target.value,d),h=vs(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),l==null||l(m),h!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=Fa(m,d),h=vs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l==null||l(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Fa(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?Fa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),tO=1,nO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},rO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},La=function(e,t){var n=c0(d0(e),t.fraction.length),r="".concat(u0(n,t.group,t.decimal)," ").concat(t.percentSign);return ta(r)},oO=E.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=Mf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=td(E.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(La(y,d))},[a.value]);var d=E.useMemo(function(){var v=rO(r);return v.percentSign=ta("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-tO,f=function(v){var y,b=s.current;b&&(b.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},m=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var b=y.selectionStart,T=y.selectionEnd,w=b!==T,S=p<b;!w&&S&&f()}i==null||i(v)},g=function(v){var y=La(v.target.value,d),b=vs(y);u(y),v.target.value=y,v.target.setAttribute("data-number",b.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=La(v,d),b=vs(y);u(y),s.current.value=y,s.current.setAttribute("data-number",b.toString());var T=new InputEvent("change",{});o==null||o(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var h=a.defaultValue?La(a.defaultValue,d):void 0;return E.createElement("input",Tt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Ai={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},iO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ys[i];a===void 0?r.push(i.replace(Ai.dots,"\\.").replace(Ai.openParenthesis,"\\(").replace(Ai.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ai.leadingBars,"\\")},Vi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nd(o,n);var i=iO(o);return n?"^".concat(i,"$"):i},aO=function(e){return e.replace(Ai.escape,"\\$&")},nd=function(e,t){var n=e.map(function(r){return typeof r=="string"?aO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ys={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]/}},sO=/\d/,pg="(dd) 9dddd-dddd",hg="(dd) dddd-dddd",mg="ddd.ddd.ddd-dd",gg="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},lO=["2",/[0-3]/,":",/[0-5]/,/\d/],cO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:mg,isoDate:"dddd-dd-dd",cnpj:gg,telephone:hg,cellphone:pg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?mg:gg},int:function(e){return e===void 0&&(e=""),sO.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=rs(e);return t.length<11?hg:pg},time:function(e){var t=rs(e),n=t[0];return n==="2"?lO:cO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Vi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:rs}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function vg(e,t,n,r){var o,i;r===void 0&&(r=ys);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var yg=function(e){return e},uO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Vi(e,n,t));return r.test(n)};function dO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var fO=E.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Mf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=zc(s),h=zc(d),v=zc(u),y=E.useRef(uO(u,i,f.value||f.defaultValue)),b=p??"input",T=td(E.useState(""),2),w=T[0],S=T[1],C=dO(w),k=E.useCallback(function(_,D){var F,j,z=(F=_??D)!==null&&F!==void 0?F:"";if(u===void 0)return z;var M=(j=z==null?void 0:z.toString())!==null&&j!==void 0?j:"";return vg(M,typeof u=="function"?u(M):u,a??yg,c??ys)},[a,u,c]),I=td(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=I[0],O=I[1],N=k(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(A);return Array.isArray(_)?nd(_,i):Vi(u,A,i)}return typeof u=="string"?Vi(u,A,i):nd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var _=k(f.value,f.defaultValue);O(_),m.current!==null&&(m.current.value=_)}},[f.value,u,a,f.defaultValue]);var P=function(_){var D,F,j,z,M,$=_.currentTarget,J=_.target.value;if(v.current===void 0)return O(J),(D=h.current)===null||D===void 0||D.call(h,J),(F=g.current)===null||F===void 0||F.call(g,_),d==null?void 0:d(J);var te=new RegExp(Vi(v.current,J,i)),ee=(j=$.selectionEnd)!==null&&j!==void 0?j:0,Z=function(G,ie,B){if(G.type!=="number")return G.setSelectionRange(ie,B)};if(r&&y.current&&J.length>=A.length)return $.value=A,Z($,ee-1,ee-1);var U=!1;J.length<C.length&&(y.current=!1,U=!0),te.test(J)&&(y.current=!0);var Y=ee,L=J[Y-1],W=vg(J,typeof v.current=="function"?v.current(J):v.current,a??yg,c??ys);for($.value=W,O(W);Y<W.length&&W.charAt(Y-1)!==L;)Y+=1;U?Z($,ee,ee):Z($,Y,Y),_.target.value=W,S(W),(z=h.current)===null||z===void 0||z.call(h,W),(M=g.current)===null||M===void 0||M.call(g,_)};return E.createElement(b,Tt({},f,{ref:m,pattern:V,onChange:P,defaultValue:xg(f.defaultValue)?N:void 0,value:xg(f.value)?k(f.value,f.value):f.value}))}),xg=function(e){return typeof e=="string"},f0=E.forwardRef(function(e,t){return Q_(e.mask)?E.createElement(eO,Tt({},e,{mask:void 0,ref:t})):nO(e.mask)?E.createElement(oO,Tt({},e,{mask:void 0,ref:t})):E.createElement(fO,Tt({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(f0,Tt({},e,t))}};Kt($t.cellTelephone);Kt($t.cellphone);Kt($t.cep);Kt($t.cnpj);Kt($t.color);Kt($t.cpf);Kt($t.cpfCnpj);Kt($t.creditCard);Kt($t.date);Kt($t.int);Kt($t.isoDate);Kt($t.telephone);Kt($t.time);Kt($t.uuid);var p0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&X_($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(f0,Tt({},o,{ref:n}))}),Va={exports:{}},Bc={},$a={exports:{}},Hc={};/**
138
138
  * @license React
139
139
  * use-sync-external-store-shim.production.js
140
140
  *
@@ -158,7 +158,7 @@
158
158
  *
159
159
  * This source code is licensed under the MIT license found in the
160
160
  * LICENSE file in the root directory of this source tree.
161
- */var Tg;function mO(){if(Tg)return Bc;Tg=1;var e=E,t=h0();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 Bc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var R=p(S);return f!==void 0&&f(C,R)?(b=S,C):(b=S,T=R)}var y=!1,b,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Bc}var qc={};/**
161
+ */var Tg;function mO(){if(Tg)return Bc;Tg=1;var e=E,t=h0();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 Bc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var k=p(S);return f!==void 0&&f(C,k)?(b=S,C):(b=S,T=k)}var y=!1,b,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Bc}var qc={};/**
162
162
  * @license React
163
163
  * use-sync-external-store-shim/with-selector.development.js
164
164
  *
@@ -166,10 +166,10 @@
166
166
  *
167
167
  * This source code is licensed under the MIT license found in the
168
168
  * LICENSE file in the root directory of this source tree.
169
- */var Eg;function gO(){return Eg||(Eg=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=E,n=h0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;qc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var R=p(S);return f!==void 0&&f(C,R)?(b=S,C):(b=S,T=R)}var y=!1,b,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[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())}()),qc}var Cg;function vO(){return Cg||(Cg=1,process.env.NODE_ENV==="production"?Va.exports=mO():Va.exports=gO()),Va.exports}vO();var Bo=function(){return Bo=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},Bo.apply(this,arguments)};function $i(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 m0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},yO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},xO=function(e){return Object.entries(e)},g0=function(e){return e instanceof Promise},v0=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)},Bo(Bo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},bO=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,m0([],$i(a),!1)),u=function(d,p){return n(function(f){return v0(d,f,i,p)})};return g0(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))}},wO=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,m0([],$i(a),!1)),c=function(u){return n(function(d){return v0(u,d,i,o.current)})};return g0(l)?l.then(function(u){return c(u)}):c(l)}},Df=function(e,t,n){var r,o,i,a=$i(E.useState(function(){return e}),2),s=a[0],l=a[1],c=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=yO(s),h=ho(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=$i(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return xO(w).reduce(function(S,C){var R,I=$i(C,2),A=I[0],O=I[1];return Bo(Bo({},S),(R={},R[A]=n!=null&&n.debug?bO(A,O,l,T,v,f.current):wO(A,O,l,T,v,f.current),R))},{})}),1),b=y[0];return[s,b,u.current]};const SO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function TO(e,t){return E.useRef(SO(e,t)).current}const pl={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>)`},jr=(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(jr(a,t,n,s))},[]),y0=(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]:y0(a,t,n,s)}},{}),kg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},xs=(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)},EO={default:e=>xs(e,{result:kg.default}),dark:e=>xs(e,{result:kg.dark})},Ei=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},CO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),jf=(e,t)=>{const n=jr(e.colors,Ei(t==null?void 0:t.colors)),r=jr(e.spacing,Ei(t==null?void 0:t.spacing)),o=jr(e.rounded,Ei(t==null?void 0:t.rounded)),i=jr(e.zIndex,Ei((t==null?void 0:t.zIndex)??CO)),a=e.custom?jr(e.custom,Ei(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},kO=(e,t)=>xs(jf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),RO=(e,t)=>jf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),PO=(e,t)=>xs(jf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},ml={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},li=E.createContext({tweaks:ml,parser:pl.hsla,map:hl,locale:void 0}),Nf=e=>{const t=E.useContext(li);if(e)return e;if(t)return t.locale||e};function AO(e,t){const n=E.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 _t=()=>{const e=E.useContext(li);return e?e.map:hl},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ci=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},Rg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Pg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ff=(e,t)=>{const n=Rg(t,Pg.basic,e)||Rg(t,Pg.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x0=(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},IO=e=>!e,Lf=()=>{},b0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},_O={type:"spring",bounce:.3,duration:.6},Ag=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),w0={enter:Ag(1),exit:Ag(-1),middle:{x:"0%",opacity:1}},Ig={exit:{visibility:"hidden"}},OO=e=>{const t=jn(Qb(e));return Xb({start:t,end:Eo(t,{days:41})})},S0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),MO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Qb(new Date(1970,o,1).setMonth(o)),a=S0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Uc={ArrowLeft:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Eo(e,{days:1}):Eo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Eo(e,{weeks:1}):Eo(e,{years:1})},_g=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Ir=e=>e.getFullYear().toString().padStart(4,"0"),DO=(e,t,n)=>e===void 0||n===void 0?!1:YI(t,e)&&GI(t,n),jO=e=>{var n;const t=_t();return x.jsx(pt.tbody,{layout:!0,variants:w0,custom:e.direction,onKeyDown:e.onKeyDown,className:je((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=nt.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return x.jsx("tr",{className:i,children:r.map(c=>{var v,y,b,T,w,S,C,R,I,A,O,N,V,P,_,D,F,j;const u=c.toISOString(),d=e.rangeMode?u===((y=(v=e.range)==null?void 0:v.to)==null?void 0:y.toISOString())||u===((T=(b=e.range)==null?void 0:b.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=U_(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=q_(c,e.stateDate),g=!m||f,h=e.rangeMode?DO((C=e.range)==null?void 0:C.from,c,(R=e.range)==null?void 0:R.to):!1;return x.jsxs("td",{align:"center",className:je("relative",nt.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(O=e.styles)==null?void 0:O.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:je(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",nt.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((_=e.stateRange.from)==null?void 0:_.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((F=e.stateRange.to)==null?void 0:F.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},NO=()=>zo(new Date),T0=({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,...p})=>{const f=E.useRef(ci()),m=_t(),g=Nf(o),h=E.useRef(null),{date:v,range:y}=p,b=v||new Date,T=E.useRef(null),[w,S]=Df({date:b,isAnimating:!1,year:Ir(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:MO(f.current,b,g),selectMode:l?"from":void 0,week:Xb({start:jn(b),end:QA(b)})},P=>({onChangeYear:_=>({year:_}),onExitComplete:()=>(_g(T.current||null,h,P.state().date,200),T.current=null,{isAnimating:!1}),date:_=>{const D=_(P.state().date);return{date:D,year:Ir(D)}},nextMonth:_=>{_&&(T.current=_.currentTarget);const D=P.state();if(D.isAnimating)return D;const F=Eo(D.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Ir(F)}},previousMonth:_=>{_&&(T.current=_.currentTarget);const D=P.state();if(D.isAnimating)return D;const F=Pi(D.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Ir(F)}},onSelectDate:_=>{const D=P.state(),F=_.currentTarget.dataset.range==="true",j=_.currentTarget.dataset.date||"",z=new Date(j);return{date:z,year:Ir(z),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:F?{from:D.selectMode==="from"?z:D.range.from,to:D.selectMode==="to"?z:D.range.to}:D.range}},onChangeMonth:_=>{const D=_.target.value,j=Array.from(_.target.options).find(M=>M.value===D),z=P.state();if(j){const M=j.dataset.index||"",$=new Date(P.state().date);return $.setMonth(+M),{...z,date:$,year:Ir($)}}return z},onKeyDown:_=>{const D=_.key,F=P.state();if(D in Uc){(D==="ArrowUp"||D==="ArrowDown")&&_.preventDefault();const j=P.state().date,z=nt.keyof(Uc,D)?Uc[D](j,_.shiftKey?"month":"days"):null;if(z!==null)return _g(_.target,h,z),{...F,date:z,year:Ir(z)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,_,D)=>{var j,z;return(D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&((z=(j=D.props).onChangeMonth)==null||z.call(j,P.date)),P},(P,_,D)=>{var j,z;return D.method==="onChangeYear"&&((z=(j=D.props).onChangeYear)==null||z.call(j,P.date)),P},(P,_,D)=>{const F=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&F&&t?(c==null||c(P.range),P):(F&&t&&(c==null||c(P.date)),P)}]}),C=OO(w.date),R=x0(C,7),I=w.date.toISOString(),A=S0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const O=TO(P=>S.date(_=>G_(new Date(_),+P)),1200),N=P=>{const _=P.currentTarget.value;S.onChangeYear(_),s==null||s(new Date(_)),O(_)},V=AO((P,_)=>(P.preventDefault(),_==="right"?S.previousMonth():S.nextMonth()),10);return x.jsx(aE,{transition:_O,children:x.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:je("relative overflow-hidden",nt.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(vr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:x.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ig,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(pA,{className:"h-4 w-4"})}),x.jsx(pt.span,{layout:!0,variants:w0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),x.jsx(p0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ig,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(Pf,{className:"h-4 w-4"})}),x.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%)"}})]}),x.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:w.week.map(P=>x.jsx("th",{role:"columnheader",className:je("py-2 text-sm font-medium capitalize",nt.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),x.jsx(jO,{zip:R,range:y,styles:u,date:v||null,dispatch:S,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>S.date(NO),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Vf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(cn,{...s,as:r,"data-componen":"card",className:je("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:je("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,x.jsx("div",{className:je("min-w-full px-4 lg:px-8",a),children:e})]});Vf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return x.jsxs(i,{...o,className:je("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[x.jsx(a,{className:"font-semibold",children:o.title}),r?x.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const E0=e=>{const t=e.Icon??Wb,n=_t();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Og(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function C0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Og(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():Og(e[o],null)}}}}function Ur(...e){return k.useCallback(C0(...e),e)}function k0(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return x.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,FO(o,...t)]}function FO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ho=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(VO);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return x.jsx(od,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return x.jsx(od,{...r,ref:t,children:n})});Ho.displayName="Slot";var od=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=zO(n),i=$O(r,n.props);return n.type!==k.Fragment&&(i.ref=t?C0(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});od.displayName="SlotClone";var LO=({children:e})=>x.jsx(x.Fragment,{children:e});function VO(e){return k.isValidElement(e)&&e.type===LO}function $O(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function zO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function BO(e){const t=e+"CollectionProvider",[n,r]=k0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),y=Ur(m,v.collectionRef);return x.jsx(Ho,{ref:y,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,y=E.useRef(null),b=Ur(m,y),T=i(c,g);return E.useEffect(()=>(T.itemMap.set(y,{ref:y,...v}),()=>void T.itemMap.delete(y))),x.jsx(Ho,{[u]:"",ref:b,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>v.indexOf(T.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var HO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=HO.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ho:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function R0(e,t){e&&Xs.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function WO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qO="DismissableLayer",id="dismissableLayer.update",UO="dismissableLayer.pointerDownOutside",YO="dismissableLayer.focusOutside",Mg,P0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(P0),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Ur(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=KO(C=>{const R=C.target,I=[...c.branches].some(A=>A.contains(R));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=ZO(C=>{const R=C.target;[...c.branches].some(A=>A.contains(R))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return WO(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Mg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Dg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Mg)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Dg())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(id,C),()=>document.removeEventListener(id,C)},[]),x.jsx(Vn.div,{...l,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,w.onPointerDownCapture)})});A0.displayName=qO;var GO="DismissableLayerBranch",I0=k.forwardRef((e,t)=>{const n=k.useContext(P0),r=k.useRef(null),o=Ur(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Vn.div,{...e,ref:o})});I0.displayName=GO;function KO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){_0(UO,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&_0(YO,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Dg(){const e=new CustomEvent(id);document.dispatchEvent(e)}function _0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?R0(o,i):o.dispatchEvent(i)}var XO=A0,QO=I0,bs=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},JO="Portal",O0=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);bs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ha.createPortal(x.jsx(Vn.div,{...r,ref:t}),a):null});O0.displayName=JO;function eM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var M0=e=>{const{present:t,children:n}=e,r=tM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=Ur(r.ref,nM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};M0.displayName="Presence";function tM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=eM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=za(r.current);i.current=s==="mounted"?c:"none"},[s]),bs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=za(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),bs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=za(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=za(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function za(e){return(e==null?void 0:e.animationName)||"none"}function nM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function rM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function oM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Un(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var iM="VisuallyHidden",$f=k.forwardRef((e,t)=>x.jsx(Vn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));$f.displayName=iM;var zf="ToastProvider",[Bf,aM,sM]=BO("Toast"),[D0,Y$]=k0("Toast",[sM]),[lM,gl]=D0(zf),j0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${zf}\`. Expected non-empty \`string\`.`),x.jsx(Bf.Provider,{scope:t,children:x.jsx(lM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};j0.displayName=zf;var N0="ToastViewport",cM=["F8"],ad="toast.viewportPause",sd="toast.viewportResume",F0=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=cM,label:o="Notifications ({hotkey})",...i}=e,a=gl(N0,n),s=aM(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=Ur(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var b;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(ad);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(sd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&b()},w=()=>{h.contains(document.activeElement)||b()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const y=s().map(b=>{const T=b.ref.current,w=[T,...TM(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=y=>{var w,S,C;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const R=document.activeElement,I=y.shiftKey;if(y.target===h&&I){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(P=>P===R);Yc(N.slice(V+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),x.jsxs(QO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&x.jsx(ld,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Yc(h)}}),x.jsx(Bf.Slot,{scope:n,children:x.jsx(Vn.ol,{tabIndex:-1,...i,ref:p})}),m&&x.jsx(ld,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Yc(h)}})]})});F0.displayName=N0;var L0="ToastFocusProxy",ld=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=gl(L0,n);return x.jsx($f,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});ld.displayName=L0;var vl="Toast",uM="toast.swipeStart",dM="toast.swipeMove",fM="toast.swipeCancel",pM="toast.swipeEnd",V0=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=rM({prop:r,defaultProp:o,onChange:i});return x.jsx(M0,{present:n||s,children:x.jsx(gM,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});V0.displayName=vl;var[hM,mM]=D0(vl,{onClose(){}}),gM=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=gl(vl,n),[h,v]=k.useState(null),y=Ur(t,P=>v(P)),b=k.useRef(null),T=k.useRef(null),w=o||g.duration,S=k.useRef(0),C=k.useRef(w),R=k.useRef(0),{onToastAdd:I,onToastRemove:A}=g,O=Un(()=>{var _;(h==null?void 0:h.contains(document.activeElement))&&((_=g.viewport)==null||_.focus()),a()}),N=k.useCallback(P=>{!P||P===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(O,P))},[O]);k.useEffect(()=>{const P=g.viewport;if(P){const _=()=>{N(C.current),c==null||c()},D=()=>{const F=new Date().getTime()-S.current;C.current=C.current-F,window.clearTimeout(R.current),l==null||l()};return P.addEventListener(ad,D),P.addEventListener(sd,_),()=>{P.removeEventListener(ad,D),P.removeEventListener(sd,_)}}},[g.viewport,w,l,c,N]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),k.useEffect(()=>(I(),()=>A()),[I,A]);const V=k.useMemo(()=>h?q0(h):null,[h]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(vM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(hM,{scope:n,onClose:O,children:Xs.createPortal(x.jsx(Bf.ItemSlot,{scope:n,children:x.jsx(XO,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(Vn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Qt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Qt(e.onPointerMove,P=>{if(!b.current)return;const _=P.clientX-b.current.x,D=P.clientY-b.current.y,F=!!T.current,j=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=j?z(0,_):0,$=j?0:z(0,D),J=P.pointerType==="touch"?10:2,te={x:M,y:$},ee={originalEvent:P,delta:te};F?(T.current=te,Ba(dM,d,ee,{discrete:!1})):jg(te,g.swipeDirection,J)?(T.current=te,Ba(uM,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(_)>J||Math.abs(D)>J)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const _=T.current,D=P.target;if(D.hasPointerCapture(P.pointerId)&&D.releasePointerCapture(P.pointerId),T.current=null,b.current=null,_){const F=P.currentTarget,j={originalEvent:P,delta:_};jg(_,g.swipeDirection,g.swipeThreshold)?Ba(pM,f,j,{discrete:!0}):Ba(fM,p,j,{discrete:!0}),F.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),vM=e=>{const{__scopeToast:t,children:n,...r}=e,o=gl(vl,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return wM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(O0,{asChild:!0,children:x.jsx($f,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},yM="ToastTitle",$0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});$0.displayName=yM;var xM="ToastDescription",z0=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});z0.displayName=xM;var B0="ToastAction",bM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(W0,{altText:n,asChild:!0,children:x.jsx(Hf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${B0}\`. Expected non-empty \`string\`.`),null)});bM.displayName=B0;var H0="ToastClose",Hf=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=mM(H0,n);return x.jsx(W0,{asChild:!0,children:x.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Hf.displayName=H0;var W0=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(Vn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function q0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),SM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...q0(r))}}),t}function Ba(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?R0(o,i):o.dispatchEvent(i)}var jg=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function wM(e=()=>{}){const t=Un(e);bs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function SM(e){return e.nodeType===e.ELEMENT_NODE}function TM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var EM=j0,CM=F0,kM=V0,RM=$0,PM=z0,AM=Hf;const IM=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.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},_M=ti("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),U0=E.createContext(()=>{throw new Error("Not implemented")}),OM=()=>E.useContext(U0),Ng={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]}},MM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=_M({theme:t.theme||"default"});return x.jsx(kM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Ng[t.reversedIndex]||Ng.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(RM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(PM,{className:"select-text truncate",children:t.text})]}),r?x.jsx(AM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(ul,{className:"h-5 w-5"})}):null]})})})});function DM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=IM(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return x.jsxs(EM,{duration:n,swipeThreshold:150,children:[x.jsx(U0.Provider,{value:l,children:e}),x.jsx(vr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(MM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(CM,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const jM=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:je("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Y0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},G0=E.createContext(""),NM=e=>{const[t,n]=Y0(e.active),r=Lo(0),o=Lo(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},d=()=>{const m=c.querySelector("li[data-active=true]");return void u(m)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const m=p.getAttribute("data-id")||"";n(m)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=Mo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(G0.Provider,{value:t,children:x.jsx(Vf,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:x.jsx(cn,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},FM=()=>E.useContext(G0),LM=e=>{const t=FM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},yl=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});yl.Icon=function(t){return x.jsx("header",{...t,className:je("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};yl.Body=function(t){return x.jsx(cn,{...t,className:je("min-w-0 flex-1",t.className),children:t.children})};yl.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(cn,{...t,type:"button"})})};const VM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function xl(){return typeof window<"u"}function xr(e){return K0(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return(t=(K0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function K0(e){return xl()?e instanceof Node||e instanceof Bt(e).Node:!1}function Qe(e){return xl()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return xl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function cd(e){return!xl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ba(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $M(e){return["table","td","th"].includes(xr(e))}function bl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wf(e){const t=qf(),n=Qe(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zM(e){let t=Yn(e);for(;bt(t)&&!fr(t);){if(Wf(t))return t;if(bl(t))return null;t=Yn(t)}return null}function qf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(xr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function wl(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(xr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cd(e)&&e.host||Zn(e);return cd(t)?t.host:t}function Z0(e){const t=Yn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&ba(t)?t:Z0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Z0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=ud(a);return t.concat(a,a.visualViewport||[],ba(o)?o:[],s&&n?cr(s):[])}return t.concat(o,cr(o,[],n))}function ud(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(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 gt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&cd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Uf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function X0(){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 Q0(e){return e.mozInputSource===0&&e.isTrusted?!0:dd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yf(e){return BM()?!1:!dd()&&e.width===0&&e.height===0||dd()&&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 Gf(){return/apple/i.test(navigator.vendor)}function dd(){const e=/android/i;return e.test(Uf())||e.test(X0())}function J0(){return Uf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function BM(){return X0().includes("jsdom/")}function Wo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function HM(e){return"nativeEvent"in e}function WM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function Gc(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 Pn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const qM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Kf(e){return bt(e)&&e.matches(qM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function ew(e){return e?e.getAttribute("role")==="combobox"&&Kf(e):!1}const An=Math.min,Xt=Math.max,ws=Math.round,Co=Math.floor,pr=e=>({x:e,y:e}),UM={left:"right",right:"left",bottom:"top",top:"bottom"},YM={start:"end",end:"start"};function fd(e,t,n){return Xt(e,An(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function tw(e){return e==="x"?"y":"x"}function Zf(e){return e==="y"?"height":"width"}function Yr(e){return["top","bottom"].includes(hr(e))?"y":"x"}function Xf(e){return tw(Yr(e))}function GM(e,t,n){n===void 0&&(n=!1);const r=di(e),o=Xf(e),i=Zf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}function KM(e){const t=Ss(e);return[pd(e),t,pd(t)]}function pd(e){return e.replace(/start|end/g,t=>YM[t])}function ZM(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function XM(e,t,n,r){const o=di(e);let i=ZM(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(pd)))),i}function Ss(e){return e.replace(/left|right|bottom|top/g,t=>UM[t])}function QM(e){return{top:0,right:0,bottom:0,left:0,...e}}function nw(e){return typeof e!="number"?QM(e):{top:e,right:e,bottom:e,left:e}}function Ts(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}}/*!
169
+ */var Eg;function gO(){return Eg||(Eg=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=E,n=h0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;qc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var k=p(S);return f!==void 0&&f(C,k)?(b=S,C):(b=S,T=k)}var y=!1,b,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[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())}()),qc}var Cg;function vO(){return Cg||(Cg=1,process.env.NODE_ENV==="production"?Va.exports=mO():Va.exports=gO()),Va.exports}vO();var Bo=function(){return Bo=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},Bo.apply(this,arguments)};function $i(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 m0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},yO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},xO=function(e){return Object.entries(e)},g0=function(e){return e instanceof Promise},v0=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)},Bo(Bo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},bO=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,m0([],$i(a),!1)),u=function(d,p){return n(function(f){return v0(d,f,i,p)})};return g0(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))}},wO=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,m0([],$i(a),!1)),c=function(u){return n(function(d){return v0(u,d,i,o.current)})};return g0(l)?l.then(function(u){return c(u)}):c(l)}},Df=function(e,t,n){var r,o,i,a=$i(E.useState(function(){return e}),2),s=a[0],l=a[1],c=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=yO(s),h=ho(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=$i(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return xO(w).reduce(function(S,C){var k,I=$i(C,2),A=I[0],O=I[1];return Bo(Bo({},S),(k={},k[A]=n!=null&&n.debug?bO(A,O,l,T,v,f.current):wO(A,O,l,T,v,f.current),k))},{})}),1),b=y[0];return[s,b,u.current]};const SO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function TO(e,t){return E.useRef(SO(e,t)).current}const pl={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>)`},jr=(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(jr(a,t,n,s))},[]),y0=(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]:y0(a,t,n,s)}},{}),Rg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},xs=(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)},EO={default:e=>xs(e,{result:Rg.default}),dark:e=>xs(e,{result:Rg.dark})},Ei=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},CO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),jf=(e,t)=>{const n=jr(e.colors,Ei(t==null?void 0:t.colors)),r=jr(e.spacing,Ei(t==null?void 0:t.spacing)),o=jr(e.rounded,Ei(t==null?void 0:t.rounded)),i=jr(e.zIndex,Ei((t==null?void 0:t.zIndex)??CO)),a=e.custom?jr(e.custom,Ei(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},RO=(e,t)=>xs(jf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),kO=(e,t)=>jf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),PO=(e,t)=>xs(jf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},ml={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},li=E.createContext({tweaks:ml,parser:pl.hsla,map:hl,locale:void 0}),Nf=e=>{const t=E.useContext(li);if(e)return e;if(t)return t.locale||e};function AO(e,t){const n=E.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 _t=()=>{const e=E.useContext(li);return e?e.map:hl},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ci=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},kg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Pg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ff=(e,t)=>{const n=kg(t,Pg.basic,e)||kg(t,Pg.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x0=(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},IO=e=>!e,Lf=()=>{},b0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},_O={type:"spring",bounce:.3,duration:.6},Ag=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),w0={enter:Ag(1),exit:Ag(-1),middle:{x:"0%",opacity:1}},Ig={exit:{visibility:"hidden"}},OO=e=>{const t=jn(Qb(e));return Xb({start:t,end:Eo(t,{days:41})})},S0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),MO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Qb(new Date(1970,o,1).setMonth(o)),a=S0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Uc={ArrowLeft:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Eo(e,{days:1}):Eo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Eo(e,{weeks:1}):Eo(e,{years:1})},_g=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Ir=e=>e.getFullYear().toString().padStart(4,"0"),DO=(e,t,n)=>e===void 0||n===void 0?!1:YI(t,e)&&GI(t,n),jO=e=>{var n;const t=_t();return x.jsx(pt.tbody,{layout:!0,variants:w0,custom:e.direction,onKeyDown:e.onKeyDown,className:je((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=tt.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return x.jsx("tr",{className:i,children:r.map(c=>{var v,y,b,T,w,S,C,k,I,A,O,N,V,P,_,D,F,j;const u=c.toISOString(),d=e.rangeMode?u===((y=(v=e.range)==null?void 0:v.to)==null?void 0:y.toISOString())||u===((T=(b=e.range)==null?void 0:b.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=U_(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=q_(c,e.stateDate),g=!m||f,h=e.rangeMode?DO((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return x.jsxs("td",{align:"center",className:je("relative",tt.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(O=e.styles)==null?void 0:O.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:je(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",tt.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((_=e.stateRange.from)==null?void 0:_.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((F=e.stateRange.to)==null?void 0:F.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},NO=()=>zo(new Date),T0=({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,...p})=>{const f=E.useRef(ci()),m=_t(),g=Nf(o),h=E.useRef(null),{date:v,range:y}=p,b=v||new Date,T=E.useRef(null),[w,S]=Df({date:b,isAnimating:!1,year:Ir(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:MO(f.current,b,g),selectMode:l?"from":void 0,week:Xb({start:jn(b),end:QA(b)})},P=>({onChangeYear:_=>({year:_}),onExitComplete:()=>(_g(T.current||null,h,P.state().date,200),T.current=null,{isAnimating:!1}),date:_=>{const D=_(P.state().date);return{date:D,year:Ir(D)}},nextMonth:_=>{_&&(T.current=_.currentTarget);const D=P.state();if(D.isAnimating)return D;const F=Eo(D.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Ir(F)}},previousMonth:_=>{_&&(T.current=_.currentTarget);const D=P.state();if(D.isAnimating)return D;const F=Pi(D.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Ir(F)}},onSelectDate:_=>{const D=P.state(),F=_.currentTarget.dataset.range==="true",j=_.currentTarget.dataset.date||"",z=new Date(j);return{date:z,year:Ir(z),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:F?{from:D.selectMode==="from"?z:D.range.from,to:D.selectMode==="to"?z:D.range.to}:D.range}},onChangeMonth:_=>{const D=_.target.value,j=Array.from(_.target.options).find(M=>M.value===D),z=P.state();if(j){const M=j.dataset.index||"",$=new Date(P.state().date);return $.setMonth(+M),{...z,date:$,year:Ir($)}}return z},onKeyDown:_=>{const D=_.key,F=P.state();if(D in Uc){(D==="ArrowUp"||D==="ArrowDown")&&_.preventDefault();const j=P.state().date,z=tt.keyof(Uc,D)?Uc[D](j,_.shiftKey?"month":"days"):null;if(z!==null)return _g(_.target,h,z),{...F,date:z,year:Ir(z)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,_,D)=>{var j,z;return(D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&((z=(j=D.props).onChangeMonth)==null||z.call(j,P.date)),P},(P,_,D)=>{var j,z;return D.method==="onChangeYear"&&((z=(j=D.props).onChangeYear)==null||z.call(j,P.date)),P},(P,_,D)=>{const F=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&F&&t?(c==null||c(P.range),P):(F&&t&&(c==null||c(P.date)),P)}]}),C=OO(w.date),k=x0(C,7),I=w.date.toISOString(),A=S0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const O=TO(P=>S.date(_=>G_(new Date(_),+P)),1200),N=P=>{const _=P.currentTarget.value;S.onChangeYear(_),s==null||s(new Date(_)),O(_)},V=AO((P,_)=>(P.preventDefault(),_==="right"?S.previousMonth():S.nextMonth()),10);return x.jsx(aE,{transition:_O,children:x.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:je("relative overflow-hidden",tt.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(vr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:x.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ig,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(pA,{className:"h-4 w-4"})}),x.jsx(pt.span,{layout:!0,variants:w0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),x.jsx(p0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ig,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(Pf,{className:"h-4 w-4"})}),x.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%)"}})]}),x.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:w.week.map(P=>x.jsx("th",{role:"columnheader",className:je("py-2 text-sm font-medium capitalize",tt.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),x.jsx(jO,{zip:k,range:y,styles:u,date:v||null,dispatch:S,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>S.date(NO),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Vf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(cn,{...s,as:r,"data-component":"card",className:je("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{"data-component":"card-title",className:je("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,x.jsx("div",{"data-component":"card-body",className:je("min-w-full px-4 lg:px-8",a),children:e})]});Vf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return x.jsxs(i,{...o,title:tt.string(o.title)?o.title:void 0,className:je("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[x.jsx(a,{className:"font-semibold",children:o.title}),r?x.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const E0=e=>{const t=e.Icon??Wb,n=_t();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Og(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function C0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Og(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():Og(e[o],null)}}}}function Ur(...e){return R.useCallback(C0(...e),e)}function R0(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=R.useMemo(()=>m,Object.values(m));return x.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=R.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,FO(o,...t)]}function FO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ho=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),i=o.find(VO);if(i){const a=i.props.children,s=o.map(l=>l===i?R.Children.count(a)>1?R.Children.only(null):R.isValidElement(a)?a.props.children:null:l);return x.jsx(od,{...r,ref:t,children:R.isValidElement(a)?R.cloneElement(a,void 0,s):null})}return x.jsx(od,{...r,ref:t,children:n})});Ho.displayName="Slot";var od=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=zO(n),i=$O(r,n.props);return n.type!==R.Fragment&&(i.ref=t?C0(t,o):o),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});od.displayName="SlotClone";var LO=({children:e})=>x.jsx(x.Fragment,{children:e});function VO(e){return R.isValidElement(e)&&e.type===LO}function $O(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function zO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function BO(e){const t=e+"CollectionProvider",[n,r]=R0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),y=Ur(m,v.collectionRef);return x.jsx(Ho,{ref:y,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,y=E.useRef(null),b=Ur(m,y),T=i(c,g);return E.useEffect(()=>(T.itemMap.set(y,{ref:y,...v}),()=>void T.itemMap.delete(y))),x.jsx(Ho,{[u]:"",ref:b,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>v.indexOf(T.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var HO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=HO.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ho:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function k0(e,t){e&&Xs.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function WO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qO="DismissableLayer",id="dismissableLayer.update",UO="dismissableLayer.pointerDownOutside",YO="dismissableLayer.focusOutside",Mg,P0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=R.useContext(P0),[u,d]=R.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=R.useState({}),m=Ur(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=KO(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=ZO(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return WO(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Mg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Dg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Mg)}},[u,p,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Dg())},[u,c]),R.useEffect(()=>{const C=()=>f({});return document.addEventListener(id,C),()=>document.removeEventListener(id,C)},[]),x.jsx(Vn.div,{...l,ref:m,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,w.onPointerDownCapture)})});A0.displayName=qO;var GO="DismissableLayerBranch",I0=R.forwardRef((e,t)=>{const n=R.useContext(P0),r=R.useRef(null),o=Ur(t,r);return R.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Vn.div,{...e,ref:o})});I0.displayName=GO;function KO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){_0(UO,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZO(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=R.useRef(!1);return R.useEffect(()=>{const o=i=>{i.target&&!r.current&&_0(YO,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Dg(){const e=new CustomEvent(id);document.dispatchEvent(e)}function _0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?k0(o,i):o.dispatchEvent(i)}var XO=A0,QO=I0,bs=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},JO="Portal",O0=R.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=R.useState(!1);bs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ha.createPortal(x.jsx(Vn.div,{...r,ref:t}),a):null});O0.displayName=JO;function eM(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var M0=e=>{const{present:t,children:n}=e,r=tM(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),i=Ur(r.ref,nM(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:i}):null};M0.displayName="Presence";function tM(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),i=R.useRef("none"),a=e?"mounted":"unmounted",[s,l]=eM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=za(r.current);i.current=s==="mounted"?c:"none"},[s]),bs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=za(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),bs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=za(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=za(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function za(e){return(e==null?void 0:e.animationName)||"none"}function nM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function rM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function oM({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=Un(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var iM="VisuallyHidden",$f=R.forwardRef((e,t)=>x.jsx(Vn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));$f.displayName=iM;var zf="ToastProvider",[Bf,aM,sM]=BO("Toast"),[D0,G$]=R0("Toast",[sM]),[lM,gl]=D0(zf),j0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),p=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${zf}\`. Expected non-empty \`string\`.`),x.jsx(Bf.Provider,{scope:t,children:x.jsx(lM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:R.useCallback(()=>u(f=>f+1),[]),onToastRemove:R.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};j0.displayName=zf;var N0="ToastViewport",cM=["F8"],ad="toast.viewportPause",sd="toast.viewportResume",F0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=cM,label:o="Notifications ({hotkey})",...i}=e,a=gl(N0,n),s=aM(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=Ur(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;R.useEffect(()=>{const h=v=>{var b;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),R.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(ad);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(sd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&b()},w=()=>{h.contains(document.activeElement)||b()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[m,a.isClosePausedRef]);const g=R.useCallback(({tabbingDirection:h})=>{const y=s().map(b=>{const T=b.ref.current,w=[T,...TM(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return R.useEffect(()=>{const h=d.current;if(h){const v=y=>{var w,S,C;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const k=document.activeElement,I=y.shiftKey;if(y.target===h&&I){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(P=>P===k);Yc(N.slice(V+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),x.jsxs(QO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&x.jsx(ld,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Yc(h)}}),x.jsx(Bf.Slot,{scope:n,children:x.jsx(Vn.ol,{tabIndex:-1,...i,ref:p})}),m&&x.jsx(ld,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Yc(h)}})]})});F0.displayName=N0;var L0="ToastFocusProxy",ld=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=gl(L0,n);return x.jsx($f,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});ld.displayName=L0;var vl="Toast",uM="toast.swipeStart",dM="toast.swipeMove",fM="toast.swipeCancel",pM="toast.swipeEnd",V0=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=rM({prop:r,defaultProp:o,onChange:i});return x.jsx(M0,{present:n||s,children:x.jsx(gM,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});V0.displayName=vl;var[hM,mM]=D0(vl,{onClose(){}}),gM=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=gl(vl,n),[h,v]=R.useState(null),y=Ur(t,P=>v(P)),b=R.useRef(null),T=R.useRef(null),w=o||g.duration,S=R.useRef(0),C=R.useRef(w),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=g,O=Un(()=>{var _;(h==null?void 0:h.contains(document.activeElement))&&((_=g.viewport)==null||_.focus()),a()}),N=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),S.current=new Date().getTime(),k.current=window.setTimeout(O,P))},[O]);R.useEffect(()=>{const P=g.viewport;if(P){const _=()=>{N(C.current),c==null||c()},D=()=>{const F=new Date().getTime()-S.current;C.current=C.current-F,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(ad,D),P.addEventListener(sd,_),()=>{P.removeEventListener(ad,D),P.removeEventListener(sd,_)}}},[g.viewport,w,l,c,N]),R.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),R.useEffect(()=>(I(),()=>A()),[I,A]);const V=R.useMemo(()=>h?q0(h):null,[h]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(vM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(hM,{scope:n,onClose:O,children:Xs.createPortal(x.jsx(Bf.ItemSlot,{scope:n,children:x.jsx(XO,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(Vn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Qt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Qt(e.onPointerMove,P=>{if(!b.current)return;const _=P.clientX-b.current.x,D=P.clientY-b.current.y,F=!!T.current,j=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=j?z(0,_):0,$=j?0:z(0,D),J=P.pointerType==="touch"?10:2,te={x:M,y:$},ee={originalEvent:P,delta:te};F?(T.current=te,Ba(dM,d,ee,{discrete:!1})):jg(te,g.swipeDirection,J)?(T.current=te,Ba(uM,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(_)>J||Math.abs(D)>J)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const _=T.current,D=P.target;if(D.hasPointerCapture(P.pointerId)&&D.releasePointerCapture(P.pointerId),T.current=null,b.current=null,_){const F=P.currentTarget,j={originalEvent:P,delta:_};jg(_,g.swipeDirection,g.swipeThreshold)?Ba(pM,f,j,{discrete:!0}):Ba(fM,p,j,{discrete:!0}),F.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),vM=e=>{const{__scopeToast:t,children:n,...r}=e,o=gl(vl,t),[i,a]=R.useState(!1),[s,l]=R.useState(!1);return wM(()=>a(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(O0,{asChild:!0,children:x.jsx($f,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},yM="ToastTitle",$0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});$0.displayName=yM;var xM="ToastDescription",z0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});z0.displayName=xM;var B0="ToastAction",bM=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(W0,{altText:n,asChild:!0,children:x.jsx(Hf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${B0}\`. Expected non-empty \`string\`.`),null)});bM.displayName=B0;var H0="ToastClose",Hf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=mM(H0,n);return x.jsx(W0,{asChild:!0,children:x.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Hf.displayName=H0;var W0=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(Vn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function q0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),SM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...q0(r))}}),t}function Ba(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?k0(o,i):o.dispatchEvent(i)}var jg=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function wM(e=()=>{}){const t=Un(e);bs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function SM(e){return e.nodeType===e.ELEMENT_NODE}function TM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var EM=j0,CM=F0,RM=V0,kM=$0,PM=z0,AM=Hf;const IM=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.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},_M=ti("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),U0=E.createContext(()=>{throw new Error("Not implemented")}),OM=()=>E.useContext(U0),Ng={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]}},MM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=_M({theme:t.theme||"default"});return x.jsx(RM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Ng[t.reversedIndex]||Ng.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(kM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(PM,{className:"select-text truncate",children:t.text})]}),r?x.jsx(AM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(ul,{className:"h-5 w-5"})}):null]})})})});function DM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=IM(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return x.jsxs(EM,{duration:n,swipeThreshold:150,children:[x.jsx(U0.Provider,{value:l,children:e}),x.jsx(vr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(MM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(CM,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const jM=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:je("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Y0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},G0=E.createContext(""),NM=e=>{const[t,n]=Y0(e.active),r=Lo(0),o=Lo(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},d=()=>{const m=c.querySelector("li[data-active=true]");return void u(m)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const m=p.getAttribute("data-id")||"";n(m)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=Mo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(G0.Provider,{value:t,children:x.jsx(Vf,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:x.jsx(cn,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},FM=()=>E.useContext(G0),LM=e=>{const t=FM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},yl=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});yl.Icon=function(t){return x.jsx("header",{...t,className:je("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};yl.Body=function(t){return x.jsx(cn,{...t,className:je("min-w-0 flex-1",t.className),children:t.children})};yl.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(cn,{...t,type:"button"})})};const VM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function xl(){return typeof window<"u"}function xr(e){return K0(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return(t=(K0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function K0(e){return xl()?e instanceof Node||e instanceof Bt(e).Node:!1}function Qe(e){return xl()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return xl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function cd(e){return!xl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ba(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $M(e){return["table","td","th"].includes(xr(e))}function bl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wf(e){const t=qf(),n=Qe(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zM(e){let t=Yn(e);for(;bt(t)&&!fr(t);){if(Wf(t))return t;if(bl(t))return null;t=Yn(t)}return null}function qf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(xr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function wl(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(xr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cd(e)&&e.host||Zn(e);return cd(t)?t.host:t}function Z0(e){const t=Yn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&ba(t)?t:Z0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Z0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=ud(a);return t.concat(a,a.visualViewport||[],ba(o)?o:[],s&&n?cr(s):[])}return t.concat(o,cr(o,[],n))}function ud(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(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 gt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&cd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Uf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function X0(){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 Q0(e){return e.mozInputSource===0&&e.isTrusted?!0:dd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yf(e){return BM()?!1:!dd()&&e.width===0&&e.height===0||dd()&&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 Gf(){return/apple/i.test(navigator.vendor)}function dd(){const e=/android/i;return e.test(Uf())||e.test(X0())}function J0(){return Uf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function BM(){return X0().includes("jsdom/")}function Wo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function HM(e){return"nativeEvent"in e}function WM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function Gc(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 Pn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const qM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Kf(e){return bt(e)&&e.matches(qM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function ew(e){return e?e.getAttribute("role")==="combobox"&&Kf(e):!1}const An=Math.min,Xt=Math.max,ws=Math.round,Co=Math.floor,pr=e=>({x:e,y:e}),UM={left:"right",right:"left",bottom:"top",top:"bottom"},YM={start:"end",end:"start"};function fd(e,t,n){return Xt(e,An(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function tw(e){return e==="x"?"y":"x"}function Zf(e){return e==="y"?"height":"width"}function Yr(e){return["top","bottom"].includes(hr(e))?"y":"x"}function Xf(e){return tw(Yr(e))}function GM(e,t,n){n===void 0&&(n=!1);const r=di(e),o=Xf(e),i=Zf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}function KM(e){const t=Ss(e);return[pd(e),t,pd(t)]}function pd(e){return e.replace(/start|end/g,t=>YM[t])}function ZM(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function XM(e,t,n,r){const o=di(e);let i=ZM(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(pd)))),i}function Ss(e){return e.replace(/left|right|bottom|top/g,t=>UM[t])}function QM(e){return{top:0,right:0,bottom:0,left:0,...e}}function nw(e){return typeof e!="number"?QM(e):{top:e,right:e,bottom:e,left:e}}function Ts(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}}/*!
170
170
  * tabbable 6.2.0
171
171
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
172
- */var JM=["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])"],Es=JM.join(","),rw=typeof Element>"u",qo=rw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cs=!rw&&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==null?void 0:e.ownerDocument},ks=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},eD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},tD=function(t,n,r){if(ks(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&qo.call(t,Es)&&o.unshift(t),o=o.filter(r),o},nD=function e(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=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=qo.call(a,Es);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!ks(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},ow=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||eD(t))&&!ow(t)?0:t.tabIndex},rD=function(t,n){var r=iw(t);return r<0&&n&&!ow(t)?0:r},oD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},aw=function(t){return t.tagName==="INPUT"},iD=function(t){return aw(t)&&t.type==="hidden"},aD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},sD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},lD=function(t){if(!t.name)return!0;var n=t.form||Cs(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=sD(o,t.form);return!i||i===t},cD=function(t){return aw(t)&&t.type==="radio"},uD=function(t){return cD(t)&&!lD(t)},dD=function(t){var n,r=t&&Cs(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=Cs(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},Fg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},fD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.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=Cs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Fg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(dD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fg(t);return!1},pD=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 qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},hD=function(t,n){return!(n.disabled||ks(n)||iD(n)||fD(n,t)||aD(n)||pD(n))},hd=function(t,n){return!(uD(n)||iw(n)<0||!hD(t,n))},mD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=rD(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(oD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},na=function(t,n){n=n||{};var r;return n.getShadowRoot?r=nD([t],n.includeContainer,{filter:hd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:mD}):r=tD(t,n.includeContainer,hd.bind(null,n)),gD(r)},vD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Es)===!1?!1:hd(n,t)};function Lg(e,t,n){let{reference:r,floating:o}=e;const i=Yr(t),a=Xf(t),s=Zf(a),l=hr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(di(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const yD=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}=Lg(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:b,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=b??d,f={...f,[h]:{...f[h],...T}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Lg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Qf(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ui(t,e),m=nw(f),h=s[p?d==="floating"?"reference":"floating":d],v=Ts(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Ts(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-w.top+m.top)/T.y,bottom:(w.bottom-v.bottom+m.bottom)/T.y,left:(v.left-w.left+m.left)/T.x,right:(w.right-v.right+m.right)/T.x}}const xD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ui(e,t)||{};if(c==null)return{};const d=nw(u),p={x:n,y:r},f=Xf(o),m=Zf(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[b]||i.floating[m]);const R=T/2-w/2,I=C/2-g[m]/2-1,A=An(d[v],I),O=An(d[y],I),N=A,V=C-g[m]-O,P=C/2-g[m]/2+R,_=fd(N,P,V),D=!l.arrow&&di(o)!=null&&P!==_&&i.reference[m]/2-(P<N?A:O)-g[m]/2<0,F=D?P<N?P-N:P-V:0;return{[f]:p[f]+F,data:{[f]:_,centerOffset:P-_-F,...D&&{alignmentOffset:F}},reset:D}}}),bD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=ui(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=hr(o),y=Yr(s),b=hr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Ss(s)]:KM(s)),S=m!=="none";!p&&S&&w.push(...XM(s,g,m,T));const C=[s,...w],R=await Qf(t,h),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(R[v]),d){const P=GM(o,a,T);I.push(R[P[0]],R[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var O,N;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,_=C[P];if(_)return{data:{index:P,overflows:A},reset:{placement:_}};let D=(N=A.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var V;const F=(V=A.filter(j=>{if(S){const z=Yr(j.placement);return z===y||z==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((j,z)=>j[1]-z[1])[0])==null?void 0:V[0];F&&(D=F);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function wD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=hr(n),s=di(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ui(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const SD=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 wD(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}}}}},TD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=ui(e,t),c={x:n,y:r},u=await Qf(t,l),d=Yr(hr(o)),p=tw(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],b=f-u[v];f=fd(y,f,b)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[h],b=m-u[v];m=fd(y,m,b)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},ED=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ui(e,t),l=await Qf(t,s),c=hr(n),u=di(n),d=Yr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,y=An(f-l[m],h),b=An(p-l[g],v),T=!t.middlewareData.shift;let w=y,S=b;if(d?S=u||T?An(b,v):v:w=u||T?An(y,h):h,T&&!u){const R=Xt(l.left,0),I=Xt(l.right,0),A=Xt(l.top,0),O=Xt(l.bottom,0);d?S=p-2*(R!==0||I!==0?R+I:Xt(l.left,l.right)):w=f-2*(A!==0||O!==0?A+O:Xt(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function sw(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=bt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ws(n)!==i||ws(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jf(e){return Qe(e)?e:e.contextElement}function Ro(e){const t=Jf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sw(t);let a=(i?ws(n.width):n.width)/r,s=(i?ws(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const CD=pr(0);function lw(e){const t=Bt(e);return!qf()||!t.visualViewport?CD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Jf(e);let a=pr(1);t&&(r?Qe(r)&&(a=Ro(r)):a=Ro(e));const s=kD(i,n,r)?lw(i):pr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Bt(i),f=r&&Qe(r)?Bt(r):r;let m=p,g=ud(m);for(;g&&r&&f!==m;){const h=Ro(g),v=g.getBoundingClientRect(),y=nn(g),b=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=T,m=Bt(g),g=ud(m)}}return Ts({width:u,height:d,x:l,y:c})}function RD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?bl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pr(1);const u=pr(0),d=bt(r);if((d||!d&&!i)&&((xr(r)!=="body"||ba(a))&&(l=wl(r)),bt(r))){const p=Gr(r);c=Ro(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function PD(e){return Array.from(e.getClientRects())}function cw(e){return Gr(Zn(e)).left+wl(e).scrollLeft}function AD(e){const t=Zn(e),n=wl(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cw(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function ID(e,t){const n=Bt(e),r=Zn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=qf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function _D(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?Ro(e):pr(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 Vg(e,t,n){let r;if(t==="viewport")r=ID(e,n);else if(t==="document")r=AD(Zn(e));else if(Qe(t))r=_D(t,n);else{const o=lw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ts(r)}function uw(e,t){const n=Yn(e);return n===t||!Qe(n)||fr(n)?!1:nn(n).position==="fixed"||uw(n,t)}function OD(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>Qe(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Yn(e):e;for(;Qe(a)&&!fr(a);){const s=nn(a),l=Wf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ba(a)&&!l&&uw(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function MD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?bl(t)?[]:OD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Vg(t,u,o);return c.top=Xt(d.top,c.top),c.right=An(d.right,c.right),c.bottom=An(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Vg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DD(e){const{width:t,height:n}=sw(e);return{width:t,height:n}}function jD(e,t,n){const r=bt(t),o=Zn(t),i=n==="fixed",a=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=pr(0);if(r||!r&&!i)if((xr(t)!=="body"||ba(o))&&(s=wl(t)),r){const d=Gr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=cw(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Kc(e){return nn(e).position==="static"}function $g(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function dw(e,t){const n=Bt(e);if(bl(e))return n;if(!bt(e)){let o=Yn(e);for(;o&&!fr(o);){if(Qe(o)&&!Kc(o))return o;o=Yn(o)}return n}let r=$g(e,t);for(;r&&$M(r)&&Kc(r);)r=$g(r,t);return r&&fr(r)&&Kc(r)&&!Wf(r)?n:r||zM(e)||n}const ND=async function(e){const t=this.getOffsetParent||dw,n=this.getDimensions,r=await n(e.floating);return{reference:jD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FD(e){return nn(e).direction==="rtl"}const LD={convertOffsetParentRelativeRectToViewportRelativeRect:RD,getDocumentElement:Zn,getClippingRect:MD,getOffsetParent:dw,getElementRects:ND,getClientRects:PD,getDimensions:DD,getScale:Ro,isElement:Qe,isRTL:FD};function VD(e,t){let n=null,r;const o=Zn(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{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Co(u),m=Co(o.clientWidth-(c+d)),g=Co(o.clientHeight-(u+p)),h=Co(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Xt(0,An(1,l))||1};let b=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function wa(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=Jf(e),u=o||i?[...c?cr(c):[],...cr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?VD(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Gr(e):null;l&&h();function h(){const v=Gr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const $D=SD,zD=TD,BD=bD,HD=ED,zg=xD,WD=(e,t,n)=>{const r=new Map,o={platform:LD,...n},i={...o.platform,_c:r};return yD(e,t,{...o,platform:i})};var os=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Rs(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(!Rs(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)&&!Rs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function fw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bg(e,t){const n=fw(e);return Math.round(t*n)/n}function Zc(e){const t=k.useRef(e);return os(()=>{t.current=e}),t}function qD(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]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Rs(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(j=>{j!==S.current&&(S.current=j,g(j))},[]),b=k.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),R=k.useRef(u),I=l!=null,A=Zc(l),O=Zc(o),N=Zc(c),V=k.useCallback(()=>{if(!S.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),WD(S.current,C.current,j).then(z=>{const M={...z,isPositioned:N.current!==!1};P.current&&!Rs(R.current,M)&&(R.current=M,Xs.flushSync(()=>{d(M)}))})},[p,t,n,O,N]);os(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const P=k.useRef(!1);os(()=>(P.current=!0,()=>{P.current=!1}),[]),os(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(A.current)return A.current(T,w,V);V()}},[T,w,V,A,I]);const _=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:b}),[y,b]),D=k.useMemo(()=>({reference:T,floating:w}),[T,w]),F=k.useMemo(()=>{const j={position:n,left:0,top:0};if(!D.floating)return j;const z=Bg(D.floating,u.x),M=Bg(D.floating,u.y);return s?{...j,transform:"translate("+z+"px, "+M+"px)",...fw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,s,D.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:V,refs:_,elements:D,floatingStyles:F}),[u,V,_,D,F])}const UD=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?zg({element:r.current,padding:o}).fn(n):{}:r?zg({element:r,padding:o}).fn(n):{}}}},Sa=(e,t)=>({...$D(e),options:[e,t]}),ep=(e,t)=>({...zD(e),options:[e,t]}),tp=(e,t)=>({...BD(e),options:[e,t]}),pw=(e,t)=>({...HD(e),options:[e,t]}),hw=(e,t)=>({...UD(e),options:[e,t]});function md(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const mw={...k},YD=mw.useInsertionEffect,GD=YD||(e=>e());function kt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return GD(()=>{t.current=e}),k.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)},[])}const np="ArrowUp",Ta="ArrowDown",Uo="ArrowLeft",fi="ArrowRight";function Ha(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Xc(e,t){return Ft(e,{disabledIndices:t})}function Hg(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&is(a,s,o));return s}function KD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===np){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}zi(e,d)&&(d=c)}if(n.key===Ta&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),zi(e,d)&&(d=c)),r==="both"){const p=Co(c/i);n.key===fi&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ha(d,i,p)&&(d=c)),n.key===Uo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ha(d,i,p)&&(d=c));const f=Co(l/i)===p;zi(e,d)&&(o&&f?d=n.key===Uo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function ZD(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function XD(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 QD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Wg=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Wg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Wg=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function JD(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 ej(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const gw=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function tj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(JD).forEach((u,d)=>{l.set(u,d)}),ej(o,l)||i(l)},[o]),k.createElement(gw.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function vw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(gw),[s,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yo.apply(this,arguments)}let qg=!1,nj=0;const Ug=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nj++;function rj(){const[e,t]=k.useState(()=>qg?Ug():void 0);return Be(()=>{e==null&&t(Ug())},[]),k.useEffect(()=>{qg=!0},[]),e}const oj=mw.useId,pi=oj||rj;let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function as(){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=ra)!=null&&e.has(o))){var i;(i=ra)==null||i.add(o),console.warn(o)}}function ij(){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=ra)!=null&&e.has(o))){var i;(i=ra)==null||i.add(o),console.error(o)}}const yw=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||as("The `ref` prop is required for `FloatingArrow`."));const h=pi(),[v,y]=k.useState(!1);if(Be(()=>{if(!o)return;nn(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const b=c*2,T=b/2,w=a/2*(l/-8+1),S=s/2*l/4,[C,R]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",O=u&&R==="end"?"bottom":"top";let N=u&&R==="end"?"right":"left";u&&v&&(N=R==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",_=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Yo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...m}}),b>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:_}),k.createElement("path",{stroke:b&&!p?g.fill:"none",d:_}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+b,height:a})))});function xw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const bw=k.createContext(null),ww=k.createContext(null),br=()=>{var e;return((e=k.useContext(bw))==null?void 0:e.id)||null},wr=()=>k.useContext(ww);function aj(e){const t=pi(),n=wr(),o=br();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function sj(e){const{children:t,id:n}=e,r=br();return k.createElement(bw.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function lj(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>xw())[0];return k.createElement(ww.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function mr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Yg=mr("safe-polygon");function Qc(e,t,n){return n&&!Wo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Sw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=wr(),m=br(),g=jt(c),h=jt(l),v=jt(n),y=k.useRef(),b=k.useRef(-1),T=k.useRef(),w=k.useRef(-1),S=k.useRef(!0),C=k.useRef(!1),R=k.useRef(()=>{}),I=k.useCallback(()=>{var _;const D=(_=o.current.openEvent)==null?void 0:_.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function _(D){let{open:F}=D;F||(clearTimeout(b.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function _(F){I()&&r(!1,F,"hover")}const D=It(a.floating).documentElement;return D.addEventListener("mouseleave",_),()=>{D.removeEventListener("mouseleave",_)}},[a.floating,n,r,s,g,I]);const A=k.useCallback(function(_,D,F){D===void 0&&(D=!0),F===void 0&&(F="hover");const j=Qc(h.current,"close",y.current);j&&!T.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,_,F),j)):D&&(clearTimeout(b.current),r(!1,_,F))},[h,r]),O=kt(()=>{R.current(),T.current=void 0}),N=kt(()=>{if(C.current){const _=It(a.floating).body;_.style.pointerEvents="",_.removeAttribute(Yg),C.current=!1}});k.useEffect(()=>{if(!s)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(M){if(clearTimeout(b.current),S.current=!1,u&&!Wo(y.current)||d>0&&!Qc(h.current,"open"))return;const $=Qc(h.current,"open",y.current);$?b.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},$):r(!0,M,"hover")}function F(M){if(_())return;R.current();const $=It(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),T.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M,!0,"safe-polygon")}});const te=T.current;$.addEventListener("mousemove",te),R.current=()=>{$.removeEventListener("mousemove",te)};return}(y.current==="touch"?!gt(a.floating,M.relatedTarget):!0)&&A(M)}function j(M){_()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M)}})(M))}if(Qe(a.domReference)){var z;const M=a.domReference;return n&&M.addEventListener("mouseleave",j),(z=a.floating)==null||z.addEventListener("mouseleave",j),p&&M.addEventListener("mousemove",D,{once:!0}),M.addEventListener("mouseenter",D),M.addEventListener("mouseleave",F),()=>{var $;n&&M.removeEventListener("mouseleave",j),($=a.floating)==null||$.removeEventListener("mouseleave",j),p&&M.removeEventListener("mousemove",D),M.removeEventListener("mouseenter",D),M.removeEventListener("mouseleave",F)}}},[a,s,e,u,d,p,A,O,N,r,n,v,f,h,g,o]),Be(()=>{var _;if(s&&n&&(_=g.current)!=null&&_.__options.blockPointerEvents&&I()){const F=It(a.floating).body;F.setAttribute(Yg,""),F.style.pointerEvents="none",C.current=!0;const j=a.floating;if(Qe(a.domReference)&&j){var D;const z=a.domReference,M=f==null||(D=f.nodesRef.current.find($=>$.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return M&&(M.style.pointerEvents=""),z.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{z.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),Be(()=>{n||(y.current=void 0,O(),N())},[n,O,N]),k.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,O,N]);const V=k.useMemo(()=>{function _(D){y.current=D.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(D){const{nativeEvent:F}=D;function j(){!S.current&&!v.current&&r(!0,F,"hover")}u&&!Wo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?j():w.current=window.setTimeout(j,d))}}},[u,r,n,v,d]),P=k.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(_){A(_.nativeEvent,!1)}}),[A]);return k.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function cj(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==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function uj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let mo=new WeakMap,Wa=new WeakSet,qa={},Jc=0;const dj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tw=e=>e&&(e.host||Tw(e.parentNode)),fj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Tw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function pj(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=fj(t,e),s=new Set,l=new Set(a),c=[];qa[o]||(qa[o]=new WeakMap);const u=qa[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(xr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(mo.get(m)||0)+1,y=(u.get(m)||0)+1;mo.set(m,v),u.set(m,y),c.push(m),v===1&&h&&Wa.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Jc++,()=>{c.forEach(f=>{const m=(mo.get(f)||0)-1,g=(u.get(f)||0)-1;mo.set(f,m),u.set(f,g),m||(!Wa.has(f)&&i&&f.removeAttribute(i),Wa.delete(f)),g||f.removeAttribute(o)}),Jc--,Jc||(mo=new WeakMap,mo=new WeakMap,Wa=new WeakSet,qa={})}}function Gg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return pj(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Go=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ew(e,t){const n=na(e,Go());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function Cw(){return Ew(document.body,"next")}function kw(){return Ew(document.body,"prev")}function Bi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function hj(e){na(e,Go()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function mj(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 gj(e,t,n){const r=e.indexOf(t);function o(a){const s=mr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||gt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const rp={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};let vj;function Kg(e){e.key==="Tab"&&(e.target,clearTimeout(vj))}const Ps=k.forwardRef(function(t,n){const[r,o]=k.useState();Be(()=>(Gf()&&o("button"),document.addEventListener("keydown",Kg),()=>{document.removeEventListener("keydown",Kg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[mr("focus-guard")]:"",style:rp};return k.createElement("span",Yo({},t,i))}),Rw=k.createContext(null),Zg=mr("portal");function yj(e){e===void 0&&(e={});const{id:t,root:n}=e,r=pi(),o=Pw(),[i,a]=k.useState(null),s=k.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{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(Zg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Qe(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(Zg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function no(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=yj({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&Bi(m)&&(m.type==="focusin"?mj:hj)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(Rw.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Ps,{"data-type":"outside",ref:l,onFocus:f=>{if(Bi(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=kw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:rp}),i&&Xs.createPortal(t,i),p&&i&&k.createElement(Ps,{"data-type":"outside",ref:c,onFocus:f=>{if(Bi(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Cw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Pw=()=>k.useContext(Rw),xj=20;let Mr=[];function eu(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!vD(t,Go())){const n=na(t,Go())[0];n&&(t=n)}Mr.push(t),Mr.length>xj&&(Mr=Mr.slice(-20))}}function Xg(){return Mr.slice().reverse().find(e=>e.isConnected)}const bj=k.forwardRef(function(t,n){return k.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:rp}))});function hi(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}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:y,elements:{domReference:b,floating:T}}=t,w=typeof a=="number"&&a<0,S=ew(b)&&w,C=dj()?i:!0,R=jt(o),I=jt(a),A=jt(s),O=wr(),N=Pw(),V=k.useRef(null),P=k.useRef(null),_=k.useRef(!1),D=k.useRef(!1),F=k.useRef(-1),j=N!=null,z=T==null?void 0:T.firstElementChild,M=(z==null?void 0:z.id)===y?z:T,$=kt(function(Z){return Z===void 0&&(Z=M),Z?na(Z,Go()):[]}),J=kt(Z=>{const U=$(Z);return R.current.map(Y=>b&&Y==="reference"?b:M&&Y==="floating"?M:U).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(Y){if(Y.key==="Tab"){gt(M,gn(It(M)))&&$().length===0&&!S&&Dt(Y);const L=J(),W=Pn(Y);R.current[0]==="reference"&&W===b&&(Dt(Y),Y.shiftKey?ir(L[L.length-1]):ir(L[1])),R.current[1]==="floating"&&W===M&&Y.shiftKey&&(Dt(Y),ir(L[0]))}}const U=It(M);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,b,M,c,R,S,$,J]),k.useEffect(()=>{if(r||!T)return;function Z(U){const Y=Pn(U),W=$().indexOf(Y);W!==-1&&(F.current=W)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,$]),k.useEffect(()=>{if(r||!d)return;function Z(){D.current=!0,setTimeout(()=>{D.current=!1})}function U(Y){const L=Y.relatedTarget;queueMicrotask(()=>{const W=!(gt(b,L)||gt(T,L)||gt(L,T)||gt(N==null?void 0:N.portalNode,L)||L!=null&&L.hasAttribute(mr("focus-guard"))||O&&(Hr(O.nodesRef.current,m).find(G=>{var ie,B;return gt((ie=G.context)==null?void 0:ie.elements.floating,L)||gt((B=G.context)==null?void 0:B.elements.domReference,L)})||cj(O.nodesRef.current,m).find(G=>{var ie,B;return((ie=G.context)==null?void 0:ie.elements.floating)===L||((B=G.context)==null?void 0:B.elements.domReference)===L})));if(l&&W&&gn(It(M))===It(M).body){bt(M)&&(M==null||M.focus());const G=F.current,ie=$(),B=ie[G]||ie[ie.length-1]||M;bt(B)&&B.focus()}(S||!c)&&L&&W&&!D.current&&L!==Xg()&&(_.current=!0,g(!1,Y))})}if(T&&bt(b))return b.addEventListener("focusout",U),b.addEventListener("pointerdown",Z),T.addEventListener("focusout",U),()=>{b.removeEventListener("focusout",U),b.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",U)}},[r,b,T,M,c,m,O,N,g,d,l,$,S]),k.useEffect(()=>{var Z;if(r)return;const U=Array.from((N==null||(Z=N.portalNode)==null?void 0:Z.querySelectorAll("["+mr("portal")+"]"))||[]);if(T){const Y=[T,...U,V.current,P.current,R.current.includes("reference")||S?b:null].filter(W=>W!=null),L=c||S?Gg(Y,C,!C):Gg(Y);return()=>{L()}}},[r,b,T,c,R,N,S,C]),Be(()=>{if(r||!bt(M))return;const Z=It(M),U=gn(Z);queueMicrotask(()=>{const Y=J(M),L=I.current,W=(typeof L=="number"?Y[L]:L.current)||M,G=gt(M,U);!w&&!G&&p&&ir(W,{preventScroll:W===M})})},[r,p,M,w,J,I]),Be(()=>{if(r||!M)return;let Z=!1;const U=It(M),Y=gn(U);let W=v.current.openEvent;const G=f.domReference.current;eu(Y);function ie(B){let{open:ye,reason:Se,event:Ie,nested:Le}=B;ye&&(W=Ie),Se==="escape-key"&&f.domReference.current&&eu(f.domReference.current),Se==="hover"&&Ie.type==="mouseleave"&&(_.current=!0),Se==="outside-press"&&(Le?(_.current=!1,Z=!0):_.current=!(Q0(Ie)||Yf(Ie)))}return h.on("openchange",ie),()=>{h.off("openchange",ie);const B=gn(U),ye=gt(T,B)||O&&Hr(O.nodesRef.current,m).some(ae=>{var ve;return gt((ve=ae.context)==null?void 0:ve.elements.floating,B)});(ye||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&eu(f.domReference.current);const Ie=G||Y,Le=na(It(Ie).body,Go());queueMicrotask(()=>{let ae=Xg();!ae&&bt(Ie)&&T&&(ae=gj(Le,Ie,T)),A.current&&!_.current&&bt(ae)&&(!(ae!==B&&B!==U.body)||ye)&&ae.focus({preventScroll:Z})})}},[r,T,M,A,v,f,h,O,m]),Be(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),Be(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const Y=M.getAttribute("tabindex"),L=$(),W=gn(It(T)),G=L.indexOf(W);G!==-1&&(F.current=G),R.current.includes("floating")||W!==f.domReference.current&&L.length===0?Y!=="0"&&M.setAttribute("tabindex","0"):Y!=="-1"&&M.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,T,M,f,R,$,w]);function te(Z){return r||!u||!c?null:k.createElement(bj,{ref:Z==="start"?V:P,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!S:!0)&&(j||c);return k.createElement(k.Fragment,null,ee&&k.createElement(Ps,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Z=>{if(c){const Y=J();ir(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(_.current=!1,Bi(Z,N.portalNode)){const Y=Cw()||b;Y==null||Y.focus()}else{var U;(U=N.beforeOutsideRef.current)==null||U.focus()}}}),!S&&te("start"),n,te("end"),ee&&k.createElement(Ps,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Z=>{if(c)ir(J()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(_.current=!0),Bi(Z,N.portalNode)){const Y=kw()||b;Y==null||Y.focus()}else{var U;(U=N.afterOutsideRef.current)==null||U.focus()}}}))}const tu=new Set,wj=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=pi();return Be(()=>{if(!r)return;tu.add(i);const a=/iP(hone|ad|od)|iOS/.test(Uf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{tu.delete(i),tu.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Yo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function Jg(e){return Kf(e)}function Ea(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}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(Wo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Wo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||Qg(m))&&(m.key===" "&&!Jg(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Qg(m)||Jg(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function Sj(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function ev(e){return e!=null&&e.clientX!=null}function Tj(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=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=kt((S,C)=>{d.current||r.current.openEvent&&!ev(r.current.openEvent)||a.setPositionReference(Sj(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=kt(S=>{c!=null||u!=null||(n?p.current||h([]):v(S.clientX,S.clientY))}),b=Wo(f)?o:n,T=k.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const S=Bt(o);function C(R){const I=Pn(R);gt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(R.clientX,R.clientY)}if(!r.current.openEvent||ev(r.current.openEvent)){S.addEventListener("mousemove",C);const R=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=R,R}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,v]);k.useEffect(()=>T(),[T,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function S(C){let{pointerType:R}=C;m(R)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const Ej={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Cj={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ro(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=wr(),h=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),b=k.useRef(!1),{escapeKey:T,outsidePress:w}=tv(f),{escapeKey:S,outsidePress:C}=tv(m),R=kt(P=>{var _;if(!n||!a||!s||P.key!=="Escape")return;const D=(_=i.current.floatingContext)==null?void 0:_.nodeId,F=g?Hr(g.nodesRef.current,D):[];if(!T&&(P.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(z=>{var M;if((M=z.context)!=null&&M.open&&!z.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,HM(P)?P.nativeEvent:P,"escape-key")}),I=kt(P=>{var _;const D=()=>{var F;R(P),(F=Pn(P))==null||F.removeEventListener("keydown",D)};(_=Pn(P))==null||_.addEventListener("keydown",D)}),A=kt(P=>{var _;const D=y.current;y.current=!1;const F=b.current;if(b.current=!1,c==="click"&&F||D||typeof v=="function"&&!v(P))return;const j=Pn(P),z="["+mr("inert")+"]",M=It(o.floating).querySelectorAll(z);let $=Qe(j)?j:null;for(;$&&!fr($);){const Z=Yn($);if(fr(Z)||!Qe(Z))break;$=Z}if(M.length&&Qe(j)&&!WM(j)&&!gt(j,o.floating)&&Array.from(M).every(Z=>!gt($,Z)))return;if(bt(j)&&V){const Z=j.clientWidth>0&&j.scrollWidth>j.clientWidth,U=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let Y=U&&P.offsetX>j.clientWidth;if(U&&nn(j).direction==="rtl"&&(Y=P.offsetX<=j.offsetWidth-j.clientWidth),Y||Z&&P.offsetY>j.clientHeight)return}const J=(_=i.current.floatingContext)==null?void 0:_.nodeId,te=g&&Hr(g.nodesRef.current,J).some(Z=>{var U;return Gc(P,(U=Z.context)==null?void 0:U.elements.floating)});if(Gc(P,o.floating)||Gc(P,o.domReference)||te)return;const ee=g?Hr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=kt(P=>{var _;const D=()=>{var F;A(P),(F=Pn(P))==null||F.removeEventListener(c,D)};(_=Pn(P))==null||_.addEventListener(c,D)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function P(F){r(!1,F,"ancestor-scroll")}const _=It(o.floating);s&&_.addEventListener("keydown",S?I:R,S),v&&_.addEventListener(c,C?O:A,C);let D=[];return p&&(Qe(o.domReference)&&(D=cr(o.domReference)),Qe(o.floating)&&(D=D.concat(cr(o.floating))),!Qe(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(cr(o.reference.contextElement)))),D=D.filter(F=>{var j;return F!==((j=_.defaultView)==null?void 0:j.visualViewport)}),D.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{s&&_.removeEventListener("keydown",S?I:R,S),v&&_.removeEventListener(c,C?O:A,C),D.forEach(F=>{F.removeEventListener("scroll",P)})}},[i,o,s,v,c,n,r,p,a,T,w,R,S,I,A,C,O]),k.useEffect(()=>{y.current=!1},[v,c]);const N=k.useMemo(()=>({onKeyDown:R,[Ej[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[R,r,u,d]),V=k.useMemo(()=>({onKeyDown:R,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Cj[c]]:()=>{y.current=!0}}),[R,c]);return k.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function kj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=pi(),i=k.useRef({}),[a]=k.useState(()=>xw()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Qe(f)&&ij("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]=k.useState(r.reference),u=kt((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function oo(e){e===void 0&&(e={});const{nodeId:t}=e,n=kj({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=wr();Be(()=>{u&&(d.current=u)},[u]);const f=qD({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(b=>{const T=Qe(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(b=>{(Qe(b)||b===null)&&(d.current=b,a(b)),(Qe(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!Qe(b))&&f.refs.setReference(b)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=y;const b=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);b&&(b.context=y)}),k.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function Rj(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=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function m(){!n&&bt(a.domReference)&&a.domReference===gn(It(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){Yf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Pn(f.nativeEvent);if(l&&Qe(m))try{if(Gf()&&J0())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Kf(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=Qe(m)&&m.hasAttribute(mr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=gn(a.domReference?a.domReference.ownerDocument:document);!m&&y===a.domReference||gt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||gt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const nv="active",rv="selected";function nu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[nv]:a,[rv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...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&&[nv,rv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function io(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>nu(s,e,"reference"),t),i=k.useCallback(s=>nu(s,e,"floating"),n),a=k.useCallback(s=>nu(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let ov=!1;function Sl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function iv(e,t){return Sl(t,e===np||e===Ta,e===Uo||e===fi)}function ru(e,t,n){return Sl(t,e===Ta,n?e===Uo:e===fi)||e==="Enter"||e===" "||e===""}function Pj(e,t,n){return Sl(t,n?e===Uo:e===fi,e===Ta)}function av(e,t,n){return Sl(t,n?e===fi:e===Uo,e===np)}function op(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:b="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:R=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||as("`useListNavigation` looping must be enabled to allow escaping."),m||as("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&T>1&&as("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),A=wr(),O=kt(s),N=k.useRef(g),V=k.useRef(c??-1),P=k.useRef(null),_=k.useRef(!0),D=k.useRef(O),F=k.useRef(!!o.floating),j=k.useRef(n),z=k.useRef(!1),M=k.useRef(!1),$=jt(y),J=jt(n),te=jt(w),ee=jt(o.floating),Z=jt(c),[U,Y]=k.useState(),[L,W]=k.useState(),G=kt(function(ae,ve,K){K===void 0&&(K=!1);function le(oe){m?(Y(oe.id),A==null||A.events.emit("virtualfocus",oe),S&&(S.current=oe)):ir(oe,{preventScroll:!0,sync:J0()&&Gf()?ov||z.current:!1})}const Q=ae.current[ve.current];Q&&le(Q),requestAnimationFrame(()=>{const oe=ae.current[ve.current]||Q;if(!oe)return;Q||le(oe);const be=te.current;be&&B&&(K||!_.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof be=="boolean"?{block:"nearest",inline:"nearest"}:be))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return ov=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?N.current&&c!=null&&(M.current=!0,V.current=c,O(c)):F.current&&(V.current=-1,D.current(null)))},[l,n,o.floating,c,O]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(F.current&&(V.current=-1,G(i,V)),(!j.current||!F.current)&&N.current&&(P.current!=null||N.current===!0&&P.current==null)){let ae=0;const ve=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ve),ae++):(V.current=P.current==null||ru(P.current,b,f)||p?Xc(i,$.current):Hg(i,$.current),P.current=null,O(V.current))};ve()}}else zi(i,a)||(V.current=a,G(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,O,G,$]),Be(()=>{var ae;if(!l||o.floating||!A||m||!F.current)return;const ve=A.nodesRef.current,K=(ae=ve.find(oe=>oe.id===I))==null||(ae=ae.context)==null?void 0:ae.elements.floating,le=gn(It(o.floating)),Q=ve.some(oe=>oe.context&&gt(oe.context.elements.floating,le));K&&!Q&&_.current&&K.focus({preventScroll:!0})},[l,o.floating,A,I,m]),Be(()=>{if(!l||!A||!m||I)return;function ae(ve){W(ve.id),S&&(S.current=ve)}return A.events.on("virtualfocus",ae),()=>{A.events.off("virtualfocus",ae)}},[l,A,m,I,S]),Be(()=>{D.current=O,F.current=!!o.floating}),Be(()=>{n||(P.current=null)},[n]),Be(()=>{j.current=n},[n]);const ie=a!=null,B=k.useMemo(()=>{function ae(K){if(!n)return;const le=i.current.indexOf(K);le!==-1&&O(le)}return{onFocus(K){let{currentTarget:le}=K;ae(le)},onClick:K=>{let{currentTarget:le}=K;return le.focus({preventScroll:!0})},...h&&{onMouseMove(K){let{currentTarget:le}=K;ae(le)},onPointerLeave(K){let{pointerType:le}=K;!_.current||le==="touch"||(V.current=-1,G(i,V),O(null),m||ir(ee.current,{preventScroll:!0}))}}}},[n,ee,G,h,i,O,m]),ye=kt(ae=>{if(_.current=!1,z.current=!0,!J.current&&ae.currentTarget===ee.current)return;if(p&&av(ae.key,b,f)){Dt(ae),r(!1,ae.nativeEvent,"list-navigation"),bt(o.domReference)&&!m&&o.domReference.focus();return}const ve=V.current,K=Xc(i,y),le=Hg(i,y);if(ae.key==="Home"&&(Dt(ae),V.current=K,O(V.current)),ae.key==="End"&&(Dt(ae),V.current=le,O(V.current)),T>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),oe=ZD(Q,T,R),be=oe.findIndex(ce=>ce!=null&&!is(i.current,ce,y)),X=oe.reduce((ce,Re,ze)=>Re!=null&&!is(i.current,Re,y)?ze:ce,-1);if(V.current=oe[KD({current:oe.map(ce=>ce!=null?i.current[ce]:null)},{event:ae,orientation:b,loop:d,cols:T,disabledIndices:QD([...y||i.current.map((ce,Re)=>is(i.current,Re)?Re:void 0),void 0],oe),minIndex:be,maxIndex:X,prevIndex:XD(V.current>le?K:V.current,Q,oe,T,ae.key===Ta?"bl":ae.key===fi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(iv(ae.key,b)){if(Dt(ae),n&&!m&&gn(ae.currentTarget.ownerDocument)===ae.currentTarget){V.current=ru(ae.key,b,f)?K:le,O(V.current);return}ru(ae.key,b,f)?d?V.current=ve>=le?u&&ve!==i.current.length?-1:K:Ft(i,{startingIndex:ve,disabledIndices:y}):V.current=Math.min(le,Ft(i,{startingIndex:ve,disabledIndices:y})):d?V.current=ve<=K?u&&ve!==-1?i.current.length:le:Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:y}):V.current=Math.max(K,Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:y})),zi(i,V.current)?O(null):O(V.current)}}),Se=k.useMemo(()=>m&&n&&ie&&{"aria-activedescendant":L||U},[m,n,ie,L,U]),Ie=k.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!ew(o.domReference)&&Se,onKeyDown:ye,onPointerMove(){_.current=!0}}),[Se,ye,o.domReference,b]),Le=k.useMemo(()=>{function ae(K){g==="auto"&&Q0(K.nativeEvent)&&(N.current=!0)}function ve(K){N.current=g,g==="auto"&&Yf(K.nativeEvent)&&(N.current=!0)}return{...Se,onKeyDown(K){_.current=!1;const le=K.key.indexOf("Arrow")===0,Q=Pj(K.key,b,f),oe=av(K.key,b,f),be=iv(K.key,b),X=(p?Q:be)||K.key==="Enter"||K.key.trim()==="";if(m&&n){const xt=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),ut=A&&xt?uj(A.nodesRef.current,xt.id):null;if(le&&ut&&S){const Ot=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||oe){var ce,Re;const fn=((ce=ut.context)==null?void 0:ce.elements.domReference)===K.currentTarget,Tn=oe&&!fn?(Re=ut.context)==null?void 0:Re.elements.domReference:Q?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===U):null;Tn&&(Dt(K),Tn.dispatchEvent(Ot),W(void 0))}if(be&&ut.context&&ut.context.open&&ut.parentId&&K.currentTarget!==ut.context.elements.domReference){var ze;Dt(K),(ze=ut.context.elements.domReference)==null||ze.dispatchEvent(Ot);return}}return ye(K)}if(!(!n&&!v&&le)){if(X&&(P.current=p&&be?null:K.key),p){Q&&(Dt(K),n?(V.current=Xc(i,$.current),O(V.current)):r(!0,K.nativeEvent,"list-navigation"));return}be&&(c!=null&&(V.current=c),Dt(K),!n&&v?r(!0,K.nativeEvent,"list-navigation"):ye(K),n&&O(V.current))}},onFocus(){n&&!m&&O(null)},onPointerDown:ve,onMouseDown:ae,onClick:ae}},[U,Se,ye,$,g,i,p,O,r,n,v,b,f,c,A,m,S]);return k.useMemo(()=>l?{reference:Le,floating:Ie,item:B}:{},[l,Le,Ie,B])}const Aj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ao(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=Aj.get(a))!=null?n:a,l=pi(),u=br()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const sv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function go(e,t){return typeof e=="function"?e(t):e}function Ij(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function _j(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]=k.useState("unmounted"),c=Ij(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Aw(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=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...go(i,c),...go(n,c)})),{isMounted:g,status:h}=_j(e,{duration:a}),v=jt(n),y=jt(r),b=jt(o),T=jt(i);return Be(()=>{const w=go(v.current,c),S=go(b.current,c),C=go(T.current,c),R=go(y.current,c)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(R).map(sv).join(","),transitionDuration:d+"ms",...C,...R}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(sv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,y,T,d,h,c]),{isMounted:g,styles:f}}function Oj(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),y=kt(s),b=kt(l),T=jt(u),w=jt(p);Be(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const S=kt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=kt(A=>{function O(D,F,j){const z=T.current?T.current(F,j):F.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return z?D.indexOf(z):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(N,N,g.current)===-1?S(!1):A.key===" "&&Dt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),S(!0)),N.every(D=>{var F,j;return D?((F=D[0])==null?void 0:F.toLocaleLowerCase())!==((j=D[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=v.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,S(!1)},d);const P=h.current,_=O(N,[...N.slice((P||0)+1),...N.slice(0,(P||0)+1)],g.current);_!==-1?(y(_),v.current=_):A.key!==" "&&(g.current="",S(!1))}),R=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&S(!1)}}),[C,S]);return k.useMemo(()=>c?{reference:R,floating:I}:{},[c,R,I])}function lv(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 Mj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Iw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,R=[S,C],I=Pn(T),A=T.type==="mouseleave",O=gt(g.floating,I),N=gt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),_=m.split("-")[0],D=p>P.right-P.width/2,F=f>P.bottom-P.height/2,j=Mj(R,V),z=P.width>V.width,M=P.height>V.height,$=(z?V:P).left,J=(z?V:P).right,te=(M?V:P).top,ee=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&Qe(T.relatedTarget)&&gt(g.floating,T.relatedTarget)||y&&Hr(y.nodesRef.current,v).some(Y=>{let{context:L}=Y;return L==null?void 0:L.open}))return;if(_==="top"&&f>=V.bottom-1||_==="bottom"&&f<=V.top+1||_==="left"&&p>=V.right-1||_==="right"&&p<=V.left+1)return w();let Z=[];switch(_){case"top":Z=[[$,V.top+1],[$,P.bottom-1],[J,P.bottom-1],[J,V.top+1]];break;case"bottom":Z=[[$,P.top+1],[$,V.bottom-1],[J,V.bottom-1],[J,P.top+1]];break;case"left":Z=[[P.right-1,ee],[P.right-1,te],[V.left+1,te],[V.left+1,ee]];break;case"right":Z=[[V.right-1,ee],[V.right-1,te],[P.left+1,te],[P.left+1,ee]];break}function U(Y){let[L,W]=Y;switch(_){case"top":{const G=[z?L+t/2:D?L+t*4:L-t*4,W+t+1],ie=[z?L-t/2:D?L+t*4:L-t*4,W+t+1],B=[[P.left,D||z?P.bottom-t:P.top],[P.right,D?z?P.bottom-t:P.top:P.bottom-t]];return[G,ie,...B]}case"bottom":{const G=[z?L+t/2:D?L+t*4:L-t*4,W-t],ie=[z?L-t/2:D?L+t*4:L-t*4,W-t],B=[[P.left,D||z?P.top+t:P.bottom],[P.right,D?z?P.top+t:P.bottom:P.top+t]];return[G,ie,...B]}case"left":{const G=[L+t+1,M?W+t/2:F?W+t*4:W-t*4],ie=[L+t+1,M?W-t/2:F?W+t*4:W-t*4];return[...[[F||M?P.right-t:P.left,P.top],[F?M?P.right-t:P.left:P.right-t,P.bottom]],G,ie]}case"right":{const G=[L-t,M?W+t/2:F?W+t*4:W-t*4],ie=[L-t,M?W-t/2:F?W+t*4:W-t*4],B=[[F||M?P.left+t:P.right,P.top],[F?M?P.left+t:P.right:P.left+t,P.bottom]];return[G,ie,...B]}}}if(!lv([S,C],Z)){if(i&&!j)return w();if(!A&&r){const Y=c(T.clientX,T.clientY);if(Y!==null&&Y<.1)return w()}lv([S,C],U([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const mi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Sa(10),tp({fallbackAxisSideDirection:"end"}),ep(),hw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=oo({open:n,middleware:i,transform:!0,whileElementsMounted:wa,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=Ea(l),u=ro(l),d=ao(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=io([c,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(no,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(hi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(yw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},Dj=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=oo({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ea(s,{enabled:e.disabled??!0}),u=ao(s,{role:"tooltip"}),d=ro(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=io([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Oo,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(pt.span,{layoutId:o,children:e.trigger})}),x.jsx(vr,{children:i?x.jsx(no,{root:t,children:x.jsx(hi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},_w=300,jj=500,Ow=(e="")=>je("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),gd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),cv=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),v=E.useContext(gd),y=br(),b=wr(),T=aj(),w=vw(),S=y!==null,{floatingStyles:C,refs:R,context:I}=oo({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:wa,placement:S?"right":"bottom-start",middleware:[Sa({mainAxis:S?0:4,alignmentAxis:S?-4:0}),tp(),ep()]}),A=ao(I,{role:"menu"}),O=ro(I,{bubbles:!0}),N=Sw(I,{move:!1,enabled:n,delay:{open:_w},handleClose:Iw({blockPointerEvents:!0})}),V=Ea(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),P=op(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),_=Oj(I,{activeIndex:f,listRef:h,resetMs:jj,onMatch:c?m:void 0}),{getReferenceProps:D,getFloatingProps:F,getItemProps:j}=io([N,V,A,O,P,_]);E.useEffect(()=>{if(!b)return;function M(){u(!1)}function $(J){J.nodeId!==T&&J.parentId===y&&u(!1)}return b.events.on("click",M),b.events.on("menuopen",$),()=>{b.events.off("click",M),b.events.off("menuopen",$)}},[b,T,y]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:y,nodeId:T})},[b,c,T,y]);const z=o?s.className:je(Ow(s.className));return x.jsxs(sj,{id:T,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Ho,{...D(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:md([R.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):x.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:md([R.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,...D(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:[a,S&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Pf,{size:14})]})]})}),x.jsx(gd.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:j,setHasFocusInside:p,isOpen:c},children:x.jsx(tj,{elementsRef:g,labelsRef:h,children:c&&x.jsx(no,{preserveTabOrder:!0,children:x.jsx(hi,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:x.jsx(t,{...F(),ref:R.setFloating,style:{...s.style,...C},className:je("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-xl outline-none",i),children:e})})})})})]})}),Nj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(gd),s=vw({label:n?null:e}),l=wr(),c=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:md([s.ref,i]),className:Ow(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),Fj=E.forwardRef((e,t)=>br()!==null?x.jsx(cv,{...e,isParent:!1,ref:t}):x.jsx(lj,{children:x.jsx(cv,{...e,isParent:!0,ref:t})})),Lj=(e,t)=>qr()?t:window.matchMedia(e).matches,Vj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Lj(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},uv=()=>window.matchMedia("@media (pointer: coarse)"),$j=()=>{var r;const e=E.useRef(qr()?null:uv()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?uv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},zj=e=>{const t=$j(),n=E.useRef(qr()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||b0())return;r.style.padding=Ky(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",Bj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},Hj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},ou={drawer:e=>e==="left"?Bj:Hj,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},Wj=ti("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] 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"}}),qj={top:0,left:0,right:0,bottom:-1},Uj=e=>e*.62,Yj=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=Uj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:qj,whileDrag:{cursor:"grabbing"},className:je("absolute rounded-lg",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?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ua={drawer:"right",sheet:"none",dialog:"none"},Gj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ua.drawer:Ua[o]:t?Ua[o]:Ua.sheet},Kj=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:m,overlayClickClose:g=!1,ariaTitle:h,...v})=>{zj(e);const y=E.useId(),b=E.useId(),T=Vj("(min-width: 64rem)"),w=f!=="dialog",S=Gj(T,d,f,m),C=T||d?ou[f]:ou.sheet,R=typeof C=="function"?C(S):C,I=T||d?f:"sheet",{refs:A,context:O}=oo({open:e,onOpenChange:s}),N=Ea(O),V=ao(O,{role:"dialog"}),P=ro(O,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:_,getFloatingProps:D}=io([N,V,P]),F=o,j=Lo(void 0),z=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Ho,{ref:A.setReference,..._({layoutId:a}),children:F}):x.jsx(pt.button,{ref:A.setReference,..._(),layoutId:a,type:"button",children:F})}):null,x.jsx(no,{children:x.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(wj,{lockScroll:!1,className:je(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(hi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:O,children:x.jsxs(pt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:R,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:a,className:je(Wj({position:S,type:I}),l),style:I==="drawer"?{width:j}:{height:j},...t?{"aria-labelledby":y,"aria-describedby":b}:{"aria-label":h},...D(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(ul,{})})}):null,w&&c?x.jsx(Yj,{onChange:s,parent:A.floating,position:S,sheet:I==="sheet",value:j}):null]})})}):null})})]})},Zj=e=>x.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),ip=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=Lf,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",y=P=>{g(P),d==null||d(P)},{refs:b,floatingStyles:T,context:w}=oo({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:wa,onOpenChange:i?void 0:y,middleware:[ep(),Sa(5),tp({fallbackAxisSideDirection:"start"}),hw({padding:5,element:h})]}),S=Sw(w,{move:!0,delay:{open:_w},enabled:l?s:!1,handleClose:c?Iw():null}),C=Rj(w,{enabled:l?a:!1}),R=Ea(w,{enabled:l?c:!1}),I=ro(w,{enabled:l}),A=ao(w,{role:"tooltip",enabled:l}),O=Tj(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:V}=io([A,I,O,a?C:void 0,s?S:void 0,c?R:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),x.jsxs(E.Fragment,{children:[x.jsx(v,{...N(p),ref:el(b.setReference,f),children:n}),m&&x.jsx(no,{preserveTabOrder:!0,children:x.jsxs(cn,{...V(),ref:b.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(yw,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class As{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)As.getDescendantProperty(s[l],i,r);else i&&As.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Vr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Vr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=As.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Vr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Vr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Vr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Tl=0,Sr=1,gi=2,Mw=4;function dv(e){return()=>e}function Xj(e){e()}function oa(e,t){return n=>e(t(n))}function fv(e,t){return()=>e(t)}function Dw(e,t){return n=>e(t,n)}function ap(e){return e!==void 0}function Qj(...e){return()=>{e.map(Xj)}}function vi(){}function El(e,t){return t(e),e}function Jj(e,t){return t(e)}function lt(...e){return e}function Ke(e,t){return e(Sr,t)}function Oe(e,t){e(Tl,t)}function sp(e){e(gi)}function Lt(e){return e(Mw)}function xe(e,t){return Ke(e,Dw(t,Tl))}function Nn(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function pv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function jw(e,t){return e===t}function at(e=jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>oa(t,e)}function Cn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=eN(...t);return(r,o)=>{switch(r){case gi:sp(e);return;case Sr:return Ke(e,n(o))}}}function In(e,t){return n=>r=>{n(t=e(t,r))}}function Ko(e){return t=>n=>{e>0?e--:t(n)}}function lr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function De(...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);Ke(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 eN(...e){return t=>e.reduceRight(Jj,t)}function tN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Sr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),vi);case gi:r(),n=null;return}}}function se(e){let t=e;const n=$e();return(r,o)=>{switch(r){case Tl:t=o;break;case Sr:{o(t);break}case Mw:return t}return n(r,o)}}function Vt(e,t){return El(se(t),n=>xe(e,n))}function $e(){const e=[];return(t,n)=>{switch(t){case Tl:e.slice().forEach(r=>{r(n)});return;case gi:e.splice(0,e.length);return;case Sr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return El($e(),t=>xe(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:nN(),singleton:n}}const nN=()=>Symbol();function rN(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 Rt(...e){const t=$e(),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);Ke(i,l=>{n[a]=l,r=r|s,r===o&&Oe(t,n)})}),function(i,a){switch(i){case gi:{sp(t);return}case Sr:return r===o&&a(n),Ke(t,a)}}}function ke(e,t=jw){return ne(e,at(t))}function hv(...e){return function(t,n){switch(t){case gi:return;case Sr:return Qj(...e.map(r=>Ke(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const oN={0:"debug",3:"error",1:"log",2:"warn"},iN=()=>typeof globalThis>"u"?window:globalThis,Tr=qe(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=iN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[oN[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Fn(e,t,n){return lp(e,t,n).callbackRef}function lp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function Nw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=aN(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?mv("column-gap",getComputedStyle(u).columnGap,o):mv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return lp(c,n,l)}function aN(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},tn.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 mv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function cp(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=lp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.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==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=qe(()=>{const e=$e(),t=$e(),n=se(0),r=$e(),o=se(0),i=$e(),a=$e(),s=se(0),l=se(0),c=se(0),u=se(0),d=$e(),p=$e(),f=se(!1),m=se(!1),g=se(!1);return xe(ne(e,pe(({scrollTop:h})=>h)),t),xe(ne(e,pe(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ia={lvl:0};function Fw(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 tt(e){return e===ia}function aa(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?aa(e.l,t):aa(e.r,t)}function wn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=wn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return wn(e.l,t,n)}function Jt(e,t,n){return tt(e)?$w(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?gv(Ct(e,{l:Jt(e.l,t,n)})):gv(Ct(e,{r:Jt(e.r,t,n)}))}function Po(){return ia}function Cl(e,t,n){if(tt(e))return[];const r=wn(e,t)[0];return sN(yd(e,r,n))}function vd(e,t){if(tt(e))return ia;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=Vw(r);return ss(Ct(e,{k:i,l:Lw(r),v:a}))}}else return t<n?ss(Ct(e,{l:vd(r,t)})):ss(Ct(e,{r:vd(o,t)}))}function $r(e){return tt(e)?[]:[...$r(e.l),{k:e.k,v:e.v},...$r(e.r)]}function yd(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(yd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(yd(i,t,n))),s}function ss(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(iu(t))return zw(Ct(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(iu(e))return xd(Ct(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=iu(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:xd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return $w(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 Lw(e){return tt(e.r)?e.l:ss(Ct(e,{r:Lw(e.r)}))}function iu(e){return tt(e)||e.lvl>e.r.lvl}function Vw(e){return tt(e.r)?[e.k,e.v]:Vw(e.r)}function $w(e,t,n,r=ia,o=ia){return{k:e,l:r,lvl:n,r:o,v:t}}function gv(e){return xd(zw(e))}function zw(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function xd(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function sN(e){return Fw(e,({k:t,v:n})=>({index:t,value:n}))}function Bw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function sa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const up=qe(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Hw(e,t,n){return e[Is(e,t,n)]}function Is(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 lN(e,t,n,r){const o=Is(e,t,r),i=Is(e,n,r,o);return e.slice(o,i+1)}function Sn(e,t){return Math.round(e.getBoundingClientRect()[t])}function kl(e){return!tt(e.groupOffsetTree)}function dp({index:e},t){return t===e?0:t<e?-1:1}function cN(){return{groupIndices:[],groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Po()}}function uN(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=Jt(e,0,i);continue}const s=Cl(e,a-1,o+1);if(s.some(vN(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=vd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));c&&(e=Jt(e,a,i))}return[e,n]}function dN(e){return typeof e.groupIndex<"u"}function fN({offset:e},t){return t===e?0:t<e?-1:1}function la(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Hw(t,e,dp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Ww(e,t){if(!kl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function qw(e,t,n){if(dN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Ww(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function pN(e,t,n,r=0){return r>0&&(t=Math.max(t,Hw(e,r,dp).offset)),Fw(lN(e,t,n,fN),gN)}function hN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>Jt(Jt(m,g,p),g+1,f),a)}else[a,s]=uN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=bd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,la(f,d,o)),Po()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function mN(e){return $r(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 vv(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 bd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Is(o,t-1,dp),s=o[l].offset;const c=wn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===wn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Cl(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function gN(e){return{index:e.index,value:e}}function vN(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 yN={offsetHeight:"height",offsetWidth:"width"},$n=qe(([{log:e},{recalcInProgress:t}])=>{const n=$e(),r=$e(),o=Vt(r,0),i=$e(),a=$e(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,S)=>Sn(w,yN[S])),p=se(void 0),f=se(0),m=cN(),g=Vt(ne(n,De(l,e,f),In(hN,m),at()),m),h=Vt(ne(l,at(),In((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);xe(ne(l,Ee(w=>w.length>0),De(g,f),pe(([w,S,C])=>{const R=w.reduce((I,A,O)=>Jt(I,A,la(A,S.offsetTree,C)||O),Po());return{...S,groupIndices:w,groupOffsetTree:R}})),g),xe(ne(r,De(g),Ee(([w,{lastIndex:S}])=>w<S),pe(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),xe(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);xe(ne(u,Ee(w=>w!==void 0&&tt(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(ne(n,De(g),In(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),pe(w=>w.changed)));Ke(ne(s,In((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:S}=Lt(g);if(w>0)Oe(t,!0),Oe(i,w+vv(w,S));else if(w<0){const C=Lt(h);C.length>0&&(w-=vv(-w,C)),Oe(a,w)}}),Ke(ne(s,De(e)),([w,S])=>{w<0&&S("`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},tn.ERROR)});const b=en(i);xe(ne(i,De(g),pe(([w,S])=>{const C=S.groupIndices.length>0,R=[],I=S.lastSize;if(C){const A=aa(S.sizeTree,0);let O=0,N=0;for(;O<w;){const P=S.groupIndices[N],_=S.groupIndices.length===N+1?1/0:S.groupIndices[N+1]-P-1;R.push({endIndex:P,size:A,startIndex:P}),R.push({endIndex:P+1+_-1,size:I,startIndex:P+1}),N++,O+=_+1}const V=$r(S.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:_,v:D})=>{let F=P.ranges;return P.prevSize!==0&&(F=[...P.ranges,{endIndex:_+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:_+w,prevSize:D,ranges:F}},{prevIndex:w,prevSize:0,ranges:R}).ranges}return $r(S.sizeTree).reduce((A,{k:O,v:N})=>({prevIndex:O+w,prevSize:N,ranges:[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(ne(a,De(g,f),pe(([w,{offsetTree:S},C])=>{const R=-w;return la(R,S,C)})));return xe(ne(a,De(g,f),pe(([w,S,C])=>{if(S.groupIndices.length>0){if(tt(S.sizeTree))return S;let R=Po();const I=Lt(h);let A=0,O=0,N=0;for(;A<-w;){N=I[O];const V=I[O+1]-N-1;O++,A+=V+1}if(R=$r(S.sizeTree).reduce((V,{k:P,v:_})=>Jt(V,Math.max(0,P+w),_),R),A!==-w){const V=aa(S.sizeTree,N);R=Jt(R,0,V);const P=wn(S.sizeTree,-w+1)[1];R=Jt(R,1,P)}return{...S,sizeTree:R,...bd(S.offsetTree,0,R,C)}}else{const R=$r(S.sizeTree).reduce((I,{k:A,v:O})=>Jt(I,Math.max(0,A+w),O),Po());return{...S,sizeTree:R,...bd(S.offsetTree,0,R,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},lt(Tr,up),{singleton:!0});function xN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Uw=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=$e(),a=$e(),s=en(ne(i,pe(xN)));return xe(ne(s,pe(l=>l.totalCount)),n),xe(ne(s,pe(l=>l.groupIndices)),e),xe(ne(Rt(o,t,r),Ee(([l,c])=>kl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),at(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},lt($n,Wt)),Er=qe(([{log:e}])=>{const t=se(!1),n=en(ne(t,Ee(r=>r),at()));return Ke(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},lt(Tr),{singleton:!0}),bN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Yw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ca=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=$e(),m=$e(),g=se(0);let h=null,v=null,y=null;function b(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Oe(l,!1)}return xe(ne(f,De(n,d,r,g,s,a,p),De(e,i,o),pe(([[T,w,S,C,R,I,A,O],N,V,P])=>{const _=Yw(T),{align:D,behavior:F,offset:j}=_,z=C-1,M=qw(_,w,z);let $=la(M,w.offsetTree,N)+I;D==="end"?($+=V+wn(w.sizeTree,M)[1]-S+P,M===z&&($+=A)):D==="center"?$+=(V+wn(w.sizeTree,M)[1]-S+P)/2:$-=R,j&&($+=j);const J=te=>{b(),te?(O("retrying to scroll to",{location:T},tn.DEBUG),Oe(f,T)):(Oe(m,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),F==="smooth"){let te=!1;y=Ke(t,ee=>{te=te||ee}),h=Nn(u,()=>{J(te)})}else h=Nn(ne(t,wN(150)),J);return v=setTimeout(()=>{b()},1200),Oe(l,!0),O("scrolling from index to",{behavior:F,index:M,top:$},tn.DEBUG),{behavior:F,top:$}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},lt($n,Wt,Tr),{singleton:!0});function wN(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 ka=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),s),xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),c),Ke(ne(Rt(t,a),De(s,n,e,c),Ee(([[,u],d,{sizeTree:p},f,m])=>u&&(!tt(p)||ap(f))&&!d&&!m),De(l)),([,u])=>{Nn(o,()=>{Oe(c,!0)}),fp(4,()=>{Nn(r,()=>{Oe(s,!0)}),Oe(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},lt($n,Wt,Ca,Er),{singleton:!0});function Gw(e,t){return Math.abs(e-t)<1.01}const ca="up",Hi="down",SN="none",TN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},EN=0,Ra=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=$e(),c=$e(),u=se(4),d=se(EN),p=Vt(ne(hv(ne(ke(o),Ko(1),Cn(!0)),ne(ke(o),Ko(1),Cn(!1),pv(100))),at()),!1),f=Vt(ne(hv(ne(n,Cn(!0)),ne(n,Cn(!1),pv(200))),at()),!1);xe(ne(Rt(ke(o),ke(d)),pe(([y,b])=>y<=b),at()),s),xe(ne(s,lr(50)),c);const m=en(ne(Rt(r,ke(i),ke(t),ke(e),ke(u)),In((y,[{scrollHeight:b,scrollTop:T},w,S,C,R])=>{const I=T+w-b>-R,A={scrollHeight:b,scrollTop:T,viewportHeight:w};if(I){let N,V;return T>y.state.scrollTop?(N="SCROLLED_DOWN",V=y.state.scrollTop-T):(N="SIZE_DECREASED",V=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:A}}let O;return A.scrollHeight>y.state.scrollHeight?O="SIZE_INCREASED":w<y.state.viewportHeight?O="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?O="SCROLLING_UPWARDS":O="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:O,state:A}},TN),at((y,b)=>y&&y.atBottom===b.atBottom))),g=Vt(ne(r,In((y,{scrollHeight:b,scrollTop:T,viewportHeight:w})=>{if(Gw(y.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:T};{const S=b-(T+w)<1;return y.scrollTop!==T&&S?{changed:!0,jump:y.scrollTop-T,scrollHeight:b,scrollTop:T}:{changed:!0,jump:0,scrollHeight:b,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ee(y=>y.changed),pe(y=>y.jump)),0);xe(ne(m,pe(y=>y.atBottom)),a),xe(ne(a,lr(50)),l);const h=se(Hi);xe(ne(r,pe(({scrollTop:y})=>y),at(),In((y,b)=>Lt(f)?{direction:y.direction,prevScrollTop:b}:{direction:b<y.prevScrollTop?ca:Hi,prevScrollTop:b},{direction:Hi,prevScrollTop:0}),pe(y=>y.direction)),h),xe(ne(r,lr(50),Cn(SN)),h);const v=se(0);return xe(ne(p,Ee(y=>!y),Cn(0)),v),xe(ne(o,lr(100),De(p),Ee(([y,b])=>!!b),In(([y,b],[T])=>[b,T],[0,0]),pe(([y,b])=>b-y)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},lt(Wt)),_s="top",Os="bottom",yv="none";function xv(e,t,n){return typeof e=="number"?n===ca&&t===_s||n===Hi&&t===Os?e:0:n===ca?t===_s?e.main:e.reverse:t===Os?e.main:e.reverse}function bv(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=$e(),a=se(0),s=se(0),l=se(0),c=Vt(ne(Rt(ke(r),ke(o),ke(n),ke(i,sa),ke(l),ke(a),ke(t),ke(e),ke(s)),pe(([u,d,p,[f,m],g,h,v,y,b])=>{const T=u-y,w=h+v,S=Math.max(p-T,0);let C=yv;const R=bv(b,_s),I=bv(b,Os);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-R&&(C=ca),m<u-S+d+I&&(C=Hi),C!==yv?[Math.max(T-p-xv(g,_s,C)-R,0),T-S-v+d+xv(g,Os,C)+I]:null}),Ee(u=>u!=null),at(sa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},lt(Wt),{singleton:!0});function CN(e,t,n){if(kl(t)){const r=Ww(e,t);return[{index:wn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const au={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ls(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,m=p-u;return{bottom:u,firstItemIndex:i,items:wv(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:wv(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Kw(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 ls(c,[],s,o,n,r)}function wv(e,t,n){if(e.length===0)return[];if(!kl(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=Cl(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const so=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),v=$e();xe(i.topItemsIndexes,g);const y=Vt(ne(Rt(f,m,ke(l,sa),ke(o),ke(r),ke(c),u,ke(g),ke(t),ke(n),e),Ee(([S,C,,R,,,,,,,I])=>{const A=I&&I.length!==R;return S&&!C&&!A}),pe(([,,[S,C],R,I,A,O,N,V,P,_])=>{const D=I,{offsetTree:F,sizeTree:j}=D,z=Lt(h);if(R===0)return{...au,totalCount:R};if(S===0&&C===0)return z===0?{...au,totalCount:R}:Kw(z,A,I,V,P,_||[]);if(tt(j))return z>0?null:ls(CN(pp(A,R),D,_),[],R,P,D,V);const M=[];if(N.length>0){const Z=N[0],U=N[N.length-1];let Y=0;for(const L of Cl(j,Z,U)){const W=L.value,G=Math.max(L.start,Z),ie=Math.min(L.end,U);for(let B=G;B<=ie;B++)M.push({data:_==null?void 0:_[B],index:B,offset:Y,size:W}),Y+=W}}if(!O)return ls([],M,R,P,D,V);const $=N.length>0?N[N.length-1]+1:0,J=pN(F,S,C,$);if(J.length===0)return null;const te=R-1,ee=El([],Z=>{for(const U of J){const Y=U.value;let L=Y.offset,W=U.start;const G=Y.size;if(Y.offset<S){W+=Math.floor((S-Y.offset+P)/(G+P));const B=W-U.start;L+=B*G+B*P}W<$&&(L+=($-W)*G,W=$);const ie=Math.min(U.end,te);for(let B=W;B<=ie&&!(L>=C);B++)Z.push({data:_==null?void 0:_[B],index:B,offset:L,size:G}),L+=G+P}});return ls(ee,M,R,P,D,V)}),Ee(S=>S!==null),at()),au);xe(ne(e,Ee(ap),pe(S=>S==null?void 0:S.length)),o),xe(ne(y,pe(S=>S.topListHeight)),d),xe(d,s),xe(ne(y,pe(S=>[S.top,S.bottom])),a),xe(ne(y,pe(S=>S.items)),v);const b=en(ne(y,Ee(({items:S})=>S.length>0),De(o,e),Ee(([{items:S},C])=>S[S.length-1].originalIndex===C-1),pe(([,S,C])=>[S-1,C]),at(sa),pe(([S])=>S))),T=en(ne(y,lr(200),Ee(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),pe(({items:S})=>S[0].index),at())),w=en(ne(y,Ee(({items:S})=>S.length>0),pe(({items:S})=>{let C=0,R=S.length-1;for(;S[C].type==="group"&&C<R;)C++;for(;S[R].type==="group"&&R>C;)R--;return{endIndex:S[R].index,startIndex:S[C].index}}),at(Bw)));return{endReached:b,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},lt($n,Uw,hp,ka,Ca,Ra,Er,up),{singleton:!0}),Zw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=$e(),a=Vt(ne(Rt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},lt(Wt,so),{singleton:!0}),kN=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Vt(ne(Rt(n,e,t),Ee(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),at()),0);return{alignToBottom:n,paddingTopAddition:r}},lt(Wt,Zw),{singleton:!0});function Sv(e){return e?e==="smooth"?"smooth":"auto":!1}const RN=(e,t)=>typeof e=="function"?Sv(e(t)):t&&Sv(e),PN=qe(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=$e();let p=null;function f(g){Oe(o,{align:"end",behavior:g,index:"LAST"})}Ke(ne(Rt(ne(ke(t),Ko(1)),a),De(ke(u),r,i,c),pe(([[g,h],v,y,b,T])=>{let w=h&&b,S="auto";return w&&(S=RN(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ee(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Nn(e,()=>{Lt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Nn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return Ke(ne(Rt(ke(u),t,s),Ee(([g,,h])=>g&&h),In(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ee(({refreshed:g})=>g),De(u,t)),([,g])=>{Lt(i)&&m(g!==!1)}),Ke(d,()=>{m(Lt(u)!==!1)}),Ke(Rt(ke(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},lt($n,Ra,Ca,ka,Er,Tr,Wt)),AN=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(ne(s,De(i),Ee(([,l])=>l!==0),De(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Kw(l,c,u,d,p,f))),a),{}),lt($n,ka,so,Er),{singleton:!0}),IN=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return Ke(ne(e,De(r),Ee(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ne(n,Ko(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,o)})})}),{initialScrollTop:r}},lt(Er,Wt,so),{singleton:!0}),_N=({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,ON=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=$e();return xe(ne(u,De(t,l,n,i,o,r,s),De(e),pe(([[d,p,f,m,g,h,v,y],b])=>{const{align:T,behavior:w,calculateViewLocation:S=_N,done:C,...R}=d,I=qw(d,p,m-1),A=la(I,p.offsetTree,b)+g+h,O=A+wn(p.sizeTree,I)[1],N=y+h,V=y+f-v,P=S({itemBottom:O,itemTop:A,locationParams:{align:T,behavior:w,...R},viewportBottom:V,viewportTop:N});return P?C&&Nn(ne(a,Ee(_=>!_),Ko(Lt(a)?1:2)),C):C&&C(),P}),Ee(d=>d!==null)),c),{scrollIntoView:u}},lt($n,Wt,Ca,so,Tr),{singleton:!0}),Xw=qe(([{scrollVelocity:e}])=>{const t=se(!1),n=$e(),r=se(!1);return xe(ne(e,De(r,t,n),Ee(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),at()),t),Ke(ne(Rt(t,e,n),De(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},lt(Ra),{singleton:!0}),mp=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=$e(),r=$e(),o=$e(),i=se(!1),a=se(void 0);return xe(ne(Rt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(ne(t,De(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},lt(Wt)),MN=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=$e(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),Ke(ne(c,De(t,r,a,d,p,n)),([f,m,g,h,v,y,b])=>{const T=mN(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=b,f({ranges:T,scrollTop:g})}),xe(ne(u,Ee(ap),pe(DN)),o),xe(ne(i,De(u),Ee(([,f])=>f!==void 0),at(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},lt($n,Wt,ka,Er,mp));function DN(e){return{align:"start",index:0,offset:e.scrollTop}}const jN=qe(([{topItemsIndexes:e}])=>{const t=se(0);return xe(ne(t,Ee(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},lt(so));function Qw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const NN=Qw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),FN=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(ne(l,De(a),In(([,v,y,b],[{bottom:T,items:w,offsetBottom:S,totalCount:C},R])=>{const I=T+S;let A=0;return y===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(A=I-b,A!==0&&(A+=R))),[A,w,C,I]},[0,[],0,0]),Ee(([v])=>v!==0),De(r,s,n,o,f,m),Ee(([,v,y,b,,,T])=>!T&&!b&&v!==0&&y===ca),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Oe(t,{behavior:"auto",top:-v}),Oe(e,0)):(Oe(e,0),Oe(t,{behavior:"auto",top:-v}))}return Ke(ne(g,De(e,i)),([v,y,b])=>{b&&NN()?Oe(e,y-v):h(-v)}),Ke(ne(Rt(Vt(i,!1),e,m),Ee(([v,y,b])=>!v&&!b&&y!==0),pe(([v,y])=>y),lr(1)),h),xe(ne(d,pe(v=>({top:-v}))),t),Ke(ne(c,De(p,u),pe(([v,{groupIndices:y,lastSize:b,sizeTree:T},w])=>{function S(C){return C*(b+w)}if(y.length===0)return S(v);{let C=0;const R=aa(T,0);let I=0,A=0;for(;I<v;){I++,C+=R;let O=y.length===A+1?1/0:y[A+1]-y[A]-1;I+O>v&&(C-=R,O=v-I+1),I+=O,C+=S(O),A++}return C}})),v=>{Oe(e,v),requestAnimationFrame(()=>{Oe(t,{top:v}),requestAnimationFrame(()=>{Oe(e,0),Oe(m,!1)})})}),{deviation:e}},lt(Wt,Ra,so,$n,Tr,up)),LN=qe(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),lt(hp,AN,Er,Xw,Zw,IN,kN,mp,ON,Tr)),Jw=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:y,topItemsIndexes:b,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:R},I])=>(xe(T.rangeChanged,I.scrollSeekRangeChanged),xe(ne(I.windowViewportRect,pe(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:R,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...I,...g,sizes:l,...h}),lt($n,ka,Wt,MN,PN,so,Ca,FN,jN,Uw,LN));function VN(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 Ya=typeof document<"u"?E.useLayoutEffect:E.useEffect;function gp(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=E.createContext({});function l(h,v){h.propsReady&&Oe(h.propsReady,!1);for(const y of r){const b=h[t.required[y]];Oe(b,v[y])}for(const y of o)if(y in v){const b=h[t.optional[y]];Oe(b,v[y])}h.propsReady&&Oe(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=b=>{const T=h[t.methods[y]];Oe(T,b)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=tN(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...b}=h,[T]=E.useState(()=>El(rN(e),C=>{l(C,b)})),[w]=E.useState(fv(u,T));Ya(()=>{for(const C of a)C in b&&Ke(w[C],b[C]);return()=>{Object.values(w).map(sp)}},[b,w,T]),Ya(()=>{l(T,b)}),E.useImperativeHandle(v,dv(c(T)));const S=n;return x.jsx(s.Provider,{value:T,children:n?x.jsx(S,{...VN([...r,...o,...a],b),children:y}):y})}),p=h=>E.useCallback(Dw(Oe,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(b=>Ke(v,b),[v]);return E.useSyncExternalStore(y,()=>Lt(v),()=>Lt(v))},m=h=>{const v=E.useContext(s)[h],[y,b]=E.useState(fv(Lt,v));return Ya(()=>Ke(v,T=>{T!==y&&b(dv(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];Ya(()=>Ke(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const Rl=E.createContext(void 0),e1=E.createContext(void 0),t1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function su(e){return"self"in e}function $N(e){return"body"in e}function n1(e,t,n,r=vi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if($N(h)||su(h)){const y=su(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():ha.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;su(f)?(h=Math.max(Sn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=Sn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),Gw(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const lu="-webkit-sticky",Tv="sticky",r1=Qw(()=>{if(typeof document>"u")return Tv;const e=document.createElement("div");return e.style.position=lu,e.style.position===lu?lu:Tv});function vp(e){return e}const zN=qe(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(vp),i=se("div"),a=se(vi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),at()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),BN=qe(([e,t])=>({...e,...t}),lt(Jw,zN)),HN=({height:e})=>x.jsx("div",{style:{height:e}}),WN={overflowAnchor:"none",position:r1(),zIndex:1},o1={overflowAnchor:"none"},qN={...o1,display:"inline-block",height:"100%"},Ev=E.memo(function({showTopList:e=!1}){const t=Pe("listState"),n=sn("sizeRanges"),r=Pe("useWindowScroll"),o=Pe("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Pe("itemContent"),c=Pe("context"),u=Pe("groupContent"),d=Pe("trackItemSizes"),p=Pe("itemSize"),f=Pe("log"),m=sn("gap"),g=Pe("horizontalDirection"),{callbackRef:h}=Nw(n,p,d,e?vi:s,f,m,o,g,Pe("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);bp("deviation",P=>{v!==P&&y(P)});const b=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||HN,w=Pe("ListComponent"),S=Pe("ItemComponent"),C=Pe("GroupComponent"),R=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,O=Pe("alignToBottom"),N=Pe("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:O?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:O?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...st(b,c)}):x.jsx(w,{...st(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:V,children:(e?t.topItems:t.items).map(P=>{const _=P.originalIndex,D=R(_+t.firstItemIndex,P.data,c);return I?E.createElement(T,{...st(T,c),height:P.size,index:P.index,key:D,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...st(C,c),"data-index":_,"data-item-index":P.index,"data-known-size":P.size,key:D,style:WN},u(P.index,c)):E.createElement(S,{...st(S,c),...i1(S,P.data),"data-index":_,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:D,style:g?qN:o1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),UN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},YN={outline:"none",overflowX:"auto",position:"relative"},yi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),GN={position:r1(),top:0,width:"100%",zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function i1(e,t){return{item:typeof e=="string"?void 0:t}}const KN=E.memo(function(){const e=Pe("HeaderComponent"),t=sn("headerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),ZN=E.memo(function(){const e=Pe("FooterComponent"),t=sn("footerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null});function yp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=n1(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?YN:UN,...o},tabIndex:0,...i,...st(s,u),children:r})})}function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=n1(a,l,s,m,d);return t1(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...st(s,p),children:r})})}const XN=({children:e})=>{const t=E.useContext(Rl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Pe("alignToBottom"),i=Pe("horizontalDirection"),a=E.useMemo(()=>oa(n,l=>Sn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Pe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:yi(o),children:e})},QN=({children:e})=>{const t=E.useContext(Rl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Pe("customScrollParent"),i=cp(n,o,Pe("skipAnimationFrameInResizeObserver")),a=Pe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(a),children:e})},JN=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...GN,marginTop:`${n}px`},o=Pe("context");return x.jsx(t,{style:r,...st(t,o),children:e})},eF=E.memo(function(e){const t=Pe("useWindowScroll"),n=Pe("topItemsIndexes").length>0,r=Pe("customScrollParent"),o=Pe("context"),i=r||t?rF:nF,a=r||t?QN:XN;return x.jsxs(i,{...e,...st(i,o),children:[n&&x.jsx(JN,{children:x.jsx(Ev,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(KN,{}),x.jsx(Ev,{}),x.jsx(ZN,{})]})]})}),{Component:tF,useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}=gp(BN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},eF),nF=yp({useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}),rF=xp({useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}),wp=tF,oF=qe(()=>{const e=se(l=>x.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(vp),a=se(vi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),at()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),iF=qe(([e,t])=>({...e,...t}),lt(Jw,oF)),aF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),sF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),lF={overflowAnchor:"none"},Cv=E.memo(function({showTopList:e=!1}){const t=Me("listState"),n=Me("computeItemKey"),r=Me("firstItemIndex"),o=Me("isSeeking"),i=Me("ScrollSeekPlaceholder")||aF,a=Me("context"),s=Me("TableRowComponent"),l=Me("fixedHeaderHeight"),c=Me("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...st(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...st(s,a),...i1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:lF},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),cF=E.memo(function(){const e=Me("listState"),t=Me("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Me("useWindowScroll"),o=Me("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Me("trackItemSizes"),c=Me("itemSize"),u=Me("log"),{callbackRef:d,ref:p}=Nw(n,c,l,s,u,void 0,o,!1,Me("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Sp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=Me("EmptyPlaceholder"),h=Me("FillerRow")||sF,v=Me("TableBodyComponent"),y=Me("paddingTopAddition"),b=Me("statefulTotalCount"),T=Me("context");if(b===0&&g)return x.jsx(g,{...st(g,T)});const w=(t?e.topItems:[]).reduce((A,O)=>A+O.size,0),S=e.offsetTop+y+f-w,C=e.offsetBottom,R=S>0?x.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?x.jsx(h,{context:T,height:C},"padding-bottom"):null;return x.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...st(v,T),children:[R,t&&x.jsx(Cv,{showTopList:!0}),x.jsx(Cv,{}),I]})}),uF=({children:e})=>{const t=E.useContext(Rl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>oa(n,i=>Sn(i,"height")),[n]),!0,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:yi(!1),children:e})},dF=({children:e})=>{const t=E.useContext(Rl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Me("customScrollParent"),i=cp(n,o,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(!1),children:e})},fF=E.memo(function(e){const t=Me("useWindowScroll"),n=Me("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Me("fixedHeaderContent"),a=Me("fixedFooterContent"),s=Me("context"),l=Fn(E.useMemo(()=>oa(r,v=>Sn(v,"height")),[r]),!0,Me("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>oa(o,v=>Sn(v,"height")),[o]),!0,Me("skipAnimationFrameInResizeObserver")),u=n||t?mF:hF,d=n||t?dF:uF,p=Me("TableComponent"),f=Me("TableHeadComponent"),m=Me("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...st(f,s),children:i()},"TableHead"):null,h=a?x.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...st(m,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...st(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...st(p,s),children:[g,x.jsx(cF,{},"TableBody"),h]})})})}),{Component:pF,useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}=gp(iF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},fF),hF=yp({useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}),mF=xp({useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}),gF=pF,kv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},vF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Rv,floor:Ms,max:Wi,min:cu,round:Pv}=Math;function Av(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function yF(e){return{...vF,items:e}}function Ga(e,t){return e&&e.width===t.width&&e.height===t.height}function xF(e,t){return e&&e.column===t.column&&e.row===t.row}const bF=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T},w])=>{const S=se(0),C=se(0),R=se(kv),I=se({height:0,width:0}),A=se({height:0,width:0}),O=$e(),N=$e(),V=se(0),P=se(null),_=se({column:0,row:0}),D=$e(),F=$e(),j=se(!1),z=se(0),M=se(!0),$=se(!1),J=se(!1);Ke(ne(m,De(z),Ee(([L,W])=>!!W)),()=>{Oe(M,!1)}),Ke(ne(Rt(m,M,A,I,z,$),Ee(([L,W,G,ie,,B])=>L&&!W&&G.height!==0&&ie.height!==0&&!B)),([,,,,L])=>{Oe($,!0),fp(1,()=>{Oe(O,L)}),Nn(ne(c),()=>{Oe(t,[0,0]),Oe(M,!0)})}),xe(ne(F,Ee(L=>L!=null&&L.scrollTop>0),Cn(0)),C),Ke(ne(m,De(F),Ee(([,L])=>L!=null)),([,L])=>{L&&(Oe(I,L.viewport),Oe(A,L.item),Oe(_,L.gap),L.scrollTop>0&&(Oe(j,!0),Nn(ne(c,Ko(1)),W=>{Oe(j,!1)}),Oe(l,{top:L.scrollTop})))}),xe(ne(I,pe(({height:L})=>L)),d),xe(ne(Rt(ke(I,Ga),ke(A,Ga),ke(_,(L,W)=>L&&L.column===W.column&&L.row===W.row),ke(c)),pe(([L,W,G,ie])=>({gap:G,item:W,scrollTop:ie,viewport:L}))),D),xe(ne(Rt(ke(S),r,ke(_,xF),ke(A,Ga),ke(I,Ga),ke(P),ke(C),ke(j),ke(M),ke(z)),Ee(([,,,,,,,L])=>!L),pe(([L,[W,G],ie,B,ye,Se,Ie,,Le,ae])=>{const{column:ve,row:K}=ie,{height:le,width:Q}=B,{width:oe}=ye;if(Ie===0&&(L===0||oe===0))return kv;if(Q===0){const fn=pp(ae,L),Tn=fn+Math.max(Ie-1,0);return yF(Av(fn,Tn,Se))}const be=a1(oe,Q,ve);let X,ce;Le?W===0&&G===0&&Ie>0?(X=0,ce=Ie-1):(X=be*Ms((W+K)/(le+K)),ce=be*Rv((G+K)/(le+K))-1,ce=cu(L-1,Wi(ce,be-1)),X=cu(ce,Wi(0,X))):(X=0,ce=-1);const Re=Av(X,ce,Se),{bottom:ze,top:xt}=Iv(ye,ie,B,Re),ut=Rv(L/be),Ot=ut*le+(ut-1)*K-ze;return{bottom:ze,itemHeight:le,items:Re,itemWidth:Q,offsetBottom:Ot,offsetTop:xt,top:xt}})),R),xe(ne(P,Ee(L=>L!==null),pe(L=>L.length)),S),xe(ne(Rt(I,A,R,_),Ee(([L,W,{items:G}])=>G.length>0&&W.height!==0&&L.height!==0),pe(([L,W,{items:G},ie])=>{const{bottom:B,top:ye}=Iv(L,ie,W,G);return[ye,B]}),at(sa)),t);const te=se(!1);xe(ne(c,De(te),pe(([L,W])=>W||L!==0)),te);const ee=en(ne(Rt(R,S),Ee(([{items:L}])=>L.length>0),De(te),Ee(([[L,W],G])=>{const ie=L.items[L.items.length-1].index===W-1;return(G||L.bottom>0&&L.itemHeight>0&&L.offsetBottom===0&&L.items.length===W)&&ie}),pe(([[,L]])=>L-1),at())),Z=en(ne(ke(R),Ee(({items:L})=>L.length>0&&L[0].index===0),Cn(0),at())),U=en(ne(ke(R),De(j),Ee(([{items:L},W])=>L.length>0&&!W),pe(([{items:L}])=>({endIndex:L[L.length-1].index,startIndex:L[0].index})),at(Bw),lr(0)));xe(U,f.scrollSeekRangeChanged),xe(ne(O,De(I,A,S,_),pe(([L,W,G,ie,B])=>{const ye=Yw(L),{align:Se,behavior:Ie,offset:Le}=ye;let ae=ye.index;ae==="LAST"&&(ae=ie-1),ae=Wi(0,ae,cu(ie-1,ae));let ve=wd(W,B,G,ae);return Se==="end"?ve=Pv(ve-W.height+G.height):Se==="center"&&(ve=Pv(ve-W.height/2+G.height/2)),Le&&(ve+=Le),{behavior:Ie,top:ve}})),l);const Y=Vt(ne(R,pe(L=>L.offsetBottom+L.bottom)),0);return xe(ne(T,pe(L=>({height:L.visibleHeight,width:L.visibleWidth}))),I),{customScrollParent:h,data:P,deviation:V,footerHeight:o,gap:_,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:F,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:O,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T,...f,gridState:R,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:D,stateRestoreInProgress:j,...w}},lt(hp,Wt,Ra,Xw,Er,mp,Tr));function a1(e,t,n){return Wi(1,Ms((e+n)/(Ms(t)+n)))}function Iv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=wd(e,t,n,r[0].index);return{bottom:wd(e,t,n,r[r.length-1].index)+o,top:i}}function wd(e,t,n,r){const o=a1(e.width,n.width,t.column),i=Ms(r/o),a=i*n.height+Wi(0,i-1)*t.row;return a>0?a+t.row:a}const wF=qe(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(vp),a=se("div"),s=se(vi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),at()),p),c=se(!1),u=se(!1);return xe(ke(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),SF=qe(([e,t])=>({...e,...t}),lt(bF,wF)),TF=E.memo(function(){const e=ct("gridState"),t=ct("listClassName"),n=ct("itemClassName"),r=ct("itemContent"),o=ct("computeItemKey"),i=ct("isSeeking"),a=ln("scrollHeight"),s=ct("ItemComponent"),l=ct("ListComponent"),c=ct("ScrollSeekPlaceholder"),u=ct("context"),d=ln("itemDimensions"),p=ln("gap"),f=ct("log"),m=ct("stateRestoreInProgress"),g=ln("reportReadyState"),h=Fn(E.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const b=v.firstChild;if(b){const{height:T,width:w}=b.getBoundingClientRect();d({height:T,width:w})}p({column:_v("column-gap",getComputedStyle(v).columnGap,f),row:_v("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return t1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:x.jsx(l,{className:t,ref:h,...st(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?x.jsx(c,{...st(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...st(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),EF=E.memo(function(){const e=ct("HeaderComponent"),t=ln("headerHeight"),n=ct("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=ct("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),CF=E.memo(function(){const e=ct("FooterComponent"),t=ln("footerHeight"),n=ct("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=ct("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),kF=({children:e})=>{const t=E.useContext(e1),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Fn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:yi(!1),children:e})},RF=({children:e})=>{const t=E.useContext(e1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=ct("customScrollParent"),i=cp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:yi(!1),children:e})},PF=E.memo(function({...e}){const t=ct("useWindowScroll"),n=ct("customScrollParent"),r=n||t?IF:AF,o=n||t?RF:kF,i=ct("context");return x.jsx(r,{...e,...st(r,i),children:x.jsxs(o,{children:[x.jsx(EF,{}),x.jsx(TF,{}),x.jsx(CF,{})]})})}),{useEmitter:s1,useEmitterValue:ct,usePublisher:ln}=gp(SF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},PF),AF=yp({useEmitter:s1,useEmitterValue:ct,usePublisher:ln}),IF=xp({useEmitter:s1,useEmitterValue:ct,usePublisher:ln});function _v(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Tp=()=>{const e=E.useContext(li);return e?e.tweaks:ml},l1=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("span",{className:je("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(ip,{as:"button",type:"button","aria-description":r,title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(qb,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[x.jsx(Hb,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(vA,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),Pa=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:b,reportStatus:T},w)=>{const S=Tp(),C=T!==void 0?T:S.input.iconFeedback,R=d??f,I=_t(),A=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:je("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[x.jsxs("label",{form:u,htmlFor:R,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(l1,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:A||n?x.jsxs(E.Fragment,{children:[y?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.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}),x.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})]})}),_F=e=>x.jsx(E.Fragment,{children:e.children}),OF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},MF={caseSensitive:!1,sort:!1},DF=[],jF=E.forwardRef(function(t,n){return x.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),NF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),FF={List:jF,Item:NF},vo=320,uu=40,LF=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=E.useRef(null),y=E.useRef(null),b=g.value??g.defaultValue??"",T=_t(),[w,S]=E.useState(()=>Math.min(vo,uu*o.length)),[C,R]=E.useState(!1),[I,A]=E.useState(""),[O,N]=E.useState(b),[V,P]=E.useState(()=>{var K;return((K=o.find(le=>le.value===b))==null?void 0:K.label)??b}),[_,D]=E.useState(null),F=E.useRef(DF),j=m&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Vr(j,["value","label"],MF).search(I),M=()=>{R(!1),S(0)},$=z.filter(K=>K.hidden!==!0),J=m?void 0:`^(${o.map(K=>`${rd(K.value)}${K.label?"|"+rd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(le=>le.value===g.value);N((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||S(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let le=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min($.length,10)).forEach(be=>{const X=be.getBoundingClientRect();le+=X.height});const oe=Math.min(le,vo);S(oe)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:Y}=oo({open:C,transform:!0,strategy:"absolute",onOpenChange:R,whileElementsMounted:wa,middleware:[Sa(4),pw({padding:10,elementContext:"reference",apply(K){const le=v.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),oe=(Q==null?void 0:Q.getBoundingClientRect().height)||0,be=Math.min(oe<uu?vo:oe,vo);ha.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<uu?void S(be):void S(Math.min(X,vo))},50)),Object.assign(K.elements.floating.style,{width:`${le}px`,maxWidth:`${le}px`,maxHeight:`${vo}`})}})]}),L=Aw(Y,OF),{getReferenceProps:W,getFloatingProps:G,getItemProps:ie}=io([ao(Y,{role:"listbox"}),ro(Y),op(Y,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return ma(K)},[]);const B=(K,le)=>{N(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const oe=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(oe),g.onChange&&g.onChange(oe),P(K.label??""),M(),A(""),D(le)},ye=K=>{var Q;const le=K.target.value;return A(le),!C&&le===""?R(!0):(K.target.name=g.name||"",le?R(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Se=()=>{var K;R(!0),A(""),(K=U.reference.current)==null||K.focus()},Ie=()=>{D(K=>K===null?0:K),R(!0),A("")},Le=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),A(""),N(""),P(""),Gy(U.reference.current),M()},ae=g.id||g.name,ve=$.length===0;return x.jsxs(Pa,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Se,children:[x.jsx(Rf,{size:20}),x.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:Le,className:"p-2 transition-colors link:text-danger md:p-1",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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:[x.jsx("input",{"data-shadow":"true",...W({...g,onChange:ye,onFocus:Ie,pattern:J,ref:U.setReference,name:`${ae}-shadow`,id:`${ae}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var le,Q;if(K.key==="Escape")return K.currentTarget.blur(),M();if(C){if(K.key==="ArrowDown"){let oe=nt.number(_)?_+1:0;return oe>$.length-1&&(oe=0),(le=y.current)==null||le.scrollIntoView({index:oe}),D(oe)}if(K.key==="ArrowUp"){let oe=nt.number(_)?_-1:$.length-1;return oe<0&&(oe=$.length-1),(Q=y.current)==null||Q.scrollIntoView({index:oe}),D(oe)}if(K.key==="Enter"){if(_!==null&&$[_])return K.preventDefault(),B($[_],_);if($.length===1)return K.preventDefault(),B($[0],0)}}}}),"data-value":O,"data-error":!!t,"data-name":ae,"data-target":ae,required:f,value:C?I:V||O,"aria-autocomplete":"list",autoComplete:"off",className:je("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","group-focus-within:border-primary group-hover:border-primary",g.className)}),x.jsx("input",{id:ae,name:ae,type:"hidden","data-origin":ae,ref:h,required:f,defaultValue:g.value||O||void 0}),x.jsx(no,{preserveTabOrder:!0,children:C?x.jsx(hi,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(pt.ul,{...G({ref:U.setFloating,style:{...L.styles,top:ee??0,position:Z,left:(te??0)+(O?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ve?"auto":w},className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[ve?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,x.jsx(wp,{ref:y,hidden:ve,data:$,style:{height:w},components:FF,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,le)=>{const Q=le.Render??_F,oe=O===le.value||O===le.label,be=_===K,X=le.label??le.value;return x.jsx("button",{"data-value":le.value,...ie({ref:ce=>void(F.current[K]=ce),role:"option",type:"button","aria-checked":oe,"aria-current":oe,"aria-selected":oe,"aria-busy":le.disabled,onClick:()=>B(le,K),className:`cursor-pointer w-full p-2 text-left ${oe?"bg-primary-hover text-primary-foreground":""} ${be?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(Q,{...g,label:le.label,value:le.value,children:X})})}})]})}):null})]})}),Ep=E.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 x.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:je("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:je("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,x.jsx("span",{"data-name":"checkbox-label",className:je("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),c1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...b},T)=>{const w=e,S=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const R=C.current,I=ma(C.current),A=r==null?void 0:r(R),O=N=>{const V=N;if(V.key==="Enter"&&R.enterKeyHint==="next"){const P=R.getAttribute("data-next");if(P){const _=document.getElementById(P);if(_)return _.focus(),void V.preventDefault()}}};return R.addEventListener("keydown",O),()=>{A==null||A(),I(),R.removeEventListener("keydown",O)}},[]),x.jsx(Pa,{...n,info:i,left:a,error:l,right:c,loading:y,form:b.form,name:b.name,feedback:h,hideLeft:v,title:b.title,container:je(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:x.jsx(w,{...n,...b,id:S,name:S,type:m,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:el(T,C),className:je("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","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Aa=c1(p0,"input",{type:"text"}),Ov=new Date(1970,11,31),du={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Mv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},VF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},fu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},$F=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Nf(t),l=E.useId(),c=_t(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=fu(u,Ov).flatMap(C=>nt.keyof(du,C.type)?du[C.type](C.value):[]),h=fu(u,Ov).reduce((C,R)=>C+(nt.keyof(Mv,R.type)?Mv[R.type](R.value):""),""),[v,y]=E.useState(d?fu(u,d).reduce((C,R)=>C+(nt.keyof(du,R.type)?VF[R.type](d,R.value):""),""):""),b=C=>{const R=C.target.value;if(y(R),g.length===R.length&&g.every((A,O)=>{const N=R.charAt(O);return typeof A=="string"?N===A:A.test(N)})){const A=zo(H_(R,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),y(C?HI(C,h):"")),w=Zb(d),S=w?d.toISOString():void 0;return x.jsx(Aa,{...i,mask:g,value:v,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(mi,{open:f,onChange:m,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(uA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(T0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),zF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],BF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],HF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],WF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Dv=(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};function jv(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?WF:HF:t.binary?BF:zF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Dv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Dv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ka={exports:{}},Za={exports:{}},Ue={};/** @license React v16.13.1
172
+ */var JM=["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])"],Es=JM.join(","),rw=typeof Element>"u",qo=rw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cs=!rw&&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==null?void 0:e.ownerDocument},Rs=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},eD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},tD=function(t,n,r){if(Rs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&qo.call(t,Es)&&o.unshift(t),o=o.filter(r),o},nD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Rs(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=qo.call(a,Es);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Rs(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},ow=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||eD(t))&&!ow(t)?0:t.tabIndex},rD=function(t,n){var r=iw(t);return r<0&&n&&!ow(t)?0:r},oD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},aw=function(t){return t.tagName==="INPUT"},iD=function(t){return aw(t)&&t.type==="hidden"},aD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},sD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},lD=function(t){if(!t.name)return!0;var n=t.form||Cs(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=sD(o,t.form);return!i||i===t},cD=function(t){return aw(t)&&t.type==="radio"},uD=function(t){return cD(t)&&!lD(t)},dD=function(t){var n,r=t&&Cs(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=Cs(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},Fg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},fD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.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=Cs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Fg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(dD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fg(t);return!1},pD=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 qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},hD=function(t,n){return!(n.disabled||Rs(n)||iD(n)||fD(n,t)||aD(n)||pD(n))},hd=function(t,n){return!(uD(n)||iw(n)<0||!hD(t,n))},mD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=rD(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(oD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},na=function(t,n){n=n||{};var r;return n.getShadowRoot?r=nD([t],n.includeContainer,{filter:hd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:mD}):r=tD(t,n.includeContainer,hd.bind(null,n)),gD(r)},vD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Es)===!1?!1:hd(n,t)};function Lg(e,t,n){let{reference:r,floating:o}=e;const i=Yr(t),a=Xf(t),s=Zf(a),l=hr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(di(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const yD=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}=Lg(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:b,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=b??d,f={...f,[h]:{...f[h],...T}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Lg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Qf(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ui(t,e),m=nw(f),h=s[p?d==="floating"?"reference":"floating":d],v=Ts(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Ts(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-w.top+m.top)/T.y,bottom:(w.bottom-v.bottom+m.bottom)/T.y,left:(v.left-w.left+m.left)/T.x,right:(w.right-v.right+m.right)/T.x}}const xD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ui(e,t)||{};if(c==null)return{};const d=nw(u),p={x:n,y:r},f=Xf(o),m=Zf(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[b]||i.floating[m]);const k=T/2-w/2,I=C/2-g[m]/2-1,A=An(d[v],I),O=An(d[y],I),N=A,V=C-g[m]-O,P=C/2-g[m]/2+k,_=fd(N,P,V),D=!l.arrow&&di(o)!=null&&P!==_&&i.reference[m]/2-(P<N?A:O)-g[m]/2<0,F=D?P<N?P-N:P-V:0;return{[f]:p[f]+F,data:{[f]:_,centerOffset:P-_-F,...D&&{alignmentOffset:F}},reset:D}}}),bD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=ui(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=hr(o),y=Yr(s),b=hr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Ss(s)]:KM(s)),S=m!=="none";!p&&S&&w.push(...XM(s,g,m,T));const C=[s,...w],k=await Qf(t,h),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const P=GM(o,a,T);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var O,N;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,_=C[P];if(_)return{data:{index:P,overflows:A},reset:{placement:_}};let D=(N=A.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var V;const F=(V=A.filter(j=>{if(S){const z=Yr(j.placement);return z===y||z==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((j,z)=>j[1]-z[1])[0])==null?void 0:V[0];F&&(D=F);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function wD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=hr(n),s=di(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ui(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const SD=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 wD(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}}}}},TD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=ui(e,t),c={x:n,y:r},u=await Qf(t,l),d=Yr(hr(o)),p=tw(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],b=f-u[v];f=fd(y,f,b)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[h],b=m-u[v];m=fd(y,m,b)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},ED=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ui(e,t),l=await Qf(t,s),c=hr(n),u=di(n),d=Yr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,y=An(f-l[m],h),b=An(p-l[g],v),T=!t.middlewareData.shift;let w=y,S=b;if(d?S=u||T?An(b,v):v:w=u||T?An(y,h):h,T&&!u){const k=Xt(l.left,0),I=Xt(l.right,0),A=Xt(l.top,0),O=Xt(l.bottom,0);d?S=p-2*(k!==0||I!==0?k+I:Xt(l.left,l.right)):w=f-2*(A!==0||O!==0?A+O:Xt(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function sw(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=bt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ws(n)!==i||ws(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jf(e){return Qe(e)?e:e.contextElement}function ko(e){const t=Jf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sw(t);let a=(i?ws(n.width):n.width)/r,s=(i?ws(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const CD=pr(0);function lw(e){const t=Bt(e);return!qf()||!t.visualViewport?CD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Jf(e);let a=pr(1);t&&(r?Qe(r)&&(a=ko(r)):a=ko(e));const s=RD(i,n,r)?lw(i):pr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Bt(i),f=r&&Qe(r)?Bt(r):r;let m=p,g=ud(m);for(;g&&r&&f!==m;){const h=ko(g),v=g.getBoundingClientRect(),y=nn(g),b=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=T,m=Bt(g),g=ud(m)}}return Ts({width:u,height:d,x:l,y:c})}function kD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?bl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pr(1);const u=pr(0),d=bt(r);if((d||!d&&!i)&&((xr(r)!=="body"||ba(a))&&(l=wl(r)),bt(r))){const p=Gr(r);c=ko(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function PD(e){return Array.from(e.getClientRects())}function cw(e){return Gr(Zn(e)).left+wl(e).scrollLeft}function AD(e){const t=Zn(e),n=wl(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cw(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function ID(e,t){const n=Bt(e),r=Zn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=qf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function _D(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?ko(e):pr(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 Vg(e,t,n){let r;if(t==="viewport")r=ID(e,n);else if(t==="document")r=AD(Zn(e));else if(Qe(t))r=_D(t,n);else{const o=lw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ts(r)}function uw(e,t){const n=Yn(e);return n===t||!Qe(n)||fr(n)?!1:nn(n).position==="fixed"||uw(n,t)}function OD(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>Qe(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Yn(e):e;for(;Qe(a)&&!fr(a);){const s=nn(a),l=Wf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ba(a)&&!l&&uw(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function MD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?bl(t)?[]:OD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Vg(t,u,o);return c.top=Xt(d.top,c.top),c.right=An(d.right,c.right),c.bottom=An(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Vg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DD(e){const{width:t,height:n}=sw(e);return{width:t,height:n}}function jD(e,t,n){const r=bt(t),o=Zn(t),i=n==="fixed",a=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=pr(0);if(r||!r&&!i)if((xr(t)!=="body"||ba(o))&&(s=wl(t)),r){const d=Gr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=cw(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Kc(e){return nn(e).position==="static"}function $g(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function dw(e,t){const n=Bt(e);if(bl(e))return n;if(!bt(e)){let o=Yn(e);for(;o&&!fr(o);){if(Qe(o)&&!Kc(o))return o;o=Yn(o)}return n}let r=$g(e,t);for(;r&&$M(r)&&Kc(r);)r=$g(r,t);return r&&fr(r)&&Kc(r)&&!Wf(r)?n:r||zM(e)||n}const ND=async function(e){const t=this.getOffsetParent||dw,n=this.getDimensions,r=await n(e.floating);return{reference:jD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FD(e){return nn(e).direction==="rtl"}const LD={convertOffsetParentRelativeRectToViewportRelativeRect:kD,getDocumentElement:Zn,getClippingRect:MD,getOffsetParent:dw,getElementRects:ND,getClientRects:PD,getDimensions:DD,getScale:ko,isElement:Qe,isRTL:FD};function VD(e,t){let n=null,r;const o=Zn(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{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Co(u),m=Co(o.clientWidth-(c+d)),g=Co(o.clientHeight-(u+p)),h=Co(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Xt(0,An(1,l))||1};let b=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function wa(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=Jf(e),u=o||i?[...c?cr(c):[],...cr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?VD(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Gr(e):null;l&&h();function h(){const v=Gr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const $D=SD,zD=TD,BD=bD,HD=ED,zg=xD,WD=(e,t,n)=>{const r=new Map,o={platform:LD,...n},i={...o.platform,_c:r};return yD(e,t,{...o,platform:i})};var os=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ks(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(!ks(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)&&!ks(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function fw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bg(e,t){const n=fw(e);return Math.round(t*n)/n}function Zc(e){const t=R.useRef(e);return os(()=>{t.current=e}),t}function qD(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]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=R.useState(r);ks(p,r)||f(r);const[m,g]=R.useState(null),[h,v]=R.useState(null),y=R.useCallback(j=>{j!==S.current&&(S.current=j,g(j))},[]),b=R.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),T=i||m,w=a||h,S=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Zc(l),O=Zc(o),N=Zc(c),V=R.useCallback(()=>{if(!S.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),WD(S.current,C.current,j).then(z=>{const M={...z,isPositioned:N.current!==!1};P.current&&!ks(k.current,M)&&(k.current=M,Xs.flushSync(()=>{d(M)}))})},[p,t,n,O,N]);os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const P=R.useRef(!1);os(()=>(P.current=!0,()=>{P.current=!1}),[]),os(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(A.current)return A.current(T,w,V);V()}},[T,w,V,A,I]);const _=R.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:b}),[y,b]),D=R.useMemo(()=>({reference:T,floating:w}),[T,w]),F=R.useMemo(()=>{const j={position:n,left:0,top:0};if(!D.floating)return j;const z=Bg(D.floating,u.x),M=Bg(D.floating,u.y);return s?{...j,transform:"translate("+z+"px, "+M+"px)",...fw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,s,D.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:V,refs:_,elements:D,floatingStyles:F}),[u,V,_,D,F])}const UD=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?zg({element:r.current,padding:o}).fn(n):{}:r?zg({element:r,padding:o}).fn(n):{}}}},Sa=(e,t)=>({...$D(e),options:[e,t]}),ep=(e,t)=>({...zD(e),options:[e,t]}),tp=(e,t)=>({...BD(e),options:[e,t]}),pw=(e,t)=>({...HD(e),options:[e,t]}),hw=(e,t)=>({...UD(e),options:[e,t]});function md(e){return R.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const mw={...R},YD=mw.useInsertionEffect,GD=YD||(e=>e());function Rt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return GD(()=>{t.current=e}),R.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)},[])}const np="ArrowUp",Ta="ArrowDown",Uo="ArrowLeft",fi="ArrowRight";function Ha(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Xc(e,t){return Ft(e,{disabledIndices:t})}function Hg(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&is(a,s,o));return s}function KD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===np){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}zi(e,d)&&(d=c)}if(n.key===Ta&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),zi(e,d)&&(d=c)),r==="both"){const p=Co(c/i);n.key===fi&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ha(d,i,p)&&(d=c)),n.key===Uo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ha(d,i,p)&&(d=c));const f=Co(l/i)===p;zi(e,d)&&(o&&f?d=n.key===Uo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function ZD(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function XD(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 QD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Wg=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Wg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Wg=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function JD(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 ej(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const gw=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function tj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=R.useState(()=>new Map),a=R.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=R.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(JD).forEach((u,d)=>{l.set(u,d)}),ej(o,l)||i(l)},[o]),R.createElement(gw.Provider,{value:R.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function vw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=R.useContext(gw),[s,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yo.apply(this,arguments)}let qg=!1,nj=0;const Ug=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nj++;function rj(){const[e,t]=R.useState(()=>qg?Ug():void 0);return Be(()=>{e==null&&t(Ug())},[]),R.useEffect(()=>{qg=!0},[]),e}const oj=mw.useId,pi=oj||rj;let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function as(){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=ra)!=null&&e.has(o))){var i;(i=ra)==null||i.add(o),console.warn(o)}}function ij(){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=ra)!=null&&e.has(o))){var i;(i=ra)==null||i.add(o),console.error(o)}}const yw=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||as("The `ref` prop is required for `FloatingArrow`."));const h=pi(),[v,y]=R.useState(!1);if(Be(()=>{if(!o)return;nn(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const b=c*2,T=b/2,w=a/2*(l/-8+1),S=s/2*l/4,[C,k]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",O=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&v&&(N=k==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",_=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",Yo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...m}}),b>0&&R.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:_}),R.createElement("path",{stroke:b&&!p?g.fill:"none",d:_}),R.createElement("clipPath",{id:h},R.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+b,height:a})))});function xw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const bw=R.createContext(null),ww=R.createContext(null),br=()=>{var e;return((e=R.useContext(bw))==null?void 0:e.id)||null},wr=()=>R.useContext(ww);function aj(e){const t=pi(),n=wr(),o=br();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function sj(e){const{children:t,id:n}=e,r=br();return R.createElement(bw.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function lj(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(a=>{n.current=[...n.current,a]},[]),o=R.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=R.useState(()=>xw())[0];return R.createElement(ww.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function mr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Yg=mr("safe-polygon");function Qc(e,t,n){return n&&!Wo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Sw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=wr(),m=br(),g=jt(c),h=jt(l),v=jt(n),y=R.useRef(),b=R.useRef(-1),T=R.useRef(),w=R.useRef(-1),S=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var _;const D=(_=o.current.openEvent)==null?void 0:_.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);R.useEffect(()=>{if(!s)return;function _(D){let{open:F}=D;F||(clearTimeout(b.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[s,i]),R.useEffect(()=>{if(!s||!g.current||!n)return;function _(F){I()&&r(!1,F,"hover")}const D=It(a.floating).documentElement;return D.addEventListener("mouseleave",_),()=>{D.removeEventListener("mouseleave",_)}},[a.floating,n,r,s,g,I]);const A=R.useCallback(function(_,D,F){D===void 0&&(D=!0),F===void 0&&(F="hover");const j=Qc(h.current,"close",y.current);j&&!T.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,_,F),j)):D&&(clearTimeout(b.current),r(!1,_,F))},[h,r]),O=Rt(()=>{k.current(),T.current=void 0}),N=Rt(()=>{if(C.current){const _=It(a.floating).body;_.style.pointerEvents="",_.removeAttribute(Yg),C.current=!1}});R.useEffect(()=>{if(!s)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(M){if(clearTimeout(b.current),S.current=!1,u&&!Wo(y.current)||d>0&&!Qc(h.current,"open"))return;const $=Qc(h.current,"open",y.current);$?b.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},$):r(!0,M,"hover")}function F(M){if(_())return;k.current();const $=It(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),T.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M,!0,"safe-polygon")}});const te=T.current;$.addEventListener("mousemove",te),k.current=()=>{$.removeEventListener("mousemove",te)};return}(y.current==="touch"?!gt(a.floating,M.relatedTarget):!0)&&A(M)}function j(M){_()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M)}})(M))}if(Qe(a.domReference)){var z;const M=a.domReference;return n&&M.addEventListener("mouseleave",j),(z=a.floating)==null||z.addEventListener("mouseleave",j),p&&M.addEventListener("mousemove",D,{once:!0}),M.addEventListener("mouseenter",D),M.addEventListener("mouseleave",F),()=>{var $;n&&M.removeEventListener("mouseleave",j),($=a.floating)==null||$.removeEventListener("mouseleave",j),p&&M.removeEventListener("mousemove",D),M.removeEventListener("mouseenter",D),M.removeEventListener("mouseleave",F)}}},[a,s,e,u,d,p,A,O,N,r,n,v,f,h,g,o]),Be(()=>{var _;if(s&&n&&(_=g.current)!=null&&_.__options.blockPointerEvents&&I()){const F=It(a.floating).body;F.setAttribute(Yg,""),F.style.pointerEvents="none",C.current=!0;const j=a.floating;if(Qe(a.domReference)&&j){var D;const z=a.domReference,M=f==null||(D=f.nodesRef.current.find($=>$.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return M&&(M.style.pointerEvents=""),z.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{z.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),Be(()=>{n||(y.current=void 0,O(),N())},[n,O,N]),R.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,O,N]);const V=R.useMemo(()=>{function _(D){y.current=D.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(D){const{nativeEvent:F}=D;function j(){!S.current&&!v.current&&r(!0,F,"hover")}u&&!Wo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?j():w.current=window.setTimeout(j,d))}}},[u,r,n,v,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(_){A(_.nativeEvent,!1)}}),[A]);return R.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function cj(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==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function uj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let mo=new WeakMap,Wa=new WeakSet,qa={},Jc=0;const dj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tw=e=>e&&(e.host||Tw(e.parentNode)),fj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Tw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function pj(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=fj(t,e),s=new Set,l=new Set(a),c=[];qa[o]||(qa[o]=new WeakMap);const u=qa[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(xr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(mo.get(m)||0)+1,y=(u.get(m)||0)+1;mo.set(m,v),u.set(m,y),c.push(m),v===1&&h&&Wa.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Jc++,()=>{c.forEach(f=>{const m=(mo.get(f)||0)-1,g=(u.get(f)||0)-1;mo.set(f,m),u.set(f,g),m||(!Wa.has(f)&&i&&f.removeAttribute(i),Wa.delete(f)),g||f.removeAttribute(o)}),Jc--,Jc||(mo=new WeakMap,mo=new WeakMap,Wa=new WeakSet,qa={})}}function Gg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return pj(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Go=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ew(e,t){const n=na(e,Go());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function Cw(){return Ew(document.body,"next")}function Rw(){return Ew(document.body,"prev")}function Bi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function hj(e){na(e,Go()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function mj(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 gj(e,t,n){const r=e.indexOf(t);function o(a){const s=mr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||gt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const rp={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};let vj;function Kg(e){e.key==="Tab"&&(e.target,clearTimeout(vj))}const Ps=R.forwardRef(function(t,n){const[r,o]=R.useState();Be(()=>(Gf()&&o("button"),document.addEventListener("keydown",Kg),()=>{document.removeEventListener("keydown",Kg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[mr("focus-guard")]:"",style:rp};return R.createElement("span",Yo({},t,i))}),kw=R.createContext(null),Zg=mr("portal");function yj(e){e===void 0&&(e={});const{id:t,root:n}=e,r=pi(),o=Pw(),[i,a]=R.useState(null),s=R.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{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(Zg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Qe(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(Zg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function no(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=yj({id:n,root:r}),[a,s]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&Bi(m)&&(m.type==="focusin"?mj:hj)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),R.createElement(kw.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&R.createElement(Ps,{"data-type":"outside",ref:l,onFocus:f=>{if(Bi(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=Rw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&R.createElement("span",{"aria-owns":i.id,style:rp}),i&&Xs.createPortal(t,i),p&&i&&R.createElement(Ps,{"data-type":"outside",ref:c,onFocus:f=>{if(Bi(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Cw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Pw=()=>R.useContext(kw),xj=20;let Mr=[];function eu(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!vD(t,Go())){const n=na(t,Go())[0];n&&(t=n)}Mr.push(t),Mr.length>xj&&(Mr=Mr.slice(-20))}}function Xg(){return Mr.slice().reverse().find(e=>e.isConnected)}const bj=R.forwardRef(function(t,n){return R.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:rp}))});function hi(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}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:y,elements:{domReference:b,floating:T}}=t,w=typeof a=="number"&&a<0,S=ew(b)&&w,C=dj()?i:!0,k=jt(o),I=jt(a),A=jt(s),O=wr(),N=Pw(),V=R.useRef(null),P=R.useRef(null),_=R.useRef(!1),D=R.useRef(!1),F=R.useRef(-1),j=N!=null,z=T==null?void 0:T.firstElementChild,M=(z==null?void 0:z.id)===y?z:T,$=Rt(function(Z){return Z===void 0&&(Z=M),Z?na(Z,Go()):[]}),J=Rt(Z=>{const U=$(Z);return k.current.map(Y=>b&&Y==="reference"?b:M&&Y==="floating"?M:U).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function Z(Y){if(Y.key==="Tab"){gt(M,gn(It(M)))&&$().length===0&&!S&&Dt(Y);const L=J(),W=Pn(Y);k.current[0]==="reference"&&W===b&&(Dt(Y),Y.shiftKey?ir(L[L.length-1]):ir(L[1])),k.current[1]==="floating"&&W===M&&Y.shiftKey&&(Dt(Y),ir(L[0]))}}const U=It(M);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,b,M,c,k,S,$,J]),R.useEffect(()=>{if(r||!T)return;function Z(U){const Y=Pn(U),W=$().indexOf(Y);W!==-1&&(F.current=W)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,$]),R.useEffect(()=>{if(r||!d)return;function Z(){D.current=!0,setTimeout(()=>{D.current=!1})}function U(Y){const L=Y.relatedTarget;queueMicrotask(()=>{const W=!(gt(b,L)||gt(T,L)||gt(L,T)||gt(N==null?void 0:N.portalNode,L)||L!=null&&L.hasAttribute(mr("focus-guard"))||O&&(Hr(O.nodesRef.current,m).find(G=>{var ie,B;return gt((ie=G.context)==null?void 0:ie.elements.floating,L)||gt((B=G.context)==null?void 0:B.elements.domReference,L)})||cj(O.nodesRef.current,m).find(G=>{var ie,B;return((ie=G.context)==null?void 0:ie.elements.floating)===L||((B=G.context)==null?void 0:B.elements.domReference)===L})));if(l&&W&&gn(It(M))===It(M).body){bt(M)&&(M==null||M.focus());const G=F.current,ie=$(),B=ie[G]||ie[ie.length-1]||M;bt(B)&&B.focus()}(S||!c)&&L&&W&&!D.current&&L!==Xg()&&(_.current=!0,g(!1,Y))})}if(T&&bt(b))return b.addEventListener("focusout",U),b.addEventListener("pointerdown",Z),T.addEventListener("focusout",U),()=>{b.removeEventListener("focusout",U),b.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",U)}},[r,b,T,M,c,m,O,N,g,d,l,$,S]),R.useEffect(()=>{var Z;if(r)return;const U=Array.from((N==null||(Z=N.portalNode)==null?void 0:Z.querySelectorAll("["+mr("portal")+"]"))||[]);if(T){const Y=[T,...U,V.current,P.current,k.current.includes("reference")||S?b:null].filter(W=>W!=null),L=c||S?Gg(Y,C,!C):Gg(Y);return()=>{L()}}},[r,b,T,c,k,N,S,C]),Be(()=>{if(r||!bt(M))return;const Z=It(M),U=gn(Z);queueMicrotask(()=>{const Y=J(M),L=I.current,W=(typeof L=="number"?Y[L]:L.current)||M,G=gt(M,U);!w&&!G&&p&&ir(W,{preventScroll:W===M})})},[r,p,M,w,J,I]),Be(()=>{if(r||!M)return;let Z=!1;const U=It(M),Y=gn(U);let W=v.current.openEvent;const G=f.domReference.current;eu(Y);function ie(B){let{open:ye,reason:Se,event:Ie,nested:Le}=B;ye&&(W=Ie),Se==="escape-key"&&f.domReference.current&&eu(f.domReference.current),Se==="hover"&&Ie.type==="mouseleave"&&(_.current=!0),Se==="outside-press"&&(Le?(_.current=!1,Z=!0):_.current=!(Q0(Ie)||Yf(Ie)))}return h.on("openchange",ie),()=>{h.off("openchange",ie);const B=gn(U),ye=gt(T,B)||O&&Hr(O.nodesRef.current,m).some(ae=>{var ve;return gt((ve=ae.context)==null?void 0:ve.elements.floating,B)});(ye||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&eu(f.domReference.current);const Ie=G||Y,Le=na(It(Ie).body,Go());queueMicrotask(()=>{let ae=Xg();!ae&&bt(Ie)&&T&&(ae=gj(Le,Ie,T)),A.current&&!_.current&&bt(ae)&&(!(ae!==B&&B!==U.body)||ye)&&ae.focus({preventScroll:Z})})}},[r,T,M,A,v,f,h,O,m]),Be(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),Be(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const Y=M.getAttribute("tabindex"),L=$(),W=gn(It(T)),G=L.indexOf(W);G!==-1&&(F.current=G),k.current.includes("floating")||W!==f.domReference.current&&L.length===0?Y!=="0"&&M.setAttribute("tabindex","0"):Y!=="-1"&&M.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,T,M,f,k,$,w]);function te(Z){return r||!u||!c?null:R.createElement(bj,{ref:Z==="start"?V:P,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!S:!0)&&(j||c);return R.createElement(R.Fragment,null,ee&&R.createElement(Ps,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Z=>{if(c){const Y=J();ir(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(_.current=!1,Bi(Z,N.portalNode)){const Y=Cw()||b;Y==null||Y.focus()}else{var U;(U=N.beforeOutsideRef.current)==null||U.focus()}}}),!S&&te("start"),n,te("end"),ee&&R.createElement(Ps,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Z=>{if(c)ir(J()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(_.current=!0),Bi(Z,N.portalNode)){const Y=Rw()||b;Y==null||Y.focus()}else{var U;(U=N.afterOutsideRef.current)==null||U.focus()}}}))}const tu=new Set,wj=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=pi();return Be(()=>{if(!r)return;tu.add(i);const a=/iP(hone|ad|od)|iOS/.test(Uf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{tu.delete(i),tu.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),R.createElement("div",Yo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function Jg(e){return Kf(e)}function Ea(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}=t,d=R.useRef(),p=R.useRef(!1),f=R.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(Wo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Wo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||Qg(m))&&(m.key===" "&&!Jg(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Qg(m)||Jg(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}function Sj(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function ev(e){return e!=null&&e.clientX!=null}function Tj(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=R.useRef(!1),p=R.useRef(null),[f,m]=R.useState(),[g,h]=R.useState([]),v=Rt((S,C)=>{d.current||r.current.openEvent&&!ev(r.current.openEvent)||a.setPositionReference(Sj(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=Rt(S=>{c!=null||u!=null||(n?p.current||h([]):v(S.clientX,S.clientY))}),b=Wo(f)?o:n,T=R.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const S=Bt(o);function C(k){const I=Pn(k);gt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||ev(r.current.openEvent)){S.addEventListener("mousemove",C);const k=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,v]);R.useEffect(()=>T(),[T,g]),R.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),R.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=R.useMemo(()=>{function S(C){let{pointerType:k}=C;m(k)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return R.useMemo(()=>s?{reference:w}:{},[s,w])}const Ej={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Cj={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ro(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=wr(),h=Rt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=R.useRef(!1),b=R.useRef(!1),{escapeKey:T,outsidePress:w}=tv(f),{escapeKey:S,outsidePress:C}=tv(m),k=Rt(P=>{var _;if(!n||!a||!s||P.key!=="Escape")return;const D=(_=i.current.floatingContext)==null?void 0:_.nodeId,F=g?Hr(g.nodesRef.current,D):[];if(!T&&(P.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(z=>{var M;if((M=z.context)!=null&&M.open&&!z.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,HM(P)?P.nativeEvent:P,"escape-key")}),I=Rt(P=>{var _;const D=()=>{var F;k(P),(F=Pn(P))==null||F.removeEventListener("keydown",D)};(_=Pn(P))==null||_.addEventListener("keydown",D)}),A=Rt(P=>{var _;const D=y.current;y.current=!1;const F=b.current;if(b.current=!1,c==="click"&&F||D||typeof v=="function"&&!v(P))return;const j=Pn(P),z="["+mr("inert")+"]",M=It(o.floating).querySelectorAll(z);let $=Qe(j)?j:null;for(;$&&!fr($);){const Z=Yn($);if(fr(Z)||!Qe(Z))break;$=Z}if(M.length&&Qe(j)&&!WM(j)&&!gt(j,o.floating)&&Array.from(M).every(Z=>!gt($,Z)))return;if(bt(j)&&V){const Z=j.clientWidth>0&&j.scrollWidth>j.clientWidth,U=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let Y=U&&P.offsetX>j.clientWidth;if(U&&nn(j).direction==="rtl"&&(Y=P.offsetX<=j.offsetWidth-j.clientWidth),Y||Z&&P.offsetY>j.clientHeight)return}const J=(_=i.current.floatingContext)==null?void 0:_.nodeId,te=g&&Hr(g.nodesRef.current,J).some(Z=>{var U;return Gc(P,(U=Z.context)==null?void 0:U.elements.floating)});if(Gc(P,o.floating)||Gc(P,o.domReference)||te)return;const ee=g?Hr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=Rt(P=>{var _;const D=()=>{var F;A(P),(F=Pn(P))==null||F.removeEventListener(c,D)};(_=Pn(P))==null||_.addEventListener(c,D)});R.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function P(F){r(!1,F,"ancestor-scroll")}const _=It(o.floating);s&&_.addEventListener("keydown",S?I:k,S),v&&_.addEventListener(c,C?O:A,C);let D=[];return p&&(Qe(o.domReference)&&(D=cr(o.domReference)),Qe(o.floating)&&(D=D.concat(cr(o.floating))),!Qe(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(cr(o.reference.contextElement)))),D=D.filter(F=>{var j;return F!==((j=_.defaultView)==null?void 0:j.visualViewport)}),D.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{s&&_.removeEventListener("keydown",S?I:k,S),v&&_.removeEventListener(c,C?O:A,C),D.forEach(F=>{F.removeEventListener("scroll",P)})}},[i,o,s,v,c,n,r,p,a,T,w,k,S,I,A,C,O]),R.useEffect(()=>{y.current=!1},[v,c]);const N=R.useMemo(()=>({onKeyDown:k,[Ej[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),V=R.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Cj[c]]:()=>{y.current=!0}}),[k,c]);return R.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function Rj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=pi(),i=R.useRef({}),[a]=R.useState(()=>xw()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Qe(f)&&ij("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]=R.useState(r.reference),u=Rt((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=R.useMemo(()=>({setPositionReference:c}),[]),p=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function oo(e){e===void 0&&(e={});const{nodeId:t}=e,n=Rj({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=R.useState(null),[s,l]=R.useState(null),u=(o==null?void 0:o.reference)||i,d=R.useRef(null),p=wr();Be(()=>{u&&(d.current=u)},[u]);const f=qD({...e,elements:{...o,...s&&{reference:s}}}),m=R.useCallback(b=>{const T=Qe(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(T),f.refs.setReference(T)},[f.refs]),g=R.useCallback(b=>{(Qe(b)||b===null)&&(d.current=b,a(b)),(Qe(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!Qe(b))&&f.refs.setReference(b)},[f.refs]),h=R.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=R.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=R.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=y;const b=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);b&&(b.context=y)}),R.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function kj(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=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function m(){!n&&bt(a.domReference)&&a.domReference===gn(It(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),R.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=R.useMemo(()=>({onPointerDown(f){Yf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Pn(f.nativeEvent);if(l&&Qe(m))try{if(Gf()&&J0())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Kf(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=Qe(m)&&m.hasAttribute(mr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=gn(a.domReference?a.domReference.ownerDocument:document);!m&&y===a.domReference||gt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||gt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return R.useMemo(()=>s?{reference:p}:{},[s,p])}const nv="active",rv="selected";function nu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[nv]:a,[rv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...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&&[nv,rv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function io(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=R.useCallback(s=>nu(s,e,"reference"),t),i=R.useCallback(s=>nu(s,e,"floating"),n),a=R.useCallback(s=>nu(s,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let ov=!1;function Sl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function iv(e,t){return Sl(t,e===np||e===Ta,e===Uo||e===fi)}function ru(e,t,n){return Sl(t,e===Ta,n?e===Uo:e===fi)||e==="Enter"||e===" "||e===""}function Pj(e,t,n){return Sl(t,n?e===Uo:e===fi,e===Ta)}function av(e,t,n){return Sl(t,n?e===fi:e===Uo,e===np)}function op(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:b="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||as("`useListNavigation` looping must be enabled to allow escaping."),m||as("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&T>1&&as("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),A=wr(),O=Rt(s),N=R.useRef(g),V=R.useRef(c??-1),P=R.useRef(null),_=R.useRef(!0),D=R.useRef(O),F=R.useRef(!!o.floating),j=R.useRef(n),z=R.useRef(!1),M=R.useRef(!1),$=jt(y),J=jt(n),te=jt(w),ee=jt(o.floating),Z=jt(c),[U,Y]=R.useState(),[L,W]=R.useState(),G=Rt(function(ae,ve,K){K===void 0&&(K=!1);function le(oe){m?(Y(oe.id),A==null||A.events.emit("virtualfocus",oe),S&&(S.current=oe)):ir(oe,{preventScroll:!0,sync:J0()&&Gf()?ov||z.current:!1})}const Q=ae.current[ve.current];Q&&le(Q),requestAnimationFrame(()=>{const oe=ae.current[ve.current]||Q;if(!oe)return;Q||le(oe);const be=te.current;be&&B&&(K||!_.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof be=="boolean"?{block:"nearest",inline:"nearest"}:be))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return ov=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?N.current&&c!=null&&(M.current=!0,V.current=c,O(c)):F.current&&(V.current=-1,D.current(null)))},[l,n,o.floating,c,O]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(F.current&&(V.current=-1,G(i,V)),(!j.current||!F.current)&&N.current&&(P.current!=null||N.current===!0&&P.current==null)){let ae=0;const ve=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ve),ae++):(V.current=P.current==null||ru(P.current,b,f)||p?Xc(i,$.current):Hg(i,$.current),P.current=null,O(V.current))};ve()}}else zi(i,a)||(V.current=a,G(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,O,G,$]),Be(()=>{var ae;if(!l||o.floating||!A||m||!F.current)return;const ve=A.nodesRef.current,K=(ae=ve.find(oe=>oe.id===I))==null||(ae=ae.context)==null?void 0:ae.elements.floating,le=gn(It(o.floating)),Q=ve.some(oe=>oe.context&&gt(oe.context.elements.floating,le));K&&!Q&&_.current&&K.focus({preventScroll:!0})},[l,o.floating,A,I,m]),Be(()=>{if(!l||!A||!m||I)return;function ae(ve){W(ve.id),S&&(S.current=ve)}return A.events.on("virtualfocus",ae),()=>{A.events.off("virtualfocus",ae)}},[l,A,m,I,S]),Be(()=>{D.current=O,F.current=!!o.floating}),Be(()=>{n||(P.current=null)},[n]),Be(()=>{j.current=n},[n]);const ie=a!=null,B=R.useMemo(()=>{function ae(K){if(!n)return;const le=i.current.indexOf(K);le!==-1&&O(le)}return{onFocus(K){let{currentTarget:le}=K;ae(le)},onClick:K=>{let{currentTarget:le}=K;return le.focus({preventScroll:!0})},...h&&{onMouseMove(K){let{currentTarget:le}=K;ae(le)},onPointerLeave(K){let{pointerType:le}=K;!_.current||le==="touch"||(V.current=-1,G(i,V),O(null),m||ir(ee.current,{preventScroll:!0}))}}}},[n,ee,G,h,i,O,m]),ye=Rt(ae=>{if(_.current=!1,z.current=!0,!J.current&&ae.currentTarget===ee.current)return;if(p&&av(ae.key,b,f)){Dt(ae),r(!1,ae.nativeEvent,"list-navigation"),bt(o.domReference)&&!m&&o.domReference.focus();return}const ve=V.current,K=Xc(i,y),le=Hg(i,y);if(ae.key==="Home"&&(Dt(ae),V.current=K,O(V.current)),ae.key==="End"&&(Dt(ae),V.current=le,O(V.current)),T>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),oe=ZD(Q,T,k),be=oe.findIndex(ce=>ce!=null&&!is(i.current,ce,y)),X=oe.reduce((ce,ke,ze)=>ke!=null&&!is(i.current,ke,y)?ze:ce,-1);if(V.current=oe[KD({current:oe.map(ce=>ce!=null?i.current[ce]:null)},{event:ae,orientation:b,loop:d,cols:T,disabledIndices:QD([...y||i.current.map((ce,ke)=>is(i.current,ke)?ke:void 0),void 0],oe),minIndex:be,maxIndex:X,prevIndex:XD(V.current>le?K:V.current,Q,oe,T,ae.key===Ta?"bl":ae.key===fi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(iv(ae.key,b)){if(Dt(ae),n&&!m&&gn(ae.currentTarget.ownerDocument)===ae.currentTarget){V.current=ru(ae.key,b,f)?K:le,O(V.current);return}ru(ae.key,b,f)?d?V.current=ve>=le?u&&ve!==i.current.length?-1:K:Ft(i,{startingIndex:ve,disabledIndices:y}):V.current=Math.min(le,Ft(i,{startingIndex:ve,disabledIndices:y})):d?V.current=ve<=K?u&&ve!==-1?i.current.length:le:Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:y}):V.current=Math.max(K,Ft(i,{startingIndex:ve,decrement:!0,disabledIndices:y})),zi(i,V.current)?O(null):O(V.current)}}),Se=R.useMemo(()=>m&&n&&ie&&{"aria-activedescendant":L||U},[m,n,ie,L,U]),Ie=R.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!ew(o.domReference)&&Se,onKeyDown:ye,onPointerMove(){_.current=!0}}),[Se,ye,o.domReference,b]),Le=R.useMemo(()=>{function ae(K){g==="auto"&&Q0(K.nativeEvent)&&(N.current=!0)}function ve(K){N.current=g,g==="auto"&&Yf(K.nativeEvent)&&(N.current=!0)}return{...Se,onKeyDown(K){_.current=!1;const le=K.key.indexOf("Arrow")===0,Q=Pj(K.key,b,f),oe=av(K.key,b,f),be=iv(K.key,b),X=(p?Q:be)||K.key==="Enter"||K.key.trim()==="";if(m&&n){const xt=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),ut=A&&xt?uj(A.nodesRef.current,xt.id):null;if(le&&ut&&S){const Ot=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||oe){var ce,ke;const fn=((ce=ut.context)==null?void 0:ce.elements.domReference)===K.currentTarget,Tn=oe&&!fn?(ke=ut.context)==null?void 0:ke.elements.domReference:Q?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===U):null;Tn&&(Dt(K),Tn.dispatchEvent(Ot),W(void 0))}if(be&&ut.context&&ut.context.open&&ut.parentId&&K.currentTarget!==ut.context.elements.domReference){var ze;Dt(K),(ze=ut.context.elements.domReference)==null||ze.dispatchEvent(Ot);return}}return ye(K)}if(!(!n&&!v&&le)){if(X&&(P.current=p&&be?null:K.key),p){Q&&(Dt(K),n?(V.current=Xc(i,$.current),O(V.current)):r(!0,K.nativeEvent,"list-navigation"));return}be&&(c!=null&&(V.current=c),Dt(K),!n&&v?r(!0,K.nativeEvent,"list-navigation"):ye(K),n&&O(V.current))}},onFocus(){n&&!m&&O(null)},onPointerDown:ve,onMouseDown:ae,onClick:ae}},[U,Se,ye,$,g,i,p,O,r,n,v,b,f,c,A,m,S]);return R.useMemo(()=>l?{reference:Le,floating:Ie,item:B}:{},[l,Le,Ie,B])}const Aj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ao(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=Aj.get(a))!=null?n:a,l=pi(),u=br()!=null,d=R.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=R.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=R.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return R.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const sv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function go(e,t){return typeof e=="function"?e(t):e}function Ij(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function _j(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]=R.useState("unmounted"),c=Ij(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Aw(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=R.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=R.useState(()=>({...go(i,c),...go(n,c)})),{isMounted:g,status:h}=_j(e,{duration:a}),v=jt(n),y=jt(r),b=jt(o),T=jt(i);return Be(()=>{const w=go(v.current,c),S=go(b.current,c),C=go(T.current,c),k=go(y.current,c)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(k).map(sv).join(","),transitionDuration:d+"ms",...C,...k}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(sv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,y,T,d,h,c]),{isMounted:g,styles:f}}function Oj(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=R.useRef(),g=R.useRef(""),h=R.useRef((n=f??a)!=null?n:-1),v=R.useRef(null),y=Rt(s),b=Rt(l),T=jt(u),w=jt(p);Be(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const S=Rt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=Rt(A=>{function O(D,F,j){const z=T.current?T.current(F,j):F.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return z?D.indexOf(z):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(N,N,g.current)===-1?S(!1):A.key===" "&&Dt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),S(!0)),N.every(D=>{var F,j;return D?((F=D[0])==null?void 0:F.toLocaleLowerCase())!==((j=D[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=v.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,S(!1)},d);const P=h.current,_=O(N,[...N.slice((P||0)+1),...N.slice(0,(P||0)+1)],g.current);_!==-1?(y(_),v.current=_):A.key!==" "&&(g.current="",S(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&S(!1)}}),[C,S]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function lv(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 Mj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Iw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,k=[S,C],I=Pn(T),A=T.type==="mouseleave",O=gt(g.floating,I),N=gt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),_=m.split("-")[0],D=p>P.right-P.width/2,F=f>P.bottom-P.height/2,j=Mj(k,V),z=P.width>V.width,M=P.height>V.height,$=(z?V:P).left,J=(z?V:P).right,te=(M?V:P).top,ee=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&Qe(T.relatedTarget)&&gt(g.floating,T.relatedTarget)||y&&Hr(y.nodesRef.current,v).some(Y=>{let{context:L}=Y;return L==null?void 0:L.open}))return;if(_==="top"&&f>=V.bottom-1||_==="bottom"&&f<=V.top+1||_==="left"&&p>=V.right-1||_==="right"&&p<=V.left+1)return w();let Z=[];switch(_){case"top":Z=[[$,V.top+1],[$,P.bottom-1],[J,P.bottom-1],[J,V.top+1]];break;case"bottom":Z=[[$,P.top+1],[$,V.bottom-1],[J,V.bottom-1],[J,P.top+1]];break;case"left":Z=[[P.right-1,ee],[P.right-1,te],[V.left+1,te],[V.left+1,ee]];break;case"right":Z=[[V.right-1,ee],[V.right-1,te],[P.left+1,te],[P.left+1,ee]];break}function U(Y){let[L,W]=Y;switch(_){case"top":{const G=[z?L+t/2:D?L+t*4:L-t*4,W+t+1],ie=[z?L-t/2:D?L+t*4:L-t*4,W+t+1],B=[[P.left,D||z?P.bottom-t:P.top],[P.right,D?z?P.bottom-t:P.top:P.bottom-t]];return[G,ie,...B]}case"bottom":{const G=[z?L+t/2:D?L+t*4:L-t*4,W-t],ie=[z?L-t/2:D?L+t*4:L-t*4,W-t],B=[[P.left,D||z?P.top+t:P.bottom],[P.right,D?z?P.top+t:P.bottom:P.top+t]];return[G,ie,...B]}case"left":{const G=[L+t+1,M?W+t/2:F?W+t*4:W-t*4],ie=[L+t+1,M?W-t/2:F?W+t*4:W-t*4];return[...[[F||M?P.right-t:P.left,P.top],[F?M?P.right-t:P.left:P.right-t,P.bottom]],G,ie]}case"right":{const G=[L-t,M?W+t/2:F?W+t*4:W-t*4],ie=[L-t,M?W-t/2:F?W+t*4:W-t*4],B=[[F||M?P.left+t:P.right,P.top],[F?M?P.left+t:P.right:P.left+t,P.bottom]];return[G,ie,...B]}}}if(!lv([S,C],Z)){if(i&&!j)return w();if(!A&&r){const Y=c(T.clientX,T.clientY);if(Y!==null&&Y<.1)return w()}lv([S,C],U([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const mi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Sa(10),tp({fallbackAxisSideDirection:"end"}),ep(),hw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=oo({open:n,middleware:i,transform:!0,whileElementsMounted:wa,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=Ea(l),u=ro(l),d=ao(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=io([c,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(no,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(hi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(yw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},Dj=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=oo({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ea(s,{enabled:e.disabled??!0}),u=ao(s,{role:"tooltip"}),d=ro(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=io([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Oo,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(pt.span,{layoutId:o,children:e.trigger})}),x.jsx(vr,{children:i?x.jsx(no,{root:t,children:x.jsx(hi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},_w=300,jj=500,Ow=(e="")=>je("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),gd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),cv=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),v=E.useContext(gd),y=br(),b=wr(),T=aj(),w=vw(),S=y!==null,{floatingStyles:C,refs:k,context:I}=oo({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:wa,placement:S?"right":"bottom-start",middleware:[Sa({mainAxis:S?0:4,alignmentAxis:S?-4:0}),tp(),ep()]}),A=ao(I,{role:"menu"}),O=ro(I,{bubbles:!0}),N=Sw(I,{move:!1,enabled:n,delay:{open:_w},handleClose:Iw({blockPointerEvents:!0})}),V=Ea(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),P=op(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),_=Oj(I,{activeIndex:f,listRef:h,resetMs:jj,onMatch:c?m:void 0}),{getReferenceProps:D,getFloatingProps:F,getItemProps:j}=io([N,V,A,O,P,_]);E.useEffect(()=>{if(!b)return;function M(){u(!1)}function $(J){J.nodeId!==T&&J.parentId===y&&u(!1)}return b.events.on("click",M),b.events.on("menuopen",$),()=>{b.events.off("click",M),b.events.off("menuopen",$)}},[b,T,y]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:y,nodeId:T})},[b,c,T,y]);const z=o?s.className:je(Ow(s.className));return x.jsxs(sj,{id:T,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Ho,{...D(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:md([k.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):x.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:md([k.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,...D(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:[a,S&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Pf,{size:14})]})]})}),x.jsx(gd.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:j,setHasFocusInside:p,isOpen:c},children:x.jsx(tj,{elementsRef:g,labelsRef:h,children:c&&x.jsx(no,{preserveTabOrder:!0,children:x.jsx(hi,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:x.jsx(t,{...F(),ref:k.setFloating,style:{...s.style,...C},className:je("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-xl outline-none",i),children:e})})})})})]})}),Nj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(gd),s=vw({label:n?null:e}),l=wr(),c=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:md([s.ref,i]),className:Ow(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),Fj=E.forwardRef((e,t)=>br()!==null?x.jsx(cv,{...e,isParent:!1,ref:t}):x.jsx(lj,{children:x.jsx(cv,{...e,isParent:!0,ref:t})})),Lj=(e,t)=>qr()?t:window.matchMedia(e).matches,Vj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Lj(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},uv=()=>window.matchMedia("@media (pointer: coarse)"),$j=()=>{var r;const e=E.useRef(qr()?null:uv()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?uv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},zj=e=>{const t=$j(),n=E.useRef(qr()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||b0())return;r.style.padding=Ky(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",Bj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},Hj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},ou={drawer:e=>e==="left"?Bj:Hj,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},Wj=ti("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] 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"}}),qj={top:0,left:0,right:0,bottom:-1},Uj=e=>e*.62,Yj=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=Uj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:qj,whileDrag:{cursor:"grabbing"},className:je("absolute rounded-lg",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?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ua={drawer:"right",sheet:"none",dialog:"none"},Gj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ua.drawer:Ua[o]:t?Ua[o]:Ua.sheet},Kj=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:m,overlayClickClose:g=!1,ariaTitle:h,...v})=>{zj(e);const y=E.useId(),b=E.useId(),T=Vj("(min-width: 64rem)"),w=f!=="dialog",S=Gj(T,d,f,m),C=T||d?ou[f]:ou.sheet,k=typeof C=="function"?C(S):C,I=T||d?f:"sheet",{refs:A,context:O}=oo({open:e,onOpenChange:s}),N=Ea(O),V=ao(O,{role:"dialog"}),P=ro(O,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:_,getFloatingProps:D}=io([N,V,P]),F=o,j=Lo(void 0),z=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Ho,{ref:A.setReference,..._({layoutId:a}),children:F}):x.jsx(pt.button,{ref:A.setReference,..._(),layoutId:a,type:"button",children:F})}):null,x.jsx(no,{children:x.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(wj,{lockScroll:!1,className:je(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(hi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:O,children:x.jsxs(pt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:a,className:je(Wj({position:S,type:I}),l),style:I==="drawer"?{width:j}:{height:j},...t?{"aria-labelledby":y,"aria-describedby":b}:{"aria-label":h},...D(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(ul,{})})}):null,w&&c?x.jsx(Yj,{onChange:s,parent:A.floating,position:S,sheet:I==="sheet",value:j}):null]})})}):null})})]})},Zj=e=>x.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),ip=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=Lf,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",y=P=>{g(P),d==null||d(P)},{refs:b,floatingStyles:T,context:w}=oo({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:wa,onOpenChange:i?void 0:y,middleware:[ep(),Sa(5),tp({fallbackAxisSideDirection:"start"}),hw({padding:5,element:h})]}),S=Sw(w,{move:!0,delay:{open:_w},enabled:l?s:!1,handleClose:c?Iw():null}),C=kj(w,{enabled:l?a:!1}),k=Ea(w,{enabled:l?c:!1}),I=ro(w,{enabled:l}),A=ao(w,{role:"tooltip",enabled:l}),O=Tj(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:V}=io([A,I,O,a?C:void 0,s?S:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),x.jsxs(E.Fragment,{children:[x.jsx(v,{...N(p),ref:el(b.setReference,f),children:n}),m&&x.jsx(no,{preserveTabOrder:!0,children:x.jsxs(cn,{...V(),ref:b.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(yw,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class As{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)As.getDescendantProperty(s[l],i,r);else i&&As.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Vr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Vr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=As.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Vr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Vr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Vr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Tl=0,Sr=1,gi=2,Mw=4;function dv(e){return()=>e}function Xj(e){e()}function oa(e,t){return n=>e(t(n))}function fv(e,t){return()=>e(t)}function Dw(e,t){return n=>e(t,n)}function ap(e){return e!==void 0}function Qj(...e){return()=>{e.map(Xj)}}function vi(){}function El(e,t){return t(e),e}function Jj(e,t){return t(e)}function lt(...e){return e}function Ke(e,t){return e(Sr,t)}function Oe(e,t){e(Tl,t)}function sp(e){e(gi)}function Lt(e){return e(Mw)}function xe(e,t){return Ke(e,Dw(t,Tl))}function Nn(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function pv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function jw(e,t){return e===t}function at(e=jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>oa(t,e)}function Cn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=eN(...t);return(r,o)=>{switch(r){case gi:sp(e);return;case Sr:return Ke(e,n(o))}}}function In(e,t){return n=>r=>{n(t=e(t,r))}}function Ko(e){return t=>n=>{e>0?e--:t(n)}}function lr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function De(...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);Ke(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 eN(...e){return t=>e.reduceRight(Jj,t)}function tN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Sr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),vi);case gi:r(),n=null;return}}}function se(e){let t=e;const n=$e();return(r,o)=>{switch(r){case Tl:t=o;break;case Sr:{o(t);break}case Mw:return t}return n(r,o)}}function Vt(e,t){return El(se(t),n=>xe(e,n))}function $e(){const e=[];return(t,n)=>{switch(t){case Tl:e.slice().forEach(r=>{r(n)});return;case gi:e.splice(0,e.length);return;case Sr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return El($e(),t=>xe(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:nN(),singleton:n}}const nN=()=>Symbol();function rN(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 kt(...e){const t=$e(),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);Ke(i,l=>{n[a]=l,r=r|s,r===o&&Oe(t,n)})}),function(i,a){switch(i){case gi:{sp(t);return}case Sr:return r===o&&a(n),Ke(t,a)}}}function Re(e,t=jw){return ne(e,at(t))}function hv(...e){return function(t,n){switch(t){case gi:return;case Sr:return Qj(...e.map(r=>Ke(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const oN={0:"debug",3:"error",1:"log",2:"warn"},iN=()=>typeof globalThis>"u"?window:globalThis,Tr=qe(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=iN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[oN[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Fn(e,t,n){return lp(e,t,n).callbackRef}function lp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function Nw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=aN(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?mv("column-gap",getComputedStyle(u).columnGap,o):mv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return lp(c,n,l)}function aN(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},tn.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 mv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function cp(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=lp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.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==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=qe(()=>{const e=$e(),t=$e(),n=se(0),r=$e(),o=se(0),i=$e(),a=$e(),s=se(0),l=se(0),c=se(0),u=se(0),d=$e(),p=$e(),f=se(!1),m=se(!1),g=se(!1);return xe(ne(e,pe(({scrollTop:h})=>h)),t),xe(ne(e,pe(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ia={lvl:0};function Fw(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 nt(e){return e===ia}function aa(e,t){if(!nt(e))return t===e.k?e.v:t<e.k?aa(e.l,t):aa(e.r,t)}function wn(e,t,n="k"){if(nt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=wn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return wn(e.l,t,n)}function Jt(e,t,n){return nt(e)?$w(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?gv(Ct(e,{l:Jt(e.l,t,n)})):gv(Ct(e,{r:Jt(e.r,t,n)}))}function Po(){return ia}function Cl(e,t,n){if(nt(e))return[];const r=wn(e,t)[0];return sN(yd(e,r,n))}function vd(e,t){if(nt(e))return ia;const{k:n,l:r,r:o}=e;if(t===n){if(nt(r))return o;if(nt(o))return r;{const[i,a]=Vw(r);return ss(Ct(e,{k:i,l:Lw(r),v:a}))}}else return t<n?ss(Ct(e,{l:vd(r,t)})):ss(Ct(e,{r:vd(o,t)}))}function $r(e){return nt(e)?[]:[...$r(e.l),{k:e.k,v:e.v},...$r(e.r)]}function yd(e,t,n){if(nt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(yd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(yd(i,t,n))),s}function ss(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(iu(t))return zw(Ct(e,{lvl:n-1}));if(!nt(t)&&!nt(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(iu(e))return xd(Ct(e,{lvl:n-1}));if(!nt(r)&&!nt(r.l)){const o=r.l,i=iu(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:xd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return $w(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 Lw(e){return nt(e.r)?e.l:ss(Ct(e,{r:Lw(e.r)}))}function iu(e){return nt(e)||e.lvl>e.r.lvl}function Vw(e){return nt(e.r)?[e.k,e.v]:Vw(e.r)}function $w(e,t,n,r=ia,o=ia){return{k:e,l:r,lvl:n,r:o,v:t}}function gv(e){return xd(zw(e))}function zw(e){const{l:t}=e;return!nt(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function xd(e){const{lvl:t,r:n}=e;return!nt(n)&&!nt(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function sN(e){return Fw(e,({k:t,v:n})=>({index:t,value:n}))}function Bw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function sa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const up=qe(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Hw(e,t,n){return e[Is(e,t,n)]}function Is(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 lN(e,t,n,r){const o=Is(e,t,r),i=Is(e,n,r,o);return e.slice(o,i+1)}function Sn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Rl(e){return!nt(e.groupOffsetTree)}function dp({index:e},t){return t===e?0:t<e?-1:1}function cN(){return{groupIndices:[],groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Po()}}function uN(e,t){let n=nt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),nt(e)){e=Jt(e,0,i);continue}const s=Cl(e,a-1,o+1);if(s.some(vN(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=vd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));c&&(e=Jt(e,a,i))}return[e,n]}function dN(e){return typeof e.groupIndex<"u"}function fN({offset:e},t){return t===e?0:t<e?-1:1}function la(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Hw(t,e,dp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Ww(e,t){if(!Rl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function qw(e,t,n){if(dN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Ww(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function pN(e,t,n,r=0){return r>0&&(t=Math.max(t,Hw(e,r,dp).offset)),Fw(lN(e,t,n,fN),gN)}function hN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&nt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>Jt(Jt(m,g,p),g+1,f),a)}else[a,s]=uN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=bd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,la(f,d,o)),Po()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function mN(e){return $r(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 vv(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 bd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Is(o,t-1,dp),s=o[l].offset;const c=wn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===wn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Cl(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function gN(e){return{index:e.index,value:e}}function vN(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 yN={offsetHeight:"height",offsetWidth:"width"},$n=qe(([{log:e},{recalcInProgress:t}])=>{const n=$e(),r=$e(),o=Vt(r,0),i=$e(),a=$e(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,S)=>Sn(w,yN[S])),p=se(void 0),f=se(0),m=cN(),g=Vt(ne(n,De(l,e,f),In(hN,m),at()),m),h=Vt(ne(l,at(),In((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);xe(ne(l,Ee(w=>w.length>0),De(g,f),pe(([w,S,C])=>{const k=w.reduce((I,A,O)=>Jt(I,A,la(A,S.offsetTree,C)||O),Po());return{...S,groupIndices:w,groupOffsetTree:k}})),g),xe(ne(r,De(g),Ee(([w,{lastIndex:S}])=>w<S),pe(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),xe(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);xe(ne(u,Ee(w=>w!==void 0&&nt(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(ne(n,De(g),In(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),pe(w=>w.changed)));Ke(ne(s,In((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:S}=Lt(g);if(w>0)Oe(t,!0),Oe(i,w+vv(w,S));else if(w<0){const C=Lt(h);C.length>0&&(w-=vv(-w,C)),Oe(a,w)}}),Ke(ne(s,De(e)),([w,S])=>{w<0&&S("`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},tn.ERROR)});const b=en(i);xe(ne(i,De(g),pe(([w,S])=>{const C=S.groupIndices.length>0,k=[],I=S.lastSize;if(C){const A=aa(S.sizeTree,0);let O=0,N=0;for(;O<w;){const P=S.groupIndices[N],_=S.groupIndices.length===N+1?1/0:S.groupIndices[N+1]-P-1;k.push({endIndex:P,size:A,startIndex:P}),k.push({endIndex:P+1+_-1,size:I,startIndex:P+1}),N++,O+=_+1}const V=$r(S.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:_,v:D})=>{let F=P.ranges;return P.prevSize!==0&&(F=[...P.ranges,{endIndex:_+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:_+w,prevSize:D,ranges:F}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return $r(S.sizeTree).reduce((A,{k:O,v:N})=>({prevIndex:O+w,prevSize:N,ranges:[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(ne(a,De(g,f),pe(([w,{offsetTree:S},C])=>{const k=-w;return la(k,S,C)})));return xe(ne(a,De(g,f),pe(([w,S,C])=>{if(S.groupIndices.length>0){if(nt(S.sizeTree))return S;let k=Po();const I=Lt(h);let A=0,O=0,N=0;for(;A<-w;){N=I[O];const V=I[O+1]-N-1;O++,A+=V+1}if(k=$r(S.sizeTree).reduce((V,{k:P,v:_})=>Jt(V,Math.max(0,P+w),_),k),A!==-w){const V=aa(S.sizeTree,N);k=Jt(k,0,V);const P=wn(S.sizeTree,-w+1)[1];k=Jt(k,1,P)}return{...S,sizeTree:k,...bd(S.offsetTree,0,k,C)}}else{const k=$r(S.sizeTree).reduce((I,{k:A,v:O})=>Jt(I,Math.max(0,A+w),O),Po());return{...S,sizeTree:k,...bd(S.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},lt(Tr,up),{singleton:!0});function xN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Uw=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=$e(),a=$e(),s=en(ne(i,pe(xN)));return xe(ne(s,pe(l=>l.totalCount)),n),xe(ne(s,pe(l=>l.groupIndices)),e),xe(ne(kt(o,t,r),Ee(([l,c])=>Rl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),at(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},lt($n,Wt)),Er=qe(([{log:e}])=>{const t=se(!1),n=en(ne(t,Ee(r=>r),at()));return Ke(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},lt(Tr),{singleton:!0}),bN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Yw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ca=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=$e(),m=$e(),g=se(0);let h=null,v=null,y=null;function b(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Oe(l,!1)}return xe(ne(f,De(n,d,r,g,s,a,p),De(e,i,o),pe(([[T,w,S,C,k,I,A,O],N,V,P])=>{const _=Yw(T),{align:D,behavior:F,offset:j}=_,z=C-1,M=qw(_,w,z);let $=la(M,w.offsetTree,N)+I;D==="end"?($+=V+wn(w.sizeTree,M)[1]-S+P,M===z&&($+=A)):D==="center"?$+=(V+wn(w.sizeTree,M)[1]-S+P)/2:$-=k,j&&($+=j);const J=te=>{b(),te?(O("retrying to scroll to",{location:T},tn.DEBUG),Oe(f,T)):(Oe(m,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),F==="smooth"){let te=!1;y=Ke(t,ee=>{te=te||ee}),h=Nn(u,()=>{J(te)})}else h=Nn(ne(t,wN(150)),J);return v=setTimeout(()=>{b()},1200),Oe(l,!0),O("scrolling from index to",{behavior:F,index:M,top:$},tn.DEBUG),{behavior:F,top:$}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},lt($n,Wt,Tr),{singleton:!0});function wN(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 Ra=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),s),xe(ne(a,De(l),Ee(([u,d])=>!!d),Cn(!1)),c),Ke(ne(kt(t,a),De(s,n,e,c),Ee(([[,u],d,{sizeTree:p},f,m])=>u&&(!nt(p)||ap(f))&&!d&&!m),De(l)),([,u])=>{Nn(o,()=>{Oe(c,!0)}),fp(4,()=>{Nn(r,()=>{Oe(s,!0)}),Oe(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},lt($n,Wt,Ca,Er),{singleton:!0});function Gw(e,t){return Math.abs(e-t)<1.01}const ca="up",Hi="down",SN="none",TN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},EN=0,ka=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=$e(),c=$e(),u=se(4),d=se(EN),p=Vt(ne(hv(ne(Re(o),Ko(1),Cn(!0)),ne(Re(o),Ko(1),Cn(!1),pv(100))),at()),!1),f=Vt(ne(hv(ne(n,Cn(!0)),ne(n,Cn(!1),pv(200))),at()),!1);xe(ne(kt(Re(o),Re(d)),pe(([y,b])=>y<=b),at()),s),xe(ne(s,lr(50)),c);const m=en(ne(kt(r,Re(i),Re(t),Re(e),Re(u)),In((y,[{scrollHeight:b,scrollTop:T},w,S,C,k])=>{const I=T+w-b>-k,A={scrollHeight:b,scrollTop:T,viewportHeight:w};if(I){let N,V;return T>y.state.scrollTop?(N="SCROLLED_DOWN",V=y.state.scrollTop-T):(N="SIZE_DECREASED",V=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:A}}let O;return A.scrollHeight>y.state.scrollHeight?O="SIZE_INCREASED":w<y.state.viewportHeight?O="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?O="SCROLLING_UPWARDS":O="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:O,state:A}},TN),at((y,b)=>y&&y.atBottom===b.atBottom))),g=Vt(ne(r,In((y,{scrollHeight:b,scrollTop:T,viewportHeight:w})=>{if(Gw(y.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:T};{const S=b-(T+w)<1;return y.scrollTop!==T&&S?{changed:!0,jump:y.scrollTop-T,scrollHeight:b,scrollTop:T}:{changed:!0,jump:0,scrollHeight:b,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ee(y=>y.changed),pe(y=>y.jump)),0);xe(ne(m,pe(y=>y.atBottom)),a),xe(ne(a,lr(50)),l);const h=se(Hi);xe(ne(r,pe(({scrollTop:y})=>y),at(),In((y,b)=>Lt(f)?{direction:y.direction,prevScrollTop:b}:{direction:b<y.prevScrollTop?ca:Hi,prevScrollTop:b},{direction:Hi,prevScrollTop:0}),pe(y=>y.direction)),h),xe(ne(r,lr(50),Cn(SN)),h);const v=se(0);return xe(ne(p,Ee(y=>!y),Cn(0)),v),xe(ne(o,lr(100),De(p),Ee(([y,b])=>!!b),In(([y,b],[T])=>[b,T],[0,0]),pe(([y,b])=>b-y)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},lt(Wt)),_s="top",Os="bottom",yv="none";function xv(e,t,n){return typeof e=="number"?n===ca&&t===_s||n===Hi&&t===Os?e:0:n===ca?t===_s?e.main:e.reverse:t===Os?e.main:e.reverse}function bv(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=$e(),a=se(0),s=se(0),l=se(0),c=Vt(ne(kt(Re(r),Re(o),Re(n),Re(i,sa),Re(l),Re(a),Re(t),Re(e),Re(s)),pe(([u,d,p,[f,m],g,h,v,y,b])=>{const T=u-y,w=h+v,S=Math.max(p-T,0);let C=yv;const k=bv(b,_s),I=bv(b,Os);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-k&&(C=ca),m<u-S+d+I&&(C=Hi),C!==yv?[Math.max(T-p-xv(g,_s,C)-k,0),T-S-v+d+xv(g,Os,C)+I]:null}),Ee(u=>u!=null),at(sa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},lt(Wt),{singleton:!0});function CN(e,t,n){if(Rl(t)){const r=Ww(e,t);return[{index:wn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const au={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ls(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,m=p-u;return{bottom:u,firstItemIndex:i,items:wv(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:wv(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Kw(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 ls(c,[],s,o,n,r)}function wv(e,t,n){if(e.length===0)return[];if(!Rl(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=Cl(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const so=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),v=$e();xe(i.topItemsIndexes,g);const y=Vt(ne(kt(f,m,Re(l,sa),Re(o),Re(r),Re(c),u,Re(g),Re(t),Re(n),e),Ee(([S,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return S&&!C&&!A}),pe(([,,[S,C],k,I,A,O,N,V,P,_])=>{const D=I,{offsetTree:F,sizeTree:j}=D,z=Lt(h);if(k===0)return{...au,totalCount:k};if(S===0&&C===0)return z===0?{...au,totalCount:k}:Kw(z,A,I,V,P,_||[]);if(nt(j))return z>0?null:ls(CN(pp(A,k),D,_),[],k,P,D,V);const M=[];if(N.length>0){const Z=N[0],U=N[N.length-1];let Y=0;for(const L of Cl(j,Z,U)){const W=L.value,G=Math.max(L.start,Z),ie=Math.min(L.end,U);for(let B=G;B<=ie;B++)M.push({data:_==null?void 0:_[B],index:B,offset:Y,size:W}),Y+=W}}if(!O)return ls([],M,k,P,D,V);const $=N.length>0?N[N.length-1]+1:0,J=pN(F,S,C,$);if(J.length===0)return null;const te=k-1,ee=El([],Z=>{for(const U of J){const Y=U.value;let L=Y.offset,W=U.start;const G=Y.size;if(Y.offset<S){W+=Math.floor((S-Y.offset+P)/(G+P));const B=W-U.start;L+=B*G+B*P}W<$&&(L+=($-W)*G,W=$);const ie=Math.min(U.end,te);for(let B=W;B<=ie&&!(L>=C);B++)Z.push({data:_==null?void 0:_[B],index:B,offset:L,size:G}),L+=G+P}});return ls(ee,M,k,P,D,V)}),Ee(S=>S!==null),at()),au);xe(ne(e,Ee(ap),pe(S=>S==null?void 0:S.length)),o),xe(ne(y,pe(S=>S.topListHeight)),d),xe(d,s),xe(ne(y,pe(S=>[S.top,S.bottom])),a),xe(ne(y,pe(S=>S.items)),v);const b=en(ne(y,Ee(({items:S})=>S.length>0),De(o,e),Ee(([{items:S},C])=>S[S.length-1].originalIndex===C-1),pe(([,S,C])=>[S-1,C]),at(sa),pe(([S])=>S))),T=en(ne(y,lr(200),Ee(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),pe(({items:S})=>S[0].index),at())),w=en(ne(y,Ee(({items:S})=>S.length>0),pe(({items:S})=>{let C=0,k=S.length-1;for(;S[C].type==="group"&&C<k;)C++;for(;S[k].type==="group"&&k>C;)k--;return{endIndex:S[k].index,startIndex:S[C].index}}),at(Bw)));return{endReached:b,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},lt($n,Uw,hp,Ra,Ca,ka,Er,up),{singleton:!0}),Zw=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=$e(),a=Vt(ne(kt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Re(a),i),{totalListHeight:a,totalListHeightChanged:i}},lt(Wt,so),{singleton:!0}),RN=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Vt(ne(kt(n,e,t),Ee(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),at()),0);return{alignToBottom:n,paddingTopAddition:r}},lt(Wt,Zw),{singleton:!0});function Sv(e){return e?e==="smooth"?"smooth":"auto":!1}const kN=(e,t)=>typeof e=="function"?Sv(e(t)):t&&Sv(e),PN=qe(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=$e();let p=null;function f(g){Oe(o,{align:"end",behavior:g,index:"LAST"})}Ke(ne(kt(ne(Re(t),Ko(1)),a),De(Re(u),r,i,c),pe(([[g,h],v,y,b,T])=>{let w=h&&b,S="auto";return w&&(S=kN(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ee(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Nn(e,()=>{Lt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Nn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return Ke(ne(kt(Re(u),t,s),Ee(([g,,h])=>g&&h),In(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ee(({refreshed:g})=>g),De(u,t)),([,g])=>{Lt(i)&&m(g!==!1)}),Ke(d,()=>{m(Lt(u)!==!1)}),Ke(kt(Re(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},lt($n,ka,Ca,Ra,Er,Tr,Wt)),AN=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(ne(s,De(i),Ee(([,l])=>l!==0),De(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Kw(l,c,u,d,p,f))),a),{}),lt($n,Ra,so,Er),{singleton:!0}),IN=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return Ke(ne(e,De(r),Ee(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ne(n,Ko(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,o)})})}),{initialScrollTop:r}},lt(Er,Wt,so),{singleton:!0}),_N=({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,ON=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=$e();return xe(ne(u,De(t,l,n,i,o,r,s),De(e),pe(([[d,p,f,m,g,h,v,y],b])=>{const{align:T,behavior:w,calculateViewLocation:S=_N,done:C,...k}=d,I=qw(d,p,m-1),A=la(I,p.offsetTree,b)+g+h,O=A+wn(p.sizeTree,I)[1],N=y+h,V=y+f-v,P=S({itemBottom:O,itemTop:A,locationParams:{align:T,behavior:w,...k},viewportBottom:V,viewportTop:N});return P?C&&Nn(ne(a,Ee(_=>!_),Ko(Lt(a)?1:2)),C):C&&C(),P}),Ee(d=>d!==null)),c),{scrollIntoView:u}},lt($n,Wt,Ca,so,Tr),{singleton:!0}),Xw=qe(([{scrollVelocity:e}])=>{const t=se(!1),n=$e(),r=se(!1);return xe(ne(e,De(r,t,n),Ee(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),at()),t),Ke(ne(kt(t,e,n),De(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},lt(ka),{singleton:!0}),mp=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=$e(),r=$e(),o=$e(),i=se(!1),a=se(void 0);return xe(ne(kt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(ne(t,De(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},lt(Wt)),MN=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=$e(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),Ke(ne(c,De(t,r,a,d,p,n)),([f,m,g,h,v,y,b])=>{const T=mN(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=b,f({ranges:T,scrollTop:g})}),xe(ne(u,Ee(ap),pe(DN)),o),xe(ne(i,De(u),Ee(([,f])=>f!==void 0),at(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},lt($n,Wt,Ra,Er,mp));function DN(e){return{align:"start",index:0,offset:e.scrollTop}}const jN=qe(([{topItemsIndexes:e}])=>{const t=se(0);return xe(ne(t,Ee(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},lt(so));function Qw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const NN=Qw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),FN=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(ne(l,De(a),In(([,v,y,b],[{bottom:T,items:w,offsetBottom:S,totalCount:C},k])=>{const I=T+S;let A=0;return y===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(A=I-b,A!==0&&(A+=k))),[A,w,C,I]},[0,[],0,0]),Ee(([v])=>v!==0),De(r,s,n,o,f,m),Ee(([,v,y,b,,,T])=>!T&&!b&&v!==0&&y===ca),pe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Oe(t,{behavior:"auto",top:-v}),Oe(e,0)):(Oe(e,0),Oe(t,{behavior:"auto",top:-v}))}return Ke(ne(g,De(e,i)),([v,y,b])=>{b&&NN()?Oe(e,y-v):h(-v)}),Ke(ne(kt(Vt(i,!1),e,m),Ee(([v,y,b])=>!v&&!b&&y!==0),pe(([v,y])=>y),lr(1)),h),xe(ne(d,pe(v=>({top:-v}))),t),Ke(ne(c,De(p,u),pe(([v,{groupIndices:y,lastSize:b,sizeTree:T},w])=>{function S(C){return C*(b+w)}if(y.length===0)return S(v);{let C=0;const k=aa(T,0);let I=0,A=0;for(;I<v;){I++,C+=k;let O=y.length===A+1?1/0:y[A+1]-y[A]-1;I+O>v&&(C-=k,O=v-I+1),I+=O,C+=S(O),A++}return C}})),v=>{Oe(e,v),requestAnimationFrame(()=>{Oe(t,{top:v}),requestAnimationFrame(()=>{Oe(e,0),Oe(m,!1)})})}),{deviation:e}},lt(Wt,ka,so,$n,Tr,up)),LN=qe(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),lt(hp,AN,Er,Xw,Zw,IN,RN,mp,ON,Tr)),Jw=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:y,topItemsIndexes:b,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:k},I])=>(xe(T.rangeChanged,I.scrollSeekRangeChanged),xe(ne(I.windowViewportRect,pe(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...I,...g,sizes:l,...h}),lt($n,Ra,Wt,MN,PN,so,Ca,FN,jN,Uw,LN));function VN(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 Ya=typeof document<"u"?E.useLayoutEffect:E.useEffect;function gp(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=E.createContext({});function l(h,v){h.propsReady&&Oe(h.propsReady,!1);for(const y of r){const b=h[t.required[y]];Oe(b,v[y])}for(const y of o)if(y in v){const b=h[t.optional[y]];Oe(b,v[y])}h.propsReady&&Oe(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=b=>{const T=h[t.methods[y]];Oe(T,b)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=tN(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...b}=h,[T]=E.useState(()=>El(rN(e),C=>{l(C,b)})),[w]=E.useState(fv(u,T));Ya(()=>{for(const C of a)C in b&&Ke(w[C],b[C]);return()=>{Object.values(w).map(sp)}},[b,w,T]),Ya(()=>{l(T,b)}),E.useImperativeHandle(v,dv(c(T)));const S=n;return x.jsx(s.Provider,{value:T,children:n?x.jsx(S,{...VN([...r,...o,...a],b),children:y}):y})}),p=h=>E.useCallback(Dw(Oe,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(b=>Ke(v,b),[v]);return E.useSyncExternalStore(y,()=>Lt(v),()=>Lt(v))},m=h=>{const v=E.useContext(s)[h],[y,b]=E.useState(fv(Lt,v));return Ya(()=>Ke(v,T=>{T!==y&&b(dv(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];Ya(()=>Ke(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const kl=E.createContext(void 0),e1=E.createContext(void 0),t1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function su(e){return"self"in e}function $N(e){return"body"in e}function n1(e,t,n,r=vi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if($N(h)||su(h)){const y=su(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():ha.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;su(f)?(h=Math.max(Sn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=Sn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),Gw(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const lu="-webkit-sticky",Tv="sticky",r1=Qw(()=>{if(typeof document>"u")return Tv;const e=document.createElement("div");return e.style.position=lu,e.style.position===lu?lu:Tv});function vp(e){return e}const zN=qe(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(vp),i=se("div"),a=se(vi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),at()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),BN=qe(([e,t])=>({...e,...t}),lt(Jw,zN)),HN=({height:e})=>x.jsx("div",{style:{height:e}}),WN={overflowAnchor:"none",position:r1(),zIndex:1},o1={overflowAnchor:"none"},qN={...o1,display:"inline-block",height:"100%"},Ev=E.memo(function({showTopList:e=!1}){const t=Pe("listState"),n=sn("sizeRanges"),r=Pe("useWindowScroll"),o=Pe("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Pe("itemContent"),c=Pe("context"),u=Pe("groupContent"),d=Pe("trackItemSizes"),p=Pe("itemSize"),f=Pe("log"),m=sn("gap"),g=Pe("horizontalDirection"),{callbackRef:h}=Nw(n,p,d,e?vi:s,f,m,o,g,Pe("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);bp("deviation",P=>{v!==P&&y(P)});const b=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||HN,w=Pe("ListComponent"),S=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,O=Pe("alignToBottom"),N=Pe("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:O?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:O?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...st(b,c)}):x.jsx(w,{...st(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:V,children:(e?t.topItems:t.items).map(P=>{const _=P.originalIndex,D=k(_+t.firstItemIndex,P.data,c);return I?E.createElement(T,{...st(T,c),height:P.size,index:P.index,key:D,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...st(C,c),"data-index":_,"data-item-index":P.index,"data-known-size":P.size,key:D,style:WN},u(P.index,c)):E.createElement(S,{...st(S,c),...i1(S,P.data),"data-index":_,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:D,style:g?qN:o1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),UN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},YN={outline:"none",overflowX:"auto",position:"relative"},yi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),GN={position:r1(),top:0,width:"100%",zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function i1(e,t){return{item:typeof e=="string"?void 0:t}}const KN=E.memo(function(){const e=Pe("HeaderComponent"),t=sn("headerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),ZN=E.memo(function(){const e=Pe("FooterComponent"),t=sn("footerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null});function yp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=n1(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?YN:UN,...o},tabIndex:0,...i,...st(s,u),children:r})})}function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=n1(a,l,s,m,d);return t1(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...st(s,p),children:r})})}const XN=({children:e})=>{const t=E.useContext(kl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Pe("alignToBottom"),i=Pe("horizontalDirection"),a=E.useMemo(()=>oa(n,l=>Sn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Pe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:yi(o),children:e})},QN=({children:e})=>{const t=E.useContext(kl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Pe("customScrollParent"),i=cp(n,o,Pe("skipAnimationFrameInResizeObserver")),a=Pe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(a),children:e})},JN=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...GN,marginTop:`${n}px`},o=Pe("context");return x.jsx(t,{style:r,...st(t,o),children:e})},eF=E.memo(function(e){const t=Pe("useWindowScroll"),n=Pe("topItemsIndexes").length>0,r=Pe("customScrollParent"),o=Pe("context"),i=r||t?rF:nF,a=r||t?QN:XN;return x.jsxs(i,{...e,...st(i,o),children:[n&&x.jsx(JN,{children:x.jsx(Ev,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(KN,{}),x.jsx(Ev,{}),x.jsx(ZN,{})]})]})}),{Component:tF,useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}=gp(BN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},eF),nF=yp({useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}),rF=xp({useEmitter:bp,useEmitterValue:Pe,usePublisher:sn}),wp=tF,oF=qe(()=>{const e=se(l=>x.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(vp),a=se(vi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),at()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),iF=qe(([e,t])=>({...e,...t}),lt(Jw,oF)),aF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),sF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),lF={overflowAnchor:"none"},Cv=E.memo(function({showTopList:e=!1}){const t=Me("listState"),n=Me("computeItemKey"),r=Me("firstItemIndex"),o=Me("isSeeking"),i=Me("ScrollSeekPlaceholder")||aF,a=Me("context"),s=Me("TableRowComponent"),l=Me("fixedHeaderHeight"),c=Me("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...st(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...st(s,a),...i1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:lF},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),cF=E.memo(function(){const e=Me("listState"),t=Me("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Me("useWindowScroll"),o=Me("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Me("trackItemSizes"),c=Me("itemSize"),u=Me("log"),{callbackRef:d,ref:p}=Nw(n,c,l,s,u,void 0,o,!1,Me("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Sp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=Me("EmptyPlaceholder"),h=Me("FillerRow")||sF,v=Me("TableBodyComponent"),y=Me("paddingTopAddition"),b=Me("statefulTotalCount"),T=Me("context");if(b===0&&g)return x.jsx(g,{...st(g,T)});const w=(t?e.topItems:[]).reduce((A,O)=>A+O.size,0),S=e.offsetTop+y+f-w,C=e.offsetBottom,k=S>0?x.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?x.jsx(h,{context:T,height:C},"padding-bottom"):null;return x.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...st(v,T),children:[k,t&&x.jsx(Cv,{showTopList:!0}),x.jsx(Cv,{}),I]})}),uF=({children:e})=>{const t=E.useContext(kl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>oa(n,i=>Sn(i,"height")),[n]),!0,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:yi(!1),children:e})},dF=({children:e})=>{const t=E.useContext(kl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Me("customScrollParent"),i=cp(n,o,Me("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(!1),children:e})},fF=E.memo(function(e){const t=Me("useWindowScroll"),n=Me("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Me("fixedHeaderContent"),a=Me("fixedFooterContent"),s=Me("context"),l=Fn(E.useMemo(()=>oa(r,v=>Sn(v,"height")),[r]),!0,Me("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>oa(o,v=>Sn(v,"height")),[o]),!0,Me("skipAnimationFrameInResizeObserver")),u=n||t?mF:hF,d=n||t?dF:uF,p=Me("TableComponent"),f=Me("TableHeadComponent"),m=Me("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...st(f,s),children:i()},"TableHead"):null,h=a?x.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...st(m,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...st(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...st(p,s),children:[g,x.jsx(cF,{},"TableBody"),h]})})})}),{Component:pF,useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}=gp(iF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},fF),hF=yp({useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}),mF=xp({useEmitter:Sp,useEmitterValue:Me,usePublisher:xn}),gF=pF,Rv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},vF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:kv,floor:Ms,max:Wi,min:cu,round:Pv}=Math;function Av(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function yF(e){return{...vF,items:e}}function Ga(e,t){return e&&e.width===t.width&&e.height===t.height}function xF(e,t){return e&&e.column===t.column&&e.row===t.row}const bF=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T},w])=>{const S=se(0),C=se(0),k=se(Rv),I=se({height:0,width:0}),A=se({height:0,width:0}),O=$e(),N=$e(),V=se(0),P=se(null),_=se({column:0,row:0}),D=$e(),F=$e(),j=se(!1),z=se(0),M=se(!0),$=se(!1),J=se(!1);Ke(ne(m,De(z),Ee(([L,W])=>!!W)),()=>{Oe(M,!1)}),Ke(ne(kt(m,M,A,I,z,$),Ee(([L,W,G,ie,,B])=>L&&!W&&G.height!==0&&ie.height!==0&&!B)),([,,,,L])=>{Oe($,!0),fp(1,()=>{Oe(O,L)}),Nn(ne(c),()=>{Oe(t,[0,0]),Oe(M,!0)})}),xe(ne(F,Ee(L=>L!=null&&L.scrollTop>0),Cn(0)),C),Ke(ne(m,De(F),Ee(([,L])=>L!=null)),([,L])=>{L&&(Oe(I,L.viewport),Oe(A,L.item),Oe(_,L.gap),L.scrollTop>0&&(Oe(j,!0),Nn(ne(c,Ko(1)),W=>{Oe(j,!1)}),Oe(l,{top:L.scrollTop})))}),xe(ne(I,pe(({height:L})=>L)),d),xe(ne(kt(Re(I,Ga),Re(A,Ga),Re(_,(L,W)=>L&&L.column===W.column&&L.row===W.row),Re(c)),pe(([L,W,G,ie])=>({gap:G,item:W,scrollTop:ie,viewport:L}))),D),xe(ne(kt(Re(S),r,Re(_,xF),Re(A,Ga),Re(I,Ga),Re(P),Re(C),Re(j),Re(M),Re(z)),Ee(([,,,,,,,L])=>!L),pe(([L,[W,G],ie,B,ye,Se,Ie,,Le,ae])=>{const{column:ve,row:K}=ie,{height:le,width:Q}=B,{width:oe}=ye;if(Ie===0&&(L===0||oe===0))return Rv;if(Q===0){const fn=pp(ae,L),Tn=fn+Math.max(Ie-1,0);return yF(Av(fn,Tn,Se))}const be=a1(oe,Q,ve);let X,ce;Le?W===0&&G===0&&Ie>0?(X=0,ce=Ie-1):(X=be*Ms((W+K)/(le+K)),ce=be*kv((G+K)/(le+K))-1,ce=cu(L-1,Wi(ce,be-1)),X=cu(ce,Wi(0,X))):(X=0,ce=-1);const ke=Av(X,ce,Se),{bottom:ze,top:xt}=Iv(ye,ie,B,ke),ut=kv(L/be),Ot=ut*le+(ut-1)*K-ze;return{bottom:ze,itemHeight:le,items:ke,itemWidth:Q,offsetBottom:Ot,offsetTop:xt,top:xt}})),k),xe(ne(P,Ee(L=>L!==null),pe(L=>L.length)),S),xe(ne(kt(I,A,k,_),Ee(([L,W,{items:G}])=>G.length>0&&W.height!==0&&L.height!==0),pe(([L,W,{items:G},ie])=>{const{bottom:B,top:ye}=Iv(L,ie,W,G);return[ye,B]}),at(sa)),t);const te=se(!1);xe(ne(c,De(te),pe(([L,W])=>W||L!==0)),te);const ee=en(ne(kt(k,S),Ee(([{items:L}])=>L.length>0),De(te),Ee(([[L,W],G])=>{const ie=L.items[L.items.length-1].index===W-1;return(G||L.bottom>0&&L.itemHeight>0&&L.offsetBottom===0&&L.items.length===W)&&ie}),pe(([[,L]])=>L-1),at())),Z=en(ne(Re(k),Ee(({items:L})=>L.length>0&&L[0].index===0),Cn(0),at())),U=en(ne(Re(k),De(j),Ee(([{items:L},W])=>L.length>0&&!W),pe(([{items:L}])=>({endIndex:L[L.length-1].index,startIndex:L[0].index})),at(Bw),lr(0)));xe(U,f.scrollSeekRangeChanged),xe(ne(O,De(I,A,S,_),pe(([L,W,G,ie,B])=>{const ye=Yw(L),{align:Se,behavior:Ie,offset:Le}=ye;let ae=ye.index;ae==="LAST"&&(ae=ie-1),ae=Wi(0,ae,cu(ie-1,ae));let ve=wd(W,B,G,ae);return Se==="end"?ve=Pv(ve-W.height+G.height):Se==="center"&&(ve=Pv(ve-W.height/2+G.height/2)),Le&&(ve+=Le),{behavior:Ie,top:ve}})),l);const Y=Vt(ne(k,pe(L=>L.offsetBottom+L.bottom)),0);return xe(ne(T,pe(L=>({height:L.visibleHeight,width:L.visibleWidth}))),I),{customScrollParent:h,data:P,deviation:V,footerHeight:o,gap:_,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:F,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:O,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:T,...f,gridState:k,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:D,stateRestoreInProgress:j,...w}},lt(hp,Wt,ka,Xw,Er,mp,Tr));function a1(e,t,n){return Wi(1,Ms((e+n)/(Ms(t)+n)))}function Iv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=wd(e,t,n,r[0].index);return{bottom:wd(e,t,n,r[r.length-1].index)+o,top:i}}function wd(e,t,n,r){const o=a1(e.width,n.width,t.column),i=Ms(r/o),a=i*n.height+Wi(0,i-1)*t.row;return a>0?a+t.row:a}const wF=qe(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(vp),a=se("div"),s=se(vi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),at()),p),c=se(!1),u=se(!1);return xe(Re(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")}}),SF=qe(([e,t])=>({...e,...t}),lt(bF,wF)),TF=E.memo(function(){const e=ct("gridState"),t=ct("listClassName"),n=ct("itemClassName"),r=ct("itemContent"),o=ct("computeItemKey"),i=ct("isSeeking"),a=ln("scrollHeight"),s=ct("ItemComponent"),l=ct("ListComponent"),c=ct("ScrollSeekPlaceholder"),u=ct("context"),d=ln("itemDimensions"),p=ln("gap"),f=ct("log"),m=ct("stateRestoreInProgress"),g=ln("reportReadyState"),h=Fn(E.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const b=v.firstChild;if(b){const{height:T,width:w}=b.getBoundingClientRect();d({height:T,width:w})}p({column:_v("column-gap",getComputedStyle(v).columnGap,f),row:_v("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return t1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:x.jsx(l,{className:t,ref:h,...st(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?x.jsx(c,{...st(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...st(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),EF=E.memo(function(){const e=ct("HeaderComponent"),t=ln("headerHeight"),n=ct("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=ct("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),CF=E.memo(function(){const e=ct("FooterComponent"),t=ln("footerHeight"),n=ct("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Sn(i,"height"))},[t]),!0,!1),o=ct("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),RF=({children:e})=>{const t=E.useContext(e1),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Fn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:yi(!1),children:e})},kF=({children:e})=>{const t=E.useContext(e1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=ct("customScrollParent"),i=cp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:yi(!1),children:e})},PF=E.memo(function({...e}){const t=ct("useWindowScroll"),n=ct("customScrollParent"),r=n||t?IF:AF,o=n||t?kF:RF,i=ct("context");return x.jsx(r,{...e,...st(r,i),children:x.jsxs(o,{children:[x.jsx(EF,{}),x.jsx(TF,{}),x.jsx(CF,{})]})})}),{useEmitter:s1,useEmitterValue:ct,usePublisher:ln}=gp(SF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},PF),AF=yp({useEmitter:s1,useEmitterValue:ct,usePublisher:ln}),IF=xp({useEmitter:s1,useEmitterValue:ct,usePublisher:ln});function _v(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Tp=()=>{const e=E.useContext(li);return e?e.tweaks:ml},l1=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("span",{className:je("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(ip,{as:"button",type:"button","aria-description":r,title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(qb,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[x.jsx(Hb,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(vA,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),Pa=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:b,reportStatus:T},w)=>{const S=Tp(),C=T!==void 0?T:S.input.iconFeedback,k=d??f,I=_t(),A=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:je("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[x.jsxs("label",{form:u,htmlFor:k,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(l1,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:A||n?x.jsxs(E.Fragment,{children:[y?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.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}),x.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})]})}),_F=e=>x.jsx(E.Fragment,{children:e.children}),OF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},MF={caseSensitive:!1,sort:!1},DF=[],jF=E.forwardRef(function(t,n){return x.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),NF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),FF={List:jF,Item:NF},vo=320,uu=40,LF=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=E.useRef(null),y=E.useRef(null),b=g.value??g.defaultValue??"",T=_t(),[w,S]=E.useState(()=>Math.min(vo,uu*o.length)),[C,k]=E.useState(!1),[I,A]=E.useState(""),[O,N]=E.useState(b),[V,P]=E.useState(()=>{var K;return((K=o.find(le=>le.value===b))==null?void 0:K.label)??b}),[_,D]=E.useState(null),F=E.useRef(DF),j=m&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Vr(j,["value","label"],MF).search(I),M=()=>{k(!1),S(0)},$=z.filter(K=>K.hidden!==!0),J=m?void 0:`^(${o.map(K=>`${rd(K.value)}${K.label?"|"+rd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(le=>le.value===g.value);N((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||S(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let le=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min($.length,10)).forEach(be=>{const X=be.getBoundingClientRect();le+=X.height});const oe=Math.min(le,vo);S(oe)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:Y}=oo({open:C,transform:!0,strategy:"absolute",onOpenChange:k,whileElementsMounted:wa,middleware:[Sa(4),pw({padding:10,elementContext:"reference",apply(K){const le=v.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),oe=(Q==null?void 0:Q.getBoundingClientRect().height)||0,be=Math.min(oe<uu?vo:oe,vo);ha.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<uu?void S(be):void S(Math.min(X,vo))},50)),Object.assign(K.elements.floating.style,{width:`${le}px`,maxWidth:`${le}px`,maxHeight:`${vo}`})}})]}),L=Aw(Y,OF),{getReferenceProps:W,getFloatingProps:G,getItemProps:ie}=io([ao(Y,{role:"listbox"}),ro(Y),op(Y,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return ma(K)},[]);const B=(K,le)=>{N(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const oe=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(oe),g.onChange&&g.onChange(oe),P(K.label??""),M(),A(""),D(le)},ye=K=>{var Q;const le=K.target.value;return A(le),!C&&le===""?k(!0):(K.target.name=g.name||"",le?k(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Se=()=>{var K;k(!0),A(""),(K=U.reference.current)==null||K.focus()},Ie=()=>{D(K=>K===null?0:K),k(!0),A("")},Le=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),A(""),N(""),P(""),Gy(U.reference.current),M()},ae=g.id||g.name,ve=$.length===0;return x.jsxs(Pa,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Se,children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:Le,className:"p-2 transition-colors link:text-danger md:p-1",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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:[x.jsx("input",{"data-shadow":"true",...W({...g,onChange:ye,onFocus:Ie,pattern:J,ref:U.setReference,name:`${ae}-shadow`,id:`${ae}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var le,Q;if(K.key==="Escape")return K.currentTarget.blur(),M();if(C){if(K.key==="ArrowDown"){let oe=tt.number(_)?_+1:0;return oe>$.length-1&&(oe=0),(le=y.current)==null||le.scrollIntoView({index:oe}),D(oe)}if(K.key==="ArrowUp"){let oe=tt.number(_)?_-1:$.length-1;return oe<0&&(oe=$.length-1),(Q=y.current)==null||Q.scrollIntoView({index:oe}),D(oe)}if(K.key==="Enter"){if(_!==null&&$[_])return K.preventDefault(),B($[_],_);if($.length===1)return K.preventDefault(),B($[0],0)}}}}),"data-value":O,"data-error":!!t,"data-name":ae,"data-target":ae,required:f,value:C?I:V||O,"aria-autocomplete":"list",autoComplete:"off",className:je("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","group-focus-within:border-primary group-hover:border-primary",g.className)}),x.jsx("input",{id:ae,name:ae,type:"hidden","data-origin":ae,ref:h,required:f,defaultValue:g.value||O||void 0}),x.jsx(no,{preserveTabOrder:!0,children:C?x.jsx(hi,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(pt.ul,{...G({ref:U.setFloating,style:{...L.styles,top:ee??0,position:Z,left:(te??0)+(O?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ve?"auto":w},className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[ve?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,x.jsx(wp,{ref:y,hidden:ve,data:$,style:{height:w},components:FF,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,le)=>{const Q=le.Render??_F,oe=O===le.value||O===le.label,be=_===K,X=le.label??le.value;return x.jsx("button",{"data-value":le.value,...ie({ref:ce=>void(F.current[K]=ce),role:"option",type:"button","aria-checked":oe,"aria-current":oe,"aria-selected":oe,"aria-busy":le.disabled,onClick:()=>B(le,K),className:`cursor-pointer w-full p-2 text-left ${oe?"bg-primary-hover text-primary-foreground":""} ${be?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(Q,{...g,label:le.label,value:le.value,children:X})})}})]})}):null})]})}),Ep=E.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 x.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:je("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:je("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,x.jsx("span",{"data-name":"checkbox-label",className:je("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),c1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...b},T)=>{const w=e,S=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=ma(C.current),A=r==null?void 0:r(k),O=N=>{const V=N;if(V.key==="Enter"&&k.enterKeyHint==="next"){const P=k.getAttribute("data-next");if(P){const _=document.getElementById(P);if(_)return _.focus(),void V.preventDefault()}}};return k.addEventListener("keydown",O),()=>{A==null||A(),I(),k.removeEventListener("keydown",O)}},[]),x.jsx(Pa,{...n,info:i,left:a,error:l,right:c,loading:y,form:b.form,name:b.name,feedback:h,hideLeft:v,title:b.title,container:je(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:x.jsx(w,{...n,...b,id:S,name:S,type:m,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:el(T,C),className:je("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","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Aa=c1(p0,"input",{type:"text"}),Ov=new Date(1970,11,31),du={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Mv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},VF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},fu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},$F=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Nf(t),l=E.useId(),c=_t(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=fu(u,Ov).flatMap(C=>tt.keyof(du,C.type)?du[C.type](C.value):[]),h=fu(u,Ov).reduce((C,k)=>C+(tt.keyof(Mv,k.type)?Mv[k.type](k.value):""),""),[v,y]=E.useState(d?fu(u,d).reduce((C,k)=>C+(tt.keyof(du,k.type)?VF[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(y(k),g.length===k.length&&g.every((A,O)=>{const N=k.charAt(O);return typeof A=="string"?N===A:A.test(N)})){const A=zo(H_(k,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),y(C?HI(C,h):"")),w=Zb(d),S=w?d.toISOString():void 0;return x.jsx(Aa,{...i,mask:g,value:v,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(mi,{open:f,onChange:m,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(uA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(T0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),zF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],BF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],HF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],WF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Dv=(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};function jv(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?WF:HF:t.binary?BF:zF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Dv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Dv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ka={exports:{}},Za={exports:{}},Ue={};/** @license React v16.13.1
173
173
  * react-is.production.min.js
174
174
  *
175
175
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -183,15 +183,15 @@
183
183
  *
184
184
  * This source code is licensed under the MIT license found in the
185
185
  * LICENSE file in the root directory of this source tree.
186
- */var Fv;function UF(){return Fv||(Fv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===h||B.$$typeof===v||B.$$typeof===y||B.$$typeof===g)}function T(B){if(typeof B=="object"&&B!==null){var ye=B.$$typeof;switch(ye){case t:var Se=B.type;switch(Se){case l:case c:case r:case i:case o:case d:return Se;default:var Ie=Se&&Se.$$typeof;switch(Ie){case s:case u:case m:case f:case a:return Ie;default:return ye}}case n:return ye}}}var w=l,S=c,C=s,R=a,I=t,A=u,O=r,N=m,V=f,P=n,_=i,D=o,F=d,j=!1;function z(B){return j||(j=!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.")),M(B)||T(B)===l}function M(B){return T(B)===c}function $(B){return T(B)===s}function J(B){return T(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function Z(B){return T(B)===r}function U(B){return T(B)===m}function Y(B){return T(B)===f}function L(B){return T(B)===n}function W(B){return T(B)===i}function G(B){return T(B)===o}function ie(B){return T(B)===d}Ye.AsyncMode=w,Ye.ConcurrentMode=S,Ye.ContextConsumer=C,Ye.ContextProvider=R,Ye.Element=I,Ye.ForwardRef=A,Ye.Fragment=O,Ye.Lazy=N,Ye.Memo=V,Ye.Portal=P,Ye.Profiler=_,Ye.StrictMode=D,Ye.Suspense=F,Ye.isAsyncMode=z,Ye.isConcurrentMode=M,Ye.isContextConsumer=$,Ye.isContextProvider=J,Ye.isElement=te,Ye.isForwardRef=ee,Ye.isFragment=Z,Ye.isLazy=U,Ye.isMemo=Y,Ye.isPortal=L,Ye.isProfiler=W,Ye.isStrictMode=G,Ye.isSuspense=ie,Ye.isValidElementType=b,Ye.typeOf=T}()),Ye}var Lv;function u1(){return Lv||(Lv=1,process.env.NODE_ENV==="production"?Za.exports=qF():Za.exports=UF()),Za.exports}/*
186
+ */var Fv;function UF(){return Fv||(Fv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===h||B.$$typeof===v||B.$$typeof===y||B.$$typeof===g)}function T(B){if(typeof B=="object"&&B!==null){var ye=B.$$typeof;switch(ye){case t:var Se=B.type;switch(Se){case l:case c:case r:case i:case o:case d:return Se;default:var Ie=Se&&Se.$$typeof;switch(Ie){case s:case u:case m:case f:case a:return Ie;default:return ye}}case n:return ye}}}var w=l,S=c,C=s,k=a,I=t,A=u,O=r,N=m,V=f,P=n,_=i,D=o,F=d,j=!1;function z(B){return j||(j=!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.")),M(B)||T(B)===l}function M(B){return T(B)===c}function $(B){return T(B)===s}function J(B){return T(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function Z(B){return T(B)===r}function U(B){return T(B)===m}function Y(B){return T(B)===f}function L(B){return T(B)===n}function W(B){return T(B)===i}function G(B){return T(B)===o}function ie(B){return T(B)===d}Ye.AsyncMode=w,Ye.ConcurrentMode=S,Ye.ContextConsumer=C,Ye.ContextProvider=k,Ye.Element=I,Ye.ForwardRef=A,Ye.Fragment=O,Ye.Lazy=N,Ye.Memo=V,Ye.Portal=P,Ye.Profiler=_,Ye.StrictMode=D,Ye.Suspense=F,Ye.isAsyncMode=z,Ye.isConcurrentMode=M,Ye.isContextConsumer=$,Ye.isContextProvider=J,Ye.isElement=te,Ye.isForwardRef=ee,Ye.isFragment=Z,Ye.isLazy=U,Ye.isMemo=Y,Ye.isPortal=L,Ye.isProfiler=W,Ye.isStrictMode=G,Ye.isSuspense=ie,Ye.isValidElementType=b,Ye.typeOf=T}()),Ye}var Lv;function u1(){return Lv||(Lv=1,process.env.NODE_ENV==="production"?Za.exports=qF():Za.exports=UF()),Za.exports}/*
187
187
  object-assign
188
188
  (c) Sindre Sorhus
189
189
  @license MIT
190
- */var pu,Vv;function YF(){if(Vv)return pu;Vv=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 pu=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},pu}var hu,$v;function Cp(){if($v)return hu;$v=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hu=e,hu}var mu,zv;function d1(){return zv||(zv=1,mu=Function.call.bind(Object.prototype.hasOwnProperty)),mu}var gu,Bv;function GF(){if(Bv)return gu;Bv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Cp(),n={},r=d1();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},gu=o,gu}var vu,Hv;function KF(){if(Hv)return vu;Hv=1;var e=u1(),t=YF(),n=Cp(),r=d1(),o=GF(),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 vu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var $=M&&(c&&M[c]||M[u]);if(typeof $=="function")return $}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(),arrayOf:b,element:T(),elementType:w(),instanceOf:S,node:A(),objectOf:R,oneOf:C,oneOfType:I,shape:N,exact:V};function m(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function g(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}g.prototype=Error.prototype;function h(M){if(process.env.NODE_ENV!=="production")var $={},J=0;function te(Z,U,Y,L,W,G,ie){if(L=L||p,G=G||Y,ie!==n){if(l){var B=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 B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=L+":"+Y;!$[ye]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+L+"`. 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."),$[ye]=!0,J++)}}return U[Y]==null?Z?U[Y]===null?new g("The "+W+" `"+G+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new g("The "+W+" `"+G+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M(U,Y,L,W,G)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function v(M){function $(J,te,ee,Z,U,Y){var L=J[te],W=D(L);if(W!==M){var G=F(L);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+G+"` supplied to `"+ee+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return h($)}function y(){return h(a)}function b(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var Y=J[te];if(!Array.isArray(Y)){var L=D(Y);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<Y.length;W++){var G=M(Y,W,ee,Z,U+"["+W+"]",n);if(G instanceof Error)return G}return null}return h($)}function T(){function M($,J,te,ee,Z){var U=$[J];if(!s(U)){var Y=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return h(M)}function w(){function M($,J,te,ee,Z){var U=$[J];if(!e.isValidElementType(U)){var Y=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return h(M)}function S(M){function $(J,te,ee,Z,U){if(!(J[te]instanceof M)){var Y=M.name||p,L=z(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected ")+("instance of `"+Y+"`."))}return null}return h($)}function C(M){if(!Array.isArray(M))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 $(J,te,ee,Z,U){for(var Y=J[te],L=0;L<M.length;L++)if(m(Y,M[L]))return null;var W=JSON.stringify(M,function(ie,B){var ye=F(B);return ye==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(Y)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return h($)}function R(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected an object."));for(var W in Y)if(r(Y,W)){var G=M(Y,W,ee,Z,U+"."+W,n);if(G instanceof Error)return G}return null}return h($)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<M.length;$++){var J=M[$];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(J)+" at index "+$+"."),a}function te(ee,Z,U,Y,L){for(var W=[],G=0;G<M.length;G++){var ie=M[G],B=ie(ee,Z,U,Y,L,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var ye=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+Y+" `"+L+"` supplied to "+("`"+U+"`"+ye+"."))}return h(te)}function A(){function M($,J,te,ee,Z){return P($[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return h(M)}function O(M,$,J,te,ee){return new g((M||"React class")+": "+$+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function N(M){function $(J,te,ee,Z,U){var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+L+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in M){var G=M[W];if(typeof G!="function")return O(ee,Z,U,W,F(G));var ie=G(Y,W,ee,Z,U+"."+W,n);if(ie)return ie}return null}return h($)}function V(M){function $(J,te,ee,Z,U){var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+L+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],M);for(var G in W){var ie=M[G];if(r(M,G)&&typeof ie!="function")return O(ee,Z,U,G,F(ie));if(!ie)return new g("Invalid "+Z+" `"+U+"` key `"+G+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
191
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var B=ie(Y,G,ee,Z,U+"."+G,n);if(B)return B}return null}return h($)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var $=d(M);if($){var J=$.call(M),te;if($!==M.entries){for(;!(te=J.next()).done;)if(!P(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function D(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":_($,M)?"symbol":$}function F(M){if(typeof M>"u"||M===null)return""+M;var $=D(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function j(M){var $=F(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function z(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},vu}var yu,Wv;function ZF(){if(Wv)return yu;Wv=1;var e=Cp();function t(){}function n(){}return n.resetWarningCache=t,yu=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yu}var qv;function XF(){if(qv)return Ka.exports;if(qv=1,process.env.NODE_ENV!=="production"){var e=u1(),t=!0;Ka.exports=KF()(e.isElement,t)}else Ka.exports=ZF()();return Ka.exports}var QF=XF();const et=Iy(QF);function lo(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())})}const JF=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 Zo(e,t,n){const r=eL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Uv(r,"path",i),Uv(r,"relativePath",i),r}function eL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=JF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Uv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const tL=[".DS_Store","Thumbs.db"];function nL(e){return lo(this,void 0,void 0,function*(){return Ds(e)&&rL(e.dataTransfer)?sL(e.dataTransfer,e.type):oL(e)?iL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?aL(e):[]})}function rL(e){return Ds(e)}function oL(e){return Ds(e)&&Ds(e.target)}function Ds(e){return typeof e=="object"&&e!==null}function iL(e){return Sd(e.target.files).map(t=>Zo(t))}function aL(e){return lo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Zo(n))})}function sL(e,t){return lo(this,void 0,void 0,function*(){if(e.items){const n=Sd(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(lL));return Yv(f1(r))}return Yv(Sd(e.files).map(n=>Zo(n)))})}function Yv(e){return e.filter(t=>tL.indexOf(t.name)===-1)}function Sd(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 lL(e){if(typeof e.webkitGetAsEntry!="function")return Gv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?p1(t):Gv(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function Gv(e,t){return lo(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,Zo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Zo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function cL(e){return lo(this,void 0,void 0,function*(){return e.isDirectory?p1(e):uL(e)})}function p1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>lo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(cL));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function uL(e){return lo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Zo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Xa={},Kv;function dL(){return Kv||(Kv=1,Xa.__esModule=!0,Xa.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}),Xa}var fL=dL();const xu=Iy(fL);function Zv(e){return mL(e)||hL(e)||m1(e)||pL()}function pL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mL(e){if(Array.isArray(e))return Td(e)}function Xv(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 Qv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(n),!0).forEach(function(r){h1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t){return yL(e)||vL(e,t)||m1(e,t)||gL()}function gL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m1(e,t){if(e){if(typeof e=="string")return Td(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 Td(e,t)}}function Td(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 vL(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 yL(e){if(Array.isArray(e))return e}var xL=typeof xu=="function"?xu:xu.default,bL="file-invalid-type",wL="file-too-large",SL="file-too-small",TL="too-many-files",EL=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:bL,message:"File type must be ".concat(r)}},Jv=function(t){return{code:wL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ey=function(t){return{code:SL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},CL={code:TL,message:"Too many files"};function g1(e,t){var n=e.type==="application/x-moz-file"||xL(e,t);return[n,n?null:EL(t)]}function v1(e,t,n){if(Nr(e.size))if(Nr(t)&&Nr(n)){if(e.size>n)return[!1,Jv(n)];if(e.size<t)return[!1,ey(t)]}else{if(Nr(t)&&e.size<t)return[!1,ey(t)];if(Nr(n)&&e.size>n)return[!1,Jv(n)]}return[!0,null]}function Nr(e){return e!=null}function kL(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=g1(l,n),u=ua(c,1),d=u[0],p=v1(l,r,o),f=ua(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function js(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Qa(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 ty(e){e.preventDefault()}function RL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function PL(e){return e.indexOf("Edge/")!==-1}function AL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return RL(e)||PL(e)}function En(){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!js(r)&&s&&s.apply(void 0,[r].concat(i)),js(r)})}}function IL(){return"showOpenFilePicker"in window}function _L(e){if(Nr(e)){var t=Object.entries(e).filter(function(n){var r=ua(n,2),o=r[0],i=r[1],a=!0;return y1(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(x1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ua(r,2),i=o[0],a=o[1];return Qv(Qv({},n),{},h1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function OL(e){if(Nr(e))return Object.entries(e).reduce(function(t,n){var r=ua(n,2),o=r[0],i=r[1];return[].concat(Zv(t),[o],Zv(i))},[]).filter(function(t){return y1(t)||x1(t)}).join(",")}function ML(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function DL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function y1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function x1(e){return/^.*\.[\w]+$/.test(e)}var jL=["children"],NL=["open"],FL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],LL=["refKey","onChange","onClick"];function VL(e){return BL(e)||zL(e)||b1(e)||$L()}function $L(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BL(e){if(Array.isArray(e))return Ed(e)}function bu(e,t){return qL(e)||WL(e,t)||b1(e,t)||HL()}function HL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b1(e,t){if(e){if(typeof e=="string")return Ed(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 Ed(e,t)}}function Ed(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 WL(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 qL(e){if(Array.isArray(e))return e}function ny(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 dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ny(Object(n),!0).forEach(function(r){Cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t){if(e==null)return{};var n=UL(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 UL(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 kp=E.forwardRef(function(e,t){var n=e.children,r=Ns(e,jL),o=S1(r),i=o.open,a=Ns(o,NL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(dt(dt({},a),{},{open:i})))});kp.displayName="Dropzone";var w1={disabled:!1,getFilesFromEvent:nL,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};kp.defaultProps=w1;kp.propTypes={children:et.func,accept:et.objectOf(et.arrayOf(et.string)),multiple:et.bool,preventDropOnDocument:et.bool,noClick:et.bool,noKeyboard:et.bool,noDrag:et.bool,noDragEventsBubbling:et.bool,minSize:et.number,maxSize:et.number,maxFiles:et.number,disabled:et.bool,getFilesFromEvent:et.func,onFileDialogCancel:et.func,onFileDialogOpen:et.func,useFsAccessApi:et.bool,autoFocus:et.bool,onDragEnter:et.func,onDragLeave:et.func,onDragOver:et.func,onDrop:et.func,onDropAccepted:et.func,onDropRejected:et.func,onError:et.func,validator:et.func};var kd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function S1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=dt(dt({},w1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,R=t.onError,I=t.validator,A=E.useMemo(function(){return OL(n)},[n]),O=E.useMemo(function(){return _L(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:ry},[h]),V=E.useMemo(function(){return typeof g=="function"?g:ry},[g]),P=E.useRef(null),_=E.useRef(null),D=E.useReducer(YL,kd),F=bu(D,2),j=F[0],z=F[1],M=j.isFocused,$=j.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&IL()),te=function(){!J.current&&$&&setTimeout(function(){if(_.current){var ce=_.current.files;ce.length||(z({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[_,$,V,J]);var ee=E.useRef([]),Z=function(ce){P.current&&P.current.contains(ce.target)||(ce.preventDefault(),ee.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",ty,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",ty),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var U=E.useCallback(function(X){R?R(X):console.error(X)},[R]),Y=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[].concat(VL(ee.current),[X.target]),Qa(X)&&Promise.resolve(o(X)).then(function(ce){if(!(js(X)&&!C)){var Re=ce.length,ze=Re>0&&kL({files:ce,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),xt=Re>0&&!ze;z({isDragAccept:ze,isDragReject:xt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ce){return U(ce)})},[o,c,U,C,A,a,i,s,l,I]),L=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=Qa(X);if(ce&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ce&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=ee.current.filter(function(ze){return P.current&&P.current.contains(ze)}),Re=ce.indexOf(X.target);Re!==-1&&ce.splice(Re,1),ee.current=ce,!(ce.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qa(X)&&u&&u(X))},[P,u,C]),G=E.useCallback(function(X,ce){var Re=[],ze=[];X.forEach(function(xt){var ut=g1(xt,A),Ot=bu(ut,2),fn=Ot[0],Tn=Ot[1],Xn=v1(xt,a,i),Qn=bu(Xn,2),Jn=Qn[0],H=Qn[1],q=I?I(xt):null;if(fn&&Jn&&!q)Re.push(xt);else{var Ve=[Tn,H];q&&(Ve=Ve.concat(q)),ze.push({file:xt,errors:Ve.filter(function(Xe){return Xe})})}}),(!s&&Re.length>1||s&&l>=1&&Re.length>l)&&(Re.forEach(function(xt){ze.push({file:xt,errors:[CL]})}),Re.splice(0)),z({acceptedFiles:Re,fileRejections:ze,isDragReject:ze.length>0,type:"setFiles"}),p&&p(Re,ze,ce),ze.length>0&&m&&m(ze,ce),Re.length>0&&f&&f(Re,ce)},[z,s,A,a,i,l,p,f,m,I]),ie=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[],Qa(X)&&Promise.resolve(o(X)).then(function(ce){js(X)&&!C||G(ce,X)}).catch(function(ce){return U(ce)}),z({type:"reset"})},[o,G,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),N();var X={multiple:s,types:O};window.showOpenFilePicker(X).then(function(ce){return o(ce)}).then(function(ce){G(ce,null),z({type:"closeDialog"})}).catch(function(ce){ML(ce)?(V(ce),z({type:"closeDialog"})):DL(ce)?(J.current=!1,_.current?(_.current.value=null,_.current.click()):U(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."))):U(ce)});return}_.current&&(z({type:"openDialog"}),N(),_.current.value=null,_.current.click())},[z,N,V,v,G,U,O,s]),ye=E.useCallback(function(X){!P.current||!P.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[P,B]),Se=E.useCallback(function(){z({type:"focus"})},[]),Ie=E.useCallback(function(){z({type:"blur"})},[]),Le=E.useCallback(function(){T||(AL()?setTimeout(B,0):B())},[T,B]),ae=function(ce){return r?null:ce},ve=function(ce){return w?null:ae(ce)},K=function(ce){return S?null:ae(ce)},le=function(ce){C&&ce.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,Re=ce===void 0?"ref":ce,ze=X.role,xt=X.onKeyDown,ut=X.onFocus,Ot=X.onBlur,fn=X.onClick,Tn=X.onDragEnter,Xn=X.onDragOver,Qn=X.onDragLeave,Jn=X.onDrop,H=Ns(X,FL);return dt(dt(Cd({onKeyDown:ve(En(xt,ye)),onFocus:ve(En(ut,Se)),onBlur:ve(En(Ot,Ie)),onClick:ae(En(fn,Le)),onDragEnter:K(En(Tn,Y)),onDragOver:K(En(Xn,L)),onDragLeave:K(En(Qn,W)),onDrop:K(En(Jn,ie)),role:typeof ze=="string"&&ze!==""?ze:"presentation"},Re,P),!r&&!w?{tabIndex:0}:{}),H)}},[P,ye,Se,Ie,Le,Y,L,W,ie,w,S,r]),oe=E.useCallback(function(X){X.stopPropagation()},[]),be=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,Re=ce===void 0?"ref":ce,ze=X.onChange,xt=X.onClick,ut=Ns(X,LL),Ot=Cd({accept:A,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:ae(En(ze,ie)),onClick:ae(En(xt,oe)),tabIndex:-1},Re,_);return dt(dt({},Ot),ut)}},[_,n,s,ie,r]);return dt(dt({},j),{},{isFocused:M&&!r,getRootProps:Q,getInputProps:be,rootRef:P,inputRef:_,open:ae(B)})}function YL(e,t){switch(t.type){case"focus":return dt(dt({},e),{},{isFocused:!0});case"blur":return dt(dt({},e),{},{isFocused:!1});case"openDialog":return dt(dt({},kd),{},{isFileDialogActive:!0});case"closeDialog":return dt(dt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return dt(dt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return dt(dt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return dt({},kd);default:return e}}function ry(){}const GL={isImage:e=>e.type.includes("image")},KL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(GL.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:jv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:jv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Oo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Vo,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(Wb,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Oo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Vo,{className:"text-danger"})})]})},ZL=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(KL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),XL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(ZL,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),QL=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(jA,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),JL=({idle:e=QL,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=S1({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(XL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},e2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})};class zr extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zr&&(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 zr(this);return t?t(n):n}}const t2=e=>x.jsx(E.Fragment,{children:e.children}),n2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},r2={caseSensitive:!1,sort:!1},oy=[],o2=E.forwardRef(function(t,n){return x.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),i2=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),a2={List:o2,Item:i2},s2=e=>{const t=_t(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.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]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(Ud,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},l2=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const y=E.useMemo(()=>new zr(r.map(Q=>[Q.value,Q])),[r]),b=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??oy,S=_t(),[C,R]=E.useState(0),[I,A]=E.useState(!1),[O,N]=E.useState(""),[V,P]=E.useState(()=>{const Q=new zr;return w.forEach(oe=>{const be=y.get(oe);return be?Q.set(oe,be):void 0}),Q}),_=E.useMemo(()=>Array.from(V.keys()),[V]),[D,F]=E.useState(()=>{const Q=new Set(w);return r.reduce((oe,be)=>Q.has(be.value)?[...oe,be.label??be.value]:oe,[])??w}),[j,z]=E.useState(null),M=E.useRef(oy),$=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,J=new Vr($,["value","label"],r2).search(O);E.useEffect(()=>{I||R(0)},[I]),E.useEffect(()=>{h.value&&P(new zr(h.value.map(Q=>[Q,y.get(Q)])))},[h.value,y]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:Y,refs:L,context:W}=oo({open:I,transform:!0,strategy:"absolute",onOpenChange:A,whileElementsMounted:wa,middleware:[Sa(4),pw({padding:10,elementContext:"reference",apply(Q){if(b.current===null)return;const oe=b.current.getBoundingClientRect().width,be=360;ha.flushSync(()=>setTimeout(()=>R(be),200)),Object.assign(Q.elements.floating.style,{width:`${oe}px`,maxWidth:`${oe}px`,maxHeight:ee?"auto":`${be}px`,height:ee?"auto":`${be}px`})}})]}),G=Aw(W,n2),{getReferenceProps:ie,getFloatingProps:B,getItemProps:ye}=io([ao(W,{role:"listbox"}),ro(W),op(W,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(oe=>Q??oe)})]);E.useEffect(()=>{const Q=L.reference.current;if(Q)return ma(Q)},[]);const Se=(Q,oe)=>{const be=V.clone(Re=>Re.has(Q.value)?Re.remove(Q.value):Re.set(Q.value,Q));P(be);const X=L.reference.current;if(!X)return;const ce=be.map(Re=>Re.value);X==null||X.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),F(Re=>Re.concat(Q.label??"")),N(""),z(oe)},Ie=Q=>{const oe=Q.target.value;return N(oe),!I&&oe===""?A(!0):(Q.target.name=h.name||"",oe?A(!0):void 0)},Le=()=>{var Q;A(!0),N(""),(Q=L.reference.current)==null||Q.focus()},ae=()=>{A(!0),N("")},ve=()=>{var Q;(Q=L.reference.current)==null||Q.setAttribute("data-value","[]"),N(""),A(!1),P(new zr),g==null||g([])},K=h.id||h.name,le=V.map((Q,oe)=>x.jsx(Ud,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:be=>{be.stopPropagation(),Se(Q,oe)},children:x.jsx(ul,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return x.jsxs(Pa,{...h,left:e,error:t,ref:b,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Le,children:[x.jsx(Rf,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:ve,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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:[x.jsx("button",{...ie({...h,onFocus:ae,id:`${K}-shadow`,name:`${K}-shadow`,ref:L.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":_.join(","),value:I?O:D||V,className:je("input 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:x.jsx(s2,{label:c,children:le})}),x.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:v,required:f,defaultValue:h.value||_||void 0}),x.jsx(no,{preserveTabOrder:!0,children:I?x.jsx(hi,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...B({ref:L.setFloating,style:{...G.styles,top:U??0,position:Y,left:(Z??0)+(V?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:O,onChange:Ie,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:Q=>{var oe,be;if(Q.key==="ArrowDown"){let X=j+1;return X>te.length-1&&(X=0),(oe=T.current)==null||oe.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=j-1;return X<0&&(X=te.length-1),(be=T.current)==null||be.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),A(!1);if(Q.key==="Enter"){if(j!==null&&te[j])return Q.preventDefault(),Se(te[j],j);if(te.length===1)return Q.preventDefault(),Se(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),ee?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,ee?null:x.jsx(wp,{ref:T,hidden:ee,data:te,components:a2,style:{height:ee?"0":V.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,oe)=>{const be=oe.Render??t2,X=V.has(oe.value)||V.has(oe.label??""),ce=j===Q,Re=oe.label??oe.value;return x.jsxs("button",{"data-value":oe.value,...ye({ref:ze=>void(M.current[Q]=ze),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":oe.disabled,onClick:()=>Se(oe,Q)}),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 ${X||ce?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Ep,{onChange:Lf,checked:X,"aria-checked":X,onClick:ze=>{ze.stopPropagation(),Se(oe,Q)}}),x.jsx(be,{...h,label:oe.label,value:oe.value,children:Re})]})}}),V.size===0?null:x.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:le})]})}):null})]})}),c2=({children:e,className:t="",size:n,...r})=>x.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:[x.jsx("input",{...r,type:"radio",className:je("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]}),Kr=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=_t(),y=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(h,()=>y.current),E.useEffect(()=>{if(y.current===null)return;const w=new AbortController,S=y.current,C=ma(y.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=y.current)==null?void 0:w.focus()};return x.jsx(Pa,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:x.jsxs("label",{htmlFor:b,children:[p,x.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Rf,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:x.jsxs("select",{...g,id:b,name:b,value:g.value,required:e,ref:el(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:je("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function T1(e,[t,n]){return Math.min(n,Math.max(t,e))}function ko(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function iy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function E1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=iy(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():iy(e[o],null)}}}}function Zr(...e){return k.useCallback(E1(...e),e)}function C1(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return x.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,u2(o,...t)]}function u2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function k1(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function d2({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=f2({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=k1(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function f2({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=k1(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var p2=k.createContext(void 0);function h2(e){const t=k.useContext(p2);return e||t||"ltr"}function m2(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var g2=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function v2(e){const[t,n]=k.useState(void 0);return g2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Rd(e){const t=y2(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(b2);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return x.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function y2(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=S2(o),s=w2(i,o.props);return o.type!==k.Fragment&&(s.ref=r?E1(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x2=Symbol("radix.slottable");function b2(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x2}function w2(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function S2(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Pl=T2.reduce((e,t)=>{const n=Rd(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function E2(e){const t=e+"CollectionProvider",[n,r]=C1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=E.useRef(null),b=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:b,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Rd(s),c=E.forwardRef((g,h)=>{const{scope:v,children:y}=g,b=i(s,v),T=Zr(h,b.collectionRef);return x.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Rd(u),f=E.forwardRef((g,h)=>{const{scope:v,children:y,...b}=g,T=E.useRef(null),w=Zr(h,T),S=i(u,v);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...b}),()=>void S.itemMap.delete(T))),x.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>b.indexOf(S.ref.current)-b.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var R1=["PageUp","PageDown"],P1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],A1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xi="Slider",[Pd,C2,k2]=E2(xi),[I1,G$]=C1(xi,[k2]),[R2,Al]=I1(xi),_1=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),b=a==="horizontal"?P2:A2,[T=[],w]=d2({prop:u,defaultProp:c,onChange:O=>{var V;(V=[...h.current][v.current])==null||V.focus(),d(O)}}),S=k.useRef(T);function C(O){const N=D2(T,O);A(O,N)}function R(O){A(O,v.current)}function I(){const O=S.current[v.current];T[v.current]!==O&&p(T)}function A(O,N,{commit:V}={commit:!1}){const P=L2(i),_=V2(Math.round((O-r)/i)*i+r,P),D=T1(_,[r,o]);w((F=[])=>{const j=O2(F,D,N);if(F2(j,l*i)){v.current=j.indexOf(D);const z=String(j)!==String(F);return z&&V&&p(j),z?j:F}else return F})}return x.jsx(R2,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:m,children:x.jsx(Pd.Provider,{scope:e.__scopeSlider,children:x.jsx(Pd.Slot,{scope:e.__scopeSlider,children:x.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ko(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:R,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,T.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:N})=>{if(!s){const _=R1.includes(O.key)||O.shiftKey&&P1.includes(O.key)?10:1,D=v.current,F=T[D],j=i*_*N;A(F+j,D,{commit:!0})}}})})})})});_1.displayName=xi;var[O1,M1]=I1(xi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),P2=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=Zr(t,b=>p(b)),m=k.useRef(void 0),g=h2(o),h=g==="ltr",v=h&&!i||!h&&i;function y(b){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=Rp(w,v?[n,r]:[r,n]);return m.current=T,C(b-T.left)}return x.jsx(O1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:x.jsx(D1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const T=y(b.clientX);a==null||a(T)},onSlideMove:b=>{const T=y(b.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=A1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),A2=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=Zr(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],b=Rp(v,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return x.jsx(O1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(D1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=A1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),D1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Al(xi,n);return x.jsx(Pl.span,{...c,ref:t,onKeyDown:ko(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):R1.concat(P1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ko(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ko(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ko(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),j1="SliderTrack",N1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(j1,n);return x.jsx(Pl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});N1.displayName=j1;var Ad="SliderRange",F1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(Ad,n),i=M1(Ad,n),a=k.useRef(null),s=Zr(t,a),l=o.values.length,c=o.values.map(p=>V1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(Pl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});F1.displayName=Ad;var Id="SliderThumb",L1=k.forwardRef((e,t)=>{const n=C2(e.__scopeSlider),[r,o]=k.useState(null),i=Zr(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(I2,{...e,ref:i,index:a})}),I2=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Al(Id,n),s=M1(Id,n),[l,c]=k.useState(null),u=Zr(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=v2(l),f=a.values[r],m=f===void 0?0:V1(f,a.min,a.max),g=M2(r,a.values.length),h=p==null?void 0:p[s.size],v=h?j2(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[x.jsx(Pd.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Pl.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:ko(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(_2,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});L1.displayName=Id;var _2=e=>{const{value:t,...n}=e,r=k.useRef(null),o=m2(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),x.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function O2(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function V1(e,t,n){const i=100/(n-t)*(e-t);return T1(i,[0,100])}function M2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function D2(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function j2(e,t,n){const r=e/2,i=Rp([0,50],[0,r]);return(r-i(t)*n)*n}function N2(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function F2(e,t){if(t>0){const n=N2(e);return Math.min(...n)>=t}return!0}function Rp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function L2(e){return(String(e).split(".")[1]||"").length}function V2(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var $2=_1,z2=N1,B2=F1,H2=L1;const W2=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));nt.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(nt.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(ip,{title:"",ref:r,as:H2,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},q2=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(ci()),s=r||o||[];return x.jsxs($2,{...i,defaultValue:r,value:o,className:je("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(z2,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(B2,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>x.jsx(W2,{tooltip:t??!1},`${a.current}-${c}`))]})},U2=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Mo(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:je("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.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"})}),x.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Y2=e=>{const[t,n]=HP();return E.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:GP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},G2=c1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
196
- `);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)}),K2=e=>{const[t,n]=E.useState(0);return E.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},Z2={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},X2=e=>{const t=E.useRef(null),n=K2(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.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:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Aa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(wp,{height:n,useWindowScroll:!0,data:e.source,components:Z2,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Ep,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Oo,{children:x.jsx(Pf,{})})}),x.jsx("div",{})]})};var Q2=Object.defineProperty,ay=Object.getOwnPropertySymbols,J2=Object.prototype.hasOwnProperty,eV=Object.prototype.propertyIsEnumerable,sy=(e,t,n)=>t in e?Q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tV=(e,t)=>{for(var n in t||(t={}))J2.call(t,n)&&sy(e,n,t[n]);if(ay)for(var n of ay(t))eV.call(t,n)&&sy(e,n,t[n]);return e},Pp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},nV=(e,t,n,r)=>Il(Pp,e,t,n,r),Xo=e=>typeof e=="object",ur=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Xo(e)&&!Xo(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=>ur(e[r],t[r]))},rV=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,oV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Fs=e=>/[0-9.]+/.test(e),ly=e=>["string","number"].includes(typeof e),cy=e=>e==null||(e==null?void 0:e.length)===0||e==="",uy={eq:ur,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:cy,notEmpty:e=>!cy(e),in:(e,t)=>Pp(t,n=>ur(e,n)),notIn:(e,t)=>$1(t,n=>!ur(e,n))},iV=e=>{if(e in uy)return uy[e];throw new Error("Linq - Symbol not found")},Ao=(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},Il=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=iV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},aV=(e,t,n,r)=>Il(Ao,e,t,n,r),$1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},sV=(e,t,n,r)=>Il($1,e,t,n,r),z1=e=>{if(e===null)return null;const t=tV({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?z1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},dy=(e,t)=>{if(Xo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1},lV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},cV=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),uV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},B1=(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())},dV=(e,t)=>B1(e,n=>n[t]),fy=(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},fV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},pV=(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 Fs(e)&&Fs(t)?r.map(a=>Number.parseInt(a)):r},wu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Fs(e)&&Fs(t)){const o=[],[i,a]=fV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return pV(e,t,r)},hV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?wu(r,o,1):wu(r,i,Number.parseInt(o,10))}return ly(e)&&ly(t)?wu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Su=(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},py=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},mV=(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)},gV=(e,t,n,r)=>Il(mV,e,t,n,r),hy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(oV(t))},H1=(e=>(e.Asc="asc",e.Desc="desc",e))(H1||{}),vV=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),yV=(e,t)=>e.sort(vV(t)),xV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},bV=class _d{constructor(t=[]){this.array=t}static Range(...t){return hV(...t)}static New(t){return new _d(t)}Where(t,n,r){return this.array=aV(this.array,t,n,r),this}Some(t,n,r){return nV(this.array,t,n,r)}All(t,n,r){return sV(this.array,t,n,r)}Reverse(){return this.array=py(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=gV(this.array,t,n,r),this}Distinct(){return this.array=cV(this.array),this}First(t){return t===void 0?this.array[0]:uV(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?Su((n,r)=>n+r,0,this.array):Su((n,r)=>n+rV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return dV(this.array,t)}GroupWith(t){return B1(this.array,t)}Except(t){return Ao(this.array,n=>!dy(t,n))}Intersect(t){return Ao(this.array,n=>dy(t,n))}OrderBy(t,n){let r;return r=t?hy(this.array,t):this.array.toSorted(),this.array=n==="desc"?py(r):r,this}Includes(t){return Pp(this.array,n=>ur(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 Su(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(fy(this.array,n=>[t,n]))}Zip(t,n){return fy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new _d(z1(this.array))}ToObject(t){return lV(this.array,t)}Sort(t){return Array.isArray(t)?yV(this.array,t):hy(this.array,t)}Unique(t){return xV(this.array,t)}},W1=bV,Tu={},my;function wV(){return my||(my=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,S)=>{const C=S.parse(y);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=b=>{h().removeItem(b);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const T=h().getItem(b);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,T)=>{h().setItem(b,JSON.stringify(T)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(Tu)),Tu}var qi=wV();const Ap=e=>e.headerLabel??e.thead??e.id,Ip=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Io=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Io||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,SV=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},TV={},EV=(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})},CV=(e,t,n=TV)=>{const r=qr()?null:qi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Df({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:EV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||qi.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=Mo(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Od=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Io.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:ci(),operation:l,label:Ap(e),name:o,type:i,value:"",...r}},Op=()=>{const e=_t(),t=E.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:E.useMemo(()=>({[Io.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Io.Boolean]:[t.is,t.isNot],[Io.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},RV=e=>{const t=_t(),n=Op(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Od(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return Od(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=_p(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(TA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Kr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Aa,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:x.jsx(Vo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(Af,{size:14})," ",t.tableFilterNewFilter]})})]})})})},PV=({filter:e,onDelete:t,set:n})=>{const r=_t(),o=Op(),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 x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Kr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Aa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Vo,{className:"text-danger",size:14})})]})},AV=({item:e,onPointerDown:t})=>{const n=Lo(0);return x.jsxs($b,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(bA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},IV=e=>{var l;const t=_t(),n=Ip(e.cols),r=UP(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new W1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(GS(m).map((v,y)=>{const b=m[v];return{...g,groupId:ci(),groupKey:d,index:y,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(MA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Kr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Oo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Vo,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(nE,{children:x.jsx(Vb,{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(c=>x.jsx(AV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},_V=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),OV=(e,t)=>e.toSorted(_V(t)),q1=(e,t,n)=>({label:t,id:ci(),type:n,value:e.id}),MV=e=>{const t=_t(),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,q1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(E.Fragment,{children:x.jsx(mi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Bb,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Kr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:x.jsx(Vo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Af,{size:14})," ",t.tableSortAddButton]})})]})})})},DV=e=>{const t=_t(),[n,r]=E.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");E.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=q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ap(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(sA,{size:14}):null,n==="desc"?x.jsx(iA,{size:14}):null,n==="undefined"?x.jsx(Bb,{size:14}):null]})},jV=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(RV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(MV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(IV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.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}`))})]})});function NV(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 FV=e=>{const t=E.useId(),n=_t(),r=E.useMemo(()=>NV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(cn,{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?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},LV={top:0,left:0,right:0,bottom:-1},VV=e=>{var g;const t=Tp(),n=_t(),r=e.filters.filter(h=>h.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=Op(),l=o?kA:PA,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===H1.Asc?"ascending":"descending":"none",m=Ap(e.header);return x.jsxs($b,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[x.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?x.jsx(mi,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),x.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"font-medium",children:m})]}),children:x.jsxs("ul",{className:"font-medium",children:[r.length===0?null:x.jsx(E.Fragment,{children:r.map(h=>x.jsx("li",{className:"my-1",children:x.jsx(PV,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(Od(e.header,s.options,s.operations))),children:[x.jsx(Af,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?x.jsx(DV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(pt.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:LV,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=v.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},$V=e=>{const[t,n]=kV(e.setCols);return x.jsx(Vb,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:x.jsx(vr,{children:e.headers.map((r,o)=>x.jsx(VV,{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}`))})})},U1=E.createContext({}),zV=()=>E.useContext(U1),BV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(vr,{children:n.children})})),HV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse divide-y divide-table-border border-0 text-left ${t??""}`})),WV=E.forwardRef(({context:e,...t},n)=>{const r=zV(),o={...t==null?void 0:t.style,top:nt.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),qV=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`group table-row ${(n==null?void 0:n.className)??""}`})),UV=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),YV={TableHead:WV,Table:HV,TableBody:BV,TableRow:qV,TableFoot:UV},GV=[0,0,0,0,0,0,0,0,0,0],Y1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),KV=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Y1:x.jsx(E0,{})}),ZV=()=>x.jsx(E.Fragment,{}),XV=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=Ff(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Y1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:nt.nil(l)?"":l}))})})},QV=()=>x.jsx(E.Fragment,{}),JV=[],gy=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=Mo(a),g=Mo(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return GV;if(c)return u.rows;const y=new W1(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:y.Where(b.name,b.operation.symbol,b.value)),r.length===0?y.Select():OV(y.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,b=new IntersectionObserver(T=>{var C;return T[T.length-1].isIntersecting&&g.current?((C=m.current)==null||C.call(m),void f(!0)):f(!1)});return b.observe(y),()=>b.disconnect()},[g,m]);const v=h.length===0;return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(gF,{useWindowScroll:!0,followOutput:"smooth",components:YV,totalCount:h.length,data:v?JV:h,itemContent:v?ZV:XV,fixedFooterContent:p?QV:null,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx($V,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?x.jsx(KV,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(FV,{...l}):null]})},e$=(e,t)=>typeof t=="function"?t(e):t,Ja=(e,t,n)=>e===t||n==null?void 0:n(t),t$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Tp(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Ip(e.cols),[e.cols]),[i,a]=Df({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:e$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),Ja((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),Ja((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),Ja((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),Ja((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(U1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(jV,{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?x.jsx(gy,{...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}):x.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>x.jsx("div",{className:"min-w-full",children:x.jsx(gy,{...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}`))})]})})},n$=["INPUT","SELECT"],G1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{n$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Eu,vy;function Mp(){if(vy)return Eu;vy=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Eu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Eu}var Cu,yy;function K1(){if(yy)return Cu;yy=1;var e=Mp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),b=y.obj[y.prop];if(n(b)){for(var T=[],w=0;w<b.length;++w)typeof b[w]<"u"&&T.push(b[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var b=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(b[T]=v[T]);return b},a=function h(v,y,b){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,b)),n(v)&&n(y)?(y.forEach(function(w,S){if(t.call(v,S)){var C=v[S];C&&typeof C=="object"&&w&&typeof w=="object"?v[S]=h(C,w,b):v.push(w)}else v[S]=w}),v):Object.keys(y).reduce(function(w,S){var C=y[S];return t.call(w,S)?w[S]=h(w[S],C,b):w[S]=C,w},T)},s=function(v,y){return Object.keys(y).reduce(function(b,T){return b[T]=y[T],b},v)},l=function(h,v,y){var b=h.replace(/\+/g," ");if(y==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,y,b,T,w){if(v.length===0)return v;var S=v;if(typeof v=="symbol"?S=Symbol.prototype.toString.call(v):typeof v!="string"&&(S=String(v)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",R=0;R<S.length;R+=c){for(var I=S.length>=c?S.slice(R,R+c):S,A=[],O=0;O<I.length;++O){var N=I.charCodeAt(O);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(O);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}O+=1,N=65536+((N&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],b=[],T=0;T<y.length;++T)for(var w=y[T],S=w.obj[w.prop],C=Object.keys(S),R=0;R<C.length;++R){var I=C[R],A=S[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(y.push({obj:S,prop:I}),b.push(A))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var b=[],T=0;T<v.length;T+=1)b.push(y(v[T]));return b}return y(v)};return Cu={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},Cu}var ku,xy;function r$(){if(xy)return ku;xy=1;var e=HS(),t=K1(),n=Mp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,b,T,w,S,C,R,I,A,O,N,V,P,_,D,F){for(var j=h,z=F,M=0,$=!1;(z=z.get(p))!==void 0&&!$;){var J=z.get(h);if(M+=1,typeof J<"u"){if(J===M)throw new RangeError("Cyclic object value");$=!0}typeof z.get(p)>"u"&&(M=0)}if(typeof I=="function"?j=I(v,j):j instanceof Date?j=N(j):y==="comma"&&i(j)&&(j=t.maybeMap(j,function(Ie){return Ie instanceof Date?N(Ie):Ie})),j===null){if(w)return R&&!_?R(v,u.encoder,D,"key",V):v;j=""}if(d(j)||t.isBuffer(j)){if(R){var te=_?v:R(v,u.encoder,D,"key",V);return[P(te)+"="+P(R(j,u.encoder,D,"value",V))]}return[P(v)+"="+P(String(j))]}var ee=[];if(typeof j>"u")return ee;var Z;if(y==="comma"&&i(j))_&&R&&(j=t.maybeMap(j,R)),Z=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(j);Z=A?U.sort(A):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),L=b&&i(j)&&j.length===1?Y+"[]":Y;if(T&&i(j)&&j.length===0)return L+"[]";for(var W=0;W<Z.length;++W){var G=Z[W],ie=typeof G=="object"&&G&&typeof G.value<"u"?G.value:j[G];if(!(S&&ie===null)){var B=O&&C?String(G).replace(/\./g,"%2E"):String(G),ye=i(j)?typeof y=="function"?y(L,B):L:L+(O?"."+B:"["+B+"]");F.set(h,M);var Se=e();Se.set(p,F),s(ee,g(ie,ye,y,b,T,w,S,C,y==="comma"&&_&&i(j)?null:R,I,A,O,N,V,P,_,D,Se))}}return ee},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var b=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:b,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 ku=function(g,h){var v=g,y=m(h),b,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,b=T);var w=[];if(typeof v!="object"||v===null)return"";var S=o[y.arrayFormat],C=S==="comma"&&y.commaRoundTrip;b||(b=Object.keys(v)),y.sort&&b.sort(y.sort);for(var R=e(),I=0;I<b.length;++I){var A=b[I],O=v[A];y.skipNulls&&O===null||s(w,f(O,A,S,C,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,R))}var N=w.join(y.delimiter),V=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},ku}var Ru,by;function o$(){if(by)return Ru;by=1;var e=K1(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,y=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,T,w=m.charset;if(m.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),b=T,T=y.length);for(T=0;T<y.length;++T)if(T!==b){var S=y[T],C=S.indexOf("]="),R=C===-1?S.indexOf("="):C+1,I,A;R===-1?(I=m.decoder(S,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,R),r.decoder,w,"key"),A=e.maybeMap(i(S.slice(R+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),S.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var O=t.call(g,I);O&&m.duplicates==="combine"?g[I]=e.combine(g[I],A):(!O||m.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,m,h),b=p.length-1;b>=0;--b){var T,w=p[b];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,R=parseInt(C,10);!m.parseArrays&&C===""?T={0:y}:!isNaN(R)&&w!==C&&String(R)===C&&R>=0&&m.parseArrays&&R<=m.arrayLimit?(T=[],T[R]=y):C!=="__proto__"&&(T[C]=y)}y=T}return y},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=b.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+v.slice(T.index)+"]")}return c(S,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return Ru=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var b=v[y],T=u(b,g[b],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},Ru}var Pu,wy;function i$(){if(wy)return Pu;wy=1;var e=r$(),t=o$(),n=Mp();return Pu={formats:n,parse:t,stringify:e},Pu}var a$=i$(),He;(function(e){e.assertEqual=o=>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"&&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})(He||(He={}));var Sy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Sy||(Sy={}));const fe=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ar=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=He.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 un 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 un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}un.create=e=>new un(e);const da=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let s$=da;function Md(){return s$}const Dd=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 ue(e,t){const n=Md(),r=Dd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===da?void 0:da].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 Ce;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 Ht.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 Ce;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 Ce=Object.freeze({status:"aborted"}),Ii=e=>({status:"dirty",value:e}),Gt=e=>({status:"valid",value:e}),Ty=e=>e.status==="aborted",Ey=e=>e.status==="dirty",Qo=e=>e.status==="valid",Ls=e=>typeof Promise<"u"&&e instanceof Promise;function Vs(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Z1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ge||(ge={}));var _i,Oi;class Ln{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cy=(e,t)=>{if(Qo(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 un(e.common.issues);return this._error=n,this._error}}};function Ae(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)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ne{get description(){return this._def.description}_getType(t){return ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ls(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){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return Cy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Qo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Qo(i)?{value:i.value}:{issues:o.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==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ls(o)?o:Promise.resolve(o));return Cy(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:re.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 Kn({schema:this,typeName:Te.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 Hn.create(this,this._def)}nullable(){return Jr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dn.create(this)}promise(){return pa.create(this,this._def)}or(t){return Bs.create([this,t],this._def)}and(t){return Hs.create(this,t,this._def)}transform(t){return new Kn({...Ae(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gs({...Ae(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new eS({typeName:Te.ZodBranded,type:this,...Ae(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ks({...Ae(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _l.create(this,t)}readonly(){return Zs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const l$=/^c[^\s-]{8,}$/i,c$=/^[0-9a-z]+$/,u$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,d$=/^[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,f$=/^[a-z0-9_-]{21}$/i,p$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,h$=/^[-+]?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)?)??$/,m$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,g$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Au;const v$=/^(?:(?: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])$/,y$=/^(?:(?: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])$/,x$=/^(([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]))$/,b$=/^(([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])$/,w$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,S$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X1="((\\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])))",T$=new RegExp(`^${X1}$`);function Q1(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function E$(e){return new RegExp(`^${Q1(e)}$`)}function C$(e){let t=`${X1}T${Q1(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 k$(e,t){return!!((t==="v4"||!t)&&v$.test(e)||(t==="v6"||!t)&&x$.test(e))}function R$(e,t){if(!p$.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||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function P$(e,t){return!!((t==="v4"||!t)&&y$.test(e)||(t==="v6"||!t)&&b$.test(e))}class Bn extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),Ce}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.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?ue(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")m$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Au||(Au=new RegExp(g$,"u")),Au.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")d$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")f$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")l$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")c$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")u$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:re.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),ue(o,{validation:"regex",code:re.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),ue(o,{code:re.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),ue(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?C$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?T$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?E$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?h$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?k$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?R$(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?P$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?w$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?S$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ge.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ge.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ge.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ge.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ge.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ge.errToObj(n)})}nonempty(t){return this.min(1,ge.errToObj(t))}trim(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bn({...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}}Bn.create=e=>{var t;return new Bn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};function A$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Xr extends Ne{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)!==fe.number){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),Ce}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?A$(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.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"&&He.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)}}Xr.create=e=>new Xr({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class Jo extends Ne{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)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;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),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),Ce}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.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}}Jo.create=e=>{var t;return new Jo({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};class jd extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),Ce}return Gt(t.data)}}jd.create=e=>new jd({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class fa extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),Ce}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_date}),Ce}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ge.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}}fa.create=e=>new fa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ae(e)});class Nd extends Ne{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),Ce}return Gt(t.data)}}Nd.create=e=>new Nd({typeName:Te.ZodSymbol,...Ae(e)});class $s extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),Ce}return Gt(t.data)}}$s.create=e=>new $s({typeName:Te.ZodUndefined,...Ae(e)});class zs extends Ne{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),Ce}return Gt(t.data)}}zs.create=e=>new zs({typeName:Te.ZodNull,...Ae(e)});class Fd extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Gt(t.data)}}Fd.create=e=>new Fd({typeName:Te.ZodAny,...Ae(e)});class _o extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gt(t.data)}}_o.create=e=>new _o({typeName:Te.ZodUnknown,...Ae(e)});class gr extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),Ce}}gr.create=e=>new gr({typeName:Te.ZodNever,...Ae(e)});class Ld extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),Ce}return Gt(t.data)}}Ld.create=e=>new Ld({typeName:Te.ZodVoid,...Ae(e)});class Dn extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),Ce;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?re.too_big:re.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&&(ue(n,{code:re.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&&(ue(n,{code:re.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 Ln(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ln(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dn({...this._def,minLength:{value:t,message:ge.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ge.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ge.toString(n)}})}nonempty(t){return this.min(1,t)}}Dn.create=(e,t)=>new Dn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ae(t)});function yo(e){if(e instanceof vt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(yo(r))}return new vt({...e._def,shape:()=>t})}else return e instanceof Dn?new Dn({...e._def,type:yo(e.element)}):e instanceof Hn?Hn.create(yo(e.unwrap())):e instanceof Jr?Jr.create(yo(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>yo(t))):e}class vt extends Ne{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=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),Ce}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gr&&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 Ln(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){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&&(ue(o,{code:re.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 Ln(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new vt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ge.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(t){return new vt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new vt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new vt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}deepPartial(){return yo(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new vt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hn;)i=i._def.innerType;n[r]=i}}),new vt({...this._def,shape:()=>n})}keyof(){return J1(He.objectKeys(this.shape))}}vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});class Bs extends Ne{_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 un(s.ctx.common.issues));return ue(n,{code:re.invalid_union,unionErrors:a}),Ce}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 un(l));return ue(n,{code:re.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}}Bs.create=(e,t)=>new Bs({options:e,typeName:Te.ZodUnion,...Ae(t)});const zn=e=>e instanceof qs?zn(e.schema):e instanceof Kn?zn(e.innerType()):e instanceof Us?[e.value]:e instanceof Qr?e.options:e instanceof Ys?He.objectValues(e.enum):e instanceof Gs?zn(e._def.innerType):e instanceof $s?[void 0]:e instanceof zs?[null]:e instanceof Hn?[void 0,...zn(e.unwrap())]:e instanceof Jr?[null,...zn(e.unwrap())]:e instanceof eS||e instanceof Zs?zn(e.unwrap()):e instanceof Ks?zn(e._def.innerType):[];class Dp extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),Ce;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=zn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ae(r)})}}function Vd(e,t){const n=ar(e),r=ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Vd(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.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=Vd(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hs extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Ty(i)||Ty(a))return Ce;const s=Vd(i.value,a.value);return s.valid?((Ey(i)||Ey(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:re.invalid_intersection_types}),Ce)};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}))}}Hs.create=(e,t,n)=>new Hs({left:e,right:t,typeName:Te.ZodIntersection,...Ae(n)});class Gn extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ue(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:re.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 Ln(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Gn({...this._def,rest:t})}}Gn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:e,typeName:Te.ZodTuple,rest:null,...Ae(t)})};class Ws extends Ne{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!==fe.object)return ue(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),Ce;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Ln(r,s,r.path,s)),value:a._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new Ws({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ae(r)}):new Ws({keyType:Bn.create(),valueType:t,typeName:Te.ZodRecord,...Ae(n)})}}class $d extends Ne{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!==fe.map)return ue(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),Ce;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ln(r,s,r.path,[c,"key"])),value:i._parse(new Ln(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 Ce;(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 Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}$d.create=(e,t,n)=>new $d({valueType:t,keyType:e,typeName:Te.ZodMap,...Ae(n)});class ei extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),Ce;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:re.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&&(ue(r,{code:re.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 Ce;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 Ln(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new ei({...this._def,minSize:{value:t,message:ge.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ae(t)});class Ui extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),Ce;function r(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),da].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),da].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof pa){const s=this;return Gt(async function(...l){const c=new un([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Gt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new un([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ui({...this._def,args:Gn.create(t).rest(_o.create())})}returns(t){return new Ui({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ui({args:t||Gn.create([]).rest(_o.create()),returns:n||_o.create(),typeName:Te.ZodFunction,...Ae(r)})}}class qs extends Ne{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})}}qs.create=(e,t)=>new qs({getter:e,typeName:Te.ZodLazy,...Ae(t)});class Us extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:t.data}}get value(){return this._def.value}}Us.create=(e,t)=>new Us({value:e,typeName:Te.ZodLiteral,...Ae(t)});function J1(e,t){return new Qr({values:e,typeName:Te.ZodEnum,...Ae(t)})}class Qr extends Ne{constructor(){super(...arguments),_i.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:He.joinValues(r),received:n.parsedType,code:re.invalid_type}),Ce}if(Vs(this,_i)||Z1(this,_i,new Set(this._def.values)),!Vs(this,_i).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:re.invalid_enum_value,options:r}),Ce}return Gt(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 Qr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Qr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_i=new WeakMap;Qr.create=J1;class Ys extends Ne{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return ue(r,{expected:He.joinValues(o),received:r.parsedType,code:re.invalid_type}),Ce}if(Vs(this,Oi)||Z1(this,Oi,new Set(He.getValidEnumValues(this._def.values))),!Vs(this,Oi).has(t.data)){const o=He.objectValues(n);return ue(r,{received:r.data,code:re.invalid_enum_value,options:o}),Ce}return Gt(t.data)}get enum(){return this._def.values}}Oi=new WeakMap;Ys.create=(e,t)=>new Ys({values:e,typeName:Te.ZodNativeEnum,...Ae(t)});class pa extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),Ce;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Gt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}pa.create=(e,t)=>new pa({type:e,typeName:Te.ZodPromise,...Ae(t)});class Kn extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.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=>{ue(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 Ce;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ce:l.status==="dirty"||n.value==="dirty"?Ii(l.value):l});{if(n.value==="aborted")return Ce;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"||n.value==="dirty"?Ii(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"?Ce:(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"?Ce:(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(!Qo(a))return a;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=>Qo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,...Ae(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ae(n)});class Hn extends Ne{_parse(t){return this._getType(t)===fe.undefined?Gt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hn.create=(e,t)=>new Hn({innerType:e,typeName:Te.ZodOptional,...Ae(t)});class Jr extends Ne{_parse(t){return this._getType(t)===fe.null?Gt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:Te.ZodNullable,...Ae(t)});class Gs extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ae(t)});class Ks extends Ne{_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 Ls(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ks.create=(e,t)=>new Ks({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ae(t)});class zd extends Ne{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),Ce}return{status:"valid",value:t.data}}}zd.create=e=>new zd({typeName:Te.ZodNaN,...Ae(e)});class eS extends Ne{_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 _l extends Ne{_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"?Ce:i.status==="dirty"?(n.dirty(),Ii(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"?Ce: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 _l({in:t,out:n,typeName:Te.ZodPipeline})}}class Zs extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Qo(o)&&(o.value=Object.freeze(o.value)),o);return Ls(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Te.ZodReadonly,...Ae(t)});vt.lazycreate;var Te;(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"})(Te||(Te={}));Bn.create;Xr.create;zd.create;Jo.create;jd.create;fa.create;Nd.create;$s.create;zs.create;Fd.create;_o.create;gr.create;Ld.create;Dn.create;vt.create;vt.strictCreate;Bs.create;Dp.create;Hs.create;Gn.create;Ws.create;$d.create;ei.create;Ui.create;qs.create;Us.create;Qr.create;Ys.create;pa.create;Kn.create;Hn.create;Jr.create;Kn.createWithPreprocess;_l.create;const I$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},_$=(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]}}},tS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):tS(t),o=structuredClone(e);return _$(o,r,n),o},O$=(e,t)=>e.localeCompare(t),Ci={},nS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return rS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=nS(e._def.innerType);return t==="ZodArray"?n??[]:n}},rS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,nS(n)])),oS=(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]=oS(i,o):n[r]=o||i)}return n},M$={sort:O$,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},iS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return a$.parse(n.toString(),M$)},Dr=(e,t)=>tS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),sr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Iu=e=>{const t=e.dataset.target;if(!t)return sr(e);const n=document.querySelector(`[data-origin="${t}"]`);return sr(n||e)},D$={state:{},loading:!1,useOnChange:!1},ky=e=>e.dataset.target||e.name,j$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=qi.LocalStorage.get(t);return I$(n)?n:{}},clear:()=>void qi.LocalStorage.delete(t),set:n=>qi.LocalStorage.set(t,n)}},N$=(e,t,n=D$)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>nt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??rS(e)??{}),l=E.useCallback(y=>{var I;const b=y.target,T=y.currentTarget;if(b.dataset.optional==="true")return;const S=ky(b),C=Iu(b)||(T?sr(T):""),R=Dr(S,e);if(b.setAttribute("data-initialized","true"),R){const A=R.safeParse(C),O=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(N=>hn(N??{},S,O))}},[]),c=E.useCallback(y=>b=>{const T=b.currentTarget,w=Object.values(i.current).reduce((C,R)=>{var V;const I=R.element,A=R.schema.safeParse(sr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const O=(V=A.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return hn(C,N,O)},{}),S=nt.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,b=Ci)=>{const T=Dr(y,e),w=S=>{var R;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>hn(I,y,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,S)};return{...b,loading:n.loading,name:y,id:y,onChange:w,form:t,date:nt.string(a[y])?new Date(a[y]):a[y],required:b.required??!T.isOptional(),error:r==null?void 0:r[y],ref:S=>{S!==null&&(i.current[y]={element:S,schema:T})}}},d=(y,b=Ci)=>{const T=Dr(y,e);return{...b,name:y,id:y,onChange:S=>{var R;const C=S.target.value;s(I=>hn(I,y,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),value:kr(a,y,void 0)||"",required:b.required??!T.isOptional(),ref:S=>S!==null?i.current[y]={element:S,schema:T}:void 0}},p=(y,b=Ci)=>{const T=Dr(y,e);return{...b,name:y,id:y,onChange:S=>{var R;const C=S.target.checked;s(I=>hn(I??{},y,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:b.required??!T.isOptional(),ref:S=>S!==null?void(i.current[y]={element:S,schema:T}):void 0}},f=(y,b=Ci)=>{const T=Dr(y,e),w=S=>{var R,I;(R=S.persist)==null||R.call(S);const C=S.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,S),s(A=>hn(A,y,C))};return{...b,loading:n.loading,name:y,id:y,onChange:w,form:t,onInvalid:l,error:kr(r,y,void 0),required:b.required??!T.isOptional(),value:kr(a,y,void 0)||(b==null?void 0:b.value)||"",type:nt.instance(T,Xr)?"number":(b==null?void 0:b.type)??"text",ref:S=>S===null?void 0:i.current[y]={element:S,schema:T}}},m=(y,b=Ci)=>{const T=Dr(y,e),w=T._def.typeName==="ZodNumber";return{...b,name:y,id:y,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const R=w?C.target.valueAsNumber:C.target.value;(A=b==null?void 0:b.onChange)==null||A.call(b,C),s(O=>hn(O,y,R))},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:b.required??!T.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:kr(a,y,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[y]={element:C,schema:T})}};E.useEffect(()=>{const y=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(sr(w)),C=O=>{var D;const N=ky(O.target);if(!N)return!1;const V=O.target,P=Iu(O.target)||(O.relatedTarget?sr(O.relatedTarget):""),_=T.schema.safeParse(P);if(V.setAttribute("value",P),_.success)return w.setCustomValidity(""),o(F=>{if(nt.null(F))return null;const j=hn(F,N,void 0);return nt.empty(F)||nt.nil(F)||nt.empty(j)?null:j}),!1;if(w.required){const F=((D=_.error.issues[0])==null?void 0:D.message)||"";w.setCustomValidity(F),o(j=>{if(nt.null(j))return null;const z=hn(j,N,F||void 0);return nt.empty(z)?null:z})}return!1},R=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:R.signal});const A=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>R.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const g=y=>b=>{var A;b.preventDefault();const T=b.currentTarget;let w=iS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(O=>{if(O.tagName==="SELECT"){const N=O;w=hn(w,N.name,N.value)}if(O.tagName==="INPUT"){const N=O,V=Iu(N)||(N?sr(N):"");w=hn(w,N.dataset.target||N.name,V)}});const C=oS(w,a),R=e.safeParse(C),I=()=>{var O;G1(T),(O=n.interceptor)==null||O.clear()};if(R.success){const O=JSON.stringify(R.data);return T.setAttribute("data-json",O),(A=n.interceptor)==null||A.clear(),y==null?void 0:y(b,{form:T,event:b,reset:I,errors:[],success:!0,data:R.data,json:R.data})}return console.group("useForm error"),console.info(R),console.info(R.error.issues),console.error(R.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(b,{form:T,json:w,event:b,reset:I,data:w,success:!1,errors:R.error.issues.map(O=>({message:O.message,path:O.path.map(N=>String(N))}))})},h=y=>Ff(a,y)||"",v=y=>({...y,id:t,name:t});return E.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},F$=e=>e?JSON.parse(e.getAttribute("data-json")):{},L$=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},aS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},sS={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},lS={normal:"1",navbar:"19",calendar:"2",overlay:"20",tooltip:"13",floating:"21"},V$={name:"dark",zIndex:lS,rounded:aS,spacing:sS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},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%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",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%)"}}}},$$={rounded:aS,spacing:sS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:lS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",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%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",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(221, 20%, 97%)",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%)"}}}},z$=V$,B$=$$,H$=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...ml,...e.tweaks},parser:e.parser||pl.hsla,map:{...hl,...e.map}}),[e]);return x.jsx(li.Provider,{value:t,children:e.children})},W$=()=>{const e=E.useContext(li);return e?e.parser:pl.hsla};exports.Alert=VA;exports.Autocomplete=LF;exports.Button=Oo;exports.Calendar=T0;exports.Card=Vf;exports.Checkbox=Ep;exports.ColType=Io;exports.Collapse=Ub;exports.ComponentsProvider=H$;exports.Context=li;exports.DatePicker=$F;exports.Dropdown=mi;exports.Empty=E0;exports.Expand=Dj;exports.FileUpload=JL;exports.Form=e2;exports.Input=Aa;exports.InputFeedback=l1;exports.InputField=Pa;exports.Menu=Fj;exports.MenuItem=Nj;exports.Modal=Kj;exports.MultiSelect=l2;exports.Notifications=DM;exports.Polymorph=cn;exports.Radiobox=c2;exports.RenderOnView=zT;exports.Select=Kr;exports.Slider=q2;exports.Stats=jM;exports.Switch=U2;exports.Tab=LM;exports.Table=t$;exports.Tabs=NM;exports.Tag=Ud;exports.TaskList=Y2;exports.Textarea=G2;exports.Timeline=VM;exports.TimelineItem=yl;exports.Toolbar=Zj;exports.Tooltip=ip;exports.TransferList=X2;exports.createColumns=SV;exports.createCssProperties=RO;exports.createDesignTokens=y0;exports.createFormStorage=j$;exports.createOptionCols=Ip;exports.createStyles=EO;exports.createTheme=kO;exports.createTokenStyles=PO;exports.css=je;exports.defaultDarkTheme=z$;exports.defaultLightTheme=B$;exports.defaultTranslations=hl;exports.defaultTweaks=ml;exports.dispatchInput=Gy;exports.formReset=G1;exports.formToJson=iS;exports.getJsonForm=F$;exports.getSchemaShape=Dr;exports.hasVerticalScroll=Ky;exports.initializeInputDataset=ma;exports.isMobile=b0;exports.isReactComponent=NT;exports.isReactFC=FT;exports.isSsr=qr;exports.mergeRefs=el;exports.negate=IO;exports.noop=Lf;exports.parsers=pl;exports.path=Ff;exports.reduceTokens=jr;exports.safeRegex=rd;exports.splitInto=x0;exports.useColorParser=W$;exports.useForm=N$;exports.useLocale=Nf;exports.useNotification=OM;exports.usePrevious=L$;exports.useReactive=Y0;exports.useTablePreferences=CV;exports.useTranslations=_t;exports.uuid=ci;
190
+ */var pu,Vv;function YF(){if(Vv)return pu;Vv=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 pu=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},pu}var hu,$v;function Cp(){if($v)return hu;$v=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hu=e,hu}var mu,zv;function d1(){return zv||(zv=1,mu=Function.call.bind(Object.prototype.hasOwnProperty)),mu}var gu,Bv;function GF(){if(Bv)return gu;Bv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Cp(),n={},r=d1();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},gu=o,gu}var vu,Hv;function KF(){if(Hv)return vu;Hv=1;var e=u1(),t=YF(),n=Cp(),r=d1(),o=GF(),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 vu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var $=M&&(c&&M[c]||M[u]);if(typeof $=="function")return $}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(),arrayOf:b,element:T(),elementType:w(),instanceOf:S,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:N,exact:V};function m(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function g(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}g.prototype=Error.prototype;function h(M){if(process.env.NODE_ENV!=="production")var $={},J=0;function te(Z,U,Y,L,W,G,ie){if(L=L||p,G=G||Y,ie!==n){if(l){var B=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 B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=L+":"+Y;!$[ye]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+L+"`. 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."),$[ye]=!0,J++)}}return U[Y]==null?Z?U[Y]===null?new g("The "+W+" `"+G+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new g("The "+W+" `"+G+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M(U,Y,L,W,G)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function v(M){function $(J,te,ee,Z,U,Y){var L=J[te],W=D(L);if(W!==M){var G=F(L);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+G+"` supplied to `"+ee+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return h($)}function y(){return h(a)}function b(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var Y=J[te];if(!Array.isArray(Y)){var L=D(Y);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<Y.length;W++){var G=M(Y,W,ee,Z,U+"["+W+"]",n);if(G instanceof Error)return G}return null}return h($)}function T(){function M($,J,te,ee,Z){var U=$[J];if(!s(U)){var Y=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return h(M)}function w(){function M($,J,te,ee,Z){var U=$[J];if(!e.isValidElementType(U)){var Y=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return h(M)}function S(M){function $(J,te,ee,Z,U){if(!(J[te]instanceof M)){var Y=M.name||p,L=z(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected ")+("instance of `"+Y+"`."))}return null}return h($)}function C(M){if(!Array.isArray(M))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 $(J,te,ee,Z,U){for(var Y=J[te],L=0;L<M.length;L++)if(m(Y,M[L]))return null;var W=JSON.stringify(M,function(ie,B){var ye=F(B);return ye==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(Y)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return h($)}function k(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+L+"` supplied to `"+ee+"`, expected an object."));for(var W in Y)if(r(Y,W)){var G=M(Y,W,ee,Z,U+"."+W,n);if(G instanceof Error)return G}return null}return h($)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<M.length;$++){var J=M[$];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(J)+" at index "+$+"."),a}function te(ee,Z,U,Y,L){for(var W=[],G=0;G<M.length;G++){var ie=M[G],B=ie(ee,Z,U,Y,L,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var ye=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+Y+" `"+L+"` supplied to "+("`"+U+"`"+ye+"."))}return h(te)}function A(){function M($,J,te,ee,Z){return P($[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return h(M)}function O(M,$,J,te,ee){return new g((M||"React class")+": "+$+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function N(M){function $(J,te,ee,Z,U){var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+L+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in M){var G=M[W];if(typeof G!="function")return O(ee,Z,U,W,F(G));var ie=G(Y,W,ee,Z,U+"."+W,n);if(ie)return ie}return null}return h($)}function V(M){function $(J,te,ee,Z,U){var Y=J[te],L=D(Y);if(L!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+L+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],M);for(var G in W){var ie=M[G];if(r(M,G)&&typeof ie!="function")return O(ee,Z,U,G,F(ie));if(!ie)return new g("Invalid "+Z+" `"+U+"` key `"+G+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
191
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var B=ie(Y,G,ee,Z,U+"."+G,n);if(B)return B}return null}return h($)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var $=d(M);if($){var J=$.call(M),te;if($!==M.entries){for(;!(te=J.next()).done;)if(!P(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function D(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":_($,M)?"symbol":$}function F(M){if(typeof M>"u"||M===null)return""+M;var $=D(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function j(M){var $=F(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function z(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},vu}var yu,Wv;function ZF(){if(Wv)return yu;Wv=1;var e=Cp();function t(){}function n(){}return n.resetWarningCache=t,yu=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yu}var qv;function XF(){if(qv)return Ka.exports;if(qv=1,process.env.NODE_ENV!=="production"){var e=u1(),t=!0;Ka.exports=KF()(e.isElement,t)}else Ka.exports=ZF()();return Ka.exports}var QF=XF();const et=Iy(QF);function lo(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())})}const JF=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 Zo(e,t,n){const r=e2(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Uv(r,"path",i),Uv(r,"relativePath",i),r}function e2(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=JF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Uv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const t2=[".DS_Store","Thumbs.db"];function n2(e){return lo(this,void 0,void 0,function*(){return Ds(e)&&r2(e.dataTransfer)?s2(e.dataTransfer,e.type):o2(e)?i2(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?a2(e):[]})}function r2(e){return Ds(e)}function o2(e){return Ds(e)&&Ds(e.target)}function Ds(e){return typeof e=="object"&&e!==null}function i2(e){return Sd(e.target.files).map(t=>Zo(t))}function a2(e){return lo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Zo(n))})}function s2(e,t){return lo(this,void 0,void 0,function*(){if(e.items){const n=Sd(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(l2));return Yv(f1(r))}return Yv(Sd(e.files).map(n=>Zo(n)))})}function Yv(e){return e.filter(t=>t2.indexOf(t.name)===-1)}function Sd(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 l2(e){if(typeof e.webkitGetAsEntry!="function")return Gv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?p1(t):Gv(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function Gv(e,t){return lo(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,Zo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Zo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function c2(e){return lo(this,void 0,void 0,function*(){return e.isDirectory?p1(e):u2(e)})}function p1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>lo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(c2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function u2(e){return lo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Zo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Xa={},Kv;function d2(){return Kv||(Kv=1,Xa.__esModule=!0,Xa.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}),Xa}var f2=d2();const xu=Iy(f2);function Zv(e){return m2(e)||h2(e)||m1(e)||p2()}function p2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m2(e){if(Array.isArray(e))return Td(e)}function Xv(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 Qv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(n),!0).forEach(function(r){h1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t){return y2(e)||v2(e,t)||m1(e,t)||g2()}function g2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m1(e,t){if(e){if(typeof e=="string")return Td(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 Td(e,t)}}function Td(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 v2(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 y2(e){if(Array.isArray(e))return e}var x2=typeof xu=="function"?xu:xu.default,b2="file-invalid-type",w2="file-too-large",S2="file-too-small",T2="too-many-files",E2=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:b2,message:"File type must be ".concat(r)}},Jv=function(t){return{code:w2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ey=function(t){return{code:S2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},C2={code:T2,message:"Too many files"};function g1(e,t){var n=e.type==="application/x-moz-file"||x2(e,t);return[n,n?null:E2(t)]}function v1(e,t,n){if(Nr(e.size))if(Nr(t)&&Nr(n)){if(e.size>n)return[!1,Jv(n)];if(e.size<t)return[!1,ey(t)]}else{if(Nr(t)&&e.size<t)return[!1,ey(t)];if(Nr(n)&&e.size>n)return[!1,Jv(n)]}return[!0,null]}function Nr(e){return e!=null}function R2(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=g1(l,n),u=ua(c,1),d=u[0],p=v1(l,r,o),f=ua(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function js(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Qa(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 ty(e){e.preventDefault()}function k2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function P2(e){return e.indexOf("Edge/")!==-1}function A2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return k2(e)||P2(e)}function En(){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!js(r)&&s&&s.apply(void 0,[r].concat(i)),js(r)})}}function I2(){return"showOpenFilePicker"in window}function _2(e){if(Nr(e)){var t=Object.entries(e).filter(function(n){var r=ua(n,2),o=r[0],i=r[1],a=!0;return y1(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(x1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ua(r,2),i=o[0],a=o[1];return Qv(Qv({},n),{},h1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function O2(e){if(Nr(e))return Object.entries(e).reduce(function(t,n){var r=ua(n,2),o=r[0],i=r[1];return[].concat(Zv(t),[o],Zv(i))},[]).filter(function(t){return y1(t)||x1(t)}).join(",")}function M2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function D2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function y1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function x1(e){return/^.*\.[\w]+$/.test(e)}var j2=["children"],N2=["open"],F2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],L2=["refKey","onChange","onClick"];function V2(e){return B2(e)||z2(e)||b1(e)||$2()}function $2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B2(e){if(Array.isArray(e))return Ed(e)}function bu(e,t){return q2(e)||W2(e,t)||b1(e,t)||H2()}function H2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b1(e,t){if(e){if(typeof e=="string")return Ed(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 Ed(e,t)}}function Ed(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 W2(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 q2(e){if(Array.isArray(e))return e}function ny(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 dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ny(Object(n),!0).forEach(function(r){Cd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t){if(e==null)return{};var n=U2(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 U2(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 Rp=E.forwardRef(function(e,t){var n=e.children,r=Ns(e,j2),o=S1(r),i=o.open,a=Ns(o,N2);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(dt(dt({},a),{},{open:i})))});Rp.displayName="Dropzone";var w1={disabled:!1,getFilesFromEvent:n2,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};Rp.defaultProps=w1;Rp.propTypes={children:et.func,accept:et.objectOf(et.arrayOf(et.string)),multiple:et.bool,preventDropOnDocument:et.bool,noClick:et.bool,noKeyboard:et.bool,noDrag:et.bool,noDragEventsBubbling:et.bool,minSize:et.number,maxSize:et.number,maxFiles:et.number,disabled:et.bool,getFilesFromEvent:et.func,onFileDialogCancel:et.func,onFileDialogOpen:et.func,useFsAccessApi:et.bool,autoFocus:et.bool,onDragEnter:et.func,onDragLeave:et.func,onDragOver:et.func,onDrop:et.func,onDropAccepted:et.func,onDropRejected:et.func,onError:et.func,validator:et.func};var Rd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function S1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=dt(dt({},w1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=E.useMemo(function(){return O2(n)},[n]),O=E.useMemo(function(){return _2(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:ry},[h]),V=E.useMemo(function(){return typeof g=="function"?g:ry},[g]),P=E.useRef(null),_=E.useRef(null),D=E.useReducer(Y2,Rd),F=bu(D,2),j=F[0],z=F[1],M=j.isFocused,$=j.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&I2()),te=function(){!J.current&&$&&setTimeout(function(){if(_.current){var ce=_.current.files;ce.length||(z({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[_,$,V,J]);var ee=E.useRef([]),Z=function(ce){P.current&&P.current.contains(ce.target)||(ce.preventDefault(),ee.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",ty,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",ty),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var U=E.useCallback(function(X){k?k(X):console.error(X)},[k]),Y=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[].concat(V2(ee.current),[X.target]),Qa(X)&&Promise.resolve(o(X)).then(function(ce){if(!(js(X)&&!C)){var ke=ce.length,ze=ke>0&&R2({files:ce,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),xt=ke>0&&!ze;z({isDragAccept:ze,isDragReject:xt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ce){return U(ce)})},[o,c,U,C,A,a,i,s,l,I]),L=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=Qa(X);if(ce&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ce&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X);var ce=ee.current.filter(function(ze){return P.current&&P.current.contains(ze)}),ke=ce.indexOf(X.target);ke!==-1&&ce.splice(ke,1),ee.current=ce,!(ce.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qa(X)&&u&&u(X))},[P,u,C]),G=E.useCallback(function(X,ce){var ke=[],ze=[];X.forEach(function(xt){var ut=g1(xt,A),Ot=bu(ut,2),fn=Ot[0],Tn=Ot[1],Xn=v1(xt,a,i),Qn=bu(Xn,2),Jn=Qn[0],H=Qn[1],q=I?I(xt):null;if(fn&&Jn&&!q)ke.push(xt);else{var Ve=[Tn,H];q&&(Ve=Ve.concat(q)),ze.push({file:xt,errors:Ve.filter(function(Xe){return Xe})})}}),(!s&&ke.length>1||s&&l>=1&&ke.length>l)&&(ke.forEach(function(xt){ze.push({file:xt,errors:[C2]})}),ke.splice(0)),z({acceptedFiles:ke,fileRejections:ze,isDragReject:ze.length>0,type:"setFiles"}),p&&p(ke,ze,ce),ze.length>0&&m&&m(ze,ce),ke.length>0&&f&&f(ke,ce)},[z,s,A,a,i,l,p,f,m,I]),ie=E.useCallback(function(X){X.preventDefault(),X.persist(),le(X),ee.current=[],Qa(X)&&Promise.resolve(o(X)).then(function(ce){js(X)&&!C||G(ce,X)}).catch(function(ce){return U(ce)}),z({type:"reset"})},[o,G,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),N();var X={multiple:s,types:O};window.showOpenFilePicker(X).then(function(ce){return o(ce)}).then(function(ce){G(ce,null),z({type:"closeDialog"})}).catch(function(ce){M2(ce)?(V(ce),z({type:"closeDialog"})):D2(ce)?(J.current=!1,_.current?(_.current.value=null,_.current.click()):U(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."))):U(ce)});return}_.current&&(z({type:"openDialog"}),N(),_.current.value=null,_.current.click())},[z,N,V,v,G,U,O,s]),ye=E.useCallback(function(X){!P.current||!P.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[P,B]),Se=E.useCallback(function(){z({type:"focus"})},[]),Ie=E.useCallback(function(){z({type:"blur"})},[]),Le=E.useCallback(function(){T||(A2()?setTimeout(B,0):B())},[T,B]),ae=function(ce){return r?null:ce},ve=function(ce){return w?null:ae(ce)},K=function(ce){return S?null:ae(ce)},le=function(ce){C&&ce.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,ke=ce===void 0?"ref":ce,ze=X.role,xt=X.onKeyDown,ut=X.onFocus,Ot=X.onBlur,fn=X.onClick,Tn=X.onDragEnter,Xn=X.onDragOver,Qn=X.onDragLeave,Jn=X.onDrop,H=Ns(X,F2);return dt(dt(Cd({onKeyDown:ve(En(xt,ye)),onFocus:ve(En(ut,Se)),onBlur:ve(En(Ot,Ie)),onClick:ae(En(fn,Le)),onDragEnter:K(En(Tn,Y)),onDragOver:K(En(Xn,L)),onDragLeave:K(En(Qn,W)),onDrop:K(En(Jn,ie)),role:typeof ze=="string"&&ze!==""?ze:"presentation"},ke,P),!r&&!w?{tabIndex:0}:{}),H)}},[P,ye,Se,Ie,Le,Y,L,W,ie,w,S,r]),oe=E.useCallback(function(X){X.stopPropagation()},[]),be=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=X.refKey,ke=ce===void 0?"ref":ce,ze=X.onChange,xt=X.onClick,ut=Ns(X,L2),Ot=Cd({accept:A,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:ae(En(ze,ie)),onClick:ae(En(xt,oe)),tabIndex:-1},ke,_);return dt(dt({},Ot),ut)}},[_,n,s,ie,r]);return dt(dt({},j),{},{isFocused:M&&!r,getRootProps:Q,getInputProps:be,rootRef:P,inputRef:_,open:ae(B)})}function Y2(e,t){switch(t.type){case"focus":return dt(dt({},e),{},{isFocused:!0});case"blur":return dt(dt({},e),{},{isFocused:!1});case"openDialog":return dt(dt({},Rd),{},{isFileDialogActive:!0});case"closeDialog":return dt(dt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return dt(dt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return dt(dt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return dt({},Rd);default:return e}}function ry(){}const G2={isImage:e=>e.type.includes("image")},K2=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(G2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:jv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:jv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Oo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Vo,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(Wb,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Oo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Vo,{className:"text-danger"})})]})},Z2=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(K2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),X2=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(Z2,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),Q2=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(jA,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),J2=({idle:e=Q2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=S1({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(X2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},eL=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})};class zr extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zr&&(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 zr(this);return t?t(n):n}}const tL=e=>x.jsx(E.Fragment,{children:e.children}),nL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},rL={caseSensitive:!1,sort:!1},oy=[],oL=E.forwardRef(function(t,n){return x.jsx(pt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),iL=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),aL={List:oL,Item:iL},sL=e=>{const t=_t(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.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]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(Ud,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},lL=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const y=E.useMemo(()=>new zr(r.map(Q=>[Q.value,Q])),[r]),b=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??oy,S=_t(),[C,k]=E.useState(0),[I,A]=E.useState(!1),[O,N]=E.useState(""),[V,P]=E.useState(()=>{const Q=new zr;return w.forEach(oe=>{const be=y.get(oe);return be?Q.set(oe,be):void 0}),Q}),_=E.useMemo(()=>Array.from(V.keys()),[V]),[D,F]=E.useState(()=>{const Q=new Set(w);return r.reduce((oe,be)=>Q.has(be.value)?[...oe,be.label??be.value]:oe,[])??w}),[j,z]=E.useState(null),M=E.useRef(oy),$=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,J=new Vr($,["value","label"],rL).search(O);E.useEffect(()=>{I||k(0)},[I]),E.useEffect(()=>{h.value&&P(new zr(h.value.map(Q=>[Q,y.get(Q)])))},[h.value,y]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:Y,refs:L,context:W}=oo({open:I,transform:!0,strategy:"absolute",onOpenChange:A,whileElementsMounted:wa,middleware:[Sa(4),pw({padding:10,elementContext:"reference",apply(Q){if(b.current===null)return;const oe=b.current.getBoundingClientRect().width,be=360;ha.flushSync(()=>setTimeout(()=>k(be),200)),Object.assign(Q.elements.floating.style,{width:`${oe}px`,maxWidth:`${oe}px`,maxHeight:ee?"auto":`${be}px`,height:ee?"auto":`${be}px`})}})]}),G=Aw(W,nL),{getReferenceProps:ie,getFloatingProps:B,getItemProps:ye}=io([ao(W,{role:"listbox"}),ro(W),op(W,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(oe=>Q??oe)})]);E.useEffect(()=>{const Q=L.reference.current;if(Q)return ma(Q)},[]);const Se=(Q,oe)=>{const be=V.clone(ke=>ke.has(Q.value)?ke.remove(Q.value):ke.set(Q.value,Q));P(be);const X=L.reference.current;if(!X)return;const ce=be.map(ke=>ke.value);X==null||X.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),F(ke=>ke.concat(Q.label??"")),N(""),z(oe)},Ie=Q=>{const oe=Q.target.value;return N(oe),!I&&oe===""?A(!0):(Q.target.name=h.name||"",oe?A(!0):void 0)},Le=()=>{var Q;A(!0),N(""),(Q=L.reference.current)==null||Q.focus()},ae=()=>{A(!0),N("")},ve=()=>{var Q;(Q=L.reference.current)==null||Q.setAttribute("data-value","[]"),N(""),A(!1),P(new zr),g==null||g([])},K=h.id||h.name,le=V.map((Q,oe)=>x.jsx(Ud,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:be=>{be.stopPropagation(),Se(Q,oe)},children:x.jsx(ul,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return x.jsxs(Pa,{...h,left:e,error:t,ref:b,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Le,children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:ve,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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:[x.jsx("button",{...ie({...h,onFocus:ae,id:`${K}-shadow`,name:`${K}-shadow`,ref:L.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":_.join(","),value:I?O:D||V,className:je("input 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:x.jsx(sL,{label:c,children:le})}),x.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:v,required:f,defaultValue:h.value||_||void 0}),x.jsx(no,{preserveTabOrder:!0,children:I?x.jsx(hi,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...B({ref:L.setFloating,style:{...G.styles,top:U??0,position:Y,left:(Z??0)+(V?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:O,onChange:Ie,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:Q=>{var oe,be;if(Q.key==="ArrowDown"){let X=j+1;return X>te.length-1&&(X=0),(oe=T.current)==null||oe.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=j-1;return X<0&&(X=te.length-1),(be=T.current)==null||be.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),A(!1);if(Q.key==="Enter"){if(j!==null&&te[j])return Q.preventDefault(),Se(te[j],j);if(te.length===1)return Q.preventDefault(),Se(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),ee?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,ee?null:x.jsx(wp,{ref:T,hidden:ee,data:te,components:aL,style:{height:ee?"0":V.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,oe)=>{const be=oe.Render??tL,X=V.has(oe.value)||V.has(oe.label??""),ce=j===Q,ke=oe.label??oe.value;return x.jsxs("button",{"data-value":oe.value,...ye({ref:ze=>void(M.current[Q]=ze),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":oe.disabled,onClick:()=>Se(oe,Q)}),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 ${X||ce?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Ep,{onChange:Lf,checked:X,"aria-checked":X,onClick:ze=>{ze.stopPropagation(),Se(oe,Q)}}),x.jsx(be,{...h,label:oe.label,value:oe.value,children:ke})]})}}),V.size===0?null:x.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:le})]})}):null})]})}),cL=({children:e,className:t="",size:n,...r})=>x.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:[x.jsx("input",{...r,type:"radio",className:je("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]}),Kr=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=_t(),y=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(h,()=>y.current),E.useEffect(()=>{if(y.current===null)return;const w=new AbortController,S=y.current,C=ma(y.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=y.current)==null?void 0:w.focus()};return x.jsx(Pa,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:x.jsxs("label",{htmlFor:b,children:[p,x.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(kf,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:x.jsxs("select",{...g,id:b,name:b,value:g.value,required:e,ref:el(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:je("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function T1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ro(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function iy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function E1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=iy(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():iy(e[o],null)}}}}function Zr(...e){return R.useCallback(E1(...e),e)}function C1(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=R.useMemo(()=>m,Object.values(m));return x.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=R.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,uL(o,...t)]}function uL(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function R1(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function dL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=fL({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=R1(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function fL({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=R1(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var pL=R.createContext(void 0);function hL(e){const t=R.useContext(pL);return e||t||"ltr"}function mL(e){const t=R.useRef({value:e,previous:e});return R.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gL=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{};function vL(e){const[t,n]=R.useState(void 0);return gL(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function kd(e){const t=yL(e),n=R.forwardRef((r,o)=>{const{children:i,...a}=r,s=R.Children.toArray(i),l=s.find(bL);if(l){const c=l.props.children,u=s.map(d=>d===l?R.Children.count(c)>1?R.Children.only(null):R.isValidElement(c)?c.props.children:null:d);return x.jsx(t,{...a,ref:o,children:R.isValidElement(c)?R.cloneElement(c,void 0,u):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function yL(e){const t=R.forwardRef((n,r)=>{const{children:o,...i}=n;if(R.isValidElement(o)){const a=SL(o),s=wL(i,o.props);return o.type!==R.Fragment&&(s.ref=r?E1(r,a):a),R.cloneElement(o,s)}return R.Children.count(o)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xL=Symbol("radix.slottable");function bL(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xL}function wL(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function SL(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var TL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Pl=TL.reduce((e,t)=>{const n=kd(`Primitive.${t}`),r=R.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function EL(e){const t=e+"CollectionProvider",[n,r]=C1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=E.useRef(null),b=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:b,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=kd(s),c=E.forwardRef((g,h)=>{const{scope:v,children:y}=g,b=i(s,v),T=Zr(h,b.collectionRef);return x.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=kd(u),f=E.forwardRef((g,h)=>{const{scope:v,children:y,...b}=g,T=E.useRef(null),w=Zr(h,T),S=i(u,v);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...b}),()=>void S.itemMap.delete(T))),x.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>b.indexOf(S.ref.current)-b.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var k1=["PageUp","PageDown"],P1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],A1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xi="Slider",[Pd,CL,RL]=EL(xi),[I1,K$]=C1(xi,[RL]),[kL,Al]=I1(xi),_1=R.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=R.useRef(new Set),v=R.useRef(0),b=a==="horizontal"?PL:AL,[T=[],w]=dL({prop:u,defaultProp:c,onChange:O=>{var V;(V=[...h.current][v.current])==null||V.focus(),d(O)}}),S=R.useRef(T);function C(O){const N=DL(T,O);A(O,N)}function k(O){A(O,v.current)}function I(){const O=S.current[v.current];T[v.current]!==O&&p(T)}function A(O,N,{commit:V}={commit:!1}){const P=LL(i),_=VL(Math.round((O-r)/i)*i+r,P),D=T1(_,[r,o]);w((F=[])=>{const j=OL(F,D,N);if(FL(j,l*i)){v.current=j.indexOf(D);const z=String(j)!==String(F);return z&&V&&p(j),z?j:F}else return F})}return x.jsx(kL,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:m,children:x.jsx(Pd.Provider,{scope:e.__scopeSlider,children:x.jsx(Pd.Slot,{scope:e.__scopeSlider,children:x.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Ro(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,T.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:N})=>{if(!s){const _=k1.includes(O.key)||O.shiftKey&&P1.includes(O.key)?10:1,D=v.current,F=T[D],j=i*_*N;A(F+j,D,{commit:!0})}}})})})})});_1.displayName=xi;var[O1,M1]=I1(xi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),PL=R.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=R.useState(null),f=Zr(t,b=>p(b)),m=R.useRef(void 0),g=hL(o),h=g==="ltr",v=h&&!i||!h&&i;function y(b){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=kp(w,v?[n,r]:[r,n]);return m.current=T,C(b-T.left)}return x.jsx(O1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:x.jsx(D1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const T=y(b.clientX);a==null||a(T)},onSlideMove:b=>{const T=y(b.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=A1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),AL=R.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=R.useRef(null),d=Zr(t,u),p=R.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],b=kp(v,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return x.jsx(O1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(D1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=A1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),D1=R.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Al(xi,n);return x.jsx(Pl.span,{...c,ref:t,onKeyDown:Ro(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):k1.concat(P1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ro(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Ro(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ro(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),j1="SliderTrack",N1=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(j1,n);return x.jsx(Pl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});N1.displayName=j1;var Ad="SliderRange",F1=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(Ad,n),i=M1(Ad,n),a=R.useRef(null),s=Zr(t,a),l=o.values.length,c=o.values.map(p=>V1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(Pl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});F1.displayName=Ad;var Id="SliderThumb",L1=R.forwardRef((e,t)=>{const n=CL(e.__scopeSlider),[r,o]=R.useState(null),i=Zr(t,s=>o(s)),a=R.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(IL,{...e,ref:i,index:a})}),IL=R.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Al(Id,n),s=M1(Id,n),[l,c]=R.useState(null),u=Zr(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=vL(l),f=a.values[r],m=f===void 0?0:V1(f,a.min,a.max),g=ML(r,a.values.length),h=p==null?void 0:p[s.size],v=h?jL(h,m,s.direction):0;return R.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[x.jsx(Pd.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Pl.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Ro(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(_L,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});L1.displayName=Id;var _L=e=>{const{value:t,...n}=e,r=R.useRef(null),o=mL(t);return R.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),x.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function OL(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function V1(e,t,n){const i=100/(n-t)*(e-t);return T1(i,[0,100])}function ML(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function DL(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function jL(e,t,n){const r=e/2,i=kp([0,50],[0,r]);return(r-i(t)*n)*n}function NL(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function FL(e,t){if(t>0){const n=NL(e);return Math.min(...n)>=t}return!0}function kp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function LL(e){return(String(e).split(".")[1]||"").length}function VL(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var $L=_1,zL=N1,BL=F1,HL=L1;const WL=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));tt.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(tt.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(ip,{title:"",ref:r,as:HL,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},qL=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(ci()),s=r||o||[];return x.jsxs($L,{...i,defaultValue:r,value:o,className:je("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(zL,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(BL,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>x.jsx(WL,{tooltip:t??!1},`${a.current}-${c}`))]})},UL=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Mo(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:je("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.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"})}),x.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),YL=e=>{const[t,n]=HP();return E.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:GP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},GL=c1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
196
+ `);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)}),KL=e=>{const[t,n]=E.useState(0);return E.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},ZL={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},XL=e=>{const t=E.useRef(null),n=KL(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.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:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Aa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(wp,{height:n,useWindowScroll:!0,data:e.source,components:ZL,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Ep,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Oo,{children:x.jsx(Pf,{})})}),x.jsx("div",{})]})};var QL=Object.defineProperty,ay=Object.getOwnPropertySymbols,JL=Object.prototype.hasOwnProperty,eV=Object.prototype.propertyIsEnumerable,sy=(e,t,n)=>t in e?QL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tV=(e,t)=>{for(var n in t||(t={}))JL.call(t,n)&&sy(e,n,t[n]);if(ay)for(var n of ay(t))eV.call(t,n)&&sy(e,n,t[n]);return e},Pp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},nV=(e,t,n,r)=>Il(Pp,e,t,n,r),Xo=e=>typeof e=="object",ur=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Xo(e)&&!Xo(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=>ur(e[r],t[r]))},rV=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,oV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Fs=e=>/[0-9.]+/.test(e),ly=e=>["string","number"].includes(typeof e),cy=e=>e==null||(e==null?void 0:e.length)===0||e==="",uy={eq:ur,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:cy,notEmpty:e=>!cy(e),in:(e,t)=>Pp(t,n=>ur(e,n)),notIn:(e,t)=>$1(t,n=>!ur(e,n))},iV=e=>{if(e in uy)return uy[e];throw new Error("Linq - Symbol not found")},Ao=(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},Il=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=iV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},aV=(e,t,n,r)=>Il(Ao,e,t,n,r),$1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},sV=(e,t,n,r)=>Il($1,e,t,n,r),z1=e=>{if(e===null)return null;const t=tV({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?z1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},dy=(e,t)=>{if(Xo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1},lV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},cV=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),uV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},B1=(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())},dV=(e,t)=>B1(e,n=>n[t]),fy=(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},fV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},pV=(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 Fs(e)&&Fs(t)?r.map(a=>Number.parseInt(a)):r},wu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Fs(e)&&Fs(t)){const o=[],[i,a]=fV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return pV(e,t,r)},hV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?wu(r,o,1):wu(r,i,Number.parseInt(o,10))}return ly(e)&&ly(t)?wu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Su=(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},py=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},mV=(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)},gV=(e,t,n,r)=>Il(mV,e,t,n,r),hy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(oV(t))},H1=(e=>(e.Asc="asc",e.Desc="desc",e))(H1||{}),vV=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),yV=(e,t)=>e.sort(vV(t)),xV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},bV=class _d{constructor(t=[]){this.array=t}static Range(...t){return hV(...t)}static New(t){return new _d(t)}Where(t,n,r){return this.array=aV(this.array,t,n,r),this}Some(t,n,r){return nV(this.array,t,n,r)}All(t,n,r){return sV(this.array,t,n,r)}Reverse(){return this.array=py(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=gV(this.array,t,n,r),this}Distinct(){return this.array=cV(this.array),this}First(t){return t===void 0?this.array[0]:uV(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?Su((n,r)=>n+r,0,this.array):Su((n,r)=>n+rV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return dV(this.array,t)}GroupWith(t){return B1(this.array,t)}Except(t){return Ao(this.array,n=>!dy(t,n))}Intersect(t){return Ao(this.array,n=>dy(t,n))}OrderBy(t,n){let r;return r=t?hy(this.array,t):this.array.toSorted(),this.array=n==="desc"?py(r):r,this}Includes(t){return Pp(this.array,n=>ur(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 Su(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(fy(this.array,n=>[t,n]))}Zip(t,n){return fy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new _d(z1(this.array))}ToObject(t){return lV(this.array,t)}Sort(t){return Array.isArray(t)?yV(this.array,t):hy(this.array,t)}Unique(t){return xV(this.array,t)}},W1=bV;const q1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"});var Tu={},my;function wV(){return my||(my=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,S)=>{const C=S.parse(y);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=b=>{h().removeItem(b);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const T=h().getItem(b);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,T)=>{h().setItem(b,JSON.stringify(T)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(Tu)),Tu}var qi=wV();const Ap=e=>e.headerLabel??e.thead??e.id,Ip=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Io=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Io||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,SV=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},TV={},EV=(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})},CV=(e,t,n=TV)=>{const r=qr()?null:qi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Df({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:EV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||qi.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},RV=e=>{const t=Mo(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Od=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Io.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:ci(),operation:l,label:Ap(e),name:o,type:i,value:"",...r}},Op=()=>{const e=_t(),t=E.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:E.useMemo(()=>({[Io.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Io.Boolean]:[t.is,t.isNot],[Io.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},kV=e=>{const t=_t(),n=Op(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Od(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return Od(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=_p(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(TA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Kr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Aa,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:x.jsx(Vo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(Af,{size:14})," ",t.tableFilterNewFilter]})})]})})})},PV=({filter:e,onDelete:t,set:n})=>{const r=_t(),o=Op(),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 x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Kr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Aa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Vo,{className:"text-danger",size:14})})]})},AV=({item:e,onPointerDown:t})=>{const n=Lo(0);return x.jsxs($b,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(bA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},IV=e=>{var l;const t=_t(),n=Ip(e.cols),r=UP(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new W1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(GS(m).map((v,y)=>{const b=m[v];return{...g,groupId:ci(),groupKey:d,index:y,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(MA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Kr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Oo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Vo,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(nE,{children:x.jsx(Vb,{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(c=>x.jsx(AV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},_V=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),OV=(e,t)=>e.toSorted(_V(t)),U1=(e,t,n)=>({label:t,id:ci(),type:n,value:e.id}),MV=e=>{const t=_t(),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,U1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(E.Fragment,{children:x.jsx(mi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Bb,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Kr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:x.jsx(Vo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Af,{size:14})," ",t.tableSortAddButton]})})]})})})},DV=e=>{const t=_t(),[n,r]=E.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");E.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=U1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ap(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(sA,{size:14}):null,n==="desc"?x.jsx(iA,{size:14}):null,n==="undefined"?x.jsx(Bb,{size:14}):null]})},jV=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(kV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(MV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(IV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.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}`))})]})});function NV(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 FV=e=>{const t=E.useId(),n=_t(),r=E.useMemo(()=>NV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(cn,{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?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},LV=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.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 E.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()},[]),x.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:x.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},VV=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=Ff(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},d?x.jsx(LV,{children:x.jsx(p,{col:i,row:t,rowIndex:e})}):null,x.jsx("span",{className:"relative",children:o?q1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:tt.nil(l)?"":l})}))})})},$V={top:0,left:0,right:0,bottom:-1},zV=e=>{var g;const t=Tp(),n=_t(),r=e.filters.filter(h=>h.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=Op(),l=o?RA:PA,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===H1.Asc?"ascending":"descending":"none",m=Ap(e.header);return x.jsxs($b,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[x.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?x.jsx(mi,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),x.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"font-medium",children:m})]}),children:x.jsxs("ul",{className:"font-medium",children:[r.length===0?null:x.jsx(E.Fragment,{children:r.map(h=>x.jsx("li",{className:"my-1",children:x.jsx(PV,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(Od(e.header,s.options,s.operations))),children:[x.jsx(Af,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?x.jsx(DV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(pt.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:$V,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=v.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},BV=e=>{const[t,n]=RV(e.setCols);return x.jsx(Vb,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:x.jsx(vr,{children:e.headers.map((r,o)=>x.jsx(zV,{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}`))})})},Y1=E.createContext({}),HV=()=>E.useContext(Y1),WV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(vr,{children:n.children})})),qV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse divide-y divide-table-border border-0 text-left ${t??""}`})),UV=E.forwardRef(({context:e,...t},n)=>{const r=HV(),o={...t==null?void 0:t.style,top:tt.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),YV=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row table-row ${(n==null?void 0:n.className)??""}`})),GV=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),KV={TableHead:UV,Table:qV,TableBody:WV,TableRow:YV,TableFoot:GV},ZV=[0,0,0,0,0,0,0,0,0,0],XV=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?q1:x.jsx(E0,{})}),QV=()=>x.jsx(E.Fragment,{}),JV=()=>x.jsx(E.Fragment,{}),e$=[],gy=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=Mo(a),g=Mo(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return ZV;if(c)return u.rows;const b=new W1(u.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:b.Where(T.name,T.operation.symbol,T.value)),r.length===0?b.Select():OV(b.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,T=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=m.current)==null||k.call(m),void f(!0)):f(!1)});return T.observe(b),()=>T.disconnect()},[g,m]);const v=h.length===0,y={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(gF,{useWindowScroll:!0,followOutput:"smooth",components:KV,totalCount:h.length,data:v?e$:h,itemContent:v?QV:VV,fixedFooterContent:p?JV:null,context:y,fixedHeaderContent:()=>x.jsx(BV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?x.jsx(XV,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(FV,{...l}):null]})},t$=(e,t)=>typeof t=="function"?t(e):t,Ja=(e,t,n)=>e===t||n==null?void 0:n(t),n$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Tp(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Ip(e.cols),[e.cols]),[i,a]=Df({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:t$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),Ja((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),Ja((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),Ja((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),Ja((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(Y1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(jV,{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?x.jsx(gy,{...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}):x.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>x.jsx("div",{className:"min-w-full",children:x.jsx(gy,{...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}`))})]})})},r$=["INPUT","SELECT"],G1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{r$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Eu,vy;function Mp(){if(vy)return Eu;vy=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Eu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Eu}var Cu,yy;function K1(){if(yy)return Cu;yy=1;var e=Mp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),b=y.obj[y.prop];if(n(b)){for(var T=[],w=0;w<b.length;++w)typeof b[w]<"u"&&T.push(b[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var b=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(b[T]=v[T]);return b},a=function h(v,y,b){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,b)),n(v)&&n(y)?(y.forEach(function(w,S){if(t.call(v,S)){var C=v[S];C&&typeof C=="object"&&w&&typeof w=="object"?v[S]=h(C,w,b):v.push(w)}else v[S]=w}),v):Object.keys(y).reduce(function(w,S){var C=y[S];return t.call(w,S)?w[S]=h(w[S],C,b):w[S]=C,w},T)},s=function(v,y){return Object.keys(y).reduce(function(b,T){return b[T]=y[T],b},v)},l=function(h,v,y){var b=h.replace(/\+/g," ");if(y==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,y,b,T,w){if(v.length===0)return v;var S=v;if(typeof v=="symbol"?S=Symbol.prototype.toString.call(v):typeof v!="string"&&(S=String(v)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",k=0;k<S.length;k+=c){for(var I=S.length>=c?S.slice(k,k+c):S,A=[],O=0;O<I.length;++O){var N=I.charCodeAt(O);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(O);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}O+=1,N=65536+((N&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],b=[],T=0;T<y.length;++T)for(var w=y[T],S=w.obj[w.prop],C=Object.keys(S),k=0;k<C.length;++k){var I=C[k],A=S[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(y.push({obj:S,prop:I}),b.push(A))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var b=[],T=0;T<v.length;T+=1)b.push(y(v[T]));return b}return y(v)};return Cu={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},Cu}var Ru,xy;function o$(){if(xy)return Ru;xy=1;var e=HS(),t=K1(),n=Mp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,b,T,w,S,C,k,I,A,O,N,V,P,_,D,F){for(var j=h,z=F,M=0,$=!1;(z=z.get(p))!==void 0&&!$;){var J=z.get(h);if(M+=1,typeof J<"u"){if(J===M)throw new RangeError("Cyclic object value");$=!0}typeof z.get(p)>"u"&&(M=0)}if(typeof I=="function"?j=I(v,j):j instanceof Date?j=N(j):y==="comma"&&i(j)&&(j=t.maybeMap(j,function(Ie){return Ie instanceof Date?N(Ie):Ie})),j===null){if(w)return k&&!_?k(v,u.encoder,D,"key",V):v;j=""}if(d(j)||t.isBuffer(j)){if(k){var te=_?v:k(v,u.encoder,D,"key",V);return[P(te)+"="+P(k(j,u.encoder,D,"value",V))]}return[P(v)+"="+P(String(j))]}var ee=[];if(typeof j>"u")return ee;var Z;if(y==="comma"&&i(j))_&&k&&(j=t.maybeMap(j,k)),Z=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(j);Z=A?U.sort(A):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),L=b&&i(j)&&j.length===1?Y+"[]":Y;if(T&&i(j)&&j.length===0)return L+"[]";for(var W=0;W<Z.length;++W){var G=Z[W],ie=typeof G=="object"&&G&&typeof G.value<"u"?G.value:j[G];if(!(S&&ie===null)){var B=O&&C?String(G).replace(/\./g,"%2E"):String(G),ye=i(j)?typeof y=="function"?y(L,B):L:L+(O?"."+B:"["+B+"]");F.set(h,M);var Se=e();Se.set(p,F),s(ee,g(ie,ye,y,b,T,w,S,C,y==="comma"&&_&&i(j)?null:k,I,A,O,N,V,P,_,D,Se))}}return ee},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var b=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:b,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 Ru=function(g,h){var v=g,y=m(h),b,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,b=T);var w=[];if(typeof v!="object"||v===null)return"";var S=o[y.arrayFormat],C=S==="comma"&&y.commaRoundTrip;b||(b=Object.keys(v)),y.sort&&b.sort(y.sort);for(var k=e(),I=0;I<b.length;++I){var A=b[I],O=v[A];y.skipNulls&&O===null||s(w,f(O,A,S,C,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,k))}var N=w.join(y.delimiter),V=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},Ru}var ku,by;function i$(){if(by)return ku;by=1;var e=K1(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,y=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,T,w=m.charset;if(m.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),b=T,T=y.length);for(T=0;T<y.length;++T)if(T!==b){var S=y[T],C=S.indexOf("]="),k=C===-1?S.indexOf("="):C+1,I,A;k===-1?(I=m.decoder(S,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(S.slice(k+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),S.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var O=t.call(g,I);O&&m.duplicates==="combine"?g[I]=e.combine(g[I],A):(!O||m.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,m,h),b=p.length-1;b>=0;--b){var T,w=p[b];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,k=parseInt(C,10);!m.parseArrays&&C===""?T={0:y}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(T=[],T[k]=y):C!=="__proto__"&&(T[C]=y)}y=T}return y},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=b.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+v.slice(T.index)+"]")}return c(S,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return ku=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var b=v[y],T=u(b,g[b],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},ku}var Pu,wy;function a$(){if(wy)return Pu;wy=1;var e=o$(),t=i$(),n=Mp();return Pu={formats:n,parse:t,stringify:e},Pu}var s$=a$(),He;(function(e){e.assertEqual=o=>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"&&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})(He||(He={}));var Sy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Sy||(Sy={}));const fe=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ar=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=He.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 un 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 un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}un.create=e=>new un(e);const da=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let l$=da;function Md(){return l$}const Dd=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 ue(e,t){const n=Md(),r=Dd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===da?void 0:da].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 Ce;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 Ht.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 Ce;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 Ce=Object.freeze({status:"aborted"}),Ii=e=>({status:"dirty",value:e}),Gt=e=>({status:"valid",value:e}),Ty=e=>e.status==="aborted",Ey=e=>e.status==="dirty",Qo=e=>e.status==="valid",Ls=e=>typeof Promise<"u"&&e instanceof Promise;function Vs(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Z1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ge||(ge={}));var _i,Oi;class Ln{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cy=(e,t)=>{if(Qo(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 un(e.common.issues);return this._error=n,this._error}}};function Ae(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)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ne{get description(){return this._def.description}_getType(t){return ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ls(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){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return Cy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Qo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Qo(i)?{value:i.value}:{issues:o.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==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ls(o)?o:Promise.resolve(o));return Cy(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:re.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 Kn({schema:this,typeName:Te.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 Hn.create(this,this._def)}nullable(){return Jr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dn.create(this)}promise(){return pa.create(this,this._def)}or(t){return Bs.create([this,t],this._def)}and(t){return Hs.create(this,t,this._def)}transform(t){return new Kn({...Ae(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gs({...Ae(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new eS({typeName:Te.ZodBranded,type:this,...Ae(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ks({...Ae(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _l.create(this,t)}readonly(){return Zs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const c$=/^c[^\s-]{8,}$/i,u$=/^[0-9a-z]+$/,d$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,f$=/^[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,p$=/^[a-z0-9_-]{21}$/i,h$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,m$=/^[-+]?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)?)??$/,g$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,v$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Au;const y$=/^(?:(?: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])$/,x$=/^(?:(?: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])$/,b$=/^(([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]))$/,w$=/^(([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])$/,S$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,T$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X1="((\\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])))",E$=new RegExp(`^${X1}$`);function Q1(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function C$(e){return new RegExp(`^${Q1(e)}$`)}function R$(e){let t=`${X1}T${Q1(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 k$(e,t){return!!((t==="v4"||!t)&&y$.test(e)||(t==="v6"||!t)&&b$.test(e))}function P$(e,t){if(!h$.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||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function A$(e,t){return!!((t==="v4"||!t)&&x$.test(e)||(t==="v6"||!t)&&w$.test(e))}class Bn extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),Ce}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.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?ue(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")g$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Au||(Au=new RegExp(v$,"u")),Au.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")f$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")p$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")c$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")u$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")d$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:re.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),ue(o,{validation:"regex",code:re.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),ue(o,{code:re.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),ue(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?R$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?E$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?C$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?m$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?k$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?P$(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?A$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?S$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?T$.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ge.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ge.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ge.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ge.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ge.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ge.errToObj(n)})}nonempty(t){return this.min(1,ge.errToObj(t))}trim(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bn({...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}}Bn.create=e=>{var t;return new Bn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};function I$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Xr extends Ne{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)!==fe.number){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),Ce}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?I$(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:re.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.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"&&He.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)}}Xr.create=e=>new Xr({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class Jo extends Ne{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)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;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),ue(r,{code:re.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),ue(r,{code:re.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),ue(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),Ce}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.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}}Jo.create=e=>{var t;return new Jo({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ae(e)})};class jd extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),Ce}return Gt(t.data)}}jd.create=e=>new jd({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ae(e)});class fa extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),Ce}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:re.invalid_date}),Ce}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:re.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),ue(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ge.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}}fa.create=e=>new fa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ae(e)});class Nd extends Ne{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),Ce}return Gt(t.data)}}Nd.create=e=>new Nd({typeName:Te.ZodSymbol,...Ae(e)});class $s extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),Ce}return Gt(t.data)}}$s.create=e=>new $s({typeName:Te.ZodUndefined,...Ae(e)});class zs extends Ne{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),Ce}return Gt(t.data)}}zs.create=e=>new zs({typeName:Te.ZodNull,...Ae(e)});class Fd extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Gt(t.data)}}Fd.create=e=>new Fd({typeName:Te.ZodAny,...Ae(e)});class _o extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gt(t.data)}}_o.create=e=>new _o({typeName:Te.ZodUnknown,...Ae(e)});class gr extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),Ce}}gr.create=e=>new gr({typeName:Te.ZodNever,...Ae(e)});class Ld extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),Ce}return Gt(t.data)}}Ld.create=e=>new Ld({typeName:Te.ZodVoid,...Ae(e)});class Dn extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),Ce;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?re.too_big:re.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&&(ue(n,{code:re.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&&(ue(n,{code:re.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 Ln(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ln(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dn({...this._def,minLength:{value:t,message:ge.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ge.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ge.toString(n)}})}nonempty(t){return this.min(1,t)}}Dn.create=(e,t)=>new Dn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ae(t)});function yo(e){if(e instanceof vt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(yo(r))}return new vt({...e._def,shape:()=>t})}else return e instanceof Dn?new Dn({...e._def,type:yo(e.element)}):e instanceof Hn?Hn.create(yo(e.unwrap())):e instanceof Jr?Jr.create(yo(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>yo(t))):e}class vt extends Ne{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=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),Ce}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gr&&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 Ln(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){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&&(ue(o,{code:re.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 Ln(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new vt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ge.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(t){return new vt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new vt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new vt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new vt({...this._def,shape:()=>n})}deepPartial(){return yo(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new vt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hn;)i=i._def.innerType;n[r]=i}}),new vt({...this._def,shape:()=>n})}keyof(){return J1(He.objectKeys(this.shape))}}vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Ae(t)});class Bs extends Ne{_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 un(s.ctx.common.issues));return ue(n,{code:re.invalid_union,unionErrors:a}),Ce}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 un(l));return ue(n,{code:re.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}}Bs.create=(e,t)=>new Bs({options:e,typeName:Te.ZodUnion,...Ae(t)});const zn=e=>e instanceof qs?zn(e.schema):e instanceof Kn?zn(e.innerType()):e instanceof Us?[e.value]:e instanceof Qr?e.options:e instanceof Ys?He.objectValues(e.enum):e instanceof Gs?zn(e._def.innerType):e instanceof $s?[void 0]:e instanceof zs?[null]:e instanceof Hn?[void 0,...zn(e.unwrap())]:e instanceof Jr?[null,...zn(e.unwrap())]:e instanceof eS||e instanceof Zs?zn(e.unwrap()):e instanceof Ks?zn(e._def.innerType):[];class Dp extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),Ce;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=zn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ae(r)})}}function Vd(e,t){const n=ar(e),r=ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Vd(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.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=Vd(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hs extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Ty(i)||Ty(a))return Ce;const s=Vd(i.value,a.value);return s.valid?((Ey(i)||Ey(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:re.invalid_intersection_types}),Ce)};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}))}}Hs.create=(e,t,n)=>new Hs({left:e,right:t,typeName:Te.ZodIntersection,...Ae(n)});class Gn extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ue(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:re.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 Ln(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Gn({...this._def,rest:t})}}Gn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:e,typeName:Te.ZodTuple,rest:null,...Ae(t)})};class Ws extends Ne{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!==fe.object)return ue(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),Ce;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Ln(r,s,r.path,s)),value:a._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new Ws({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ae(r)}):new Ws({keyType:Bn.create(),valueType:t,typeName:Te.ZodRecord,...Ae(n)})}}class $d extends Ne{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!==fe.map)return ue(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),Ce;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ln(r,s,r.path,[c,"key"])),value:i._parse(new Ln(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 Ce;(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 Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}$d.create=(e,t,n)=>new $d({valueType:t,keyType:e,typeName:Te.ZodMap,...Ae(n)});class ei extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),Ce;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:re.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&&(ue(r,{code:re.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 Ce;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 Ln(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new ei({...this._def,minSize:{value:t,message:ge.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ae(t)});class Ui extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),Ce;function r(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),da].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return Dd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),da].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof pa){const s=this;return Gt(async function(...l){const c=new un([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Gt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new un([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ui({...this._def,args:Gn.create(t).rest(_o.create())})}returns(t){return new Ui({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ui({args:t||Gn.create([]).rest(_o.create()),returns:n||_o.create(),typeName:Te.ZodFunction,...Ae(r)})}}class qs extends Ne{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})}}qs.create=(e,t)=>new qs({getter:e,typeName:Te.ZodLazy,...Ae(t)});class Us extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:t.data}}get value(){return this._def.value}}Us.create=(e,t)=>new Us({value:e,typeName:Te.ZodLiteral,...Ae(t)});function J1(e,t){return new Qr({values:e,typeName:Te.ZodEnum,...Ae(t)})}class Qr extends Ne{constructor(){super(...arguments),_i.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:He.joinValues(r),received:n.parsedType,code:re.invalid_type}),Ce}if(Vs(this,_i)||Z1(this,_i,new Set(this._def.values)),!Vs(this,_i).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:re.invalid_enum_value,options:r}),Ce}return Gt(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 Qr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Qr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_i=new WeakMap;Qr.create=J1;class Ys extends Ne{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return ue(r,{expected:He.joinValues(o),received:r.parsedType,code:re.invalid_type}),Ce}if(Vs(this,Oi)||Z1(this,Oi,new Set(He.getValidEnumValues(this._def.values))),!Vs(this,Oi).has(t.data)){const o=He.objectValues(n);return ue(r,{received:r.data,code:re.invalid_enum_value,options:o}),Ce}return Gt(t.data)}get enum(){return this._def.values}}Oi=new WeakMap;Ys.create=(e,t)=>new Ys({values:e,typeName:Te.ZodNativeEnum,...Ae(t)});class pa extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),Ce;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Gt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}pa.create=(e,t)=>new pa({type:e,typeName:Te.ZodPromise,...Ae(t)});class Kn extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.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=>{ue(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 Ce;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ce:l.status==="dirty"||n.value==="dirty"?Ii(l.value):l});{if(n.value==="aborted")return Ce;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"||n.value==="dirty"?Ii(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"?Ce:(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"?Ce:(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(!Qo(a))return a;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=>Qo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,...Ae(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ae(n)});class Hn extends Ne{_parse(t){return this._getType(t)===fe.undefined?Gt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hn.create=(e,t)=>new Hn({innerType:e,typeName:Te.ZodOptional,...Ae(t)});class Jr extends Ne{_parse(t){return this._getType(t)===fe.null?Gt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:Te.ZodNullable,...Ae(t)});class Gs extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ae(t)});class Ks extends Ne{_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 Ls(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ks.create=(e,t)=>new Ks({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ae(t)});class zd extends Ne{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),Ce}return{status:"valid",value:t.data}}}zd.create=e=>new zd({typeName:Te.ZodNaN,...Ae(e)});class eS extends Ne{_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 _l extends Ne{_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"?Ce:i.status==="dirty"?(n.dirty(),Ii(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"?Ce: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 _l({in:t,out:n,typeName:Te.ZodPipeline})}}class Zs extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Qo(o)&&(o.value=Object.freeze(o.value)),o);return Ls(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Te.ZodReadonly,...Ae(t)});vt.lazycreate;var Te;(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"})(Te||(Te={}));Bn.create;Xr.create;zd.create;Jo.create;jd.create;fa.create;Nd.create;$s.create;zs.create;Fd.create;_o.create;gr.create;Ld.create;Dn.create;vt.create;vt.strictCreate;Bs.create;Dp.create;Hs.create;Gn.create;Ws.create;$d.create;ei.create;Ui.create;qs.create;Us.create;Qr.create;Ys.create;pa.create;Kn.create;Hn.create;Jr.create;Kn.createWithPreprocess;_l.create;const _$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},O$=(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]}}},tS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):tS(t),o=structuredClone(e);return O$(o,r,n),o},M$=(e,t)=>e.localeCompare(t),Ci={},nS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return rS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=nS(e._def.innerType);return t==="ZodArray"?n??[]:n}},rS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,nS(n)])),oS=(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]=oS(i,o):n[r]=o||i)}return n},D$={sort:M$,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},iS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return s$.parse(n.toString(),D$)},Dr=(e,t)=>tS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),sr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Iu=e=>{const t=e.dataset.target;if(!t)return sr(e);const n=document.querySelector(`[data-origin="${t}"]`);return sr(n||e)},j$={state:{},loading:!1,useOnChange:!1},Ry=e=>e.dataset.target||e.name,N$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=qi.LocalStorage.get(t);return _$(n)?n:{}},clear:()=>void qi.LocalStorage.delete(t),set:n=>qi.LocalStorage.set(t,n)}},F$=(e,t,n=j$)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>tt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??rS(e)??{}),l=E.useCallback(y=>{var I;const b=y.target,T=y.currentTarget;if(b.dataset.optional==="true")return;const S=Ry(b),C=Iu(b)||(T?sr(T):""),k=Dr(S,e);if(b.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),O=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(N=>hn(N??{},S,O))}},[]),c=E.useCallback(y=>b=>{const T=b.currentTarget,w=Object.values(i.current).reduce((C,k)=>{var V;const I=k.element,A=k.schema.safeParse(sr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const O=(V=A.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return hn(C,N,O)},{}),S=tt.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,b=Ci)=>{const T=Dr(y,e),w=S=>{var k;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>hn(I,y,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,S)};return{...b,loading:n.loading,name:y,id:y,onChange:w,form:t,date:tt.string(a[y])?new Date(a[y]):a[y],required:b.required??!T.isOptional(),error:r==null?void 0:r[y],ref:S=>{S!==null&&(i.current[y]={element:S,schema:T})}}},d=(y,b=Ci)=>{const T=Dr(y,e);return{...b,name:y,id:y,onChange:S=>{var k;const C=S.target.value;s(I=>hn(I,y,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,S)},form:t,loading:n.loading,onInvalid:l,error:Rr(r,y,void 0),value:Rr(a,y,void 0)||"",required:b.required??!T.isOptional(),ref:S=>S!==null?i.current[y]={element:S,schema:T}:void 0}},p=(y,b=Ci)=>{const T=Dr(y,e);return{...b,name:y,id:y,onChange:S=>{var k;const C=S.target.checked;s(I=>hn(I??{},y,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,S)},form:t,loading:n.loading,onInvalid:l,error:Rr(r,y,void 0),required:b.required??!T.isOptional(),ref:S=>S!==null?void(i.current[y]={element:S,schema:T}):void 0}},f=(y,b=Ci)=>{const T=Dr(y,e),w=S=>{var k,I;(k=S.persist)==null||k.call(S);const C=S.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,S),s(A=>hn(A,y,C))};return{...b,loading:n.loading,name:y,id:y,onChange:w,form:t,onInvalid:l,error:Rr(r,y,void 0),required:b.required??!T.isOptional(),value:Rr(a,y,void 0)||(b==null?void 0:b.value)||"",type:tt.instance(T,Xr)?"number":(b==null?void 0:b.type)??"text",ref:S=>S===null?void 0:i.current[y]={element:S,schema:T}}},m=(y,b=Ci)=>{const T=Dr(y,e),w=T._def.typeName==="ZodNumber";return{...b,name:y,id:y,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=w?C.target.valueAsNumber:C.target.value;(A=b==null?void 0:b.onChange)==null||A.call(b,C),s(O=>hn(O,y,k))},form:t,loading:n.loading,onInvalid:l,error:Rr(r,y,void 0),required:b.required??!T.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:Rr(a,y,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[y]={element:C,schema:T})}};E.useEffect(()=>{const y=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(sr(w)),C=O=>{var D;const N=Ry(O.target);if(!N)return!1;const V=O.target,P=Iu(O.target)||(O.relatedTarget?sr(O.relatedTarget):""),_=T.schema.safeParse(P);if(V.setAttribute("value",P),_.success)return w.setCustomValidity(""),o(F=>{if(tt.null(F))return null;const j=hn(F,N,void 0);return tt.empty(F)||tt.nil(F)||tt.empty(j)?null:j}),!1;if(w.required){const F=((D=_.error.issues[0])==null?void 0:D.message)||"";w.setCustomValidity(F),o(j=>{if(tt.null(j))return null;const z=hn(j,N,F||void 0);return tt.empty(z)?null:z})}return!1},k=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:k.signal});const A=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>k.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const g=y=>b=>{var A;b.preventDefault();const T=b.currentTarget;let w=iS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(O=>{if(O.tagName==="SELECT"){const N=O;w=hn(w,N.name,N.value)}if(O.tagName==="INPUT"){const N=O,V=Iu(N)||(N?sr(N):"");w=hn(w,N.dataset.target||N.name,V)}});const C=oS(w,a),k=e.safeParse(C),I=()=>{var O;G1(T),(O=n.interceptor)==null||O.clear()};if(k.success){const O=JSON.stringify(k.data);return T.setAttribute("data-json",O),(A=n.interceptor)==null||A.clear(),y==null?void 0:y(b,{form:T,event:b,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(b,{form:T,json:w,event:b,reset:I,data:w,success:!1,errors:k.error.issues.map(O=>({message:O.message,path:O.path.map(N=>String(N))}))})},h=y=>Ff(a,y)||"",v=y=>({...y,id:t,name:t});return E.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},L$=e=>e?JSON.parse(e.getAttribute("data-json")):{},V$=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},aS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},sS={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},lS={normal:"1",navbar:"19",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},$$={name:"dark",zIndex:lS,rounded:aS,spacing:sS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},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%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",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%)"}}}},z$={rounded:aS,spacing:sS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:lS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",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%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",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(221, 20%, 97%)",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%)"}}}},B$=$$,H$=z$,W$=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...ml,...e.tweaks},parser:e.parser||pl.hsla,map:{...hl,...e.map}}),[e]);return x.jsx(li.Provider,{value:t,children:e.children})},q$=()=>{const e=E.useContext(li);return e?e.parser:pl.hsla};exports.Alert=VA;exports.Autocomplete=LF;exports.Button=Oo;exports.Calendar=T0;exports.Card=Vf;exports.Checkbox=Ep;exports.ColType=Io;exports.Collapse=Ub;exports.ComponentsProvider=W$;exports.Context=li;exports.DatePicker=$F;exports.Dropdown=mi;exports.Empty=E0;exports.Expand=Dj;exports.FileUpload=J2;exports.Form=eL;exports.Input=Aa;exports.InputFeedback=l1;exports.InputField=Pa;exports.Menu=Fj;exports.MenuItem=Nj;exports.Modal=Kj;exports.MultiSelect=lL;exports.Notifications=DM;exports.Polymorph=cn;exports.Radiobox=cL;exports.RenderOnView=zT;exports.Select=Kr;exports.Slider=qL;exports.Stats=jM;exports.Switch=UL;exports.Tab=LM;exports.Table=n$;exports.Tabs=NM;exports.Tag=Ud;exports.TaskList=YL;exports.Textarea=GL;exports.Timeline=VM;exports.TimelineItem=yl;exports.Toolbar=Zj;exports.Tooltip=ip;exports.TransferList=XL;exports.createColumns=SV;exports.createCssProperties=kO;exports.createDesignTokens=y0;exports.createFormStorage=N$;exports.createOptionCols=Ip;exports.createStyles=EO;exports.createTheme=RO;exports.createTokenStyles=PO;exports.css=je;exports.defaultDarkTheme=B$;exports.defaultLightTheme=H$;exports.defaultTranslations=hl;exports.defaultTweaks=ml;exports.dispatchInput=Gy;exports.formReset=G1;exports.formToJson=iS;exports.getJsonForm=L$;exports.getSchemaShape=Dr;exports.hasVerticalScroll=Ky;exports.initializeInputDataset=ma;exports.isMobile=b0;exports.isReactComponent=NT;exports.isReactFC=FT;exports.isSsr=qr;exports.mergeRefs=el;exports.negate=IO;exports.noop=Lf;exports.parsers=pl;exports.path=Ff;exports.reduceTokens=jr;exports.safeRegex=rd;exports.splitInto=x0;exports.useColorParser=q$;exports.useForm=F$;exports.useLocale=Nf;exports.useNotification=OM;exports.usePrevious=V$;exports.useReactive=Y0;exports.useTablePreferences=CV;exports.useTranslations=_t;exports.uuid=ci;
197
197
  //# sourceMappingURL=index.js.map