@g4rcez/components 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/components/core/button.d.ts +36 -0
  2. package/dist/components/core/button.d.ts.map +1 -1
  3. package/dist/components/core/button.js +35 -0
  4. package/dist/components/display/notifications.d.ts.map +1 -1
  5. package/dist/components/display/notifications.js +10 -10
  6. package/dist/components/display/progress.d.ts +2 -0
  7. package/dist/components/display/progress.d.ts.map +1 -1
  8. package/dist/components/display/progress.js +1 -1
  9. package/dist/components/floating/menu.js +1 -1
  10. package/dist/components/floating/modal.d.ts.map +1 -1
  11. package/dist/components/floating/modal.js +18 -12
  12. package/dist/components/form/autocomplete.d.ts.map +1 -1
  13. package/dist/components/form/autocomplete.js +9 -8
  14. package/dist/components/form/input-field.js +1 -1
  15. package/dist/components/form/input.d.ts +34 -0
  16. package/dist/components/form/input.d.ts.map +1 -1
  17. package/dist/components/form/input.js +30 -0
  18. package/dist/hooks/use-form.d.ts +46 -0
  19. package/dist/hooks/use-form.d.ts.map +1 -1
  20. package/dist/hooks/use-form.js +52 -0
  21. package/dist/index.css +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +13645 -13437
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/index.umd.js +56 -56
  26. package/dist/index.umd.js.map +1 -1
  27. package/dist/preset/plugin.tailwind.d.ts +7 -4
  28. package/dist/preset/plugin.tailwind.d.ts.map +1 -1
  29. package/dist/preset/plugin.tailwind.js +20 -13
  30. package/dist/preset/src/styles/common.d.ts +1 -1
  31. package/dist/preset/src/styles/common.js +1 -1
  32. package/dist/styles/common.d.ts +1 -1
  33. package/dist/styles/common.js +1 -1
  34. package/package.json +7 -1
package/dist/index.umd.js CHANGED
@@ -1,185 +1,185 @@
1
- (function(ee,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ee=typeof globalThis<"u"?globalThis:ee||self,E(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,E,v,vi){"use strict";var rB=Object.defineProperty;var oB=(ee,E,v)=>E in ee?rB(ee,E,{enumerable:!0,configurable:!0,writable:!0,value:v}):ee[E]=v;var fe=(ee,E,v)=>oB(ee,typeof E!="symbol"?E+"":E,v);function Sp(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 P=Sp(E),Sa=Sp(vi);function Tp(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=Tp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ep(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tp(e))&&(r&&(r+=" "),r+=t);return r}const Cp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kp=Ep,ao=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return kp(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=Cp(u)||Cp(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 kp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Ap=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function TS(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 ml,Ip;function so(){return Ip||(Ip=1,ml=TypeError),ml}const ES=TS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var gl,_p;function Ta(){if(_p)return gl;_p=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,y=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,_=Array.prototype.slice,A=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function F(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var rt=W<0?-A(-W):A(W);if(rt!==W){var ft=String(rt),Ne=x.call(U,ft.length+1);return b.call(ft,Be,"$&_")+"."+b.call(b.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,Be,"$&_")}var H=ES,O=H.custom,B=Ee(O)?O:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};gl=function W(U,Be,rt,ft){var Ne=Be||{};if(le(Ne,"quoteStyle")&&!le(X,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(le(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var _r=le(Ne,"customInspect")?Ne.customInspect:!0;if(typeof _r!="boolean"&&_r!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(le(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(le(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var io=Ne.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return Me(U,Ne);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var sn=String(U);return io?F(U,sn):sn}if(typeof U=="bigint"){var Or=String(U)+"n";return io?F(U,Or):Or}var hp=typeof Ne.depth>"u"?5:Ne.depth;if(typeof rt>"u"&&(rt=0),rt>=hp&&hp>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var mi=Ar(Ne,rt);if(typeof ft>"u")ft=[];else if(Se(ft,U)>=0)return"[Circular]";function kn(gi,hl,nB){if(hl&&(ft=_.call(ft),ft.push(hl)),nB){var SS={depth:Ne.depth};return le(Ne,"quoteStyle")&&(SS.quoteStyle=Ne.quoteStyle),W(gi,SS,rt+1,ft)}return W(gi,Ne,rt+1,ft)}if(typeof U=="function"&&!z(U)){var mS=ce(U),gS=Ir(U,kn);return"[Function"+(mS?": "+mS:" (anonymous)")+"]"+(gS.length>0?" { "+k.call(gS,", ")+" }":"")}if(Ee(U)){var vS=I?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(U);return typeof U=="object"&&!I?Qe(vS):vS}if(he(U)){for(var wa="<"+w.call(String(U.nodeName)),mp=U.attributes||[],pl=0;pl<mp.length;pl++)wa+=" "+mp[pl].name+"="+J(G(mp[pl].value),"double",Ne);return wa+=">",U.childNodes&&U.childNodes.length&&(wa+="..."),wa+="</"+w.call(String(U.nodeName))+">",wa}if(Z(U)){if(U.length===0)return"[]";var gp=Ir(U,kn);return mi&&!Rn(gp)?"["+Pr(gp,mi)+"]":"[ "+k.call(gp,", ")+" ]"}if(K(U)){var vp=Ir(U,kn);return!("cause"in Error.prototype)&&"cause"in U&&!D.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+kn(U.cause),vp),", ")+" }":vp.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(vp,", ")+" }"}if(typeof U=="object"&&_r){if(B&&typeof U[B]=="function"&&H)return H(U,{depth:hp-rt});if(_r!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(oe(U)){var yS=[];return r&&r.call(U,function(gi,hl){yS.push(kn(hl,U,!0)+" => "+kn(gi,U))}),Cn("Map",n.call(U),yS,mi)}if(q(U)){var bS=[];return s&&s.call(U,function(gi){bS.push(kn(gi,U))}),Cn("Set",a.call(U),bS,mi)}if(ue(U))return jt("WeakMap");if(ne(U))return jt("WeakSet");if(te(U))return jt("WeakRef");if(R(U))return Qe(kn(Number(U)));if(Pe(U))return Qe(kn(L.call(U)));if(be(U))return Qe(m.call(U));if(ie(U))return Qe(kn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Ap<"u"&&U===Ap)return"{ [object globalThis] }";if(!j(U)&&!z(U)){var yp=Ir(U,kn),xS=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,bp=U instanceof Object?"":"null prototype",wS=!xS&&M&&Object(U)===U&&M in U?x.call(we(U),8,-1):bp?"Object":"",tB=xS||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",xp=tB+(wS||bp?"["+k.call(C.call([],wS||[],bp||[]),": ")+"] ":"");return yp.length===0?xp+"{}":mi?xp+"{"+Pr(yp,mi)+"}":xp+"{ "+k.call(yp,", ")+" }"}return String(U)};function J(W,U,Be){var rt=Be.quoteStyle||U,ft=X[rt];return ft+W+ft}function G(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!M||!(typeof W=="object"&&(M in W||typeof W[M]<"u"))}function Z(W){return we(W)==="[object Array]"&&Y(W)}function j(W){return we(W)==="[object Date]"&&Y(W)}function z(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ie(W){return we(W)==="[object String]"&&Y(W)}function R(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ee(W){if(I)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function Pe(W){if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}var ze=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return ze.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=y.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Be=0,rt=W.length;Be<rt;Be++)if(W[Be]===U)return Be;return-1}function oe(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function te(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function ne(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function he(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function Me(W,U){if(W.length>U.maxStringLength){var Be=W.length-U.maxStringLength,rt="... "+Be+" more character"+(Be>1?"s":"");return Me(x.call(W,0,U.maxStringLength),U)+rt}var ft=Q[U.quoteStyle||"single"];ft.lastIndex=0;var Ne=b.call(b.call(W,ft,"\\$1"),/[\x00-\x1f]/g,qe);return J(Ne,"single",U)}function qe(W){var U=W.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Be?"\\"+Be:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Qe(W){return"Object("+W+")"}function jt(W){return W+" { ? }"}function Cn(W,U,Be,rt){var ft=rt?Pr(Be,rt):k.call(Be,", ");return W+" ("+U+") {"+ft+"}"}function Rn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
2
- `)>=0)return!1;return!0}function Ar(W,U){var Be;if(W.indent===" ")Be=" ";else if(typeof W.indent=="number"&&W.indent>0)Be=k.call(Array(W.indent+1)," ");else return null;return{base:Be,prev:k.call(Array(U+1),Be)}}function Pr(W,U){if(W.length===0)return"";var Be=`
3
- `+U.prev+U.base;return Be+k.call(W,","+Be)+`
4
- `+U.prev}function Ir(W,U){var Be=Z(W),rt=[];if(Be){rt.length=W.length;for(var ft=0;ft<W.length;ft++)rt[ft]=le(W,ft)?U(W[ft],W):""}var Ne=typeof N=="function"?N(W):[],_r;if(I){_r={};for(var io=0;io<Ne.length;io++)_r["$"+Ne[io]]=Ne[io]}for(var sn in W)le(W,sn)&&(Be&&String(Number(sn))===sn&&sn<W.length||I&&_r["$"+sn]instanceof Symbol||(T.call(/[^\w$]/,sn)?rt.push(U(sn,W)+": "+U(W[sn],W)):rt.push(sn+": "+U(W[sn],W))));if(typeof N=="function")for(var Or=0;Or<Ne.length;Or++)D.call(W,Ne[Or])&&rt.push("["+U(Ne[Or])+"]: "+U(W[Ne[Or]],W));return rt}return gl}var vl,Op;function CS(){if(Op)return vl;Op=1;var e=Ta(),t=so(),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 vl=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},vl}var yl,Mp;function Dp(){return Mp||(Mp=1,yl=Object),yl}var bl,Np;function kS(){return Np||(Np=1,bl=Error),bl}var xl,Fp;function AS(){return Fp||(Fp=1,xl=EvalError),xl}var wl,Lp;function PS(){return Lp||(Lp=1,wl=RangeError),wl}var Sl,Vp;function IS(){return Vp||(Vp=1,Sl=ReferenceError),Sl}var Tl,$p;function _S(){return $p||($p=1,Tl=SyntaxError),Tl}var El,jp;function OS(){return jp||(jp=1,El=URIError),El}var Cl,zp;function MS(){return zp||(zp=1,Cl=Math.abs),Cl}var kl,Bp;function DS(){return Bp||(Bp=1,kl=Math.floor),kl}var Al,Rp;function NS(){return Rp||(Rp=1,Al=Math.max),Al}var Pl,Hp;function FS(){return Hp||(Hp=1,Pl=Math.min),Pl}var Il,Wp;function LS(){return Wp||(Wp=1,Il=Math.pow),Il}var _l,qp;function VS(){return qp||(qp=1,_l=Math.round),_l}var Ol,Up;function $S(){return Up||(Up=1,Ol=Number.isNaN||function(t){return t!==t}),Ol}var Ml,Kp;function jS(){if(Kp)return Ml;Kp=1;var e=$S();return Ml=function(n){return e(n)||n===0?n:n<0?-1:1},Ml}var Dl,Yp;function zS(){return Yp||(Yp=1,Dl=Object.getOwnPropertyDescriptor),Dl}var Nl,Gp;function Zp(){if(Gp)return Nl;Gp=1;var e=zS();if(e)try{e([],"length")}catch{e=null}return Nl=e,Nl}var Fl,Xp;function BS(){if(Xp)return Fl;Xp=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Fl=e,Fl}var Ll,Qp;function RS(){return Qp||(Qp=1,Ll=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}),Ll}var Vl,Jp;function HS(){if(Jp)return Vl;Jp=1;var e=typeof Symbol<"u"&&Symbol,t=RS();return Vl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Vl}var $l,eh;function th(){return eh||(eh=1,$l=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),$l}var jl,nh;function rh(){if(nh)return jl;nh=1;var e=Dp();return jl=e.getPrototypeOf||null,jl}var zl,oh;function WS(){if(oh)return zl;oh=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 zl=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 y=c.apply(this,o(u,arguments));return Object(y)===y?y: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},zl}var Bl,ih;function Ea(){if(ih)return Bl;ih=1;var e=WS();return Bl=Function.prototype.bind||e,Bl}var Rl,ah;function Hl(){return ah||(ah=1,Rl=Function.prototype.call),Rl}var Wl,sh;function lh(){return sh||(sh=1,Wl=Function.prototype.apply),Wl}var ql,ch;function qS(){return ch||(ch=1,ql=typeof Reflect<"u"&&Reflect&&Reflect.apply),ql}var Ul,uh;function US(){if(uh)return Ul;uh=1;var e=Ea(),t=lh(),n=Hl(),r=qS();return Ul=r||e.call(n,t),Ul}var Kl,dh;function fh(){if(dh)return Kl;dh=1;var e=Ea(),t=so(),n=Hl(),r=US();return Kl=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Kl}var Yl,ph;function KS(){if(ph)return Yl;ph=1;var e=fh(),t=Zp(),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 Yl=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Yl}var Gl,hh;function YS(){if(hh)return Gl;hh=1;var e=th(),t=rh(),n=KS();return Gl=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,Gl}var Zl,mh;function GS(){if(mh)return Zl;mh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ea();return Zl=n.call(e,t),Zl}var Xl,gh;function Ql(){if(gh)return Xl;gh=1;var e,t=Dp(),n=kS(),r=AS(),o=PS(),i=IS(),a=_S(),s=so(),l=OS(),c=MS(),u=DS(),d=NS(),p=FS(),f=LS(),m=VS(),g=jS(),h=Function,y=function(z){try{return h('"use strict"; return ('+z+").constructor;")()}catch{}},x=Zp(),b=BS(),S=function(){throw new s},w=x?function(){try{return arguments.callee,S}catch{try{return x(arguments,"callee").get}catch{return S}}}():S,T=HS()(),C=YS(),k=rh(),_=th(),A=lh(),L=Hl(),N={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&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%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%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"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%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%":L,"%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%":_};if(C)try{null.error}catch(z){var M=C(C(z));I["%Error.prototype%"]=M}var D=function z(K){var ie;if(K==="%AsyncFunction%")ie=y("async function () {}");else if(K==="%GeneratorFunction%")ie=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ie=y("async function* () {}");else if(K==="%AsyncGenerator%"){var R=z("%AsyncGeneratorFunction%");R&&(ie=R.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=z("%AsyncGenerator%");be&&C&&(ie=C(be.prototype))}return I[K]=ie,ie},V={__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"]},F=Ea(),H=GS(),O=F.call(L,Array.prototype.concat),B=F.call(A,Array.prototype.splice),X=F.call(L,String.prototype.replace),Q=F.call(L,String.prototype.slice),J=F.call(L,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ie=Q(K,0,1),R=Q(K,-1);if(ie==="%"&&R!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return X(K,G,function(Ee,Pe,ze,le){be[be.length]=ze?X(le,Y,"$1"):Pe||Ee}),be},j=function(K,ie){var R=K,be;if(H(V,R)&&(be=V[R],R="%"+be[0]+"%"),H(I,R)){var Ee=I[R];if(Ee===N&&(Ee=D(R)),typeof Ee>"u"&&!ie)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:R,value:Ee}}throw new a("intrinsic "+K+" does not exist!")};return Xl=function(K,ie){if(typeof K!="string"||K.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(J(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var R=Z(K),be=R.length>0?R[0]:"",Ee=j("%"+be+"%",ie),Pe=Ee.name,ze=Ee.value,le=!1,we=Ee.alias;we&&(be=we[0],B(R,O([0,1],we)));for(var ce=1,Se=!0;ce<R.length;ce+=1){var oe=R[ce],ue=Q(oe,0,1),te=Q(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||te==='"'||te==="'"||te==="`")&&ue!==te)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!Se)&&(le=!0),be+="."+oe,Pe="%"+be+"%",H(I,Pe))ze=I[Pe];else if(ze!=null){if(!(oe in ze)){if(!ie)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(x&&ce+1>=R.length){var q=x(ze,oe);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?ze=q.get:ze=ze[oe]}else Se=H(ze,oe),ze=ze[oe];Se&&!le&&(I[Pe]=ze)}}return ze},Xl}var Jl,vh;function yh(){if(vh)return Jl;vh=1;var e=Ql(),t=fh(),n=t([e("%String.prototype.indexOf%")]);return Jl=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Jl}var ec,bh;function xh(){if(bh)return ec;bh=1;var e=Ql(),t=yh(),n=Ta(),r=so(),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 ec=!!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},ec}var tc,wh;function ZS(){if(wh)return tc;wh=1;var e=Ql(),t=yh(),n=Ta(),r=xh(),o=so(),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 nc,Sh;function XS(){if(Sh)return nc;Sh=1;var e=so(),t=Ta(),n=CS(),r=xh(),o=ZS(),i=o||r||n;return nc=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},nc}var Th=e=>Array.isArray(e),rc=e=>e===void 0,oc=e=>e===null,QS=Function.bind.call(Function.call,Object.prototype.toString),JS=e=>!!e&&QS(e)==="[object Error]"||e instanceof Error,Eh=(e,t)=>e instanceof t,eT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},tT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Eh(e,Date),Fe={array:Th,date:tT,empty:e=>oc(e)||rc(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:Eh,isError:JS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>oc(e)||rc(e),null:oc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Th(e)&&typeof e=="object",primitive:eT,string:e=>typeof e=="string",undefined:rc},nT=e=>Object.keys(e),An=(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},rT=e=>e.replace(/[^0-9]/g,"");const ic="-",oT=e=>{const t=aT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(ic);return s[0]===""&&s.length!==1&&s.shift(),Ch(s,t)||iT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Ch=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ch(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(ic);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},kh=/^\[(.+)\]$/,iT=e=>{if(kh.test(e)){const t=kh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},aT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)ac(n[o],r,o,t);return r},ac=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ah(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(sT(o)){ac(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{ac(a,Ah(t,i),n,r)})})},Ah=(e,t)=>{let n=e;return t.split(ic).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},sT=e=>e.isThemeGetter,lT=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)}}},sc="!",lc=":",cT=lc.length,uT=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===lc){i.push(o.slice(l,m)),l=m+cT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=dT(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+lc,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},dT=e=>e.endsWith(sc)?e.substring(0,e.length-1):e.startsWith(sc)?e.substring(1):e,fT=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}},pT=e=>({cache:lT(e.cacheSize),parseClassName:uT(e),sortModifiers:fT(e),...oT(e)}),hT=/\s+/,mT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(hT);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,y=r(h?m.substring(0,g):m);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const x=i(p).join(":"),b=f?x+sc:x,S=b+y;if(a.includes(S))continue;a.push(S);const w=o(y,h);for(let T=0;T<w.length;++T){const C=w[T];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function gT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ph(t))&&(r&&(r+=" "),r+=n);return r}const Ph=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ph(e[r]))&&(n&&(n+=" "),n+=t);return n};function vT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=pT(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=mT(l,n);return o(l,u),u}return function(){return i(gT.apply(null,arguments))}}const Dt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ih=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_h=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yT=/^\d+\/\d+$/,bT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xT=/\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$/,wT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ST=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lo=e=>yT.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Mr=e=>!!e&&Number.isInteger(Number(e)),Oh=e=>e.endsWith("%")&&je(e.slice(0,-1)),Zn=e=>bT.test(e),ET=()=>!0,CT=e=>xT.test(e)&&!wT.test(e),cc=()=>!1,kT=e=>ST.test(e),AT=e=>TT.test(e),PT=e=>!me(e)&&!ge(e),IT=e=>co(e,Nh,cc),me=e=>Ih.test(e),Dr=e=>co(e,Fh,CT),uc=e=>co(e,zT,je),_T=e=>co(e,Mh,cc),OT=e=>co(e,Dh,AT),MT=e=>co(e,cc,kT),ge=e=>_h.test(e),Ca=e=>uo(e,Fh),DT=e=>uo(e,BT),NT=e=>uo(e,Mh),FT=e=>uo(e,Nh),LT=e=>uo(e,Dh),VT=e=>uo(e,RT,!0),co=(e,t,n)=>{const r=Ih.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},uo=(e,t,n=!1)=>{const r=_h.exec(e);return r?r[1]?t(r[1]):n:!1},Mh=e=>e==="position",$T=new Set(["image","url"]),Dh=e=>$T.has(e),jT=new Set(["length","size","percentage"]),Nh=e=>jT.has(e),Fh=e=>e==="length",zT=e=>e==="number",BT=e=>e==="family-name",RT=e=>e==="shadow",HT=vT(()=>{const e=Dt("color"),t=Dt("font"),n=Dt("text"),r=Dt("font-weight"),o=Dt("tracking"),i=Dt("leading"),a=Dt("breakpoint"),s=Dt("container"),l=Dt("spacing"),c=Dt("radius"),u=Dt("shadow"),d=Dt("inset-shadow"),p=Dt("drop-shadow"),f=Dt("blur"),m=Dt("perspective"),g=Dt("aspect"),h=Dt("ease"),y=Dt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ge,me,l],C=()=>[lo,"full","auto",...T()],k=()=>[Mr,"none","subgrid",ge,me],_=()=>["auto",{span:["full",Mr,ge,me]},ge,me],A=()=>[Mr,"auto",ge,me],L=()=>["auto","min","max","fr",ge,me],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],I=()=>["auto",...T()],M=()=>[lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],D=()=>[e,ge,me],V=()=>[Oh,Dr],F=()=>["","none","full",c,ge,me],H=()=>["",je,Ca,Dr],O=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,ge,me],Q=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],J=()=>["none",je,ge,me],G=()=>["none",je,ge,me],Y=()=>[je,ge,me],Z=()=>[lo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zn],breakpoint:[Zn],color:[ET],container:[Zn],"drop-shadow":[Zn],ease:["in","out","in-out"],font:[PT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zn],shadow:[Zn],spacing:["px",je],text:[Zn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lo,me,ge,g]}],container:["container"],columns:[{columns:[je,me,ge,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),me,ge]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],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:[Mr,"auto",ge,me]}],basis:[{basis:[lo,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,lo,"auto","initial","none",me]}],grow:[{grow:["",je,ge,me]}],shrink:[{shrink:["",je,ge,me]}],order:[{order:[Mr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:_()}],"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":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",n,Ca,Dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,uc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oh,me]}],"font-family":[{font:[DT,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[je,"none",ge,uc]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ge,Dr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[je,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),NT,_T]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",FT,IT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mr,ge,me],radial:["",ge,me],conic:[Mr,ge,me]},LT,OT]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"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:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ge,me]}],"outline-w":[{outline:["",je,Ca,Dr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,VT,MT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[je,Dr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[je,ge,me]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:X()}],brightness:[{brightness:[je,ge,me]}],contrast:[{contrast:[je,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",je,ge,me]}],"hue-rotate":[{"hue-rotate":[je,ge,me]}],invert:[{invert:["",je,ge,me]}],saturate:[{saturate:[je,ge,me]}],sepia:[{sepia:["",je,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[je,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[je,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",je,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[je,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[je,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ge,me]}],ease:[{ease:["linear","initial",h,ge,me]}],delay:[{delay:[je,ge,me]}],animate:[{animate:["none",y,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ge,me]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"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",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[je,Ca,Dr,uc]}],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","*","**"]}}),Hn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},WT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),dc=e=>Fe.function(e),Ce=(...e)=>HT(Ep(e)),Lh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},yi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Vh=e=>e.scrollHeight>e.clientHeight,bi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},qT=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},UT="span",ln=E.forwardRef(function(t,n){const r=t.as||UT;return v.jsx(r,{ref:n,...t,as:void 0})}),KT=ao("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ka=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 v.jsxs(ln,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Ce(KT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Xn=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function YT(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 GT=({children:e,...t})=>{const n=Xn(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:YT(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()},[]),v.jsx("div",{...t,ref:r,children:o?e:null})},ZT={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:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},XT=ao("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),QT=ao("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:ZT,defaultVariants:{theme:"primary",size:"default"}}),Aa=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return v.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ce(QT({size:a,theme:i}),t),children:[n?v.jsx("span",{"aria-hidden":"true",className:XT({theme:n})}):null,r,s.children]})}),xi=E.createContext({});function vn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const fc=typeof window<"u",Pa=fc?E.useLayoutEffect:E.useEffect,Ia=E.createContext(null);function pc(e,t){e.indexOf(t)===-1&&e.push(t)}function _a(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function JT([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Wn=(e,t,n)=>n>t?t:n<e?e:n;let fo=()=>{},Xt=()=>{};process.env.NODE_ENV!=="production"&&(fo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Xt=(e,t)=>{if(!e)throw new Error(t)});const qn={},$h=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jh(e){return typeof e=="object"&&e!==null}const zh=e=>/^0[^.\s]+$/u.test(e);function hc(e){let t;return()=>(t===void 0&&(t=e()),t)}const cn=e=>e,eE=(e,t)=>n=>t(e(n)),wi=(...e)=>e.reduce(eE),po=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class mc{constructor(){this.subscriptions=[]}add(t){return pc(this.subscriptions,t),()=>_a(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const un=e=>e*1e3,Pn=e=>e/1e3;function Bh(e,t){return t?e*(1e3/t):0}const Rh=new Set;function gc(e,t,n){e||Rh.has(t)||(console.warn(t),Rh.add(t))}const tE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},Hh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nE=1e-7,rE=12;function oE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Hh(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>nE&&++s<rE);return a}function Si(e,t,n,r){if(e===t&&n===r)return cn;const o=i=>oE(i,0,1,e,n);return i=>i===0||i===1?i:Hh(o(i),t,r)}const Wh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qh=e=>t=>1-e(1-t),Uh=Si(.33,1.53,.69,.99),vc=qh(Uh),Kh=Wh(vc),Yh=e=>(e*=2)<1?.5*vc(e):.5*(2-Math.pow(2,-10*(e-1))),yc=e=>1-Math.sin(Math.acos(e)),Gh=qh(yc),Zh=Wh(yc),iE=Si(.42,0,1,1),aE=Si(0,0,.58,1),Xh=Si(.42,0,.58,1),Qh=e=>Array.isArray(e)&&typeof e[0]!="number";function Jh(e,t){return Qh(e)?e[tE(0,e.length,t)]:e}const em=e=>Array.isArray(e)&&typeof e[0]=="number",tm={linear:cn,easeIn:iE,easeInOut:Xh,easeOut:aE,circIn:yc,circInOut:Zh,circOut:Gh,backIn:vc,backInOut:Kh,backOut:Uh,anticipate:Yh},sE=e=>typeof e=="string",bc=e=>{if(em(e)){Xt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Si(t,n,r,o)}else if(sE(e))return Xt(tm[e]!==void 0,`Invalid easing type '${e}'`),tm[e];return e},Oa=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function lE(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 cE=40;function nm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Oa.reduce((b,S)=>(b[S]=lE(i),b),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const b=qn.useManualTiming?o.timestamp:performance.now();n=!1,qn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,cE),1)),o.timestamp=b,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),f.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},h=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:Oa.reduce((b,S)=>{const w=a[S];return b[S]=(T,C=!1,k=!1)=>(n||h(),w.schedule(T,C,k)),b},{}),cancel:b=>{for(let S=0;S<Oa.length;S++)a[Oa[S]].cancel(b)},state:o,steps:a}}const{schedule:st,cancel:Un,state:Ft,steps:xc}=nm(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0);let Ma;function uE(){Ma=void 0}const Kt={now:()=>(Ma===void 0&&Kt.set(Ft.isProcessing||qn.useManualTiming?Ft.timestamp:performance.now()),Ma),set:e=>{Ma=e,queueMicrotask(uE)}},rm=e=>t=>typeof t=="string"&&t.startsWith(e),wc=rm("--"),dE=rm("var(--"),Sc=e=>dE(e)?fE.test(e.split("/*")[0].trim()):!1,fE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ho={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ti={...ho,transform:e=>Wn(0,1,e)},Da={...ho,default:1},Ei=e=>Math.round(e*1e5)/1e5,Tc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pE(e){return e==null}const hE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ec=(e,t)=>n=>!!(typeof n=="string"&&hE.test(n)&&n.startsWith(e)||t&&!pE(n)&&Object.prototype.hasOwnProperty.call(n,t)),om=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Tc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},mE=e=>Wn(0,255,e),Cc={...ho,transform:e=>Math.round(mE(e))},Nr={test:Ec("rgb","red"),parse:om("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cc.transform(e)+", "+Cc.transform(t)+", "+Cc.transform(n)+", "+Ei(Ti.transform(r))+")"};function gE(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 kc={test:Ec("#"),parse:gE,transform:Nr.transform},Ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qn=Ci("deg"),In=Ci("%"),Te=Ci("px"),vE=Ci("vh"),yE=Ci("vw"),im={...In,parse:e=>In.parse(e)/100,transform:e=>In.transform(e*100)},mo={test:Ec("hsl","hue"),parse:om("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+In.transform(Ei(t))+", "+In.transform(Ei(n))+", "+Ei(Ti.transform(r))+")"},kt={test:e=>Nr.test(e)||kc.test(e)||mo.test(e),parse:e=>Nr.test(e)?Nr.parse(e):mo.test(e)?mo.parse(e):kc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Nr.transform(e):mo.transform(e),getAnimatableNone:e=>{const t=kt.parse(e);return t.alpha=0,kt.transform(t)}},bE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tc))==null?void 0:t.length)||0)+(((n=e.match(bE))==null?void 0:n.length)||0)>0}const am="number",sm="color",wE="var",SE="var(",lm="${}",TE=/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 ki(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(TE,l=>(kt.test(l)?(r.color.push(i),o.push(sm),n.push(kt.parse(l))):l.startsWith(SE)?(r.var.push(i),o.push(wE),n.push(l)):(r.number.push(i),o.push(am),n.push(parseFloat(l))),++i,lm)).split(lm);return{values:n,split:s,indexes:r,types:o}}function cm(e){return ki(e).values}function um(e){const{split:t,types:n}=ki(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===am?i+=Ei(o[a]):s===sm?i+=kt.transform(o[a]):i+=o[a]}return i}}const EE=e=>typeof e=="number"?0:kt.test(e)?kt.getAnimatableNone(e):e;function CE(e){const t=cm(e);return um(e)(t.map(EE))}const Jn={test:xE,parse:cm,createTransformer:um,getAnimatableNone:CE};function Ac(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 kE({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=Ac(l,s,e+1/3),i=Ac(l,s,e),a=Ac(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Na(e,t){return n=>n>0?t:e}const lt=(e,t,n)=>e+(t-e)*n,Pc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},AE=[kc,Nr,mo],PE=e=>AE.find(t=>t.test(e));function dm(e){const t=PE(e);if(fo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===mo&&(n=kE(n)),n}const fm=(e,t)=>{const n=dm(e),r=dm(t);if(!n||!r)return Na(e,t);const o={...n};return i=>(o.red=Pc(n.red,r.red,i),o.green=Pc(n.green,r.green,i),o.blue=Pc(n.blue,r.blue,i),o.alpha=lt(n.alpha,r.alpha,i),Nr.transform(o))},Ic=new Set(["none","hidden"]);function IE(e,t){return Ic.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _E(e,t){return n=>lt(e,t,n)}function _c(e){return typeof e=="number"?_E:typeof e=="string"?Sc(e)?Na:kt.test(e)?fm:DE:Array.isArray(e)?pm:typeof e=="object"?kt.test(e)?fm:OE:Na}function pm(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>_c(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function OE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=_c(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function ME(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const DE=(e,t)=>{const n=Jn.createTransformer(t),r=ki(e),o=ki(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?Ic.has(e)&&!o.values.length||Ic.has(t)&&!r.values.length?IE(e,t):wi(pm(ME(r,o),o.values),n):(fo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Na(e,t))};function hm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):_c(e)(e,t)}const NE=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>st.update(t,n),stop:()=>Un(t),now:()=>Ft.isProcessing?Ft.timestamp:Kt.now()}},mm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Fa=2e4;function Oc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Fa;)t+=n,r=e.next(t);return t>=Fa?1/0:t}function gm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Oc(r),Fa);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Pn(o)}}const FE=5;function vm(e,t,n){const r=Math.max(t-FE,0);return Bh(n-e(r),t-r)}const mt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ym=.001;function LE({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;fo(e<=un(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Wn(mt.minDamping,mt.maxDamping,a),e=Wn(mt.minDuration,mt.maxDuration,Pn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Mc(c,a),m=Math.exp(-d);return ym-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=Mc(Math.pow(c,2),a);return(-o(c)+ym>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=$E(o,i,s);if(e=un(e),isNaN(l))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const VE=12;function $E(e,t,n){let r=n;for(let o=1;o<VE;o++)r=r-e(r)/t(r);return r}function Mc(e,t){return e*Math.sqrt(1-t*t)}const jE=["duration","bounce"],zE=["stiffness","damping","mass"];function bm(e,t){return t.some(n=>e[n]!==void 0)}function BE(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!bm(e,zE)&&bm(e,jE))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=LE(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Ai(e=mt.visualDuration,t=mt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=BE({...n,velocity:-Pn(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,y=Pn(Math.sqrt(l/u)),x=Math.abs(h)<5;r||(r=x?mt.restSpeed.granular:mt.restSpeed.default),o||(o=x?mt.restDelta.granular:mt.restDelta.default);let b;if(g<1){const w=Mc(y,g);b=T=>{const C=Math.exp(-g*y*T);return a-C*((m+g*y*h)/w*Math.sin(w*T)+h*Math.cos(w*T))}}else if(g===1)b=w=>a-Math.exp(-y*w)*(h+(m+y*h)*w);else{const w=y*Math.sqrt(g*g-1);b=T=>{const C=Math.exp(-g*y*T),k=Math.min(w*T,300);return a-C*((m+g*y*h)*Math.sinh(k)+w*h*Math.cosh(k))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const T=b(w);if(f)s.done=w>=d;else{let C=w===0?m:0;g<1&&(C=w===0?un(m):vm(b,w,T));const k=Math.abs(C)<=r,_=Math.abs(a-T)<=o;s.done=k&&_}return s.value=s.done?a:T,s},toString:()=>{const w=Math.min(Oc(S),Fa),T=mm(C=>S.next(w*C).value,w,30);return w+"ms "+T},toTransition:()=>{}};return S}Ai.applyToOptions=e=>{const t=gm(e,100,Ai);return e.ease=t.ease,e.duration=un(t.duration),e.type="keyframes",e};function Dc({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,y=a===void 0?h:a(h);y!==h&&(g=y-d);const x=k=>-g*Math.exp(-k/r),b=k=>y+x(k),S=k=>{const _=x(k),A=b(k);p.done=Math.abs(_)<=c,p.value=p.done?y:A};let w,T;const C=k=>{f(p.value)&&(w=k,T=Ai({keyframes:[p.value,m(p.value)],velocity:vm(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let _=!1;return!T&&w===void 0&&(_=!0,S(k),C(k)),w!==void 0&&k>=w?T.next(k-w):(!_&&S(k),p)}}}function RE(e,t,n){const r=[],o=n||qn.mix||hm,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]||cn:t;s=wi(l,s)}r.push(s)}return r}function xm(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Xt(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=RE(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=po(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Wn(e[0],e[i-1],u)):c}function wm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=po(0,t,r);e.push(lt(n,1,o))}}function Sm(e){const t=[0];return wm(t,e.length-1),t}function HE(e,t){return e.map(n=>n*t)}function WE(e,t){return e.map(()=>t||Xh).splice(0,e.length-1)}function go({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Qh(r)?r.map(bc):bc(r),i={done:!1,value:t[0]},a=HE(n&&n.length===t.length?n:Sm(t),e),s=xm(a,t,{ease:Array.isArray(o)?o:WE(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const qE=e=>e!==null;function Nc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(qE),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const UE={decay:Dc,inertia:Dc,tween:go,keyframes:go,spring:Ai};function Tm(e){typeof e.type=="string"&&(e.type=UE[e.type])}class Fc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const KE=e=>e/100;class Lc extends Fc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Kt.now()&&this.tick(Kt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Tm(t);const{type:n=go,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||go;process.env.NODE_ENV!=="production"&&l!==go&&Xt(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==go&&typeof s[0]!="number"&&(this.mixKeyframes=wi(KE,hm(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Oc(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:f,type:m,onUpdate:g,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,S=r;if(d){const k=Math.min(this.currentTime,o)/s;let _=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&_--,_=Math.min(_,d+1),!!(_%2)&&(p==="reverse"?(A=1-A,f&&(A-=f/s)):p==="mirror"&&(S=a)),b=Wn(0,1,A)*s}const w=x?{done:!1,value:u[0]}:S.next(b);i&&(w.value=i(w.value));let{done:T}=w;!x&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&m!==Dc&&(w.value=Nc(u,this.options,h,this.speed)),g&&g(w.value),C&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Pn(this.calculatedDuration)}get time(){return Pn(this.currentTime)}set time(t){var n;t=un(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Kt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pn(this.currentTime))}play(){var o,i;if(this.isStopped)return;const{driver:t=NE,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(i=(o=this.options).onPlay)==null||i.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Kt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function YE(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Fr=e=>e*180/Math.PI,Vc=e=>{const t=Fr(Math.atan2(e[1],e[0]));return $c(t)},GE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vc,rotateZ:Vc,skewX:e=>Fr(Math.atan(e[1])),skewY:e=>Fr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$c=e=>(e=e%360,e<0&&(e+=360),e),Em=Vc,Cm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),km=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ZE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cm,scaleY:km,scale:e=>(Cm(e)+km(e))/2,rotateX:e=>$c(Fr(Math.atan2(e[6],e[5]))),rotateY:e=>$c(Fr(Math.atan2(-e[2],e[0]))),rotateZ:Em,rotate:Em,skewX:e=>Fr(Math.atan(e[4])),skewY:e=>Fr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function jc(e){return e.includes("scale")?1:0}function zc(e,t){if(!e||e==="none")return jc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ZE,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=GE,o=s}if(!o)return jc(t);const i=r[t],a=o[1].split(",").map(QE);return typeof i=="function"?i(a):a[i]}const XE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return zc(n,t)};function QE(e){return parseFloat(e.trim())}const vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=new Set(vo),Am=e=>e===ho||e===Te,JE=new Set(["x","y","z"]),eC=vo.filter(e=>!JE.has(e));function tC(e){const t=[];return eC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Lr={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})=>zc(t,"x"),y:(e,{transform:t})=>zc(t,"y")};Lr.translateX=Lr.x,Lr.translateY=Lr.y;const Vr=new Set;let Bc=!1,Rc=!1,Hc=!1;function Pm(){if(Rc){const e=Array.from(Vr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=tC(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.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Rc=!1,Bc=!1,Vr.forEach(e=>e.complete(Hc)),Vr.clear()}function Im(){Vr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rc=!0)})}function nC(){Hc=!0,Im(),Pm(),Hc=!1}class Wc{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Vr.add(this),Bc||(Bc=!0,st.read(Im),st.resolveKeyframes(Pm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}YE(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Vr.delete(this)}cancel(){this.state==="scheduled"&&(Vr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const rC=e=>e.startsWith("--");function oC(e,t,n){rC(t)?e.style.setProperty(t,n):e.style[t]=n}const iC=hc(()=>window.ScrollTimeline!==void 0),aC={};function sC(e,t){const n=hc(e);return()=>aC[t]??n()}const _m=sC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Om={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pi([0,.65,.55,1]),circOut:Pi([.55,0,1,.45]),backIn:Pi([.31,.01,.66,-.59]),backOut:Pi([.33,1.53,.69,.99])};function Mm(e,t){if(e)return typeof e=="function"?_m()?mm(e,t):"ease-out":em(e)?Pi(e):Array.isArray(e)?e.map(n=>Mm(n,t)||Om.easeOut):Om[e]}function lC(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Mm(s,o);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(u,p)}function qc(e){return typeof e=="function"&&"applyToOptions"in e}function cC({type:e,...t}){return qc(e)&&_m()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class uC extends Fc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,Xt(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=cC(t);this.animation=lC(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Nc(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):oC(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Pn(Number(t))}get time(){return Pn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=un(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&iC()?(this.animation.timeline=t,cn):n(this)}}const Dm={anticipate:Yh,backInOut:Kh,circInOut:Zh};function dC(e){return e in Dm}function fC(e){typeof e.ease=="string"&&dC(e.ease)&&(e.ease=Dm[e.ease])}const Nm=10;class pC extends uC{constructor(t){fC(t),Tm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Lc({...a,autoplay:!1}),l=un(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-Nm).value,s.sample(l).value,Nm),s.stop()}}const Fm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function hC(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 mC(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=Fm(o,t),s=Fm(i,t);return fo(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:hC(e)||(n==="spring"||qc(n))&&r}function Uc(e){return jh(e)&&"offsetHeight"in e}const gC=new Set(["opacity","clipPath","filter","transform"]),vC=hc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function yC(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!Uc((c=t==null?void 0:t.owner)==null?void 0:c.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return vC()&&n&&gC.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const bC=40;class xC extends Fc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var g,h;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(h=this.keyframeResolver)==null||h.cancel()},this.createdAt=Kt.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=(u==null?void 0:u.KeyframeResolver)||Wc;this.keyframeResolver=new f(s,(g,h,y)=>this.onKeyframesResolved(g,h,p,!y),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Kt.now(),mC(t,i,a,s)||((qn.instantAnimations||!l)&&(u==null||u(Nc(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>bC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&yC(p)?new pC({...p,element:p.motionValue.owner.current}):new Lc(p);f.finished.then(()=>this.notifyFinished()).catch(cn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),nC()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}class wC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class SC extends wC{then(t,n){return this.finished.finally(t).then(()=>{})}}const TC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function EC(e){const t=TC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const CC=4;function Lm(e,t,n=1){Xt(n<=CC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=EC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return $h(a)?parseFloat(a):a}return Sc(o)?Lm(o,t,n+1):o}function Kc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Vm=new Set(["width","height","top","left","right","bottom",...vo]),kC={test:e=>e==="auto",parse:e=>e},$m=e=>t=>t.test(e),jm=[ho,Te,In,Qn,yE,vE,kC],zm=e=>jm.find($m(e));function AC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zh(e):!0}const PC=new Set(["brightness","contrast","saturate","opacity"]);function IC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tc)||[];if(!r)return e;const o=n.replace(r,"");let i=PC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const _C=/\b([a-z-]*)\(.*?\)/gu,Yc={...Jn,getAnimatableNone:e=>{const t=e.match(_C);return t?t.map(IC).join(" "):e}},Bm={...ho,transform:Math.round},Gc={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,backgroundPositionX:Te,backgroundPositionY:Te,...{rotate:Qn,rotateX:Qn,rotateY:Qn,rotateZ:Qn,scale:Da,scaleX:Da,scaleY:Da,scaleZ:Da,skew:Qn,skewX:Qn,skewY:Qn,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Ti,originX:im,originY:im,originZ:Te},zIndex:Bm,fillOpacity:Ti,strokeOpacity:Ti,numOctaves:Bm},OC={...Gc,color:kt,backgroundColor:kt,outlineColor:kt,fill:kt,stroke:kt,borderColor:kt,borderTopColor:kt,borderRightColor:kt,borderBottomColor:kt,borderLeftColor:kt,filter:Yc,WebkitFilter:Yc},Rm=e=>OC[e];function Hm(e,t){let n=Rm(e);return n!==Yc&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const MC=new Set(["auto","none","0"]);function DC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!MC.has(i)&&ki(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Hm(n,o)}class NC extends Wc{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(),Sc(c))){const u=Lm(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Vm.has(r)||t.length!==2)return;const[o,i]=t,a=zm(o),s=zm(i);if(a!==s)if(Am(a)&&Am(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Lr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||AC(t[o]))&&r.push(o);r.length&&DC(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=Lr[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 s;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Lr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(s=this.removedTransforms)!=null&&s.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Wm(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const qm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Um=30,FC=e=>!isNaN(parseFloat(e)),Ii={current:void 0};class LC{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{var a,s;const i=Kt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();o&&((s=this.events.renderRequest)==null||s.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Kt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=FC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gc(!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 mc);const r=this.events[t].add(n);return t==="change"?()=>{r(),st.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ii.current&&Ii.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Kt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Um)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Um);return Bh(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $r(e,t){return new LC(e,t)}const{schedule:Zc}=nm(queueMicrotask,!1),yn={x:!1,y:!1};function Km(){return yn.x||yn.y}function VC(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}function Ym(e,t){const n=Wm(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Gm(e){return!(e.pointerType==="touch"||Km())}function $C(e,t,n={}){const[r,o,i]=Ym(e,n),a=s=>{if(!Gm(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Gm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const Zm=(e,t)=>t?e===t?!0:Zm(e,t.parentElement):!1,Xc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zC(e){return jC.has(e.tagName)||e.tabIndex!==-1}const La=new WeakSet;function Xm(e){return t=>{t.key==="Enter"&&e(t)}}function Qc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Xm(()=>{if(La.has(n))return;Qc(n,"down");const o=Xm(()=>{Qc(n,"up")}),i=()=>Qc(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 Xc(e)&&!Km()}function RC(e,t,n={}){const[r,o,i]=Ym(e,n),a=s=>{const l=s.currentTarget;if(!Qm(s))return;La.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),La.has(l)&&La.delete(l),Qm(f)&&typeof c=="function"&&c(f,{success:m})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Zm(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),Uc(s)&&(s.addEventListener("focus",c=>BC(c,o)),!zC(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function Jc(e){return jh(e)&&"ownerSVGElement"in e}function Jm(e){return Jc(e)&&e.tagName==="svg"}function HC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=xm(o,i,a);return t?s(r):s}const At=e=>!!(e&&e.getVelocity),WC=[...jm,kt,Jn],qC=e=>WC.find($m(e)),bo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class UC extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Uc(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function KC({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(bo);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
+ (function(re,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(re=typeof globalThis<"u"?globalThis:re||self,S(re.components={},re.React,re["react/jsx-runtime"],re.ReactDOM))})(this,function(re,S,v,fi){"use strict";function _p(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 P=_p(S),pi=_p(fi);function Op(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=Op(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Op(e))&&(r&&(r+=" "),r+=t);return r}const Dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Np=Mp,io=(e,t)=>n=>{var r;if(t?.variants==null)return Np(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const h=Dp(u)||Dp(d);return o[c][h]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(b=>{let[m,p]=b;return Array.isArray(p)?p.includes({...i,...s}[m]):{...i,...s}[m]===p})?[...c,d,h]:c},[]);return Np(e,a,l,n?.class,n?.className)};var Fp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function HS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Sl,Vp;function ao(){return Vp||(Vp=1,Sl=TypeError),Sl}const WS=HS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Tl,$p;function wa(){if($p)return Tl;$p=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,h=typeof WeakRef=="function"&&WeakRef.prototype,f=h?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,m=Object.prototype.toString,p=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,M=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,V=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function A(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||E.call(/e/,U))return U;var Fe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Xe=W<0?-_(-W):_(W);if(Xe!==W){var nt=String(Xe),Me=y.call(U,nt.length+1);return x.call(nt,Fe,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(U,Fe,"$&_")}var j=WS,N=j.custom,q=ce(N)?N:null,R={__proto__:null,double:'"',single:"'"},Y={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Tl=function W(U,Fe,Xe,nt){var Me=Fe||{};if(Te(Me,"quoteStyle")&&!Te(R,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Te(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ir=Te(Me,"customInspect")?Me.customInspect:!0;if(typeof Ir!="boolean"&&Ir!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Te(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Te(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var oo=Me.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return ye(U,Me);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var cn=String(U);return oo?A(U,cn):cn}if(typeof U=="bigint"){var _r=String(U)+"n";return oo?A(U,_r):_r}var Sp=typeof Me.depth>"u"?5:Me.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=Sp&&Sp>0&&typeof U=="object")return ee(U)?"[Array]":"[Object]";var ui=qn(Me,Xe);if(typeof nt>"u")nt=[];else if(be(nt,U)>=0)return"[Circular]";function An(di,wl,PR){if(wl&&(nt=M.call(nt),nt.push(wl)),PR){var BS={depth:Me.depth};return Te(Me,"quoteStyle")&&(BS.quoteStyle=Me.quoteStyle),W(di,BS,Xe+1,nt)}return W(di,Me,Xe+1,nt)}if(typeof U=="function"&&!K(U)){var FS=we(U),LS=Pn(U,An);return"[Function"+(FS?": "+FS:" (anonymous)")+"]"+(LS.length>0?" { "+C.call(LS,", ")+" }":"")}if(ce(U)){var VS=I?x.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):H.call(U);return typeof U=="object"&&!I?st(VS):VS}if(de(U)){for(var xa="<"+w.call(String(U.nodeName)),Tp=U.attributes||[],xl=0;xl<Tp.length;xl++)xa+=" "+Tp[xl].name+"="+X(oe(Tp[xl].value),"double",Me);return xa+=">",U.childNodes&&U.childNodes.length&&(xa+="..."),xa+="</"+w.call(String(U.nodeName))+">",xa}if(ee(U)){if(U.length===0)return"[]";var Ep=Pn(U,An);return ui&&!Yt(Ep)?"["+Cn(Ep,ui)+"]":"[ "+C.call(Ep,", ")+" ]"}if(G(U)){var kp=Pn(U,An);return!("cause"in Error.prototype)&&"cause"in U&&!V.call(U,"cause")?"{ ["+String(U)+"] "+C.call(k.call("[cause]: "+An(U.cause),kp),", ")+" }":kp.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+C.call(kp,", ")+" }"}if(typeof U=="object"&&Ir){if(q&&typeof U[q]=="function"&&j)return j(U,{depth:Sp-Xe});if(Ir!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(Re(U)){var $S=[];return r&&r.call(U,function(di,wl){$S.push(An(wl,U,!0)+" => "+An(di,U))}),xt("Map",n.call(U),$S,ui)}if($(U)){var jS=[];return s&&s.call(U,function(di){jS.push(An(di,U))}),xt("Set",a.call(U),jS,ui)}if(te(U))return Lt("WeakMap");if(J(U))return Lt("WeakSet");if(Z(U))return Lt("WeakRef");if(B(U))return st(An(Number(U)));if(xe(U))return st(An(F.call(U)));if(se(U))return st(b.call(U));if(Q(U))return st(An(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Fp<"u"&&U===Fp)return"{ [object globalThis] }";if(!z(U)&&!K(U)){var Cp=Pn(U,An),zS=D?D(U)===Object.prototype:U instanceof Object||U.constructor===Object,Pp=U instanceof Object?"":"null prototype",RS=!zS&&O&&Object(U)===U&&O in U?y.call(Ae(U),8,-1):Pp?"Object":"",CR=zS||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Ap=CR+(RS||Pp?"["+C.call(k.call([],RS||[],Pp||[]),": ")+"] ":"");return Cp.length===0?Ap+"{}":ui?Ap+"{"+Cn(Cp,ui)+"}":Ap+"{ "+C.call(Cp,", ")+" }"}return String(U)};function X(W,U,Fe){var Xe=Fe.quoteStyle||U,nt=R[Xe];return nt+W+nt}function oe(W){return x.call(String(W),/"/g,"&quot;")}function ne(W){return!O||!(typeof W=="object"&&(O in W||typeof W[O]<"u"))}function ee(W){return Ae(W)==="[object Array]"&&ne(W)}function z(W){return Ae(W)==="[object Date]"&&ne(W)}function K(W){return Ae(W)==="[object RegExp]"&&ne(W)}function G(W){return Ae(W)==="[object Error]"&&ne(W)}function Q(W){return Ae(W)==="[object String]"&&ne(W)}function B(W){return Ae(W)==="[object Number]"&&ne(W)}function se(W){return Ae(W)==="[object Boolean]"&&ne(W)}function ce(W){if(I)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!H)return!1;try{return H.call(W),!0}catch{}return!1}function xe(W){if(!W||typeof W!="object"||!F)return!1;try{return F.call(W),!0}catch{}return!1}var Se=Object.prototype.hasOwnProperty||function(W){return W in this};function Te(W,U){return Se.call(W,U)}function Ae(W){return m.call(W)}function we(W){if(W.name)return W.name;var U=g.call(p.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function be(W,U){if(W.indexOf)return W.indexOf(U);for(var Fe=0,Xe=W.length;Fe<Xe;Fe++)if(W[Fe]===U)return Fe;return-1}function Re(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function te(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function Z(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function $(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function J(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function de(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function ye(W,U){if(W.length>U.maxStringLength){var Fe=W.length-U.maxStringLength,Xe="... "+Fe+" more character"+(Fe>1?"s":"");return ye(y.call(W,0,U.maxStringLength),U)+Xe}var nt=Y[U.quoteStyle||"single"];nt.lastIndex=0;var Me=x.call(x.call(W,nt,"\\$1"),/[\x00-\x1f]/g,Ne);return X(Me,"single",U)}function Ne(W){var U=W.charCodeAt(0),Fe={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Fe?"\\"+Fe:"\\x"+(U<16?"0":"")+T.call(U.toString(16))}function st(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function xt(W,U,Fe,Xe){var nt=Xe?Cn(Fe,Xe):C.call(Fe,", ");return W+" ("+U+") {"+nt+"}"}function Yt(W){for(var U=0;U<W.length;U++)if(be(W[U],`
2
+ `)>=0)return!1;return!0}function qn(W,U){var Fe;if(W.indent===" ")Fe=" ";else if(typeof W.indent=="number"&&W.indent>0)Fe=C.call(Array(W.indent+1)," ");else return null;return{base:Fe,prev:C.call(Array(U+1),Fe)}}function Cn(W,U){if(W.length===0)return"";var Fe=`
3
+ `+U.prev+U.base;return Fe+C.call(W,","+Fe)+`
4
+ `+U.prev}function Pn(W,U){var Fe=ee(W),Xe=[];if(Fe){Xe.length=W.length;for(var nt=0;nt<W.length;nt++)Xe[nt]=Te(W,nt)?U(W[nt],W):""}var Me=typeof L=="function"?L(W):[],Ir;if(I){Ir={};for(var oo=0;oo<Me.length;oo++)Ir["$"+Me[oo]]=Me[oo]}for(var cn in W)Te(W,cn)&&(Fe&&String(Number(cn))===cn&&cn<W.length||I&&Ir["$"+cn]instanceof Symbol||(E.call(/[^\w$]/,cn)?Xe.push(U(cn,W)+": "+U(W[cn],W)):Xe.push(cn+": "+U(W[cn],W))));if(typeof L=="function")for(var _r=0;_r<Me.length;_r++)V.call(W,Me[_r])&&Xe.push("["+U(Me[_r])+"]: "+U(W[Me[_r]],W));return Xe}return Tl}var El,jp;function qS(){if(jp)return El;jp=1;var e=wa(),t=ao(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return El=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,h=a(l,u);return h&&d&&d===h&&(l=void 0),!!h},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},El}var kl,zp;function Rp(){return zp||(zp=1,kl=Object),kl}var Cl,Bp;function US(){return Bp||(Bp=1,Cl=Error),Cl}var Pl,Hp;function KS(){return Hp||(Hp=1,Pl=EvalError),Pl}var Al,Wp;function YS(){return Wp||(Wp=1,Al=RangeError),Al}var Il,qp;function GS(){return qp||(qp=1,Il=ReferenceError),Il}var _l,Up;function ZS(){return Up||(Up=1,_l=SyntaxError),_l}var Ol,Kp;function XS(){return Kp||(Kp=1,Ol=URIError),Ol}var Ml,Yp;function QS(){return Yp||(Yp=1,Ml=Math.abs),Ml}var Dl,Gp;function JS(){return Gp||(Gp=1,Dl=Math.floor),Dl}var Nl,Zp;function eT(){return Zp||(Zp=1,Nl=Math.max),Nl}var Fl,Xp;function tT(){return Xp||(Xp=1,Fl=Math.min),Fl}var Ll,Qp;function nT(){return Qp||(Qp=1,Ll=Math.pow),Ll}var Vl,Jp;function rT(){return Jp||(Jp=1,Vl=Math.round),Vl}var $l,eh;function oT(){return eh||(eh=1,$l=Number.isNaN||function(t){return t!==t}),$l}var jl,th;function iT(){if(th)return jl;th=1;var e=oT();return jl=function(n){return e(n)||n===0?n:n<0?-1:1},jl}var zl,nh;function aT(){return nh||(nh=1,zl=Object.getOwnPropertyDescriptor),zl}var Rl,rh;function oh(){if(rh)return Rl;rh=1;var e=aT();if(e)try{e([],"length")}catch{e=null}return Rl=e,Rl}var Bl,ih;function sT(){if(ih)return Bl;ih=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Bl=e,Bl}var Hl,ah;function lT(){return ah||(ah=1,Hl=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}),Hl}var Wl,sh;function cT(){if(sh)return Wl;sh=1;var e=typeof Symbol<"u"&&Symbol,t=lT();return Wl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Wl}var ql,lh;function ch(){return lh||(lh=1,ql=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ql}var Ul,uh;function dh(){if(uh)return Ul;uh=1;var e=Rp();return Ul=e.getPrototypeOf||null,Ul}var Kl,fh;function uT(){if(fh)return Kl;fh=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 h=0;h<c.length;h+=1)u[h+l.length]=c[h];return u},i=function(l,c){for(var u=[],d=c,h=0;d<l.length;d+=1,h+=1)u[h]=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 Kl=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,h=function(){if(this instanceof d){var g=c.apply(this,o(u,arguments));return Object(g)===g?g:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),b=[],m=0;m<f;m++)b[m]="$"+m;if(d=Function("binder","return function ("+a(b,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var p=function(){};p.prototype=c.prototype,d.prototype=new p,p.prototype=null}return d},Kl}var Yl,ph;function Sa(){if(ph)return Yl;ph=1;var e=uT();return Yl=Function.prototype.bind||e,Yl}var Gl,hh;function Zl(){return hh||(hh=1,Gl=Function.prototype.call),Gl}var Xl,mh;function gh(){return mh||(mh=1,Xl=Function.prototype.apply),Xl}var Ql,vh;function dT(){return vh||(vh=1,Ql=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ql}var Jl,yh;function fT(){if(yh)return Jl;yh=1;var e=Sa(),t=gh(),n=Zl(),r=dT();return Jl=r||e.call(n,t),Jl}var ec,bh;function xh(){if(bh)return ec;bh=1;var e=Sa(),t=ao(),n=Zl(),r=fT();return ec=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},ec}var tc,wh;function pT(){if(wh)return tc;wh=1;var e=xh(),t=oh(),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 tc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,tc}var nc,Sh;function hT(){if(Sh)return nc;Sh=1;var e=ch(),t=dh(),n=pT();return nc=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,nc}var rc,Th;function mT(){if(Th)return rc;Th=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Sa();return rc=n.call(e,t),rc}var oc,Eh;function ic(){if(Eh)return oc;Eh=1;var e,t=Rp(),n=US(),r=KS(),o=YS(),i=GS(),a=ZS(),s=ao(),l=XS(),c=QS(),u=JS(),d=eT(),h=tT(),f=nT(),b=rT(),m=iT(),p=Function,g=function(K){try{return p('"use strict"; return ('+K+").constructor;")()}catch{}},y=oh(),x=sT(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,E=cT()(),k=hT(),C=dh(),M=ch(),_=gh(),F=Zl(),L={},H=typeof Uint8Array>"u"||!k?e:k(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%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%":p,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&k?k(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":H,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":b,"%Math.sign%":m,"%Reflect.getPrototypeOf%":M};if(k)try{null.error}catch(K){var O=k(k(K));I["%Error.prototype%"]=O}var V=function K(G){var Q;if(G==="%AsyncFunction%")Q=g("async function () {}");else if(G==="%GeneratorFunction%")Q=g("function* () {}");else if(G==="%AsyncGeneratorFunction%")Q=g("async function* () {}");else if(G==="%AsyncGenerator%"){var B=K("%AsyncGeneratorFunction%");B&&(Q=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var se=K("%AsyncGenerator%");se&&k&&(Q=k(se.prototype))}return I[G]=Q,Q},D={__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"]},A=Sa(),j=mT(),N=A.call(F,Array.prototype.concat),q=A.call(_,Array.prototype.splice),R=A.call(F,String.prototype.replace),Y=A.call(F,String.prototype.slice),X=A.call(F,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,ee=function(G){var Q=Y(G,0,1),B=Y(G,-1);if(Q==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&Q!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return R(G,oe,function(ce,xe,Se,Te){se[se.length]=Se?R(Te,ne,"$1"):xe||ce}),se},z=function(G,Q){var B=G,se;if(j(D,B)&&(se=D[B],B="%"+se[0]+"%"),j(I,B)){var ce=I[B];if(ce===L&&(ce=V(B)),typeof ce>"u"&&!Q)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:se,name:B,value:ce}}throw new a("intrinsic "+G+" does not exist!")};return oc=function(G,Q){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!="boolean")throw new s('"allowMissing" argument must be a boolean');if(X(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=ee(G),se=B.length>0?B[0]:"",ce=z("%"+se+"%",Q),xe=ce.name,Se=ce.value,Te=!1,Ae=ce.alias;Ae&&(se=Ae[0],q(B,N([0,1],Ae)));for(var we=1,be=!0;we<B.length;we+=1){var Re=B[we],te=Y(Re,0,1),Z=Y(Re,-1);if((te==='"'||te==="'"||te==="`"||Z==='"'||Z==="'"||Z==="`")&&te!==Z)throw new a("property names with quotes must have matching quotes");if((Re==="constructor"||!be)&&(Te=!0),se+="."+Re,xe="%"+se+"%",j(I,xe))Se=I[xe];else if(Se!=null){if(!(Re in Se)){if(!Q)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&we+1>=B.length){var $=y(Se,Re);be=!!$,be&&"get"in $&&!("originalValue"in $.get)?Se=$.get:Se=Se[Re]}else be=j(Se,Re),Se=Se[Re];be&&!Te&&(I[xe]=Se)}}return Se},oc}var ac,kh;function Ch(){if(kh)return ac;kh=1;var e=ic(),t=xh(),n=t([e("%String.prototype.indexOf%")]);return ac=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},ac}var sc,Ph;function Ah(){if(Ph)return sc;Ph=1;var e=ic(),t=Ch(),n=wa(),r=ao(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return sc=!!o&&function(){var d,h={assert:function(f){if(!h.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var b=l(d,f);return c(d)===0&&(d=void 0),b}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,b){d||(d=new o),a(d,f,b)}};return h},sc}var lc,Ih;function gT(){if(Ih)return lc;Ih=1;var e=ic(),t=Ch(),n=wa(),r=Ah(),o=ao(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return lc=i?function(){var d,h,f={assert:function(b){if(!f.has(b))throw new o("Side channel does not contain "+n(b))},delete:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(d)return c(d,b)}else if(r&&h)return h.delete(b);return!1},get:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?a(d,b):h&&h.get(b)},has:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?l(d,b):!!h&&h.has(b)},set:function(b,m){i&&b&&(typeof b=="object"||typeof b=="function")?(d||(d=new i),s(d,b,m)):r&&(h||(h=r()),h.set(b,m))}};return f}:r,lc}var cc,_h;function vT(){if(_h)return cc;_h=1;var e=ao(),t=wa(),n=qS(),r=Ah(),o=gT(),i=o||r||n;return cc=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},cc}var Oh=e=>Array.isArray(e),uc=e=>e===void 0,dc=e=>e===null,yT=Function.bind.call(Function.call,Object.prototype.toString),bT=e=>!!e&&yT(e)==="[object Error]"||e instanceof Error,Mh=(e,t)=>e instanceof t,xT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},wT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Mh(e,Date),$e={array:Oh,date:wT,empty:e=>dc(e)||uc(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:Mh,isError:bT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>dc(e)||uc(e),null:dc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Oh(e)&&typeof e=="object",primitive:xT,string:e=>typeof e=="string",undefined:uc},ST=e=>Object.keys(e),In=(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},TT=e=>e.replace(/[^0-9]/g,"");const fc="-",ET=e=>{const t=CT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(fc);return s[0]===""&&s.length!==1&&s.shift(),Dh(s,t)||kT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Dh=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Dh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(fc);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Nh=/^\[(.+)\]$/,kT=e=>{if(Nh.test(e)){const t=Nh.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},CT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)pc(n[o],r,o,t);return r},pc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Fh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(PT(o)){pc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{pc(a,Fh(t,i),n,r)})})},Fh=(e,t)=>{let n=e;return t.split(fc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PT=e=>e.isThemeGetter,AT=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)}}},hc="!",mc=":",IT=mc.length,_T=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let b=0;b<o.length;b++){let m=o[b];if(a===0&&s===0){if(m===mc){i.push(o.slice(l,b)),l=b+IT;continue}if(m==="/"){c=b;continue}}m==="["?a++:m==="]"?a--:m==="("?s++:m===")"&&s--}const u=i.length===0?o:o.substring(l),d=OT(u),h=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+mc,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},OT=e=>e.endsWith(hc)?e.substring(0,e.length-1):e.startsWith(hc)?e.substring(1):e,MT=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}},DT=e=>({cache:AT(e.cacheSize),parseClassName:_T(e),sortModifiers:MT(e),...ET(e)}),NT=/\s+/,FT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(NT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:h,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:m}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let p=!!m,g=r(p?b.substring(0,m):b);if(!g){if(!p){l=u+(l.length>0?" "+l:l);continue}if(g=r(b),!g){l=u+(l.length>0?" "+l:l);continue}p=!1}const y=i(h).join(":"),x=f?y+hc:y,T=x+g;if(a.includes(T))continue;a.push(T);const w=o(g,p);for(let E=0;E<w.length;++E){const k=w[E];a.push(x+k)}l=u+(l.length>0?" "+l:l)}return l};function LT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Lh(t))&&(r&&(r+=" "),r+=n);return r}const Lh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Lh(e[r]))&&(n&&(n+=" "),n+=t);return n};function VT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=DT(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=FT(l,n);return o(l,u),u}return function(){return i(LT.apply(null,arguments))}}const Pt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$h=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$T=/^\d+\/\d+$/,jT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\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$/,RT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,so=e=>$T.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),tr=e=>!!e&&Number.isInteger(Number(e)),gc=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Un=e=>jT.test(e),WT=()=>!0,qT=e=>zT.test(e)&&!RT.test(e),jh=()=>!1,UT=e=>BT.test(e),KT=e=>HT.test(e),YT=e=>!pe(e)&&!he(e),GT=e=>lo(e,Wh,jh),pe=e=>Vh.test(e),Or=e=>lo(e,qh,qT),vc=e=>lo(e,eE,Le),zh=e=>lo(e,Bh,jh),ZT=e=>lo(e,Hh,KT),Ta=e=>lo(e,Uh,UT),he=e=>$h.test(e),hi=e=>co(e,qh),XT=e=>co(e,tE),Rh=e=>co(e,Bh),QT=e=>co(e,Wh),JT=e=>co(e,Hh),Ea=e=>co(e,Uh,!0),lo=(e,t,n)=>{const r=Vh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},co=(e,t,n=!1)=>{const r=$h.exec(e);return r?r[1]?t(r[1]):n:!1},Bh=e=>e==="position"||e==="percentage",Hh=e=>e==="image"||e==="url",Wh=e=>e==="length"||e==="size"||e==="bg-size",qh=e=>e==="length",eE=e=>e==="number",tE=e=>e==="family-name",Uh=e=>e==="shadow",nE=VT(()=>{const e=Pt("color"),t=Pt("font"),n=Pt("text"),r=Pt("font-weight"),o=Pt("tracking"),i=Pt("leading"),a=Pt("breakpoint"),s=Pt("container"),l=Pt("spacing"),c=Pt("radius"),u=Pt("shadow"),d=Pt("inset-shadow"),h=Pt("text-shadow"),f=Pt("drop-shadow"),b=Pt("blur"),m=Pt("perspective"),p=Pt("aspect"),g=Pt("ease"),y=Pt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...T(),he,pe],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[he,pe,l],M=()=>[so,"full","auto",...C()],_=()=>[tr,"none","subgrid",he,pe],F=()=>["auto",{span:["full",tr,he,pe]},tr,he,pe],L=()=>[tr,"auto",he,pe],H=()=>["auto","min","max","fr",he,pe],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],D=()=>[so,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],A=()=>[e,he,pe],j=()=>[...T(),Rh,zh,{position:[he,pe]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",QT,GT,{size:[he,pe]}],R=()=>[gc,hi,Or],Y=()=>["","none","full",c,he,pe],X=()=>["",Le,hi,Or],oe=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Le,gc,Rh,zh],z=()=>["","none",b,he,pe],K=()=>["none",Le,he,pe],G=()=>["none",Le,he,pe],Q=()=>[Le,he,pe],B=()=>[so,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[WT],container:[Un],"drop-shadow":[Un],ease:["in","out","in-out"],font:[YT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Un],shadow:[Un],spacing:["px",Le],text:[Un],"text-shadow":[Un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",so,pe,he,p]}],container:["container"],columns:[{columns:[Le,pe,he,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[tr,"auto",he,pe]}],basis:[{basis:[so,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,so,"auto","initial","none",pe]}],grow:[{grow:["",Le,he,pe]}],shrink:[{shrink:["",Le,he,pe]}],order:[{order:[tr,"first","last","none",he,pe]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,hi,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,he,vc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gc,pe]}],"font-family":[{font:[XT,pe,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,he,pe]}],"line-clamp":[{"line-clamp":[Le,"none",he,vc]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",he,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",he,Or]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Le,"auto",he,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tr,he,pe],radial:["",he,pe],conic:[tr,he,pe]},JT,ZT]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,he,pe]}],"outline-w":[{outline:["",Le,hi,Or]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,Ea,Ta]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Ea,Ta]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Le,Or]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Ea,Ta]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Le,he,pe]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[he,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,pe]}],filter:[{filter:["","none",he,pe]}],blur:[{blur:z()}],brightness:[{brightness:[Le,he,pe]}],contrast:[{contrast:[Le,he,pe]}],"drop-shadow":[{"drop-shadow":["","none",f,Ea,Ta]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Le,he,pe]}],"hue-rotate":[{"hue-rotate":[Le,he,pe]}],invert:[{invert:["",Le,he,pe]}],saturate:[{saturate:[Le,he,pe]}],sepia:[{sepia:["",Le,he,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",he,pe]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[Le,he,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,he,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,he,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,he,pe]}],"backdrop-invert":[{"backdrop-invert":["",Le,he,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,he,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,he,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,he,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",he,pe]}],ease:[{ease:["linear","initial",g,he,pe]}],delay:[{delay:[Le,he,pe]}],animate:[{animate:["none",y,he,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,he,pe]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[he,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",he,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,pe]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Le,hi,Or,vc]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Kn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},rE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),yc=e=>$e.function(e),ke=(...e)=>nE(Mp(e)),Kh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},mi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Yh=e=>e.scrollHeight>e.clientHeight,gi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},oE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},iE="span",un=S.forwardRef(function(t,n){const r=t.as||iE;return v.jsx(r,{ref:n,...t,as:void 0})}),aE=io("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ka=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return v.jsxs(un,{...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:ke(aE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),nr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t};function sE(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 lE=({children:e,...t})=>{const n=nr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:sE(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),v.jsx("div",{...t,ref:r,children:o?e:null})},cE={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:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},uE=io("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),dE=io("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:cE,defaultVariants:{theme:"primary",size:"default"}}),Ca=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return v.jsxs(un,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:ke(dE({size:a,theme:i}),t),children:[n?v.jsx("span",{"aria-hidden":"true",className:uE({theme:n})}):null,r,s.children]})}),vi=S.createContext({});function bn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const bc=typeof window<"u",Pa=bc?S.useLayoutEffect:S.useEffect,Aa=S.createContext(null);function xc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ia(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function fE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Yn=(e,t,n)=>n>t?t:n<e?e:n;let uo=()=>{},en=()=>{};process.env.NODE_ENV!=="production"&&(uo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},en=(e,t)=>{if(!e)throw new Error(t)});const Gn={},Gh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Zh(e){return typeof e=="object"&&e!==null}const Xh=e=>/^0[^.\s]+$/u.test(e);function wc(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,pE=(e,t)=>n=>t(e(n)),yi=(...e)=>e.reduce(pE),fo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Sc{constructor(){this.subscriptions=[]}add(t){return xc(this.subscriptions,t),()=>Ia(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fn=e=>e*1e3,_n=e=>e/1e3;function Qh(e,t){return t?e*(1e3/t):0}const Jh=new Set;function Tc(e,t,n){e||Jh.has(t)||(console.warn(t),Jh.add(t))}const hE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},em=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mE=1e-7,gE=12;function vE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=em(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>mE&&++s<gE);return a}function bi(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>vE(i,0,1,e,n);return i=>i===0||i===1?i:em(o(i),t,r)}const tm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nm=e=>t=>1-e(1-t),rm=bi(.33,1.53,.69,.99),Ec=nm(rm),om=tm(Ec),im=e=>(e*=2)<1?.5*Ec(e):.5*(2-Math.pow(2,-10*(e-1))),kc=e=>1-Math.sin(Math.acos(e)),am=nm(kc),sm=tm(kc),yE=bi(.42,0,1,1),bE=bi(0,0,.58,1),lm=bi(.42,0,.58,1),cm=e=>Array.isArray(e)&&typeof e[0]!="number";function um(e,t){return cm(e)?e[hE(0,e.length,t)]:e}const dm=e=>Array.isArray(e)&&typeof e[0]=="number",fm={linear:dn,easeIn:yE,easeInOut:lm,easeOut:bE,circIn:kc,circInOut:sm,circOut:am,backIn:Ec,backInOut:om,backOut:rm,anticipate:im},xE=e=>typeof e=="string",Cc=e=>{if(dm(e)){en(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return bi(t,n,r,o)}else if(xE(e))return en(fm[e]!==void 0,`Invalid easing type '${e}'`),fm[e];return e},_a=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function wE(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,h=!1)=>{const b=h&&o?n:r;return d&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const SE=40;function pm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=_a.reduce((x,T)=>(x[T]=wE(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:b}=a,m=()=>{const x=Gn.useManualTiming?o.timestamp:performance.now();n=!1,Gn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,SE),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),f.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},p=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:_a.reduce((x,T)=>{const w=a[T];return x[T]=(E,k=!1,C=!1)=>(n||p(),w.schedule(E,k,C)),x},{}),cancel:x=>{for(let T=0;T<_a.length;T++)a[_a[T]].cancel(x)},state:o,steps:a}}const{schedule:lt,cancel:Zn,state:Vt,steps:Pc}=pm(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Oa;function TE(){Oa=void 0}const Gt={now:()=>(Oa===void 0&&Gt.set(Vt.isProcessing||Gn.useManualTiming?Vt.timestamp:performance.now()),Oa),set:e=>{Oa=e,queueMicrotask(TE)}},hm=e=>t=>typeof t=="string"&&t.startsWith(e),Ac=hm("--"),EE=hm("var(--"),Ic=e=>EE(e)?kE.test(e.split("/*")[0].trim()):!1,kE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,po={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xi={...po,transform:e=>Yn(0,1,e)},Ma={...po,default:1},wi=e=>Math.round(e*1e5)/1e5,_c=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function CE(e){return e==null}const PE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Oc=(e,t)=>n=>!!(typeof n=="string"&&PE.test(n)&&n.startsWith(e)||t&&!CE(n)&&Object.prototype.hasOwnProperty.call(n,t)),mm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(_c);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},AE=e=>Yn(0,255,e),Mc={...po,transform:e=>Math.round(AE(e))},Mr={test:Oc("rgb","red"),parse:mm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mc.transform(e)+", "+Mc.transform(t)+", "+Mc.transform(n)+", "+wi(xi.transform(r))+")"};function IE(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 Dc={test:Oc("#"),parse:IE,transform:Mr.transform},Si=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rr=Si("deg"),On=Si("%"),Ee=Si("px"),_E=Si("vh"),OE=Si("vw"),gm={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},ho={test:Oc("hsl","hue"),parse:mm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(wi(t))+", "+On.transform(wi(n))+", "+wi(xi.transform(r))+")"},Ct={test:e=>Mr.test(e)||Dc.test(e)||ho.test(e),parse:e=>Mr.test(e)?Mr.parse(e):ho.test(e)?ho.parse(e):Dc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mr.transform(e):ho.transform(e),getAnimatableNone:e=>{const t=Ct.parse(e);return t.alpha=0,Ct.transform(t)}},ME=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function DE(e){return isNaN(e)&&typeof e=="string"&&(e.match(_c)?.length||0)+(e.match(ME)?.length||0)>0}const vm="number",ym="color",NE="var",FE="var(",bm="${}",LE=/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 Ti(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(LE,l=>(Ct.test(l)?(r.color.push(i),o.push(ym),n.push(Ct.parse(l))):l.startsWith(FE)?(r.var.push(i),o.push(NE),n.push(l)):(r.number.push(i),o.push(vm),n.push(parseFloat(l))),++i,bm)).split(bm);return{values:n,split:s,indexes:r,types:o}}function xm(e){return Ti(e).values}function wm(e){const{split:t,types:n}=Ti(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===vm?i+=wi(o[a]):s===ym?i+=Ct.transform(o[a]):i+=o[a]}return i}}const VE=e=>typeof e=="number"?0:Ct.test(e)?Ct.getAnimatableNone(e):e;function $E(e){const t=xm(e);return wm(e)(t.map(VE))}const or={test:DE,parse:xm,createTransformer:wm,getAnimatableNone:$E};function Nc(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 jE({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=Nc(l,s,e+1/3),i=Nc(l,s,e),a=Nc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Da(e,t){return n=>n>0?t:e}const ct=(e,t,n)=>e+(t-e)*n,Fc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},zE=[Dc,Mr,ho],RE=e=>zE.find(t=>t.test(e));function Sm(e){const t=RE(e);if(uo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ho&&(n=jE(n)),n}const Tm=(e,t)=>{const n=Sm(e),r=Sm(t);if(!n||!r)return Da(e,t);const o={...n};return i=>(o.red=Fc(n.red,r.red,i),o.green=Fc(n.green,r.green,i),o.blue=Fc(n.blue,r.blue,i),o.alpha=ct(n.alpha,r.alpha,i),Mr.transform(o))},Lc=new Set(["none","hidden"]);function BE(e,t){return Lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function HE(e,t){return n=>ct(e,t,n)}function Vc(e){return typeof e=="number"?HE:typeof e=="string"?Ic(e)?Da:Ct.test(e)?Tm:UE:Array.isArray(e)?Em:typeof e=="object"?Ct.test(e)?Tm:WE:Da}function Em(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Vc(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function WE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Vc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function qE(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const UE=(e,t)=>{const n=or.createTransformer(t),r=Ti(e),o=Ti(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?Lc.has(e)&&!o.values.length||Lc.has(t)&&!r.values.length?BE(e,t):yi(Em(qE(r,o),o.values),n):(uo(!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.`),Da(e,t))};function km(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ct(e,t,n):Vc(e)(e,t)}const KE=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>lt.update(t,n),stop:()=>Zn(t),now:()=>Vt.isProcessing?Vt.timestamp:Gt.now()}},Cm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Na=2e4;function $c(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Na;)t+=n,r=e.next(t);return t>=Na?1/0:t}function Pm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min($c(r),Na);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:_n(o)}}const YE=5;function Am(e,t,n){const r=Math.max(t-YE,0);return Qh(n-e(r),t-r)}const ht={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jc=.001;function GE({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;uo(e<=fn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Yn(ht.minDamping,ht.maxDamping,a),e=Yn(ht.minDuration,ht.maxDuration,_n(e)),a<1?(o=c=>{const u=c*a,d=u*e,h=u-n,f=zc(c,a),b=Math.exp(-d);return jc-h/f*b},i=c=>{const d=c*a*e,h=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-d),m=zc(Math.pow(c,2),a);return(-o(c)+jc>0?-1:1)*((h-f)*b)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-jc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=XE(o,i,s);if(e=fn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const ZE=12;function XE(e,t,n){let r=n;for(let o=1;o<ZE;o++)r=r-e(r)/t(r);return r}function zc(e,t){return e*Math.sqrt(1-t*t)}const QE=["duration","bounce"],JE=["stiffness","damping","mass"];function Im(e,t){return t.some(n=>e[n]!==void 0)}function ek(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!Im(e,JE)&&Im(e,QE))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Yn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=GE(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Ei(e=ht.visualDuration,t=ht.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=ek({...n,velocity:-_n(n.velocity||0)}),b=h||0,m=c/(2*Math.sqrt(l*u)),p=a-i,g=_n(Math.sqrt(l/u)),y=Math.abs(p)<5;r||(r=y?ht.restSpeed.granular:ht.restSpeed.default),o||(o=y?ht.restDelta.granular:ht.restDelta.default);let x;if(m<1){const w=zc(g,m);x=E=>{const k=Math.exp(-m*g*E);return a-k*((b+m*g*p)/w*Math.sin(w*E)+p*Math.cos(w*E))}}else if(m===1)x=w=>a-Math.exp(-g*w)*(p+(b+g*p)*w);else{const w=g*Math.sqrt(m*m-1);x=E=>{const k=Math.exp(-m*g*E),C=Math.min(w*E,300);return a-k*((b+m*g*p)*Math.sinh(C)+w*p*Math.cosh(C))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const E=x(w);if(f)s.done=w>=d;else{let k=w===0?b:0;m<1&&(k=w===0?fn(b):Am(x,w,E));const C=Math.abs(k)<=r,M=Math.abs(a-E)<=o;s.done=C&&M}return s.value=s.done?a:E,s},toString:()=>{const w=Math.min($c(T),Na),E=Cm(k=>T.next(w*k).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Ei.applyToOptions=e=>{const t=Pm(e,100,Ei);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};function Rc({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],h={done:!1,value:d},f=C=>s!==void 0&&C<s||l!==void 0&&C>l,b=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let m=n*t;const p=d+m,g=a===void 0?p:a(p);g!==p&&(m=g-d);const y=C=>-m*Math.exp(-C/r),x=C=>g+y(C),T=C=>{const M=y(C),_=x(C);h.done=Math.abs(M)<=c,h.value=h.done?g:_};let w,E;const k=C=>{f(h.value)&&(w=C,E=Ei({keyframes:[h.value,b(h.value)],velocity:Am(x,C,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let M=!1;return!E&&w===void 0&&(M=!0,T(C),k(C)),w!==void 0&&C>=w?E.next(C-w):(!M&&T(C),h)}}}function tk(e,t,n){const r=[],o=n||Gn.mix||km,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||dn:t;s=yi(l,s)}r.push(s)}return r}function _m(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(en(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=tk(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 h=fo(e[d],e[d+1],u);return s[d](h)};return n?u=>c(Yn(e[0],e[i-1],u)):c}function Om(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=fo(0,t,r);e.push(ct(n,1,o))}}function Mm(e){const t=[0];return Om(t,e.length-1),t}function nk(e,t){return e.map(n=>n*t)}function rk(e,t){return e.map(()=>t||lm).splice(0,e.length-1)}function mo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=cm(r)?r.map(Cc):Cc(r),i={done:!1,value:t[0]},a=nk(n&&n.length===t.length?n:Mm(t),e),s=_m(a,t,{ease:Array.isArray(o)?o:rk(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const ok=e=>e!==null;function Bc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(ok),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const ik={decay:Rc,inertia:Rc,tween:mo,keyframes:mo,spring:Ei};function Dm(e){typeof e.type=="string"&&(e.type=ik[e.type])}class Hc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const ak=e=>e/100;class Wc extends Hc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Gt.now()&&this.tick(Gt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Dm(t);const{type:n=mo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||mo;process.env.NODE_ENV!=="production"&&l!==mo&&en(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==mo&&typeof s[0]!="number"&&(this.mixKeyframes=yi(ak,km(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=$c(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:b,onUpdate:m,finalKeyframe:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/s;let M=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(h==="reverse"?(_=1-_,f&&(_-=f/s)):h==="mirror"&&(T=a)),x=Yn(0,1,_)*s}const w=y?{done:!1,value:u[0]}:T.next(x);i&&(w.value=i(w.value));let{done:E}=w;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&b!==Rc&&(w.value=Bc(u,this.options,p,this.speed)),m&&m(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return _n(this.calculatedDuration)}get time(){return _n(this.currentTime)}set time(t){t=fn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Gt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_n(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=KE,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Gt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function sk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Dr=e=>e*180/Math.PI,qc=e=>{const t=Dr(Math.atan2(e[1],e[0]));return Uc(t)},lk={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qc,rotateZ:qc,skewX:e=>Dr(Math.atan(e[1])),skewY:e=>Dr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uc=e=>(e=e%360,e<0&&(e+=360),e),Nm=qc,Fm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Lm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ck={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fm,scaleY:Lm,scale:e=>(Fm(e)+Lm(e))/2,rotateX:e=>Uc(Dr(Math.atan2(e[6],e[5]))),rotateY:e=>Uc(Dr(Math.atan2(-e[2],e[0]))),rotateZ:Nm,rotate:Nm,skewX:e=>Dr(Math.atan(e[4])),skewY:e=>Dr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Kc(e){return e.includes("scale")?1:0}function Yc(e,t){if(!e||e==="none")return Kc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ck,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=lk,o=s}if(!o)return Kc(t);const i=r[t],a=o[1].split(",").map(dk);return typeof i=="function"?i(a):a[i]}const uk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Yc(n,t)};function dk(e){return parseFloat(e.trim())}const go=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vo=new Set(go),Vm=e=>e===po||e===Ee,fk=new Set(["x","y","z"]),pk=go.filter(e=>!fk.has(e));function hk(e){const t=[];return pk.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Nr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Yc(t,"x"),y:(e,{transform:t})=>Yc(t,"y")};Nr.translateX=Nr.x,Nr.translateY=Nr.y;const Fr=new Set;let Gc=!1,Zc=!1,Xc=!1;function $m(){if(Zc){const e=Array.from(Fr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=hk(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Zc=!1,Gc=!1,Fr.forEach(e=>e.complete(Xc)),Fr.clear()}function jm(){Fr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zc=!0)})}function mk(){Xc=!0,jm(),$m(),Xc=!1}class Qc{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Fr.add(this),Gc||(Gc=!0,lt.read(jm),lt.resolveKeyframes($m))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}sk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fr.delete(this)}cancel(){this.state==="scheduled"&&(Fr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const gk=e=>e.startsWith("--");function vk(e,t,n){gk(t)?e.style.setProperty(t,n):e.style[t]=n}const yk=wc(()=>window.ScrollTimeline!==void 0),bk={};function xk(e,t){const n=wc(e);return()=>bk[t]??n()}const zm=xk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rm={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 Bm(e,t){if(e)return typeof e=="function"?zm()?Cm(e,t):"ease-out":dm(e)?ki(e):Array.isArray(e)?e.map(n=>Bm(n,t)||Rm.easeOut):Rm[e]}function wk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Bm(s,o);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function Jc(e){return typeof e=="function"&&"applyToOptions"in e}function Sk({type:e,...t}){return Jc(e)&&zm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Tk extends Hc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,en(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=Sk(t);this.animation=wk(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Bc(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):vk(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _n(Number(t))}get time(){return _n(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&yk()?(this.animation.timeline=t,dn):n(this)}}const Hm={anticipate:im,backInOut:om,circInOut:sm};function Ek(e){return e in Hm}function kk(e){typeof e.ease=="string"&&Ek(e.ease)&&(e.ease=Hm[e.ease])}const Wm=10;class Ck extends Tk{constructor(t){kk(t),Dm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Wc({...a,autoplay:!1}),l=fn(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-Wm).value,s.sample(l).value,Wm),s.stop()}}const qm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(or.test(e)||e==="0")&&!e.startsWith("url("));function Pk(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 Ak(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=qm(o,t),s=qm(i,t);return uo(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:Pk(e)||(n==="spring"||Jc(n))&&r}function eu(e){return Zh(e)&&"offsetHeight"in e}const Ik=new Set(["opacity","clipPath","filter","transform"]),_k=wc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ok(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!eu(t?.owner?.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return _k()&&n&&Ik.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const Mk=40;class Dk extends Hc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Gt.now();const h={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||Qc;this.keyframeResolver=new f(s,(b,m,p)=>this.onKeyframesResolved(b,m,h,!p),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Gt.now(),Ak(t,i,a,s)||((Gn.instantAnimations||!l)&&u?.(Bc(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const h={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Mk?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&Ok(h)?new Ck({...h,element:h.motionValue.owner.current}):new Wc(h);f.finished.then(()=>this.notifyFinished()).catch(dn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),mk()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Nk{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Fk extends Nk{then(t,n){return this.finished.finally(t).then(()=>{})}}const Lk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vk(e){const t=Lk.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const $k=4;function Um(e,t,n=1){en(n<=$k,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Vk(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Gh(a)?parseFloat(a):a}return Ic(o)?Um(o,t,n+1):o}function tu(e,t){return e?.[t]??e?.default??e}const Km=new Set(["width","height","top","left","right","bottom",...go]),jk={test:e=>e==="auto",parse:e=>e},Ym=e=>t=>t.test(e),Gm=[po,Ee,On,rr,OE,_E,jk],Zm=e=>Gm.find(Ym(e));function zk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xh(e):!0}const Rk=new Set(["brightness","contrast","saturate","opacity"]);function Bk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_c)||[];if(!r)return e;const o=n.replace(r,"");let i=Rk.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Hk=/\b([a-z-]*)\(.*?\)/gu,nu={...or,getAnimatableNone:e=>{const t=e.match(Hk);return t?t.map(Bk).join(" "):e}},Xm={...po,transform:Math.round},ru={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:rr,rotateX:rr,rotateY:rr,rotateZ:rr,scale:Ma,scaleX:Ma,scaleY:Ma,scaleZ:Ma,skew:rr,skewX:rr,skewY:rr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:xi,originX:gm,originY:gm,originZ:Ee},zIndex:Xm,fillOpacity:xi,strokeOpacity:xi,numOctaves:Xm},Wk={...ru,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:nu,WebkitFilter:nu},Qm=e=>Wk[e];function Jm(e,t){let n=Qm(e);return n!==nu&&(n=or),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const qk=new Set(["auto","none","0"]);function Uk(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!qk.has(i)&&Ti(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Jm(n,o)}class Kk extends Qc{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(),Ic(c))){const u=Um(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Km.has(r)||t.length!==2)return;const[o,i]=t,a=Zm(o),s=Zm(i);if(a!==s)if(Vm(a)&&Vm(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Nr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||zk(t[o]))&&r.push(o);r.length&&Uk(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Nr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Nr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function eg(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const tg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ng=30,Yk=e=>!isNaN(parseFloat(e)),Ci={current:void 0};class Gk{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Gt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();o&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Yk(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Tc(!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 Sc);const r=this.events[t].add(n);return t==="change"?()=>{r(),lt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ci.current&&Ci.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ng)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ng);return Qh(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lr(e,t){return new Gk(e,t)}const{schedule:ou}=pm(queueMicrotask,!1),xn={x:!1,y:!1};function rg(){return xn.x||xn.y}function Zk(e){return e==="x"||e==="y"?xn[e]?null:(xn[e]=!0,()=>{xn[e]=!1}):xn.x||xn.y?null:(xn.x=xn.y=!0,()=>{xn.x=xn.y=!1})}function og(e,t){const n=eg(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ig(e){return!(e.pointerType==="touch"||rg())}function Xk(e,t,n={}){const[r,o,i]=og(e,n),a=s=>{if(!ig(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{ig(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const ag=(e,t)=>t?e===t?!0:ag(e,t.parentElement):!1,iu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Qk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jk(e){return Qk.has(e.tagName)||e.tabIndex!==-1}const Fa=new WeakSet;function sg(e){return t=>{t.key==="Enter"&&e(t)}}function au(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const eC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=sg(()=>{if(Fa.has(n))return;au(n,"down");const o=sg(()=>{au(n,"up")}),i=()=>au(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 lg(e){return iu(e)&&!rg()}function tC(e,t,n={}){const[r,o,i]=og(e,n),a=s=>{const l=s.currentTarget;if(!lg(s))return;Fa.add(l);const c=t(l,s),u=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Fa.has(l)&&Fa.delete(l),lg(f)&&typeof c=="function"&&c(f,{success:b})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||ag(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",h,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),eu(s)&&(s.addEventListener("focus",c=>eC(c,o)),!Jk(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function su(e){return Zh(e)&&"ownerSVGElement"in e}function cg(e){return su(e)&&e.tagName==="svg"}function nC(...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=_m(o,i,a);return t?s(r):s}const At=e=>!!(e&&e.getVelocity),rC=[...Gm,Ct,or],oC=e=>rC.find(Ym(e)),yo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class iC extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=eu(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function aC({children:e,isPresent:t,anchorX:n}){const r=S.useId(),o=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(yo);return S.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const h=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;
8
8
  height: ${l}px !important;
9
- ${p}px !important;
9
+ ${h}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),v.jsx(UC,{isPresent:t,childRef:o,sizeRef:i,children:P.cloneElement(e,{ref:o})})}const YC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=vn(GC),c=E.useId();let u=!0,d=E.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return i&&u&&(d={...d}),E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=v.jsx(KC,{isPresent:n,anchorX:s,children:e})),v.jsx(Ia.Provider,{value:d,children:e})};function GC(){return new Map}function eg(e=!0){const t=E.useContext(Ia);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 Va=e=>e.key||"";function tg(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const er=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=eg(a),u=E.useMemo(()=>tg(e),[e]),d=a&&!l?[]:u.map(Va),p=E.useRef(!0),f=E.useRef(u),m=vn(()=>new Map),[g,h]=E.useState(u),[y,x]=E.useState(u);Pa(()=>{p.current=!1,f.current=u;for(let w=0;w<y.length;w++){const T=Va(y[w]);d.includes(T)?m.delete(T):m.get(T)!==!0&&m.set(T,!1)}},[y,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let T=0;T<y.length;T++){const C=y[T],k=Va(C);d.includes(k)||(w.splice(T,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),x(tg(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.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:S}=E.useContext(xi);return v.jsx(v.Fragment,{children:y.map(w=>{const T=Va(w),C=a&&!l?!1:u===y||d.includes(T),k=()=>{if(m.has(T))m.set(T,!0);else return;let _=!0;m.forEach(A=>{A||(_=!1)}),_&&(S==null||S(),x(f.current),a&&(c==null||c()),r&&r())};return v.jsx(YC,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},T)})})},ZC=E.createContext(null);function XC(){const e=E.useRef(!1);return Pa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function QC(){const e=XC(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>st.postRender(r),[r]),t]}const JC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ng(){const e=new Set,t=new WeakMap,n=()=>e.forEach(JC);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 rg=e=>e===!0,ek=e=>rg(e===!0)||e==="id",tk=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(xi),o=E.useContext(ZC),[i,a]=QC(),s=E.useRef(null),l=r.id||o;s.current===null&&(ek(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:rg(n)&&r.group||ng()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return v.jsx(xi.Provider,{value:c,children:e})},og=E.createContext({strict:!1}),ig={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"]},xo={};for(const e in ig)xo[e]={isEnabled:t=>ig[e].some(n=>!!t[n])};function nk(e){for(const t in e)xo[t]={...xo[t],...e[t]}}const rk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function $a(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rk.has(e)}let ag=e=>!$a(e);function sg(e){typeof e=="function"&&(ag=t=>t.startsWith("on")?!$a(t):e(t))}try{sg(require("@emotion/is-prop-valid").default)}catch{}function ok(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ag(o)||n===!0&&$a(o)||!t&&!$a(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ik({children:e,isValidProp:t,...n}){t&&sg(t),n={...E.useContext(bo),...n},n.isStatic=vn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return v.jsx(bo.Provider,{value:r,children:e})}function ak(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&gc(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ja=E.createContext({});function za(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _i(e){return typeof e=="string"||Array.isArray(e)}const eu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tu=["initial",...eu];function Ba(e){return za(e.animate)||tu.some(t=>_i(e[t]))}function lg(e){return!!(Ba(e)||e.variants)}function sk(e,t){if(Ba(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_i(n)?n:void 0,animate:_i(r)?r:void 0}}return e.inherit!==!1?t:{}}function lk(e){const{initial:t,animate:n}=sk(e,E.useContext(ja));return E.useMemo(()=>({initial:t,animate:n}),[cg(t),cg(n)])}function cg(e){return Array.isArray(e)?e.join(" "):e}const ck=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function uk(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):wo(n)&&(n.current=r))},[t])}const nu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ug="data-"+nu("framerAppearId"),dg=E.createContext({});function dk(e,t,n,r,o){var g,h;const{visualElement:i}=E.useContext(ja),a=E.useContext(og),s=E.useContext(Ia),l=E.useContext(bo).reducedMotion,c=E.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=E.useContext(dg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&fk(c.current,n,o,d);const p=E.useRef(!1);E.useInsertionEffect(()=>{u&&p.current&&u.update(n,s)});const f=n[ug],m=E.useRef(!!f&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,f))&&((h=window.MotionHasOptimisedAnimation)==null?void 0:h.call(window,f)));return Pa(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Zc.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),E.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,f)}),m.current=!1))}),u}function fk(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fg(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&wo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function fg(e){if(e)return e.options.allowProjection!==!1?e.projection:fg(e.parent)}function pk({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&nk(e);function i(s,l){let c;const u={...E.useContext(bo),...s,layoutId:hk(s)},{isStatic:d}=u,p=lk(s),f=r(s,d);if(!d&&fc){mk(u,e);const m=gk(u);c=m.MeasureLayout,p.visualElement=dk(o,f,u,t,m.ProjectionNode)}return v.jsxs(ja.Provider,{value:p,children:[c&&p.visualElement?v.jsx(c,{visualElement:p.visualElement,...u}):null,n(o,s,uk(f,p.visualElement,l),f,d,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=E.forwardRef(i);return a[ck]=o,a}function hk({layoutId:e}){const t=E.useContext(xi).id;return t&&e!==void 0?t+"-"+e:e}function mk(e,t){const n=E.useContext(og).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?fo(!1,r):Xt(!1,r)}}function gk(e){const{drag:t,layout:n}=xo;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 Oi={};function vk(e){for(const t in e)Oi[t]=e[t],wc(t)&&(Oi[t].isCSSVariable=!0)}function pg(e,{layout:t,layoutId:n}){return yo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Oi[e]||e==="opacity")}const yk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bk=vo.length;function xk(e,t,n){let r="",o=!0;for(let i=0;i<bk;i++){const a=vo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=qm(s,Gc[a]);if(!l){o=!1;const u=yk[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function ru(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(yo.has(l)){a=!0;continue}else if(wc(l)){o[l]=c;continue}else{const u=qm(c,Gc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=xk(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 ou=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hg(e,t,n){for(const r in t)!At(t[r])&&!pg(r,n)&&(e[r]=t[r])}function wk({transformTemplate:e},t){return E.useMemo(()=>{const n=ou();return ru(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Sk(e,t){const n=e.style||{},r={};return hg(r,n,e),Object.assign(r,wk(e,t)),r}function Tk(e,t){const n={},r=Sk(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 Ek={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ck={offset:"strokeDashoffset",array:"strokeDasharray"};function kk(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Ek:Ck;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function mg(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(ru(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&kk(d,o,i,a,!1)}const gg=()=>({...ou(),attrs:{}}),vg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ak(e,t,n,r){const o=E.useMemo(()=>{const i=gg();return mg(i,t,vg(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};hg(i,e.style,e),o.style={...i,...o.style}}return o}const Pk=["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 iu(e){return typeof e!="string"||e.includes("-")?!1:!!(Pk.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ik(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(iu(n)?Ak:Tk)(r,i,a,n),c=ok(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>At(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function yg(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function au(e,t,n,r){if(typeof t=="function"){const[o,i]=yg(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]=yg(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ra(e){return At(e)?e.get():e}function _k({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Ok(n,r,o,e),renderState:t()}}const bg=e=>(t,n)=>{const r=E.useContext(ja),o=E.useContext(Ia),i=()=>_k(e,t,r,o);return n?i():vn(i)};function Ok(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ra(i[p]);let{initial:a,animate:s}=e;const l=Ba(e),c=lg(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!za(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=au(e,p[f]);if(m){const{transitionEnd:g,transition:h,...y}=m;for(const x in y){let b=y[x];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[x]=b)}for(const x in g)o[x]=g[x]}}}return o}function su(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(At(r[a])||t.style&&At(t.style[a])||pg(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const Mk={useVisualState:bg({scrapeMotionValuesFromProps:su,createRenderState:ou})};function xg(e,t,n){const r=su(e,t,n);for(const o in e)if(At(e[o])||At(t[o])){const i=vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Dk={useVisualState:bg({scrapeMotionValuesFromProps:xg,createRenderState:gg})};function Nk(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...iu(r)?Dk:Mk,preloadedFeatures:e,useRender:Ik(o),createVisualElement:t,Component:r};return pk(a)}}function Mi(e,t,n){const r=e.getProps();return au(r,t,n!==void 0?n:r.custom,e)}const lu=e=>Array.isArray(e);function Fk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$r(n))}function Lk(e){return lu(e)?e[e.length-1]||0:e}function Vk(e,t){const n=Mi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=Lk(i[a]);Fk(e,a,s)}}function $k(e){return!!(At(e)&&e.add)}function cu(e,t){const n=e.getValue("willChange");if($k(n))return n.add(t);if(!n&&qn.WillChange){const r=new qn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function wg(e){return e.props[ug]}const jk=e=>e!==null;function zk(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(jk),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const Bk={type:"spring",stiffness:500,damping:25,restSpeed:10},Rk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hk={type:"keyframes",duration:.8},Wk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qk=(e,{keyframes:t})=>t.length>2?Hk:yo.has(e)?e.startsWith("scale")?Rk(t[1]):Bk:Wk;function Uk({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 uu=(e,t,n,r={},o,i)=>a=>{const s=Kc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-un(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};Uk(s)||Object.assign(u,qk(e,u)),u.duration&&(u.duration=un(u.duration)),u.repeatDelay&&(u.repeatDelay=un(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(qn.instantAnimations||qn.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=zk(u.keyframes,s);if(p!==void 0){st.update(()=>{u.onUpdate(p),u.onComplete()});return}}return s.isSync?new Lc(u):new xC(u)};function Kk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function du(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),p=s[u];if(p===void 0||c&&Kk(c,u))continue;const f={delay:n,...Kc(i||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===m&&!f.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=wg(e);if(y){const x=window.MotionHandoffAnimation(y,u,st);x!==null&&(f.startTime=x,g=!0)}}cu(e,u),d.start(uu(u,d,p,e.shouldReduceMotion&&Vm.has(u)?{type:!1}:f,e,g));const h=d.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{st.update(()=>{a&&Vk(e,a)})}),l}function fu(e,t,n={}){var l;const r=Mi(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(du(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=o;return Yk(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[c,u]=s==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Yk(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(Gk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(fu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Gk(e,t){return e.sortNodePosition(t)}function Zk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>fu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=fu(e,t,n);else{const o=typeof t=="function"?Mi(e,t,n.custom):t;r=Promise.all(du(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Sg(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 Xk=tu.length;function Tg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Tg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Xk;n++){const r=tu[n],o=e.props[r];(_i(o)||o===!1)&&(t[r]=o)}return t}const Qk=[...eu].reverse(),Jk=eu.length;function eA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Zk(e,n,r)))}function tA(e){let t=eA(e),n=Eg(),r=!0;const o=l=>(c,u)=>{var p;const d=Mi(e,u,l==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(d){const{transition:f,transitionEnd:m,...g}=d;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Tg(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<Jk;h++){const y=Qk[h],x=n[y],b=c[y]!==void 0?c[y]:u[y],S=_i(b),w=y===l?x.isActive:null;w===!1&&(m=h);let T=b===u[y]&&b!==c[y]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...f},!x.isActive&&w===null||!b&&!x.prevProp||za(b)||typeof b=="boolean")continue;const C=nA(x.prevProp,b);let k=C||y===l&&x.isActive&&!T&&S||h>m&&S,_=!1;const A=Array.isArray(b)?b:[b];let L=A.reduce(o(y),{});w===!1&&(L={});const{prevResolvedValues:N={}}=x,$={...N,...L},I=V=>{k=!0,p.has(V)&&(_=!0,p.delete(V)),x.needsAnimating[V]=!0;const F=e.getValue(V);F&&(F.liveStyle=!1)};for(const V in $){const F=L[V],H=N[V];if(f.hasOwnProperty(V))continue;let O=!1;lu(F)&&lu(H)?O=!Sg(F,H):O=F!==H,O?F!=null?I(V):p.add(V):F!==void 0&&p.has(V)?I(V):x.protectedKeys[V]=!0}x.prevProp=b,x.prevResolvedValues=L,x.isActive&&(f={...f,...L}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(T&&C)||_)&&d.push(...A.map(V=>({animation:V,options:{type:y}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const y=Mi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(h.transition=y.transition)}p.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),h[y]=x??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 d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(p=>{var f;return(f=p.animationState)==null?void 0:f.setActive(l,c)}),n[l].isActive=c;const u=a(l);for(const p in n)n[p].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Eg(),r=!0}}}function nA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Sg(t,e):!1}function jr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Eg(){return{animate:jr(!0),whileInView:jr(),whileHover:jr(),whileTap:jr(),whileDrag:jr(),whileFocus:jr(),exit:jr()}}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class rA extends tr{constructor(t){super(t),t.animationState||(t.animationState=tA(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();za(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let oA=0;class iA extends tr{constructor(){super(...arguments),this.id=oA++}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 aA={animation:{Feature:rA},exit:{Feature:iA}};function Di(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ni(e){return{point:{x:e.pageX,y:e.pageY}}}const sA=e=>t=>Xc(t)&&e(t,Ni(t));function Fi(e,t,n,r){return Di(e,t,sA(n),r)}function Cg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function lA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function cA(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 kg=1e-4,uA=1-kg,dA=1+kg,Ag=.01,fA=0-Ag,pA=0+Ag;function Wt(e){return e.max-e.min}function hA(e,t,n){return Math.abs(e-t)<=n}function Pg(e,t,n,r=.5){e.origin=r,e.originPoint=lt(t.min,t.max,e.origin),e.scale=Wt(n)/Wt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uA&&e.scale<=dA||isNaN(e.scale))&&(e.scale=1),(e.translate>=fA&&e.translate<=pA||isNaN(e.translate))&&(e.translate=0)}function Li(e,t,n,r){Pg(e.x,t.x,n.x,r?r.originX:void 0),Pg(e.y,t.y,n.y,r?r.originY:void 0)}function Ig(e,t,n){e.min=n.min+t.min,e.max=e.min+Wt(t)}function mA(e,t,n){Ig(e.x,t.x,n.x),Ig(e.y,t.y,n.y)}function _g(e,t,n){e.min=t.min-n.min,e.max=e.min+Wt(t)}function Vi(e,t,n){_g(e.x,t.x,n.x),_g(e.y,t.y,n.y)}const Og=()=>({translate:0,scale:1,origin:0,originPoint:0}),So=()=>({x:Og(),y:Og()}),Mg=()=>({min:0,max:0}),yt=()=>({x:Mg(),y:Mg()});function dn(e){return[e("x"),e("y")]}function pu(e){return e===void 0||e===1}function hu({scale:e,scaleX:t,scaleY:n}){return!pu(e)||!pu(t)||!pu(n)}function zr(e){return hu(e)||Dg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dg(e){return Ng(e.x)||Ng(e.y)}function Ng(e){return e&&e!=="0%"}function Ha(e,t,n){const r=e-n,o=t*r;return n+o}function Fg(e,t,n,r,o){return o!==void 0&&(e=Ha(e,o,r)),Ha(e,n,r)+t}function mu(e,t=0,n=1,r,o){e.min=Fg(e.min,t,n,r,o),e.max=Fg(e.max,t,n,r,o)}function Lg(e,{x:t,y:n}){mu(e.x,t.translate,t.scale,t.originPoint),mu(e.y,n.translate,n.scale,n.originPoint)}const Vg=.999999999999,$g=1.0000000000001;function gA(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&&Eo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Lg(e,a)),r&&zr(i.latestValues)&&Eo(e,i.latestValues))}t.x<$g&&t.x>Vg&&(t.x=1),t.y<$g&&t.y>Vg&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function jg(e,t,n,r,o=.5){const i=lt(e.min,e.max,o);mu(e,t,n,i,r)}function Eo(e,t){jg(e.x,t.x,t.scaleX,t.scale,t.originX),jg(e.y,t.y,t.scaleY,t.scale,t.originY)}function zg(e,t){return Cg(cA(e.getBoundingClientRect(),t))}function vA(e,t,n){const r=zg(e,n),{scroll:o}=t;return o&&(To(r.x,o.offset.x),To(r.y,o.offset.y)),r}const Bg=({current:e})=>e?e.ownerDocument.defaultView:null,Rg=(e,t)=>Math.abs(e-t);function yA(e,t){const n=Rg(e.x,t.x),r=Rg(e.y,t.y);return Math.sqrt(n**2+r**2)}class Hg{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=vu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=yA(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Ft;this.history.push({...m,timestamp:g});const{onStart:h,onMove:y}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=gu(p,this.transformPagePoint),st.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=vu(d.type==="pointercancel"?this.lastMoveEventInfo:gu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Xc(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Ni(t),s=gu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Ft;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,vu(s,this.history)),this.removeListeners=wi(Fi(this.contextWindow,"pointermove",this.handlePointerMove),Fi(this.contextWindow,"pointerup",this.handlePointerUp),Fi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Un(this.updatePoint)}}function gu(e,t){return t?{point:t(e.point)}:e}function Wg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vu({point:e},t){return{point:e,delta:Wg(e,qg(t)),offset:Wg(e,bA(t)),velocity:xA(t,.1)}}function bA(e){return e[0]}function qg(e){return e[e.length-1]}function xA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=qg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>un(t)));)n--;if(!r)return{x:0,y:0};const i=Pn(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 wA(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?lt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?lt(n,e,r.max):Math.min(e,n)),e}function Ug(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 SA(e,{top:t,left:n,bottom:r,right:o}){return{x:Ug(e.x,n,o),y:Ug(e.y,t,r)}}function Kg(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 TA(e,t){return{x:Kg(e.x,t.x),y:Kg(e.y,t.y)}}function EA(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=po(t.min,t.max-r,e.min):r>o&&(n=po(e.min,e.max-o,t.min)),Wn(0,1,n)}function CA(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 yu=.35;function kA(e=yu){return e===!1?e=0:e===!0&&(e=yu),{x:Yg(e,"left","right"),y:Yg(e,"top","bottom")}}function Yg(e,t,n){return{min:Gg(e,t),max:Gg(e,n)}}function Gg(e,t){return typeof e=="number"?e:e[t]||0}const AA=new WeakMap;class PA{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ni(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=VC(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),dn(h=>{let y=this.getAxisMotionValue(h).get()||0;if(In.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[h];b&&(y=Wt(b)*(parseFloat(y)/100))}}this.originPoint[h]=y}),m&&st.postRender(()=>m(u,d)),cu(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=IA(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=()=>dn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)==null?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Hg(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Bg(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&&st.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Wa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=wA(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&wo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=SA(r.layoutBox,t):this.constraints=!1,this.elastic=kA(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=CA(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;Xt(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=vA(r,o.root,this.visualElement.getTransformPagePoint());let a=TA(o.layout.layoutBox,i);if(n){const s=n(lA(a));this.hasMutatedConstraints=!!s,s&&(a=Cg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=dn(u=>{if(!Wa(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,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 cu(this.visualElement,t),r.start(uu(t,r,0,n,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?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){dn(n=>{const{drag:r}=this.getProps();if(!Wa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-lt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};dn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=EA({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(),dn(a=>{if(!Wa(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(lt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;AA.set(this.visualElement,this);const t=this.visualElement.current,n=Fi(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wo(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()),st.read(r);const a=Di(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(dn(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=yu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Wa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function IA(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _A extends tr{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new PA(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Zg=e=>(t,n)=>{e&&st.postRender(()=>e(t,n))};class OA extends tr{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new Hg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Zg(t),onStart:Zg(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&st.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Fi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const qa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Xg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $i={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=Xg(e,t.target.x),r=Xg(e,t.target.y);return`${n}% ${r}%`}},MA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const i=Jn.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=lt(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 DA extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;vk(NA),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),qa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||st.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zc.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 Qg(e){const[t,n]=eg(),r=E.useContext(xi);return v.jsx(DA,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(dg),isPresent:t,safeToRemove:n})}const NA={borderRadius:{...$i,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$i,borderTopRightRadius:$i,borderBottomLeftRadius:$i,borderBottomRightRadius:$i,boxShadow:MA};function Jg(e,t,n){const r=At(e)?e:$r(e);return r.start(uu("",r,t,n)),r.animation}const FA=(e,t)=>e.depth-t.depth;class LA{constructor(){this.children=[],this.isDirty=!1}add(t){pc(this.children,t),this.isDirty=!0}remove(t){_a(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(FA),this.isDirty=!1,this.children.forEach(t)}}function VA(e,t){const n=Kt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Un(r),e(i-t))};return st.setup(r,!0),()=>Un(r)}const ev=["TopLeft","TopRight","BottomLeft","BottomRight"],$A=ev.length,tv=e=>typeof e=="string"?parseFloat(e):e,nv=e=>typeof e=="number"||Te.test(e);function jA(e,t,n,r,o,i){o?(e.opacity=lt(0,n.opacity??1,zA(r)),e.opacityExit=lt(t.opacity??1,0,BA(r))):i&&(e.opacity=lt(t.opacity??1,n.opacity??1,r));for(let a=0;a<$A;a++){const s=`border${ev[a]}Radius`;let l=rv(t,s),c=rv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||nv(l)===nv(c)?(e[s]=Math.max(lt(tv(l),tv(c),r),0),(In.test(c)||In.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,r))}function rv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const zA=ov(0,.5,Gh),BA=ov(.5,.95,cn);function ov(e,t,n){return r=>r<e?0:r>t?1:n(po(e,t,r))}function iv(e,t){e.min=t.min,e.max=t.max}function fn(e,t){iv(e.x,t.x),iv(e.y,t.y)}function av(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sv(e,t,n,r,o){return e-=t,e=Ha(e,1/n,r),o!==void 0&&(e=Ha(e,1/o,r)),e}function RA(e,t=0,n=1,r=.5,o,i=e,a=e){if(In.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=lt(i.min,i.max,r);e===i&&(s-=t),e.min=sv(e.min,t,n,s,o),e.max=sv(e.max,t,n,s,o)}function lv(e,t,[n,r,o],i,a){RA(e,t[n],t[r],t[o],t.scale,i,a)}const HA=["x","scaleX","originX"],WA=["y","scaleY","originY"];function cv(e,t,n,r){lv(e.x,t,HA,n?n.x:void 0,r?r.x:void 0),lv(e.y,t,WA,n?n.y:void 0,r?r.y:void 0)}function uv(e){return e.translate===0&&e.scale===1}function dv(e){return uv(e.x)&&uv(e.y)}function fv(e,t){return e.min===t.min&&e.max===t.max}function qA(e,t){return fv(e.x,t.x)&&fv(e.y,t.y)}function pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hv(e,t){return pv(e.x,t.x)&&pv(e.y,t.y)}function mv(e){return Wt(e.x)/Wt(e.y)}function gv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class UA{constructor(){this.members=[]}add(t){pc(this.members,t),t.scheduleRender()}remove(t){if(_a(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function KA(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 bu=["","X","Y","Z"],YA={visibility:"hidden"},GA=1e3;let ZA=0;function xu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",st,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vv(r)}function yv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=ZA++,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(JA),this.nodes.forEach(oP),this.nodes.forEach(iP),this.nodes.forEach(eP)},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 LA)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new mc),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Jc(a)&&!Jm(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=VA(d,250),qa.hasAnimatedSinceResize&&(qa.hasAnimatedSinceResize=!1,this.nodes.forEach(xv))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||uP,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=c.getProps(),y=!this.targetLayout||!hv(this.targetLayout,f),x=!d&&p;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Kc(m,"layout"),onPlay:g,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else d||xv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Un(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(aP),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&&vv(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(bv);return}this.isUpdating||this.nodes.forEach(nP),this.isUpdating=!1,this.nodes.forEach(rP),this.nodes.forEach(XA),this.nodes.forEach(QA),this.clearAllSnapshots();const s=Kt.now();Ft.delta=Wn(0,1e3/60,s-Ft.timestamp),Ft.timestamp=s,Ft.isProcessing=!0,xc.update.process(Ft),xc.preRender.process(Ft),xc.render.process(Ft),Ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tP),this.sharedNodes.forEach(sP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Wt(this.snapshot.measuredBox.x)&&!Wt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!dv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||zr(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)),dP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(fP))){const{scroll:u}=this.root;u&&(To(s.x,u.offset.x),To(s.y,u.offset.y))}return s}removeElementScroll(a){var l;const s=yt();if(fn(s,a),(l=this.scroll)!=null&&l.wasRoot)return s;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&&fn(s,a),To(s.x,d.offset.x),To(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const l=yt();fn(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&&Eo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),zr(u.latestValues)&&Eo(l,u.latestValues)}return zr(this.latestValues)&&Eo(l,this.latestValues),l}removeTransform(a){const s=yt();fn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!zr(c.latestValues))continue;hu(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();fn(u,d),cv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return zr(this.latestValues)&&cv(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!==Ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Ft.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Vi(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),fn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fn(this.target,this.layout.layoutBox),Lg(this.target,this.targetDelta)):fn(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=yt(),this.relativeTargetOrigin=yt(),Vi(this.relativeTargetOrigin,this.target,f.target),fn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hu(this.parent.latestValues)||Dg(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 m;const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ft.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;fn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;gA(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(av(this.prevProjectionDelta.x,this.projectionDelta.x),av(this.prevProjectionDelta.y,this.projectionDelta.y)),Li(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!gv(this.projectionDelta.x,this.prevProjectionDelta.x)||!gv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)==null||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=So(),this.projectionDelta=So(),this.projectionDeltaWithTransform=So()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=So();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=yt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),y=!h||h.members.length<=1,x=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(cP));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const w=S/1e3;wv(d.x,a.x,w),wv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lP(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&qA(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=yt()),fn(b,this.relativeTarget)),g&&(this.animationValues=u,jA(u,c,this.latestValues,w,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var s,l,c;this.notifyListeners("animationStart"),(s=this.currentAnimation)==null||s.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{qa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$r(0)),this.currentAnimation=Jg(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),a.onUpdate&&a.onUpdate(u)},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(GA),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&&kv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=Wt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Wt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}fn(s,l),Eo(s,u),Li(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new UA),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 s;const{layoutId:a}=this.options;return a?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())==null?void 0:s.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&&xu("z",a,c,this.animationValues);for(let u=0;u<bu.length;u++)xu(`rotate${bu[u]}`,a,c,this.animationValues),xu(`skew${bu[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return YA;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ra(a==null?void 0:a.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Ra(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!zr(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=KA(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:p}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in Oi){if(u[f]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:h}=Oi[f],y=s.transform==="none"?u[f]:m(u[f],c);if(g){const x=g.length;for(let b=0;b<x;b++)s[g[b]]=y}else h?this.options.visualElement.renderState.vars[f]=y:s[f]=y}return this.options.layoutId&&(s.pointerEvents=c===this?Ra(a==null?void 0:a.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)==null?void 0:s.stop()}),this.root.nodes.forEach(bv),this.root.sharedNodes.clear()}}}function XA(e){e.updateLayout()}function QA(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?dn(d=>{const p=a?t.measuredBox[d]:t.layoutBox[d],f=Wt(p);p.min=r[d].min,p.max=p.min+f}):kv(i,t.layoutBox,r)&&dn(d=>{const p=a?t.measuredBox[d]:t.layoutBox[d],f=Wt(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=So();Li(s,r,t.layoutBox);const l=So();a?Li(l,e.applyTransform(o,!0),t.measuredBox):Li(l,r,t.layoutBox);const c=!dv(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=yt();Vi(m,t.layoutBox,p.layoutBox);const g=yt();Vi(g,r,f.layoutBox),hv(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,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 JA(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 eP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tP(e){e.clearSnapshot()}function bv(e){e.clearMeasurements()}function nP(e){e.isLayoutDirty=!1}function rP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function xv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oP(e){e.resolveTargetDelta()}function iP(e){e.calcProjection()}function aP(e){e.resetSkewAndRotation()}function sP(e){e.removeLeadSnapshot()}function wv(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sv(e,t,n,r){e.min=lt(t.min,n.min,r),e.max=lt(t.max,n.max,r)}function lP(e,t,n,r){Sv(e.x,t.x,n.x,r),Sv(e.y,t.y,n.y,r)}function cP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uP={duration:.45,ease:[.4,0,.1,1]},Tv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ev=Tv("applewebkit/")&&!Tv("chrome/")?Math.round:cn;function Cv(e){e.min=Ev(e.min),e.max=Ev(e.max)}function dP(e){Cv(e.x),Cv(e.y)}function kv(e,t,n){return e==="position"||e==="preserve-aspect"&&!hA(mv(t),mv(n),.2)}function fP(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const pP=yv({attachResizeListener:(e,t)=>Di(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wu={current:void 0},Av=yv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wu.current){const e=new pP({});e.mount(window),e.setOptions({layoutScroll:!0}),wu.current=e}return wu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hP={pan:{Feature:OA},drag:{Feature:_A,ProjectionNode:Av,MeasureLayout:Qg}};function Pv(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&&st.postRender(()=>i(t,Ni(t)))}class mP extends tr{mount(){const{current:t}=this.node;t&&(this.unmount=$C(t,(n,r)=>(Pv(this.node,r,"Start"),o=>Pv(this.node,o,"End"))))}unmount(){}}class gP extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wi(Di(this.node.current,"focus",()=>this.onFocus()),Di(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Iv(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&&st.postRender(()=>i(t,Ni(t)))}class vP extends tr{mount(){const{current:t}=this.node;t&&(this.unmount=RC(t,(n,r)=>(Iv(this.node,r,"Start"),(o,{success:i})=>Iv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Su=new WeakMap,Tu=new WeakMap,yP=e=>{const t=Su.get(e.target);t&&t(e)},bP=e=>{e.forEach(yP)};function xP({root:e,...t}){const n=e||document;Tu.has(n)||Tu.set(n,{});const r=Tu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(bP,{root:e,...t})),r[o]}function wP(e,t,n){const r=xP(t);return Su.set(e,n),r.observe(e),()=>{Su.delete(e),r.unobserve(e)}}const SP={some:0,all:1};class TP extends tr{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:SP[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 wP(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(EP(t,n))&&this.startObserver()}unmount(){}}function EP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const CP={inView:{Feature:TP},tap:{Feature:vP},focus:{Feature:gP},hover:{Feature:mP}},kP={layout:{ProjectionNode:Av,MeasureLayout:Qg}},Eu={current:null},_v={current:!1};function AP(){if(_v.current=!0,!!fc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Eu.current=e.matches;e.addListener(t),t()}else Eu.current=!1}const ji=new WeakMap;function PP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(At(o))e.addValue(r,o);else if(At(i))e.addValue(r,$r(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,$r(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ov=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mv{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=Wc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Kt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,st.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Ba(n),this.isVariantNode=lg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];l[p]!==void 0&&At(f)&&f.set(l[p],!1)}}mount(t){this.current=t,ji.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),_v.current||AP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Eu.current,process.env.NODE_ENV!=="production"&&gc(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(),Un(this.notifyUpdate),Un(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=yo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&st.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 xo){const n=xo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ov.length;r++){const o=Ov[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=PP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=$r(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($h(r)||zh(r))?r=parseFloat(r):!qC(r)&&Jn.test(n)&&(r=Hm(t,n)),this.setBaseTarget(t,At(r)?r.get():r)),At(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=au(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!At(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Dv extends Mv{constructor(){super(...arguments),this.KeyframeResolver=NC}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;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Nv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function IP(e){return window.getComputedStyle(e)}class Fv extends Dv{constructor(){super(...arguments),this.type="html",this.renderInstance=Nv}readValueFromInstance(t,n){var r;if(yo.has(n))return(r=this.projection)!=null&&r.isProjecting?jc(n):XE(t,n);{const o=IP(t),i=(wc(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zg(t,n)}build(t,n,r){ru(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return su(t,n,r)}}const Lv=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 _P(e,t,n,r){Nv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Lv.has(o)?o:nu(o),t.attrs[o])}class Vv extends Dv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yo.has(n)){const r=Rm(n);return r&&r.default||0}return n=Lv.has(n)?n:nu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xg(t,n,r)}build(t,n,r){mg(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){_P(t,n,r,o)}mount(t){this.isSVGTag=vg(t.tagName),super.mount(t)}}const OP=(e,t)=>iu(e)?new Vv(t):new Fv(t,{allowProjection:e!==E.Fragment}),MP=Nk({...aA,...CP,...hP,...kP},OP),pt=ak(MP);function DP(e){return E.useEffect(()=>()=>e(),[])}function Ua(e){const t=vn(()=>$r(e)),{isStatic:n}=E.useContext(bo);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function $v(e,t){const n=Ua(t()),r=()=>n.set(t());return r(),Pa(()=>{const o=()=>st.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Un(r)}}),n}function NP(e){Ii.current=[],e();const t=$v(Ii.current,e);return Ii.current=void 0,t}function FP(e,t,n,r){if(typeof e=="function")return NP(e);const o=typeof t=="function"?t:HC(t,n,r);return Array.isArray(e)?jv(e,o):jv([e],([i])=>o(i))}function jv(e,t){const n=vn(()=>[]);return $v(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Cu(e){return typeof e=="object"&&!Array.isArray(e)}function zv(e,t,n,r){return typeof e=="string"&&Cu(t)?Wm(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function LP(e,t,n){return e*(t+1)}function Bv(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function VP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(_a(e,o),r--)}}function $P(e,t,n,r,o,i){VP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:lt(o,i,r[a]),easing:Jh(n,a)})}function jP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function zP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const BP="easeInOut",RP=20;function HP(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,Bv(d,m.at,u,c));continue}let[g,h,y={}]=m;y.at!==void 0&&(d=Bv(d,y.at,u,c));let x=0;const b=(S,w,T,C=0,k=0)=>{const _=WP(S),{delay:A=0,times:L=Sm(_),type:N="keyframes",repeat:$,repeatType:I,repeatDelay:M=0,...D}=w;let{ease:V=t.ease||"easeOut",duration:F}=w;const H=typeof A=="function"?A(C,k):A,O=_.length,B=qc(N)?N:o==null?void 0:o[N||"keyframes"];if(O<=2&&B){let G=100;if(O===2&&KP(_)){const j=_[1]-_[0];G=Math.abs(j)}const Y={...D};F!==void 0&&(Y.duration=un(F));const Z=gm(Y,G,B);V=Z.ease,F=Z.duration}F??(F=i);const X=d+H;L.length===1&&L[0]===0&&(L[1]=1);const Q=L.length-_.length;if(Q>0&&wm(L,Q),_.length===1&&_.unshift(null),$){Xt($<RP,"Repeat count too high, must be less than 20"),F=LP(F,$);const G=[..._],Y=[...L];V=Array.isArray(V)?[...V]:[V];const Z=[...V];for(let j=0;j<$;j++){_.push(...G);for(let z=0;z<G.length;z++)L.push(Y[z]+(j+1)),V.push(z===0?"linear":Jh(Z,z-1))}jP(L,$)}const J=X+F;$P(T,_,V,L,X,J),x=Math.max(H+F,x),p=Math.max(J,p)};if(At(g)){const S=Rv(g,s);b(h,y,Hv("default",S))}else{const S=zv(g,h,r,l),w=S.length;for(let T=0;T<w;T++){h=h,y=y;const C=S[T],k=Rv(C,s);for(const _ in h)b(h[_],qP(y,_),Hv(_,k),T,w)}}u=d,d+=x}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(zP);const y=[],x=[],b=[];for(let w=0;w<h.length;w++){const{at:T,value:C,easing:k}=h[w];y.push(C),x.push(po(0,p,T)),b.push(k||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),b.unshift(BP)),x[x.length-1]!==1&&(x.push(1),y.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const S=a.get(m);S.keyframes[g]=y,S.transition[g]={...t,duration:p,ease:b,times:x,...n}}}),a}function Rv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Hv(e,t){return t[e]||(t[e]=[]),t[e]}function WP(e){return Array.isArray(e)?e:[e]}function qP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const UP=e=>typeof e=="number",KP=e=>e.every(UP);function YP(e,t){return e in t}class GP extends Mv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(YP(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function ZP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Jc(e)&&!Jm(e)?new Vv(t):new Fv(t);n.mount(e),ji.set(e,n)}function XP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new GP(t);n.mount(e),ji.set(e,n)}function QP(e,t){return At(e)||typeof e=="number"||typeof e=="string"&&!Cu(t)}function Wv(e,t,n,r){const o=[];if(QP(e,t))o.push(Jg(e,Cu(t)&&t.default||t,n&&(n.default||n)));else{const i=zv(e,t,r),a=i.length;Xt(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?ZP:XP;ji.has(l)||c(l);const u=ji.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...du(u,{...t,transition:d},{}))}}return o}function JP(e,t,n){const r=[];return HP(e,t,n,{spring:Ai}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Wv(s,i,a))}),r}function eI(e){return Array.isArray(e)&&e.some(Array.isArray)}function tI(e){function t(n,r,o){let i=[];eI(n)?i=JP(n,r,e):i=Wv(n,r,o,e);const a=new SC(i);return e&&e.animations.push(a),a}return t}function nI(){const e=vn(()=>({current:null,animations:[]})),t=vn(()=>tI(e));return DP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class rI{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 oI=()=>new rI;function iI(){return vn(oI)}const qv=E.createContext(null);function aI(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=lt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?JT(e,o,o+i):e}function sI({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=vn(()=>pt[t]),l=[],c=E.useRef(!1);Xt(!!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(cI)},updateOrder:(d,p,f)=>{if(c.current)return;const m=aI(l,d,p,f);l!==m&&(c.current=!0,r(m.map(lI).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),v.jsx(s,{...i,ref:a,ignoreStrict:!0,children:v.jsx(qv.Provider,{value:u,children:e})})}const Uv=E.forwardRef(sI);function lI(e){return e.value}function cI(e,t){return e.layout.min-t.layout.min}function Kv(e,t=0){return At(e)?e:Ua(t)}function uI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=vn(()=>pt[r]),c=E.useContext(qv),u={x:Kv(t.x),y:Kv(t.y)},d=FP([u.x,u.y],([g,h])=>g||h?1:"unset");Xt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return v.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:y}=h;y[p]&&m(n,u[p].get(),y[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const Yv=E.forwardRef(uI);function dI(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function fI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:dI(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=bc(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),v.jsx(iC,{isPresent:t,childRef:o,sizeRef:i,children:P.cloneElement(e,{ref:o})})}const sC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(lC),c=S.useId();let u=!0,d=S.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:h=>{l.set(h,!0);for(const f of l.values())if(!f)return;r&&r()},register:h=>(l.set(h,!1),()=>l.delete(h))}),[n,l,r]);return i&&u&&(d={...d}),S.useMemo(()=>{l.forEach((h,f)=>l.set(f,!1))},[n]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=v.jsx(aC,{isPresent:n,anchorX:s,children:e})),v.jsx(Aa.Provider,{value:d,children:e})};function lC(){return new Map}function ug(e=!0){const t=S.useContext(Aa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const La=e=>e.key||"";function dg(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const ir=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=ug(a),u=S.useMemo(()=>dg(e),[e]),d=a&&!l?[]:u.map(La),h=S.useRef(!0),f=S.useRef(u),b=bn(()=>new Map),[m,p]=S.useState(u),[g,y]=S.useState(u);Pa(()=>{h.current=!1,f.current=u;for(let w=0;w<g.length;w++){const E=La(g[w]);d.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[g,d.length,d.join("-")]);const x=[];if(u!==m){let w=[...u];for(let E=0;E<g.length;E++){const k=g[E],C=La(k);d.includes(C)||(w.splice(E,0,k),x.push(k))}return i==="wait"&&x.length&&(w=x),y(dg(w)),p(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=S.useContext(vi);return v.jsx(v.Fragment,{children:g.map(w=>{const E=La(w),k=a&&!l?!1:u===g||d.includes(E),C=()=>{if(b.has(E))b.set(E,!0);else return;let M=!0;b.forEach(_=>{_||(M=!1)}),M&&(T?.(),y(f.current),a&&c?.(),r&&r())};return v.jsx(sC,{isPresent:k,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:k?void 0:C,anchorX:s,children:w},E)})})},cC=S.createContext(null);function uC(){const e=S.useRef(!1);return Pa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function dC(){const e=uC(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>lt.postRender(r),[r]),t]}const fC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function fg(){const e=new Set,t=new WeakMap,n=()=>e.forEach(fC);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 pg=e=>e===!0,pC=e=>pg(e===!0)||e==="id",hC=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(vi),o=S.useContext(cC),[i,a]=dC(),s=S.useRef(null),l=r.id||o;s.current===null&&(pC(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:pg(n)&&r.group||fg()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return v.jsx(vi.Provider,{value:c,children:e})},hg=S.createContext({strict:!1}),mg={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"]},bo={};for(const e in mg)bo[e]={isEnabled:t=>mg[e].some(n=>!!t[n])};function mC(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const gC=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 Va(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gC.has(e)}let gg=e=>!Va(e);function vg(e){typeof e=="function"&&(gg=t=>t.startsWith("on")?!Va(t):e(t))}try{vg(require("@emotion/is-prop-valid").default)}catch{}function vC(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(gg(o)||n===!0&&Va(o)||!t&&!Va(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function yC({children:e,isValidProp:t,...n}){t&&vg(t),n={...S.useContext(yo),...n},n.isStatic=bn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return v.jsx(yo.Provider,{value:r,children:e})}function bC(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Tc(!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 $a=S.createContext({});function ja(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pi(e){return typeof e=="string"||Array.isArray(e)}const lu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cu=["initial",...lu];function za(e){return ja(e.animate)||cu.some(t=>Pi(e[t]))}function yg(e){return!!(za(e)||e.variants)}function xC(e,t){if(za(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Pi(n)?n:void 0,animate:Pi(r)?r:void 0}}return e.inherit!==!1?t:{}}function wC(e){const{initial:t,animate:n}=xC(e,S.useContext($a));return S.useMemo(()=>({initial:t,animate:n}),[bg(t),bg(n)])}function bg(e){return Array.isArray(e)?e.join(" "):e}const SC=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TC(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):xo(n)&&(n.current=r))},[t])}const uu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xg="data-"+uu("framerAppearId"),wg=S.createContext({});function EC(e,t,n,r,o){const{visualElement:i}=S.useContext($a),a=S.useContext(hg),s=S.useContext(Aa),l=S.useContext(yo).reducedMotion,c=S.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=S.useContext(wg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&kC(c.current,n,o,d);const h=S.useRef(!1);S.useInsertionEffect(()=>{u&&h.current&&u.update(n,s)});const f=n[xg],b=S.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Pa(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),ou.render(u.render),b.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!b.current&&u.animationState&&u.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1))}),u}function kC(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Sg(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&xo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Sg(e){if(e)return e.options.allowProjection!==!1?e.projection:Sg(e.parent)}function CC({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&mC(e);function i(s,l){let c;const u={...S.useContext(yo),...s,layoutId:PC(s)},{isStatic:d}=u,h=wC(s),f=r(s,d);if(!d&&bc){AC(u,e);const b=IC(u);c=b.MeasureLayout,h.visualElement=EC(o,f,u,t,b.ProjectionNode)}return v.jsxs($a.Provider,{value:h,children:[c&&h.visualElement?v.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,s,TC(f,h.visualElement,l),f,d,h.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=S.forwardRef(i);return a[SC]=o,a}function PC({layoutId:e}){const t=S.useContext(vi).id;return t&&e!==void 0?t+"-"+e:e}function AC(e,t){const n=S.useContext(hg).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?uo(!1,r):en(!1,r)}}function IC(e){const{drag:t,layout:n}=bo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ai={};function _C(e){for(const t in e)Ai[t]=e[t],Ac(t)&&(Ai[t].isCSSVariable=!0)}function Tg(e,{layout:t,layoutId:n}){return vo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ai[e]||e==="opacity")}const OC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MC=go.length;function DC(e,t,n){let r="",o=!0;for(let i=0;i<MC;i++){const a=go[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=tg(s,ru[a]);if(!l){o=!1;const u=OC[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function du(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(vo.has(l)){a=!0;continue}else if(Ac(l)){o[l]=c;continue}else{const u=tg(c,ru[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=DC(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 fu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Eg(e,t,n){for(const r in t)!At(t[r])&&!Tg(r,n)&&(e[r]=t[r])}function NC({transformTemplate:e},t){return S.useMemo(()=>{const n=fu();return du(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FC(e,t){const n=e.style||{},r={};return Eg(r,n,e),Object.assign(r,NC(e,t)),r}function LC(e,t){const n={},r=FC(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 VC={offset:"stroke-dashoffset",array:"stroke-dasharray"},$C={offset:"strokeDashoffset",array:"strokeDasharray"};function jC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?VC:$C;e[i.offset]=Ee.transform(-r);const a=Ee.transform(t),s=Ee.transform(n);e[i.array]=`${a} ${s}`}function kg(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(du(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&jC(d,o,i,a,!1)}const Cg=()=>({...fu(),attrs:{}}),Pg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zC(e,t,n,r){const o=S.useMemo(()=>{const i=Cg();return kg(i,t,Pg(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Eg(i,e.style,e),o.style={...i,...o.style}}return o}const RC=["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 pu(e){return typeof e!="string"||e.includes("-")?!1:!!(RC.indexOf(e)>-1||/[A-Z]/u.test(e))}function BC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(pu(n)?zC:LC)(r,i,a,n),c=vC(r,typeof n=="string",e),u=n!==S.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=S.useMemo(()=>At(d)?d.get():d,[d]);return S.createElement(n,{...u,children:h})}}function Ag(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function hu(e,t,n,r){if(typeof t=="function"){const[o,i]=Ag(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]=Ag(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ra(e){return At(e)?e.get():e}function HC({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:WC(n,r,o,e),renderState:t()}}const Ig=e=>(t,n)=>{const r=S.useContext($a),o=S.useContext(Aa),i=()=>HC(e,t,r,o);return n?i():bn(i)};function WC(e,t,n,r){const o={},i=r(e,{});for(const h in i)o[h]=Ra(i[h]);let{initial:a,animate:s}=e;const l=za(e),c=yg(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"&&!ja(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const b=hu(e,h[f]);if(b){const{transitionEnd:m,transition:p,...g}=b;for(const y in g){let x=g[y];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[y]=x)}for(const y in m)o[y]=m[y]}}}return o}function mu(e,t,n){const{style:r}=e,o={};for(const i in r)(At(r[i])||t.style&&At(t.style[i])||Tg(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const qC={useVisualState:Ig({scrapeMotionValuesFromProps:mu,createRenderState:fu})};function _g(e,t,n){const r=mu(e,t,n);for(const o in e)if(At(e[o])||At(t[o])){const i=go.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const UC={useVisualState:Ig({scrapeMotionValuesFromProps:_g,createRenderState:Cg})};function KC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...pu(r)?UC:qC,preloadedFeatures:e,useRender:BC(o),createVisualElement:t,Component:r};return CC(a)}}function Ii(e,t,n){const r=e.getProps();return hu(r,t,n!==void 0?n:r.custom,e)}const gu=e=>Array.isArray(e);function YC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lr(n))}function GC(e){return gu(e)?e[e.length-1]||0:e}function ZC(e,t){const n=Ii(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=GC(i[a]);YC(e,a,s)}}function XC(e){return!!(At(e)&&e.add)}function vu(e,t){const n=e.getValue("willChange");if(XC(n))return n.add(t);if(!n&&Gn.WillChange){const r=new Gn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Og(e){return e.props[xg]}const QC=e=>e!==null;function JC(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(QC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const eP={type:"spring",stiffness:500,damping:25,restSpeed:10},tP=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nP={type:"keyframes",duration:.8},rP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oP=(e,{keyframes:t})=>t.length>2?nP:vo.has(e)?e.startsWith("scale")?tP(t[1]):eP:rP;function iP({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 yu=(e,t,n,r={},o,i)=>a=>{const s=tu(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};iP(s)||Object.assign(u,oP(e,u)),u.duration&&(u.duration=fn(u.duration)),u.repeatDelay&&(u.repeatDelay=fn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Gn.instantAnimations||Gn.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const h=JC(u.keyframes,s);if(h!==void 0){lt.update(()=>{u.onUpdate(h),u.onComplete()});return}}return s.isSync?new Wc(u):new Dk(u)};function aP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),h=s[u];if(h===void 0||c&&aP(c,u))continue;const f={delay:n,...tu(i||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===b&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const g=Og(e);if(g){const y=window.MotionHandoffAnimation(g,u,lt);y!==null&&(f.startTime=y,m=!0)}}vu(e,u),d.start(yu(u,d,h,e.shouldReduceMotion&&Km.has(u)?{type:!1}:f,e,m));const p=d.animation;p&&l.push(p)}return a&&Promise.all(l).then(()=>{lt.update(()=>{a&&ZC(e,a)})}),l}function xu(e,t,n={}){const r=Ii(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(bu(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return sP(e,t,c+l,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function sP(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(lP).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(xu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function lP(e,t){return e.sortNodePosition(t)}function cP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>xu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=xu(e,t,n);else{const o=typeof t=="function"?Ii(e,t,n.custom):t;r=Promise.all(bu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Mg(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 uP=cu.length;function Dg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Dg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uP;n++){const r=cu[n],o=e.props[r];(Pi(o)||o===!1)&&(t[r]=o)}return t}const dP=[...lu].reverse(),fP=lu.length;function pP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>cP(e,n,r)))}function hP(e){let t=pP(e),n=Ng(),r=!0;const o=l=>(c,u)=>{const d=Ii(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Dg(e.parent)||{},d=[],h=new Set;let f={},b=1/0;for(let p=0;p<fP;p++){const g=dP[p],y=n[g],x=c[g]!==void 0?c[g]:u[g],T=Pi(x),w=g===l?y.isActive:null;w===!1&&(b=p);let E=x===u[g]&&x!==c[g]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||ja(x)||typeof x=="boolean")continue;const k=mP(y.prevProp,x);let C=k||g===l&&y.isActive&&!E&&T||p>b&&T,M=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(g),{});w===!1&&(F={});const{prevResolvedValues:L={}}=y,H={...L,...F},I=D=>{C=!0,h.has(D)&&(M=!0,h.delete(D)),y.needsAnimating[D]=!0;const A=e.getValue(D);A&&(A.liveStyle=!1)};for(const D in H){const A=F[D],j=L[D];if(f.hasOwnProperty(D))continue;let N=!1;gu(A)&&gu(j)?N=!Mg(A,j):N=A!==j,N?A!=null?I(D):h.add(D):A!==void 0&&h.has(D)?I(D):y.protectedKeys[D]=!0}y.prevProp=x,y.prevResolvedValues=F,y.isActive&&(f={...f,...F}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(E&&k)||M)&&d.push(..._.map(D=>({animation:D,options:{type:g}})))}if(h.size){const p={};if(typeof c.initial!="boolean"){const g=Ii(e,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(p.transition=g.transition)}h.forEach(g=>{const y=e.getBaseTarget(g),x=e.getValue(g);x&&(x.liveStyle=!0),p[g]=y??null}),d.push({animation:p})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function s(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Ng(),r=!0}}}function mP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Mg(t,e):!1}function Vr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ng(){return{animate:Vr(!0),whileInView:Vr(),whileHover:Vr(),whileTap:Vr(),whileDrag:Vr(),whileFocus:Vr(),exit:Vr()}}class ar{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gP extends ar{constructor(t){super(t),t.animationState||(t.animationState=hP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ja(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let vP=0;class yP extends ar{constructor(){super(...arguments),this.id=vP++}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 bP={animation:{Feature:gP},exit:{Feature:yP}};function _i(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Oi(e){return{point:{x:e.pageX,y:e.pageY}}}const xP=e=>t=>iu(t)&&e(t,Oi(t));function Mi(e,t,n,r){return _i(e,t,xP(n),r)}function Fg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SP(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 Lg=1e-4,TP=1-Lg,EP=1+Lg,Vg=.01,kP=0-Vg,CP=0+Vg;function qt(e){return e.max-e.min}function PP(e,t,n){return Math.abs(e-t)<=n}function $g(e,t,n,r=.5){e.origin=r,e.originPoint=ct(t.min,t.max,e.origin),e.scale=qt(n)/qt(t),e.translate=ct(n.min,n.max,e.origin)-e.originPoint,(e.scale>=TP&&e.scale<=EP||isNaN(e.scale))&&(e.scale=1),(e.translate>=kP&&e.translate<=CP||isNaN(e.translate))&&(e.translate=0)}function Di(e,t,n,r){$g(e.x,t.x,n.x,r?r.originX:void 0),$g(e.y,t.y,n.y,r?r.originY:void 0)}function jg(e,t,n){e.min=n.min+t.min,e.max=e.min+qt(t)}function AP(e,t,n){jg(e.x,t.x,n.x),jg(e.y,t.y,n.y)}function zg(e,t,n){e.min=t.min-n.min,e.max=e.min+qt(t)}function Ni(e,t,n){zg(e.x,t.x,n.x),zg(e.y,t.y,n.y)}const Rg=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:Rg(),y:Rg()}),Bg=()=>({min:0,max:0}),yt=()=>({x:Bg(),y:Bg()});function pn(e){return[e("x"),e("y")]}function wu(e){return e===void 0||e===1}function Su({scale:e,scaleX:t,scaleY:n}){return!wu(e)||!wu(t)||!wu(n)}function $r(e){return Su(e)||Hg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Hg(e){return Wg(e.x)||Wg(e.y)}function Wg(e){return e&&e!=="0%"}function Ba(e,t,n){const r=e-n,o=t*r;return n+o}function qg(e,t,n,r,o){return o!==void 0&&(e=Ba(e,o,r)),Ba(e,n,r)+t}function Tu(e,t=0,n=1,r,o){e.min=qg(e.min,t,n,r,o),e.max=qg(e.max,t,n,r,o)}function Ug(e,{x:t,y:n}){Tu(e.x,t.translate,t.scale,t.originPoint),Tu(e.y,n.translate,n.scale,n.originPoint)}const Kg=.999999999999,Yg=1.0000000000001;function IP(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,Ug(e,a)),r&&$r(i.latestValues)&&To(e,i.latestValues))}t.x<Yg&&t.x>Kg&&(t.x=1),t.y<Yg&&t.y>Kg&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function Gg(e,t,n,r,o=.5){const i=ct(e.min,e.max,o);Tu(e,t,n,i,r)}function To(e,t){Gg(e.x,t.x,t.scaleX,t.scale,t.originX),Gg(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zg(e,t){return Fg(SP(e.getBoundingClientRect(),t))}function _P(e,t,n){const r=Zg(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const Xg=({current:e})=>e?e.ownerDocument.defaultView:null,Qg=(e,t)=>Math.abs(e-t);function OP(e,t){const n=Qg(e.x,t.x),r=Qg(e.y,t.y);return Math.sqrt(n**2+r**2)}class Jg{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=ku(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=OP(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:b}=d,{timestamp:m}=Vt;this.history.push({...b,timestamp:m});const{onStart:p,onMove:g}=this.handlers;h||(p&&p(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Eu(h,this.transformPagePoint),lt.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:b,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=ku(d.type==="pointercancel"?this.lastMoveEventInfo:Eu(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,p),b&&b(d,p)},!iu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Oi(t),s=Eu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Vt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,ku(s,this.history)),this.removeListeners=yi(Mi(this.contextWindow,"pointermove",this.handlePointerMove),Mi(this.contextWindow,"pointerup",this.handlePointerUp),Mi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zn(this.updatePoint)}}function Eu(e,t){return t?{point:t(e.point)}:e}function ev(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ku({point:e},t){return{point:e,delta:ev(e,tv(t)),offset:ev(e,MP(t)),velocity:DP(t,.1)}}function MP(e){return e[0]}function tv(e){return e[e.length-1]}function DP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=tv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const i=_n(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 NP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ct(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ct(n,e,r.max):Math.min(e,n)),e}function nv(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 FP(e,{top:t,left:n,bottom:r,right:o}){return{x:nv(e.x,n,o),y:nv(e.y,t,r)}}function rv(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 LP(e,t){return{x:rv(e.x,t.x),y:rv(e.y,t.y)}}function VP(e,t){let n=.5;const r=qt(e),o=qt(t);return o>r?n=fo(t.min,t.max-r,e.min):r>o&&(n=fo(e.min,e.max-o,t.min)),Yn(0,1,n)}function $P(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 Cu=.35;function jP(e=Cu){return e===!1?e=0:e===!0&&(e=Cu),{x:ov(e,"left","right"),y:ov(e,"top","bottom")}}function ov(e,t,n){return{min:iv(e,t),max:iv(e,n)}}function iv(e,t){return typeof e=="number"?e:e[t]||0}const zP=new WeakMap;class RP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Oi(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:b}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zk(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(p=>{let g=this.getAxisMotionValue(p).get()||0;if(On.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[p];x&&(g=qt(x)*(parseFloat(g)/100))}}this.originPoint[p]=g}),b&&lt.postRender(()=>b(u,d)),vu(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:b,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=d;if(f&&this.currentDirection===null){this.currentDirection=BP(p),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",d.point,p),this.updateAxis("y",d.point,p),this.visualElement.render(),m&&m(u,d)},s=(u,d)=>this.stop(u,d),l=()=>pn(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Jg(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Xg(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&&lt.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||!Ha(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=NP(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&xo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=FP(r.layoutBox,t):this.constraints=!1,this.elastic=jP(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=$P(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(t))return!1;const r=t.current;en(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=_P(r,o.root,this.visualElement.getTransformPagePoint());let a=LP(o.layout.layoutBox,i);if(n){const s=n(wP(a));this.hasMutatedConstraints=!!s,s&&(a=Fg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!Ha(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return vu(this.visualElement,t),r.start(yu(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){pn(n=>{const{drag:r}=this.getProps();if(!Ha(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]-ct(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};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=VP({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pn(a=>{if(!Ha(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ct(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;zP.set(this.visualElement,this);const t=this.visualElement.current,n=Mi(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()),lt.read(r);const a=_i(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Cu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Ha(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HP extends ar{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new RP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const av=e=>(t,n)=>{e&&lt.postRender(()=>e(t,n))};class WP extends ar{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new Jg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:av(t),onStart:av(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&lt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Mi(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 Wa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=sv(e,t.target.x),r=sv(e,t.target.y);return`${n}% ${r}%`}},qP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=or.parse(e);if(o.length>5)return r;const i=or.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=ct(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 UP extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;_C(KP),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()})),Wa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||lt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ou.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 lv(e){const[t,n]=ug(),r=S.useContext(vi);return v.jsx(UP,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(wg),isPresent:t,safeToRemove:n})}const KP={borderRadius:{...Fi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fi,borderTopRightRadius:Fi,borderBottomLeftRadius:Fi,borderBottomRightRadius:Fi,boxShadow:qP};function cv(e,t,n){const r=At(e)?e:Lr(e);return r.start(yu("",r,t,n)),r.animation}const YP=(e,t)=>e.depth-t.depth;class GP{constructor(){this.children=[],this.isDirty=!1}add(t){xc(this.children,t),this.isDirty=!0}remove(t){Ia(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YP),this.isDirty=!1,this.children.forEach(t)}}function ZP(e,t){const n=Gt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Zn(r),e(i-t))};return lt.setup(r,!0),()=>Zn(r)}const uv=["TopLeft","TopRight","BottomLeft","BottomRight"],XP=uv.length,dv=e=>typeof e=="string"?parseFloat(e):e,fv=e=>typeof e=="number"||Ee.test(e);function QP(e,t,n,r,o,i){o?(e.opacity=ct(0,n.opacity??1,JP(r)),e.opacityExit=ct(t.opacity??1,0,eA(r))):i&&(e.opacity=ct(t.opacity??1,n.opacity??1,r));for(let a=0;a<XP;a++){const s=`border${uv[a]}Radius`;let l=pv(t,s),c=pv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||fv(l)===fv(c)?(e[s]=Math.max(ct(dv(l),dv(c),r),0),(On.test(c)||On.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ct(t.rotate||0,n.rotate||0,r))}function pv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JP=hv(0,.5,am),eA=hv(.5,.95,dn);function hv(e,t,n){return r=>r<e?0:r>t?1:n(fo(e,t,r))}function mv(e,t){e.min=t.min,e.max=t.max}function hn(e,t){mv(e.x,t.x),mv(e.y,t.y)}function gv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vv(e,t,n,r,o){return e-=t,e=Ba(e,1/n,r),o!==void 0&&(e=Ba(e,1/o,r)),e}function tA(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=ct(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ct(i.min,i.max,r);e===i&&(s-=t),e.min=vv(e.min,t,n,s,o),e.max=vv(e.max,t,n,s,o)}function yv(e,t,[n,r,o],i,a){tA(e,t[n],t[r],t[o],t.scale,i,a)}const nA=["x","scaleX","originX"],rA=["y","scaleY","originY"];function bv(e,t,n,r){yv(e.x,t,nA,n?n.x:void 0,r?r.x:void 0),yv(e.y,t,rA,n?n.y:void 0,r?r.y:void 0)}function xv(e){return e.translate===0&&e.scale===1}function wv(e){return xv(e.x)&&xv(e.y)}function Sv(e,t){return e.min===t.min&&e.max===t.max}function oA(e,t){return Sv(e.x,t.x)&&Sv(e.y,t.y)}function Tv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ev(e,t){return Tv(e.x,t.x)&&Tv(e.y,t.y)}function kv(e){return qt(e.x)/qt(e.y)}function Cv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iA{constructor(){this.members=[]}add(t){xc(this.members,t),t.scheduleRender()}remove(t){if(Ia(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 aA(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Pu=["","X","Y","Z"],sA={visibility:"hidden"},lA=1e3;let cA=0;function Au(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Og(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pv(r)}function Av({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=cA++,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(fA),this.nodes.forEach(vA),this.nodes.forEach(yA),this.nodes.forEach(pA)},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 GP)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Sc),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=su(a)&&!cg(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=ZP(d,250),Wa.hasAnimatedSinceResize&&(Wa.hasAnimatedSinceResize=!1,this.nodes.forEach(_v))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||TA,{onLayoutAnimationStart:m,onLayoutAnimationComplete:p}=c.getProps(),g=!this.targetLayout||!Ev(this.targetLayout,f),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...tu(b,"layout"),onPlay:m,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||_v(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Zn(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(bA),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&&Pv(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(Iv);return}this.isUpdating||this.nodes.forEach(mA),this.isUpdating=!1,this.nodes.forEach(gA),this.nodes.forEach(uA),this.nodes.forEach(dA),this.clearAllSnapshots();const s=Gt.now();Vt.delta=Yn(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Pc.update.process(Vt),Pc.preRender.process(Vt),Pc.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ou.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hA),this.sharedNodes.forEach(xA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qt(this.snapshot.measuredBox.x)&&!qt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!wv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(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)),EA(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(kA))){const{scroll:c}=this.root;c&&(So(s.x,c.offset.x),So(s.y,c.offset.y))}return s}removeElementScroll(a){const s=yt();if(hn(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&hn(s,a),So(s.x,u.offset.x),So(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=yt();hn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&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=yt();hn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!$r(c.latestValues))continue;Su(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();hn(u,d),bv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return $r(this.latestValues)&&bv(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Ni(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),AP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Ug(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Ni(this.relativeTargetOrigin,this.target,h.target),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Su(this.parent.latestValues)||Hg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Vt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;IP(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gv(this.prevProjectionDelta.x,this.projectionDelta.x),gv(this.prevProjectionDelta.y,this.projectionDelta.y)),Di(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Cv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=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 h=yt(),f=l?l.source:void 0,b=this.layout?this.layout.source:void 0,m=f!==b,p=this.getStack(),g=!p||p.members.length<=1,y=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(SA));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Ov(d.x,a.x,w),Ov(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ni(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wA(this.relativeTarget,this.relativeTargetOrigin,h,w),x&&oA(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),hn(x,this.relativeTarget)),m&&(this.animationValues=u,QP(u,c,this.latestValues,w,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Zn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Wa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Lr(0)),this.currentAnimation=cv(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(lA),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&&Lv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=qt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const h=qt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}hn(s,l),To(s,u),Di(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new iA),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Au("z",a,c,this.animationValues);for(let u=0;u<Pu.length;u++)Au(`rotate${Pu[u]}`,a,c,this.animationValues),Au(`skew${Pu[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return sA;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ra(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Ra(a?.pointerEvents)||""),this.hasProjected&&!$r(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=aA(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:h}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in Ai){if(u[f]===void 0)continue;const{correct:b,applyTo:m,isCSSVariable:p}=Ai[f],g=s.transform==="none"?u[f]:b(u[f],c);if(m){const y=m.length;for(let x=0;x<y;x++)s[m[x]]=g}else p?this.options.visualElement.renderState.vars[f]=g:s[f]=g}return this.options.layoutId&&(s.pointerEvents=c===this?Ra(a?.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Iv),this.root.sharedNodes.clear()}}}function uA(e){e.updateLayout()}function dA(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=qt(d);d.min=n[u].min,d.max=d.min+h}):Lv(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=qt(n[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=wo();Di(a,n,t.layoutBox);const s=wo();i?Di(s,e.applyTransform(r,!0),t.measuredBox):Di(s,n,t.layoutBox);const l=!wv(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const f=yt();Ni(f,t.layoutBox,d.layoutBox);const b=yt();Ni(b,n,h.layoutBox),Ev(f,b)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function fA(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 pA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hA(e){e.clearSnapshot()}function Iv(e){e.clearMeasurements()}function mA(e){e.isLayoutDirty=!1}function gA(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _v(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vA(e){e.resolveTargetDelta()}function yA(e){e.calcProjection()}function bA(e){e.resetSkewAndRotation()}function xA(e){e.removeLeadSnapshot()}function Ov(e,t,n){e.translate=ct(t.translate,0,n),e.scale=ct(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Mv(e,t,n,r){e.min=ct(t.min,n.min,r),e.max=ct(t.max,n.max,r)}function wA(e,t,n,r){Mv(e.x,t.x,n.x,r),Mv(e.y,t.y,n.y,r)}function SA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TA={duration:.45,ease:[.4,0,.1,1]},Dv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nv=Dv("applewebkit/")&&!Dv("chrome/")?Math.round:dn;function Fv(e){e.min=Nv(e.min),e.max=Nv(e.max)}function EA(e){Fv(e.x),Fv(e.y)}function Lv(e,t,n){return e==="position"||e==="preserve-aspect"&&!PP(kv(t),kv(n),.2)}function kA(e){return e!==e.root&&e.scroll?.wasRoot}const CA=Av({attachResizeListener:(e,t)=>_i(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Iu={current:void 0},Vv=Av({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Iu.current){const e=new CA({});e.mount(window),e.setOptions({layoutScroll:!0}),Iu.current=e}return Iu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),PA={pan:{Feature:WP},drag:{Feature:HP,ProjectionNode:Vv,MeasureLayout:lv}};function $v(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&&lt.postRender(()=>i(t,Oi(t)))}class AA extends ar{mount(){const{current:t}=this.node;t&&(this.unmount=Xk(t,(n,r)=>($v(this.node,r,"Start"),o=>$v(this.node,o,"End"))))}unmount(){}}class IA extends ar{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=yi(_i(this.node.current,"focus",()=>this.onFocus()),_i(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jv(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&&lt.postRender(()=>i(t,Oi(t)))}class _A extends ar{mount(){const{current:t}=this.node;t&&(this.unmount=tC(t,(n,r)=>(jv(this.node,r,"Start"),(o,{success:i})=>jv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _u=new WeakMap,Ou=new WeakMap,OA=e=>{const t=_u.get(e.target);t&&t(e)},MA=e=>{e.forEach(OA)};function DA({root:e,...t}){const n=e||document;Ou.has(n)||Ou.set(n,{});const r=Ou.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(MA,{root:e,...t})),r[o]}function NA(e,t,n){const r=DA(t);return _u.set(e,n),r.observe(e),()=>{_u.delete(e),r.unobserve(e)}}const FA={some:0,all:1};class LA extends ar{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:FA[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(),h=c?u:d;h&&h(l)};return NA(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(VA(t,n))&&this.startObserver()}unmount(){}}function VA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $A={inView:{Feature:LA},tap:{Feature:_A},focus:{Feature:IA},hover:{Feature:AA}},jA={layout:{ProjectionNode:Vv,MeasureLayout:lv}},Mu={current:null},zv={current:!1};function zA(){if(zv.current=!0,!!bc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mu.current=e.matches;e.addListener(t),t()}else Mu.current=!1}const Li=new WeakMap;function RA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(At(o))e.addValue(r,o);else if(At(i))e.addValue(r,Lr(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,Lr(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Rv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Bv{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=Qc,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 h=Gt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,lt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=za(n),this.isVariantNode=yg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&At(f)&&f.set(l[h],!1)}}mount(t){this.current=t,Li.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)),zv.current||zA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mu.current,process.env.NODE_ENV!=="production"&&Tc(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(),Zn(this.notifyUpdate),Zn(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=vo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&lt.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 bo){const n=bo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Rv.length;r++){const o=Rv[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=RA(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Lr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Gh(r)||Xh(r))?r=parseFloat(r):!oC(r)&&or.test(n)&&(r=Jm(t,n)),this.setBaseTarget(t,At(r)?r.get():r)),At(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=hu(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!At(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Sc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Hv extends Bv{constructor(){super(...arguments),this.KeyframeResolver=Kk}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;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Wv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function BA(e){return window.getComputedStyle(e)}class qv extends Hv{constructor(){super(...arguments),this.type="html",this.renderInstance=Wv}readValueFromInstance(t,n){if(vo.has(n))return this.projection?.isProjecting?Kc(n):uk(t,n);{const r=BA(t),o=(Ac(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zg(t,n)}build(t,n,r){du(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return mu(t,n,r)}}const Uv=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 HA(e,t,n,r){Wv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Uv.has(o)?o:uu(o),t.attrs[o])}class Kv extends Hv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vo.has(n)){const r=Qm(n);return r&&r.default||0}return n=Uv.has(n)?n:uu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return _g(t,n,r)}build(t,n,r){kg(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){HA(t,n,r,o)}mount(t){this.isSVGTag=Pg(t.tagName),super.mount(t)}}const WA=(e,t)=>pu(e)?new Kv(t):new qv(t,{allowProjection:e!==S.Fragment}),qA=KC({...bP,...$A,...PA,...jA},WA),ut=bC(qA);function UA(e){return S.useEffect(()=>()=>e(),[])}function qa(e){const t=bn(()=>Lr(e)),{isStatic:n}=S.useContext(yo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Yv(e,t){const n=qa(t()),r=()=>n.set(t());return r(),Pa(()=>{const o=()=>lt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Zn(r)}}),n}function KA(e){Ci.current=[],e();const t=Yv(Ci.current,e);return Ci.current=void 0,t}function YA(e,t,n,r){if(typeof e=="function")return KA(e);const o=typeof t=="function"?t:nC(t,n,r);return Array.isArray(e)?Gv(e,o):Gv([e],([i])=>o(i))}function Gv(e,t){const n=bn(()=>[]);return Yv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Du(e){return typeof e=="object"&&!Array.isArray(e)}function Zv(e,t,n,r){return typeof e=="string"&&Du(t)?eg(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function GA(e,t,n){return e*(t+1)}function Xv(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function ZA(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ia(e,o),r--)}}function XA(e,t,n,r,o,i){ZA(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ct(o,i,r[a]),easing:um(n,a)})}function QA(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function JA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eI="easeInOut",tI=20;function nI(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,h=0;for(let f=0;f<e.length;f++){const b=e[f];if(typeof b=="string"){c.set(b,d);continue}else if(!Array.isArray(b)){c.set(b.name,Xv(d,b.at,u,c));continue}let[m,p,g={}]=b;g.at!==void 0&&(d=Xv(d,g.at,u,c));let y=0;const x=(T,w,E,k=0,C=0)=>{const M=rI(T),{delay:_=0,times:F=Mm(M),type:L="keyframes",repeat:H,repeatType:I,repeatDelay:O=0,...V}=w;let{ease:D=t.ease||"easeOut",duration:A}=w;const j=typeof _=="function"?_(k,C):_,N=M.length,q=Jc(L)?L:o?.[L||"keyframes"];if(N<=2&&q){let oe=100;if(N===2&&aI(M)){const z=M[1]-M[0];oe=Math.abs(z)}const ne={...V};A!==void 0&&(ne.duration=fn(A));const ee=Pm(ne,oe,q);D=ee.ease,A=ee.duration}A??(A=i);const R=d+j;F.length===1&&F[0]===0&&(F[1]=1);const Y=F.length-M.length;if(Y>0&&Om(F,Y),M.length===1&&M.unshift(null),H){en(H<tI,"Repeat count too high, must be less than 20"),A=GA(A,H);const oe=[...M],ne=[...F];D=Array.isArray(D)?[...D]:[D];const ee=[...D];for(let z=0;z<H;z++){M.push(...oe);for(let K=0;K<oe.length;K++)F.push(ne[K]+(z+1)),D.push(K===0?"linear":um(ee,K-1))}QA(F,H)}const X=R+A;XA(E,M,D,F,R,X),y=Math.max(j+A,y),h=Math.max(X,h)};if(At(m)){const T=Qv(m,s);x(p,g,Jv("default",T))}else{const T=Zv(m,p,r,l),w=T.length;for(let E=0;E<w;E++){p=p,g=g;const k=T[E],C=Qv(k,s);for(const M in p)x(p[M],oI(g,M),Jv(M,C),E,w)}}u=d,d+=y}return s.forEach((f,b)=>{for(const m in f){const p=f[m];p.sort(JA);const g=[],y=[],x=[];for(let w=0;w<p.length;w++){const{at:E,value:k,easing:C}=p[w];g.push(k),y.push(fo(0,h,E)),x.push(C||"easeOut")}y[0]!==0&&(y.unshift(0),g.unshift(g[0]),x.unshift(eI)),y[y.length-1]!==1&&(y.push(1),g.push(null)),a.has(b)||a.set(b,{keyframes:{},transition:{}});const T=a.get(b);T.keyframes[m]=g,T.transition[m]={...t,duration:h,ease:x,times:y,...n}}}),a}function Qv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Jv(e,t){return t[e]||(t[e]=[]),t[e]}function rI(e){return Array.isArray(e)?e:[e]}function oI(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iI=e=>typeof e=="number",aI=e=>e.every(iI);function sI(e,t){return e in t}class lI extends Bv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(sI(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function cI(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=su(e)&&!cg(e)?new Kv(t):new qv(t);n.mount(e),Li.set(e,n)}function uI(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new lI(t);n.mount(e),Li.set(e,n)}function dI(e,t){return At(e)||typeof e=="number"||typeof e=="string"&&!Du(t)}function ey(e,t,n,r){const o=[];if(dI(e,t))o.push(cv(e,Du(t)&&t.default||t,n&&(n.default||n)));else{const i=Zv(e,t,r),a=i.length;en(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?cI:uI;Li.has(l)||c(l);const u=Li.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...bu(u,{...t,transition:d},{}))}}return o}function fI(e,t,n){const r=[];return nI(e,t,n,{spring:Ei}).forEach(({keyframes:i,transition:a},s)=>{r.push(...ey(s,i,a))}),r}function pI(e){return Array.isArray(e)&&e.some(Array.isArray)}function hI(e){function t(n,r,o){let i=[];pI(n)?i=fI(n,r,e):i=ey(n,r,o,e);const a=new Fk(i);return e&&e.animations.push(a),a}return t}function mI(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>hI(e));return UA(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class gI{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 vI=()=>new gI;function yI(){return bn(vI)}const ty=S.createContext(null);function bI(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=ct(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?fE(e,o,o+i):e}function xI({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>ut[t]),l=[],c=S.useRef(!1);en(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(b=>d===b.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(SI)},updateOrder:(d,h,f)=>{if(c.current)return;const b=bI(l,d,h,f);l!==b&&(c.current=!0,r(b.map(wI).filter(m=>o.indexOf(m)!==-1)))}};return S.useEffect(()=>{c.current=!1}),v.jsx(s,{...i,ref:a,ignoreStrict:!0,children:v.jsx(ty.Provider,{value:u,children:e})})}const ny=S.forwardRef(xI);function wI(e){return e.value}function SI(e,t){return e.layout.min-t.layout.min}function ry(e,t=0){return At(e)?e:qa(t)}function TI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>ut[r]),c=S.useContext(ty),u={x:ry(t.x),y:ry(t.y)},d=YA([u.x,u.y],([m,p])=>m||p?1:"unset");en(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:b}=c;return v.jsx(l,{drag:h,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,p)=>{const{velocity:g}=p;g[h]&&b(n,u[h].get(),g[h]),o&&o(m,p)},onLayoutMeasure:m=>f(n,m),ref:s,ignoreStrict:!0,children:e})}const oy=S.forwardRef(TI);function EI(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function kI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:EI(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Cc(r)(l/c)*c}return t+l}}/**
13
13
  * @license lucide-react v0.523.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const pI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Gv=e=>{const t=hI(e);return t.charAt(0).toUpperCase()+t.slice(1)},Zv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),mI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
17
+ */const CI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),PI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),iy=e=>{const t=PI(e);return t.charAt(0).toUpperCase()+t.slice(1)},ay=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),AI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
18
18
  * @license lucide-react v0.523.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */var gI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
22
+ */var II={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
23
23
  * @license lucide-react v0.523.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const vI=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...gI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zv("lucide",o),...!i&&!mI(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
27
+ */const _I=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...II,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ay("lucide",o),...!i&&!AI(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.523.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Ge=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(vI,{ref:i,iconNode:t,className:Zv(`lucide-${pI(Gv(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Gv(e),n};/**
32
+ */const Ye=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(_I,{ref:i,iconNode:t,className:ay(`lucide-${CI(iy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=iy(e),n};/**
33
33
  * @license lucide-react v0.523.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const yI=Ge("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
37
+ */const OI=Ye("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
38
38
  * @license lucide-react v0.523.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const bI=Ge("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
42
+ */const MI=Ye("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
43
43
  * @license lucide-react v0.523.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Xv=Ge("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
47
+ */const sy=Ye("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
48
48
  * @license lucide-react v0.523.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const xI=Ge("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/**
52
+ */const DI=Ye("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/**
53
53
  * @license lucide-react v0.523.0 - ISC
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 wI=Ge("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
57
+ */const NI=Ye("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
58
58
  * @license lucide-react v0.523.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const ku=Ge("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
62
+ */const Nu=Ye("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.523.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const SI=Ge("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const FI=Ye("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.523.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Au=Ge("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const Fu=Ye("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.523.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const Qv=Ge("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
77
+ */const ly=Ye("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
78
78
  * @license lucide-react v0.523.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const TI=Ge("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
82
+ */const LI=Ye("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
83
83
  * @license lucide-react v0.523.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const EI=Ge("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
87
+ */const VI=Ye("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
88
88
  * @license lucide-react v0.523.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const CI=Ge("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
92
+ */const $I=Ye("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
93
93
  * @license lucide-react v0.523.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Jv=Ge("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
97
+ */const cy=Ye("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
98
98
  * @license lucide-react v0.523.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const ey=Ge("file-video-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/**
102
+ */const uy=Ye("file-video-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/**
103
103
  * @license lucide-react v0.523.0 - ISC
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 ty=Ge("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
107
+ */const dy=Ye("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
108
108
  * @license lucide-react v0.523.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 kI=Ge("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
112
+ */const jI=Ye("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
113
113
  * @license lucide-react v0.523.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const AI=Ge("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
117
+ */const zI=Ye("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
118
118
  * @license lucide-react v0.523.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const ny=Ge("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
122
+ */const fy=Ye("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
123
123
  * @license lucide-react v0.523.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const PI=Ge("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
127
+ */const RI=Ye("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
128
128
  * @license lucide-react v0.523.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const ry=Ge("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
132
+ */const py=Ye("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
133
133
  * @license lucide-react v0.523.0 - ISC
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 II=Ge("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
137
+ */const BI=Ye("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
138
138
  * @license lucide-react v0.523.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const _I=Ge("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
142
+ */const HI=Ye("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
143
143
  * @license lucide-react v0.523.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const Pu=Ge("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
147
+ */const Lu=Ye("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
148
148
  * @license lucide-react v0.523.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const OI=Ge("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
152
+ */const WI=Ye("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
153
153
  * @license lucide-react v0.523.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const MI=Ge("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
157
+ */const qI=Ye("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
158
158
  * @license lucide-react v0.523.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const Iu=Ge("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
162
+ */const Vu=Ye("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
163
163
  * @license lucide-react v0.523.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const Ka=Ge("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
167
+ */const Ua=Ye("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
168
168
  * @license lucide-react v0.523.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const DI=Ge("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
172
+ */const UI=Ye("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
173
173
  * @license lucide-react v0.523.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const NI=Ge("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
177
+ */const KI=Ye("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
178
178
  * @license lucide-react v0.523.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const zi=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),oy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},FI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},iy=e=>v.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:oy,exit:oy.false,transition:FI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ce("aria-hidden:pointer-events-none",e.className),children:e.children}),LI=ao("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),VI=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 v.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ce("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:v.jsx(iy,{"data-open":!!i,open:!!i,children:v.jsxs(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ce(LI({theme:n}),t),children:[v.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?v.jsx(Qv,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?v.jsx(ry,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?v.jsx(DI,{"aria-hidden":"true",size:20}):null,r,v.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?v.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:v.jsx(zi,{size:20})}):null]})})})}),ay=6048e5,$I=864e5,jI=6e4,zI=36e5,BI=1e3,sy=Symbol.for("constructDateFrom");function at(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&sy in e?e[sy](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return at(t||e,e)}function Ya(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(t)?at((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ly(e,t,n){const r=Je(e,n==null?void 0:n.in);if(isNaN(t))return at(e,NaN);if(!t)return r;const o=r.getDate(),i=at(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 Co(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n==null?void 0:n.in),d=o||r?ly(u,o+r*12):u,p=a||i?Ya(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return at(e,+p+g)}let RI={};function Br(){return RI}function _n(e,t){var s,l,c,u;const n=Br(),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=Je(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 ko(e,t){return _n(e,{...t,weekStartsOn:1})}function cy(e,t){const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=at(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=ko(o),a=at(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=ko(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ga(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Za(e,...t){const n=at.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ao(e,t){const n=Je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function HI(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t),i=Ao(r),a=Ao(o),s=+i-Ga(i),l=+a-Ga(a);return Math.round((s-l)/$I)}function WI(e,t){const n=cy(e,t),r=at(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ko(r)}function qI(e){return at(e,Date.now())}function UI(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t);return+Ao(r)==+Ao(o)}function KI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _u(e){return!(!KI(e)&&typeof e!="number"||isNaN(+Je(e)))}function YI(e,t){const[n,r]=Za(e,t.start,t.end);return{start:n,end:r}}function uy(e,t){const{start:n,end:r}=YI(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(at(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function dy(e,t){const n=Je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function GI(e,t){const n=Je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ZI(e,t){var s,l;const n=Br(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Je(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 XI={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"}},QI=(e,t,n)=>{let r;const o=XI[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 Ou(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const JI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},e_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},t_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},n_={date:Ou({formats:JI,defaultWidth:"full"}),time:Ou({formats:e_,defaultWidth:"full"}),dateTime:Ou({formats:t_,defaultWidth:"full"})},r_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},o_=(e,t,n,r)=>r_[e];function Bi(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 i_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s_={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"]},l_={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"]},c_={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"}},u_={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"}},d_={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Bi({values:i_,defaultWidth:"wide"}),quarter:Bi({values:a_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Bi({values:s_,defaultWidth:"wide"}),day:Bi({values:l_,defaultWidth:"wide"}),dayPeriod:Bi({values:c_,defaultWidth:"wide",formattingValues:u_,defaultFormattingWidth:"wide"})};function Ri(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)?p_(s,d=>d.test(a)):f_(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function f_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function p_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function h_(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 m_=/^(\d+)(th|st|nd|rd)?/i,g_=/\d+/i,v_={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},y_={any:[/^b/i,/^(a|c)/i]},b_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},x_={any:[/1/i,/2/i,/3/i,/4/i]},w_={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},S_={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]},T_={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},E_={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]},C_={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},k_={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}},A_={ordinalNumber:h_({matchPattern:m_,parsePattern:g_,valueCallback:e=>parseInt(e,10)}),era:Ri({matchPatterns:v_,defaultMatchWidth:"wide",parsePatterns:y_,defaultParseWidth:"any"}),quarter:Ri({matchPatterns:b_,defaultMatchWidth:"wide",parsePatterns:x_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ri({matchPatterns:w_,defaultMatchWidth:"wide",parsePatterns:S_,defaultParseWidth:"any"}),day:Ri({matchPatterns:T_,defaultMatchWidth:"wide",parsePatterns:E_,defaultParseWidth:"any"}),dayPeriod:Ri({matchPatterns:C_,defaultMatchWidth:"any",parsePatterns:k_,defaultParseWidth:"any"})},fy={code:"en-US",formatDistance:QI,formatLong:n_,formatRelative:o_,localize:d_,match:A_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function P_(e,t){const n=Je(e,t==null?void 0:t.in);return HI(n,GI(n))+1}function py(e,t){const n=Je(e,t==null?void 0:t.in),r=+ko(n)-+WI(n);return Math.round(r/ay)+1}function Mu(e,t){var u,d,p,f;const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Br(),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=at((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=_n(a,t),l=at((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=_n(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function I_(e,t){var s,l,c,u;const n=Br(),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=Mu(e,t),i=at((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),_n(i,t)}function hy(e,t){const n=Je(e,t==null?void 0:t.in),r=+_n(n,t)-+I_(n,t);return Math.round(r/ay)+1}function et(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const nr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return et(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):et(n+1,2)},d(e,t){return et(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 et(e.getHours()%12||12,t.length)},H(e,t){return et(e.getHours(),t.length)},m(e,t){return et(e.getMinutes(),t.length)},s(e,t){return et(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return et(o,t.length)}},Po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},my={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 nr.y(e,t)},Y:function(e,t,n,r){const o=Mu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return et(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):et(i,t.length)},R:function(e,t){const n=cy(e);return et(n,t.length)},u:function(e,t){const n=e.getFullYear();return et(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 et(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 et(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 nr.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 et(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=hy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):et(o,t.length)},I:function(e,t,n){const r=py(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):et(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):nr.d(e,t)},D:function(e,t,n){const r=P_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):et(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 et(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 et(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 et(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 nr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):nr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):nr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):nr.s(e,t)},S:function(e,t){return nr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vy(r);case"XXXX":case"XX":return Rr(r);case"XXXXX":case"XXX":default:return Rr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vy(r);case"xxxx":case"xx":return Rr(r);case"xxxxx":case"xxx":default:return Rr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+gy(r,":");case"OOOO":default:return"GMT"+Rr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+gy(r,":");case"zzzz":default:return"GMT"+Rr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return et(r,t.length)},T:function(e,t,n){return et(+e,t.length)}};function gy(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+et(i,2)}function vy(e,t){return e%60===0?(e>0?"-":"+")+et(Math.abs(e)/60,2):Rr(e,t)}function Rr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=et(Math.trunc(r/60),2),i=et(r%60,2);return n+o+t+i}const yy=(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"})}},by=(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"})}},Du={p:by,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return yy(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}}",yy(r,t)).replace("{{time}}",by(o,t))}},__=/^D+$/,O_=/^Y+$/,M_=["D","DD","YY","YYYY"];function xy(e){return __.test(e)}function wy(e){return O_.test(e)}function Nu(e,t,n){const r=D_(e,t,n);if(console.warn(r),M_.includes(e))throw new RangeError(r)}function D_(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 N_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L_=/^'([^]*?)'?$/,V_=/''/g,$_=/[a-zA-Z]/;function j_(e,t,n){var u,d,p,f;const r=Br(),o=r.locale??fy,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=Je(e,n==null?void 0:n.in);if(!_u(s))throw new RangeError("Invalid time value");let l=t.match(F_).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Du[g];return h(m,o.formatLong)}return m}).join("").match(N_).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:z_(m)};if(my[g])return{isToken:!0,value:m};if(g.match($_))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;(wy(g)||xy(g))&&Nu(g,t,String(e));const h=my[g[0]];return h(s,g,o.localize,c)}).join("")}function z_(e){const t=e.match(L_);return t?t[1].replace(V_,"'"):e}function B_(){return Object.assign({},Br())}function R_(e,t){const n=Je(e,t==null?void 0:t.in).getDay();return n===0?7:n}function H_(e,t){return+Je(e)>+Je(t)}function W_(e,t){return+Je(e)<+Je(t)}function q_(e,t){const n=U_(t)?new t(0):at(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function U_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const K_=10;class Sy{constructor(){fe(this,"subPriority",0)}validate(t,n){return!0}}class Y_ extends Sy{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 G_ extends Sy{constructor(n,r){super();fe(this,"priority",K_);fe(this,"subPriority",-1);this.context=n||(o=>at(r,o))}set(n,r){return r.timestampIsSet?n:at(n,q_(n,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Y_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Z_ extends Ke{constructor(){super(...arguments);fe(this,"priority",140);fe(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}/},On={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 gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Mn(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*zI+i*jI+a*BI),rest:t.slice(n[0].length)}}function Ty(e){return gt(wt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(wt.singleDigit,t);case 2:return gt(wt.twoDigits,t);case 3:return gt(wt.threeDigits,t);case 4:return gt(wt.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function Xa(e,t){switch(e){case 1:return gt(wt.singleDigitSigned,t);case 2:return gt(wt.twoDigitsSigned,t);case 3:return gt(wt.threeDigitsSigned,t);case 4:return gt(wt.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Fu(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 Ey(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 Cy(e){return e%400===0||e%4===0&&e%100!==0}class X_ extends Ke{constructor(){super(...arguments);fe(this,"priority",130);fe(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(bt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(bt(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=Ey(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 Q_ extends Ke{constructor(){super(...arguments);fe(this,"priority",130);fe(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(bt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Mu(n,i);if(o.isTwoDigitYear){const l=Ey(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),_n(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),_n(n,i)}}class J_ extends Ke{constructor(){super(...arguments);fe(this,"priority",130);fe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Xa(r==="R"?4:r.length,n)}set(n,r,o){const i=at(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),ko(i)}}class eO extends Ke{constructor(){super(...arguments);fe(this,"priority",130);fe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Xa(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class tO extends Ke{constructor(){super(...arguments);fe(this,"priority",120);fe(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 bt(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 nO extends Ke{constructor(){super(...arguments);fe(this,"priority",120);fe(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 bt(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 rO extends Ke{constructor(){super(...arguments);fe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);fe(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return St(gt(wt.month,n),i);case"MM":return St(bt(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 oO extends Ke{constructor(){super(...arguments);fe(this,"priority",110);fe(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(gt(wt.month,n),i);case"LL":return St(bt(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 iO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=hy(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n==null?void 0:n.in)}class aO extends Ke{constructor(){super(...arguments);fe(this,"priority",100);fe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return gt(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return _n(iO(n,o,i),i)}}function sO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=py(r,n)-t;return r.setDate(r.getDate()-o*7),r}class lO extends Ke{constructor(){super(...arguments);fe(this,"priority",100);fe(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 gt(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return ko(sO(n,o))}}const cO=[31,28,31,30,31,30,31,31,30,31,30,31],uO=[31,29,31,30,31,30,31,31,30,31,30,31];class dO extends Ke{constructor(){super(...arguments);fe(this,"priority",90);fe(this,"subPriority",1);fe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return gt(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Cy(o),a=n.getMonth();return i?r>=1&&r<=uO[a]:r>=1&&r<=cO[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class fO extends Ke{constructor(){super(...arguments);fe(this,"priority",90);fe(this,"subpriority",1);fe(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 gt(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Cy(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 Lu(e,t,n){var d,p,f,m;const r=Br(),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=Je(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 Ya(i,u,n)}class pO extends Ke{constructor(){super(...arguments);fe(this,"priority",90);fe(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=Lu(n,o,i),n.setHours(0,0,0,0),n}}class hO extends Ke{constructor(){super(...arguments);fe(this,"priority",90);fe(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(bt(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=Lu(n,o,i),n.setHours(0,0,0,0),n}}class mO extends Ke{constructor(){super(...arguments);fe(this,"priority",90);fe(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(bt(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=Lu(n,o,i),n.setHours(0,0,0,0),n}}function gO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=R_(r,n),i=t-o;return Ya(r,i,n)}class vO extends Ke{constructor(){super(...arguments);fe(this,"priority",90);fe(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 bt(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=gO(n,o),n.setHours(0,0,0,0),n}}class yO extends Ke{constructor(){super(...arguments);fe(this,"priority",80);fe(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(Fu(o),0,0,0),n}}class bO extends Ke{constructor(){super(...arguments);fe(this,"priority",80);fe(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(Fu(o),0,0,0),n}}class xO extends Ke{constructor(){super(...arguments);fe(this,"priority",80);fe(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(Fu(o),0,0,0),n}}class wO extends Ke{constructor(){super(...arguments);fe(this,"priority",70);fe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(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 SO extends Ke{constructor(){super(...arguments);fe(this,"priority",70);fe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return gt(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class TO extends Ke{constructor(){super(...arguments);fe(this,"priority",70);fe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(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 EO extends Ke{constructor(){super(...arguments);fe(this,"priority",70);fe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return gt(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(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 CO extends Ke{constructor(){super(...arguments);fe(this,"priority",60);fe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class kO extends Ke{constructor(){super(...arguments);fe(this,"priority",50);fe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class AO extends Ke{constructor(){super(...arguments);fe(this,"priority",30);fe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return St(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class PO extends Ke{constructor(){super(...arguments);fe(this,"priority",10);fe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Mn(On.basicOptionalMinutes,n);case"XX":return Mn(On.basic,n);case"XXXX":return Mn(On.basicOptionalSeconds,n);case"XXXXX":return Mn(On.extendedOptionalSeconds,n);case"XXX":default:return Mn(On.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-Ga(n)-o)}}class IO extends Ke{constructor(){super(...arguments);fe(this,"priority",10);fe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Mn(On.basicOptionalMinutes,n);case"xx":return Mn(On.basic,n);case"xxxx":return Mn(On.basicOptionalSeconds,n);case"xxxxx":return Mn(On.extendedOptionalSeconds,n);case"xxx":default:return Mn(On.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-Ga(n)-o)}}class _O extends Ke{constructor(){super(...arguments);fe(this,"priority",40);fe(this,"incompatibleTokens","*")}parse(n){return Ty(n)}set(n,r,o){return[at(n,o*1e3),{timestampIsSet:!0}]}}class OO extends Ke{constructor(){super(...arguments);fe(this,"priority",20);fe(this,"incompatibleTokens","*")}parse(n){return Ty(n)}set(n,r,o){return[at(n,o),{timestampIsSet:!0}]}}const MO={G:new Z_,y:new X_,Y:new Q_,R:new J_,u:new eO,Q:new tO,q:new nO,M:new rO,L:new oO,w:new aO,I:new lO,d:new dO,D:new fO,E:new pO,e:new hO,c:new mO,i:new vO,a:new yO,b:new bO,B:new xO,h:new wO,H:new SO,K:new TO,k:new EO,m:new CO,s:new kO,S:new AO,X:new PO,x:new IO,t:new _O,T:new OO},DO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,NO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FO=/^'([^]*?)'?$/,LO=/''/g,VO=/\S/,$O=/[a-zA-Z]/;function jO(e,t,n,r){var h,y,x,b;const o=()=>at(n,NaN),i=B_(),a=i.locale??fy,s=i.firstWeekContainsDate??((y=(h=i.locale)==null?void 0:h.options)==null?void 0:y.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(x=i.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Je(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new G_(r==null?void 0:r.in,n)],d=t.match(NO).map(S=>{const w=S[0];if(w in Du){const T=Du[w];return T(S,a.formatLong)}return S}).join("").match(DO),p=[];for(let S of d){wy(S)&&Nu(S,t,e),xy(S)&&Nu(S,t,e);const w=S[0],T=MO[w];if(T){const{incompatibleTokens:C}=T;if(Array.isArray(C)){const _=p.find(A=>C.includes(A.token)||A.token===w);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${S}\` at the same time`)}else if(T.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:w,fullToken:S});const k=T.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match($O))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=zO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&VO.test(e))return o();const f=u.map(S=>S.priority).sort((S,w)=>w-S).filter((S,w,T)=>T.indexOf(S)===w).map(S=>u.filter(w=>w.priority===S).sort((w,T)=>T.subPriority-w.subPriority)).map(S=>S[0]);let m=Je(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const S of f){if(!S.validate(m,c))return o();const w=S.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function zO(e){return e.match(FO)[1].replace(LO,"'")}function BO(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function RO(e,t){return UI(at(e,e),qI(e))}function HO(e,t,n){return Ya(e,-t,n)}function WO(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(+r)?at(e,NaN):(r.setFullYear(t),r)}function qO(e,t,n){return ly(e,-t,n)}function Hi(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=qO(e,o+r*12,n),d=HO(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return at(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 Vu(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 $u(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Wi=function(e){return e.replace(new RegExp(" ","g")," ")},ky=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)},UO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Ay=function(e,t,n){var r=e.length-2,o=UO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Py=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Qa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},KO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ju=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},YO=function(e){return e==="money"||e==="currency"},GO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ja=function(e,t){var n=ky(Py(e),t.fraction.length),r="".concat(t.currency).concat(Ay(n,t.group,t.decimal));return Wi(r)},ZO=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=Vu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=GO(r,i,s);return m.currency=Wi("".concat(m.currency.trim()," ")),m.literal=Wi(m.literal.trim()),m},[r,i]),p=function(m){var g=Ja(m.target.value,d),h=Qa(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=Ja(m,d),h=Qa(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});l==null||l(Tt(Tt({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Ja(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?Ja(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),XO=1,QO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},JO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},es=function(e,t){var n=ky(Py(e),t.fraction.length),r="".concat(Ay(n,t.group,t.decimal)," ").concat(t.percentSign);return Wi(r)},eM=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=Vu(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=$u(E.useState(function(){var y,x;return(x=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,x=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(es(x,d))},[a.value]);var d=E.useMemo(function(){var y=JO(r);return y.percentSign=Wi("".concat(y.percentSign)),y},[r]),p=c.length-d.percentSign.length-XO,f=function(y){var x,b=s.current;b&&(b.setSelectionRange(p,p),y&&((x=a.onFocus)===null||x===void 0||x.call(a,y)))},m=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,S=x.selectionEnd,w=b!==S,T=p<b;!w&&T&&f()}i==null||i(y)},g=function(y){var x=es(y.target.value,d),b=Qa(x);u(x),y.target.value=x,y.target.setAttribute("data-number",b.toString()),o==null||o(y)};E.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var x=es(y,d),b=Qa(x);u(x),s.current.value=x,s.current.setAttribute("data-number",b.toString());var S=new InputEvent("change",{});o==null||o(Tt(Tt({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var h=a.defaultValue?es(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"}))}),qi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},tM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ts[i];a===void 0?r.push(i.replace(qi.dots,"\\.").replace(qi.openParenthesis,"\\(").replace(qi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(qi.leadingBars,"\\")},Ui=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return zu(o,n);var i=tM(o);return n?"^".concat(i,"$"):i},nM=function(e){return e.replace(qi.escape,"\\$&")},zu=function(e,t){var n=e.map(function(r){return typeof r=="string"?nM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ts={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},rM=/\d/,Iy="(dd) 9dddd-dddd",_y="(dd) dddd-dddd",Oy="ddd.ddd.ddd-dd",My="dd.ddd.ddd/dddd-dd",ns=function(e){return e.replace(/\D/g,"")},oM=["2",/[0-3]/,":",/[0-5]/,/\d/],iM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Yt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Oy,isoDate:"dddd-dd-dd",cnpj:My,telephone:_y,cellphone:Iy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ns(e).length<=11?Oy:My},int:function(e){return e===void 0&&(e=""),rM.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ns(e);return t.length<11?_y:Iy},time:function(e){var t=ns(e),n=t[0];return n==="2"?oM:iM}},Gt=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:Ui(e,"",!0),infinity:n.infinity},n)},zt={cellTelephone:Gt(Yt.cellTelephone,"tel"),cellphone:Gt(Yt.cellphone,"tel"),cep:Gt(Yt.cep,"decimal"),cnpj:Gt(Yt.cnpj,"decimal"),color:Gt(Yt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Gt(Yt.cpf,"decimal"),cpfCnpj:Gt(Yt.cpfCnpj,"decimal",{transform:ns}),creditCard:Gt(Yt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Gt(Yt.date,"decimal"),int:Gt(Yt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Gt(Yt.isoDate,"decimal"),telephone:Gt(Yt.telephone,"tel"),time:Gt(Yt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Gt(Yt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Dy(e,t,n,r){var o,i;r===void 0&&(r=ts);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var Ny=function(e){return e},aM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ui(e,n,t));return r.test(n)};function sM(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var lM=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=Vu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=ju(s),h=ju(d),y=ju(u),x=E.useRef(aM(u,i,f.value||f.defaultValue)),b=p??"input",S=$u(E.useState(""),2),w=S[0],T=S[1],C=sM(w),k=E.useCallback(function(M,D){var V,F,H=(V=M??D)!==null&&V!==void 0?V:"";if(u===void 0)return H;var O=(F=H==null?void 0:H.toString())!==null&&F!==void 0?F:"";return Dy(O,typeof u=="function"?u(O):u,a??Ny,c??ts)},[a,u,c]),_=$u(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=_[0],L=_[1],N=k(f.defaultValue,f.defaultValue),$=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(A);return Array.isArray(M)?zu(M,i):Ui(u,A,i)}return typeof u=="string"?Ui(u,A,i):zu(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var M=k(f.value,f.defaultValue);L(M),m.current!==null&&(m.current.value=M)}},[f.value,u,a,f.defaultValue]);var I=function(M){var D,V,F,H,O,B=M.currentTarget,X=M.target.value;if(y.current===void 0)return L(X),(D=h.current)===null||D===void 0||D.call(h,X),(V=g.current)===null||V===void 0||V.call(g,M),d==null?void 0:d(X);var Q=new RegExp(Ui(y.current,X,i)),J=(F=B.selectionEnd)!==null&&F!==void 0?F:0,G=function(K,ie,R){if(K.type!=="number")return K.setSelectionRange(ie,R)};if(r&&x.current&&X.length>=A.length)return B.value=A,G(B,J-1,J-1);var Y=!1;X.length<C.length&&(x.current=!1,Y=!0),Q.test(X)&&(x.current=!0);var Z=J,j=X[Z-1],z=Dy(X,typeof y.current=="function"?y.current(X):y.current,a??Ny,c??ts);for(B.value=z,L(z);Z<z.length&&z.charAt(Z-1)!==j;)Z+=1;Y?G(B,J,J):G(B,Z,Z),M.target.value=z,T(z),(H=h.current)===null||H===void 0||H.call(h,z),(O=g.current)===null||O===void 0||O.call(g,M)};return E.createElement(b,Tt({},f,{ref:m,pattern:$,onChange:I,defaultValue:Fy(f.defaultValue)?N:void 0,value:Fy(f.value)?k(f.value,f.value):f.value}))}),Fy=function(e){return typeof e=="string"},Ly=E.forwardRef(function(e,t){return YO(e.mask)?E.createElement(ZO,Tt({},e,{mask:void 0,ref:t})):QO(e.mask)?E.createElement(eM,Tt({},e,{mask:void 0,ref:t})):E.createElement(lM,Tt({},e,{ref:t}))}),Zt=function(e){return function(t){return E.createElement(Ly,Tt({},e,t))}};Zt(zt.cellTelephone),Zt(zt.cellphone),Zt(zt.cep),Zt(zt.cnpj),Zt(zt.color),Zt(zt.cpf),Zt(zt.cpfCnpj),Zt(zt.creditCard),Zt(zt.date),Zt(zt.int),Zt(zt.isoDate),Zt(zt.telephone),Zt(zt.time),Zt(zt.uuid);var Vy=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&KO(zt,t.mask)?zt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(Ly,Tt({},o,{ref:n}))}),rs={exports:{}},Bu={},os={exports:{}},Ru={};/**
182
+ */const Vi=Ye("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),hy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},YI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},my=e=>v.jsx(ut.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:hy,exit:hy.false,transition:YI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:ke("aria-hidden:pointer-events-none",e.className),children:e.children}),GI=io("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),ZI=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return v.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:ke("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:v.jsx(my,{"data-open":!!i,open:!!i,children:v.jsxs(un,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:ke(GI({theme:n}),t),children:[v.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?v.jsx(ly,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?v.jsx(py,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?v.jsx(UI,{"aria-hidden":"true",size:20}):null,r,v.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?v.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:v.jsx(Vi,{size:20})}):null]})})})}),gy=6048e5,XI=864e5,QI=6e4,JI=36e5,e_=1e3,vy=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vy in e?e[vy](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return it(t||e,e)}function Ka(e,t,n){const r=Qe(e,n?.in);return isNaN(t)?it(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function yy(e,t,n){const r=Qe(e,n?.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),i=it(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=Qe(e,n?.in),d=o||r?yy(u,o+r*12):u,h=a||i?Ka(d,a+i*7):d,f=l+s*60,m=(c+f*60)*1e3;return it(e,+h+m)}let t_={};function jr(){return t_}function Mn(e,t){const n=jr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qe(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function ko(e,t){return Mn(e,{...t,weekStartsOn:1})}function by(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=ko(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=ko(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ya(e){const t=Qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ga(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Co(e,t){const n=Qe(e,t?.in);return n.setHours(0,0,0,0),n}function n_(e,t,n){const[r,o]=Ga(n?.in,e,t),i=Co(r),a=Co(o),s=+i-Ya(i),l=+a-Ya(a);return Math.round((s-l)/XI)}function r_(e,t){const n=by(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ko(r)}function o_(e){return it(e,Date.now())}function i_(e,t,n){const[r,o]=Ga(n?.in,e,t);return+Co(r)==+Co(o)}function a_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $u(e){return!(!a_(e)&&typeof e!="number"||isNaN(+Qe(e)))}function s_(e,t){const[n,r]=Ga(e,t.start,t.end);return{start:n,end:r}}function xy(e,t){const{start:n,end:r}=s_(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(it(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function wy(e,t){const n=Qe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function l_(e,t){const n=Qe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function c_(e,t){const n=jr(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qe(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const u_={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"}},d_=(e,t,n)=>{let r;const o=u_[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ju(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const f_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},p_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},h_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},m_={date:ju({formats:f_,defaultWidth:"full"}),time:ju({formats:p_,defaultWidth:"full"}),dateTime:ju({formats:h_,defaultWidth:"full"})},g_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},v_=(e,t,n,r)=>g_[e];function $i(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const y_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},x_={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"]},w_={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"]},S_={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"}},T_={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"}},E_={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:$i({values:y_,defaultWidth:"wide"}),quarter:$i({values:b_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$i({values:x_,defaultWidth:"wide"}),day:$i({values:w_,defaultWidth:"wide"}),dayPeriod:$i({values:S_,defaultWidth:"wide",formattingValues:T_,defaultFormattingWidth:"wide"})};function ji(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)?C_(s,d=>d.test(a)):k_(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 k_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function C_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P_(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 A_=/^(\d+)(th|st|nd|rd)?/i,I_=/\d+/i,__={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},O_={any:[/^b/i,/^(a|c)/i]},M_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},D_={any:[/1/i,/2/i,/3/i,/4/i]},N_={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},F_={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]},L_={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},V_={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]},$_={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},j_={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}},z_={ordinalNumber:P_({matchPattern:A_,parsePattern:I_,valueCallback:e=>parseInt(e,10)}),era:ji({matchPatterns:__,defaultMatchWidth:"wide",parsePatterns:O_,defaultParseWidth:"any"}),quarter:ji({matchPatterns:M_,defaultMatchWidth:"wide",parsePatterns:D_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ji({matchPatterns:N_,defaultMatchWidth:"wide",parsePatterns:F_,defaultParseWidth:"any"}),day:ji({matchPatterns:L_,defaultMatchWidth:"wide",parsePatterns:V_,defaultParseWidth:"any"}),dayPeriod:ji({matchPatterns:$_,defaultMatchWidth:"any",parsePatterns:j_,defaultParseWidth:"any"})},Sy={code:"en-US",formatDistance:d_,formatLong:m_,formatRelative:v_,localize:E_,match:z_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function R_(e,t){const n=Qe(e,t?.in);return n_(n,l_(n))+1}function Ty(e,t){const n=Qe(e,t?.in),r=+ko(n)-+r_(n);return Math.round(r/gy)+1}function zu(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=jr(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=it(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Mn(a,t),l=it(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Mn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function B_(e,t){const n=jr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=zu(e,t),i=it(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Mn(i,t)}function Ey(e,t){const n=Qe(e,t?.in),r=+Mn(n,t)-+B_(n,t);return Math.round(r/gy)+1}function Je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const sr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Je(n+1,2)},d(e,t){return Je(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 Je(e.getHours()%12||12,t.length)},H(e,t){return Je(e.getHours(),t.length)},m(e,t){return Je(e.getMinutes(),t.length)},s(e,t){return Je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Je(o,t.length)}},Po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ky={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 sr.y(e,t)},Y:function(e,t,n,r){const o=zu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Je(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Je(i,t.length)},R:function(e,t){const n=by(e);return Je(n,t.length)},u:function(e,t){const n=e.getFullYear();return Je(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 Je(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 Je(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 sr.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 Je(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=Ey(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Je(o,t.length)},I:function(e,t,n){const r=Ty(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):sr.d(e,t)},D:function(e,t,n){const r=R_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Je(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 Je(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 Je(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 Je(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 sr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):sr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):sr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):sr.s(e,t)},S:function(e,t){return sr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Py(r);case"XXXX":case"XX":return zr(r);case"XXXXX":case"XXX":default:return zr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Py(r);case"xxxx":case"xx":return zr(r);case"xxxxx":case"xxx":default:return zr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Cy(r,":");case"OOOO":default:return"GMT"+zr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Cy(r,":");case"zzzz":default:return"GMT"+zr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Je(r,t.length)},T:function(e,t,n){return Je(+e,t.length)}};function Cy(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+Je(i,2)}function Py(e,t){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):zr(e,t)}function zr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Je(Math.trunc(r/60),2),i=Je(r%60,2);return n+o+t+i}const Ay=(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"})}},Iy=(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"})}},Ru={p:Iy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ay(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}}",Ay(r,t)).replace("{{time}}",Iy(o,t))}},H_=/^D+$/,W_=/^Y+$/,q_=["D","DD","YY","YYYY"];function _y(e){return H_.test(e)}function Oy(e){return W_.test(e)}function Bu(e,t,n){const r=U_(e,t,n);if(console.warn(r),q_.includes(e))throw new RangeError(r)}function U_(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 K_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,G_=/^'([^]*?)'?$/,Z_=/''/g,X_=/[a-zA-Z]/;function Q_(e,t,n){const r=jr(),o=r.locale??Sy,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Qe(e,n?.in);if(!$u(s))throw new RangeError("Invalid time value");let l=t.match(Y_).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=Ru[d];return h(u,o.formatLong)}return u}).join("").match(K_).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:J_(u)};if(ky[d])return{isToken:!0,value:u};if(d.match(X_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(Oy(d)||_y(d))&&Bu(d,t,String(e));const h=ky[d[0]];return h(s,d,o.localize,c)}).join("")}function J_(e){const t=e.match(G_);return t?t[1].replace(Z_,"'"):e}function eO(){return Object.assign({},jr())}function tO(e,t){const n=Qe(e,t?.in).getDay();return n===0?7:n}function nO(e,t){return+Qe(e)>+Qe(t)}function rO(e,t){return+Qe(e)<+Qe(t)}function oO(e,t){const n=iO(t)?new t(0):it(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function iO(e){return typeof e=="function"&&e.prototype?.constructor===e}const aO=10;class My{subPriority=0;validate(t,n){return!0}}class sO extends My{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 lO extends My{priority=aO;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>it(n,r))}set(t,n){return n.timestampIsSet?t:it(t,oO(t,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new sO(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class cO extends qe{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const wt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Dn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function St(e,t){return e&&{value:t(e.value),rest:e.rest}}function mt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Nn(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*JI+i*QI+a*e_),rest:t.slice(n[0].length)}}function Dy(e){return mt(wt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+e+"}"),t)}}function Za(e,t){switch(e){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Hu(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 Ny(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 Fy(e){return e%400===0||e%4===0&&e%100!==0}class uO extends qe{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return St(bt(4,t),o);case"yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=Ny(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class dO extends qe{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return St(bt(4,t),o);case"Yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=zu(t,o);if(r.isTwoDigitYear){const s=Ny(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mn(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class fO extends qe{priority=130;parse(t,n){return Za(n==="R"?4:n.length,t)}set(t,n,r){const o=it(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),ko(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class pO extends qe{priority=130;parse(t,n){return Za(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class hO extends qe{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class mO extends qe{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class gO extends qe{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return St(mt(wt.month,t),o);case"MM":return St(bt(2,t),o);case"Mo":return St(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class vO extends qe{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return St(mt(wt.month,t),o);case"LL":return St(bt(2,t),o);case"Lo":return St(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function yO(e,t,n){const r=Qe(e,n?.in),o=Ey(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n?.in)}class bO extends qe{priority=100;parse(t,n,r){switch(n){case"w":return mt(wt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Mn(yO(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function xO(e,t,n){const r=Qe(e,n?.in),o=Ty(r,n)-t;return r.setDate(r.getDate()-o*7),r}class wO extends qe{priority=100;parse(t,n,r){switch(n){case"I":return mt(wt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return ko(xO(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const SO=[31,28,31,30,31,30,31,31,30,31,30,31],TO=[31,29,31,30,31,30,31,31,30,31,30,31];class EO extends qe{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return mt(wt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=Fy(r),i=t.getMonth();return o?n>=1&&n<=TO[i]:n>=1&&n<=SO[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class kO extends qe{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return mt(wt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return Fy(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Wu(e,t,n){const r=jr(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Qe(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return Ka(i,u,n)}class CO extends qe{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Wu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class PO extends qe{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return St(bt(n.length,t),i);case"eo":return St(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Wu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class AO extends qe{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return St(bt(n.length,t),i);case"co":return St(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Wu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function IO(e,t,n){const r=Qe(e,n?.in),o=tO(r,n),i=t-o;return Ka(r,i,n)}class _O extends qe{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return St(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return St(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return St(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return St(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=IO(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class OO extends qe{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Hu(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class MO extends qe{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Hu(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class DO extends qe{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Hu(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class NO extends qe{priority=70;parse(t,n,r){switch(n){case"h":return mt(wt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class FO extends qe{priority=70;parse(t,n,r){switch(n){case"H":return mt(wt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class LO extends qe{priority=70;parse(t,n,r){switch(n){case"K":return mt(wt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class VO extends qe{priority=70;parse(t,n,r){switch(n){case"k":return mt(wt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class $O extends qe{priority=60;parse(t,n,r){switch(n){case"m":return mt(wt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class jO extends qe{priority=50;parse(t,n,r){switch(n){case"s":return mt(wt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class zO extends qe{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return St(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class RO extends qe{priority=10;parse(t,n){switch(n){case"X":return Nn(Dn.basicOptionalMinutes,t);case"XX":return Nn(Dn.basic,t);case"XXXX":return Nn(Dn.basicOptionalSeconds,t);case"XXXXX":return Nn(Dn.extendedOptionalSeconds,t);case"XXX":default:return Nn(Dn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:it(t,t.getTime()-Ya(t)-r)}incompatibleTokens=["t","T","x"]}class BO extends qe{priority=10;parse(t,n){switch(n){case"x":return Nn(Dn.basicOptionalMinutes,t);case"xx":return Nn(Dn.basic,t);case"xxxx":return Nn(Dn.basicOptionalSeconds,t);case"xxxxx":return Nn(Dn.extendedOptionalSeconds,t);case"xxx":default:return Nn(Dn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:it(t,t.getTime()-Ya(t)-r)}incompatibleTokens=["t","T","X"]}class HO extends qe{priority=40;parse(t){return Dy(t)}set(t,n,r){return[it(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class WO extends qe{priority=20;parse(t){return Dy(t)}set(t,n,r){return[it(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const qO={G:new cO,y:new uO,Y:new dO,R:new fO,u:new pO,Q:new hO,q:new mO,M:new gO,L:new vO,w:new bO,I:new wO,d:new EO,D:new kO,E:new CO,e:new PO,c:new AO,i:new _O,a:new OO,b:new MO,B:new DO,h:new NO,H:new FO,K:new LO,k:new VO,m:new $O,s:new jO,S:new zO,X:new RO,x:new BO,t:new HO,T:new WO},UO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YO=/^'([^]*?)'?$/,GO=/''/g,ZO=/\S/,XO=/[a-zA-Z]/;function QO(e,t,n,r){const o=()=>it(n,NaN),i=eO(),a=i.locale??Sy,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Qe(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new lO(r?.in,n)],d=t.match(KO).map(p=>{const g=p[0];if(g in Ru){const y=Ru[g];return y(p,a.formatLong)}return p}).join("").match(UO),h=[];for(let p of d){Oy(p)&&Bu(p,t,e),_y(p)&&Bu(p,t,e);const g=p[0],y=qO[g];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=h.find(E=>x.includes(E.token)||E.token===g);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${p}\` at the same time`)}else if(y.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${p}\` and any other token at the same time`);h.push({token:g,fullToken:p});const T=y.run(e,p,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(g.match(XO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");if(p==="''"?p="'":g==="'"&&(p=JO(p)),e.indexOf(p)===0)e=e.slice(p.length);else return o()}}if(e.length>0&&ZO.test(e))return o();const f=u.map(p=>p.priority).sort((p,g)=>g-p).filter((p,g,y)=>y.indexOf(p)===g).map(p=>u.filter(g=>g.priority===p).sort((g,y)=>y.subPriority-g.subPriority)).map(p=>p[0]);let b=Qe(n,r?.in);if(isNaN(+b))return o();const m={};for(const p of f){if(!p.validate(b,c))return o();const g=p.set(b,m,c);Array.isArray(g)?(b=g[0],Object.assign(m,g[1])):b=g}return b}function JO(e){return e.match(YO)[1].replace(GO,"'")}function eM(e,t,n){const[r,o]=Ga(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function tM(e,t){return i_(it(e,e),o_(e))}function nM(e,t,n){return Ka(e,-t,n)}function rM(e,t,n){const r=Qe(e,n?.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function oM(e,t,n){return yy(e,-t,n)}function zi(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=oM(e,o+r*12,n),d=nM(u,a+i*7,n),h=l+s*60,b=(c+h*60)*1e3;return it(e,+d-b)}var Tt=function(){return Tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tt.apply(this,arguments)};function qu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Uu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ri=function(e){return e.replace(new RegExp(" ","g")," ")},Ly=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)},iM=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Vy=function(e,t,n){var r=e.length-2,o=iM(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},$y=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Xa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},aM=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ku=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},sM=function(e){return e==="money"||e==="currency"},lM=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:""})},Qa=function(e,t){var n=Ly($y(e),t.fraction.length),r="".concat(t.currency).concat(Vy(n,t.group,t.decimal));return Ri(r)},cM=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=qu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var b=lM(r,i,s);return b.currency=Ri("".concat(b.currency.trim()," ")),b.literal=Ri(b.literal.trim()),b},[r,i]),h=function(b){var m=Qa(b.target.value,d),p=Xa(m);b.target.value=m,b.target.setAttribute("data-number",p.toString()),l?.(b),p!==0&&(u.current.selectionEnd=m.length)};S.useEffect(function(){if(u.current!==null){var b=u.current.value;if(b!==""){var m=Qa(b,d),p=Xa(m);u.current.value=m,u.current.setAttribute("data-number",p.toString());var g=new InputEvent("change",{});l?.(Tt(Tt({},g),{target:u.current,currentTarget:u.current})),p!==0&&(u.current.selectionEnd=m.length)}}},[d]);var f=c.defaultValue?Qa(c.defaultValue,d):void 0;return S.createElement("input",Tt({},c,{value:typeof c.value=="string"?Qa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),uM=1,dM=function(e){return e==="percentage"||e==="percent"||e==="percentual"},fM=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:""})},Ja=function(e,t){var n=Ly($y(e),t.fraction.length),r="".concat(Vy(n,t.group,t.decimal)," ").concat(t.percentSign);return Ri(r)},pM=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=qu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=Uu(S.useState(function(){var g,y;return(y=(g=a.value)===null||g===void 0?void 0:g.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var g,y=Number.parseFloat("".concat((g=a.value)!==null&&g!==void 0?g:"0")).toFixed(d.fraction.length);u(Ja(y,d))},[a.value]);var d=S.useMemo(function(){var g=fM(r);return g.percentSign=Ri("".concat(g.percentSign)),g},[r]),h=c.length-d.percentSign.length-uM,f=function(g){var y,x=s.current;x&&(x.setSelectionRange(h,h),g&&((y=a.onFocus)===null||y===void 0||y.call(a,g)))},b=function(g){var y=g.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,T=y.selectionEnd,w=x!==T,E=h<x;!w&&E&&f()}i?.(g)},m=function(g){var y=Ja(g.target.value,d),x=Xa(y);u(y),g.target.value=y,g.target.setAttribute("data-number",x.toString()),o?.(g)};S.useEffect(function(){if(s.current!==null){var g=s.current.value;if(g!==""){var y=Ja(g,d),x=Xa(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return f()},[c]);var p=a.defaultValue?Ja(a.defaultValue,d):void 0;return S.createElement("input",Tt({},a,{defaultValue:p,inputMode:"decimal",onChange:m,onFocus:f,onKeyUp:b,ref:s,type:"text"}))}),Bi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},hM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=es[i];a===void 0?r.push(i.replace(Bi.dots,"\\.").replace(Bi.openParenthesis,"\\(").replace(Bi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Bi.leadingBars,"\\")},Hi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Yu(o,n);var i=hM(o);return n?"^".concat(i,"$"):i},mM=function(e){return e.replace(Bi.escape,"\\$&")},Yu=function(e,t){var n=e.map(function(r){return typeof r=="string"?mM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},es={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]/}},gM=/\d/,jy="(dd) 9dddd-dddd",zy="(dd) dddd-dddd",Ry="ddd.ddd.ddd-dd",By="dd.ddd.ddd/dddd-dd",ts=function(e){return e.replace(/\D/g,"")},vM=["2",/[0-3]/,":",/[0-5]/,/\d/],yM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Zt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ry,isoDate:"dddd-dd-dd",cnpj:By,telephone:zy,cellphone:jy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ts(e).length<=11?Ry:By},int:function(e){return e===void 0&&(e=""),gM.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=ts(e);return t.length<11?zy:jy},time:function(e){var t=ts(e),n=t[0];return n==="2"?vM:yM}},Xt=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Hi(e,"",!0),infinity:n.infinity},n)},Bt={cellTelephone:Xt(Zt.cellTelephone,"tel"),cellphone:Xt(Zt.cellphone,"tel"),cep:Xt(Zt.cep,"decimal"),cnpj:Xt(Zt.cnpj,"decimal"),color:Xt(Zt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Xt(Zt.cpf,"decimal"),cpfCnpj:Xt(Zt.cpfCnpj,"decimal",{transform:ts}),creditCard:Xt(Zt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Xt(Zt.date,"decimal"),int:Xt(Zt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Xt(Zt.isoDate,"decimal"),telephone:Xt(Zt.telephone,"tel"),time:Xt(Zt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Xt(Zt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Hy(e,t,n,r){var o,i;r===void 0&&(r=es);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],h=a[c];if(d===void 0){s+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return s}var Wy=function(e){return e},bM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Hi(e,n,t));return r.test(n)};function xM(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var wM=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,h=e.as,f=qu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),b=S.useRef(null);S.useImperativeHandle(t,function(){return b.current});var m=Ku(s),p=Ku(d),g=Ku(u),y=S.useRef(bM(u,i,f.value||f.defaultValue)),x=h??"input",T=Uu(S.useState(""),2),w=T[0],E=T[1],k=xM(w),C=S.useCallback(function(O,V){var D,A,j=(D=O??V)!==null&&D!==void 0?D:"";if(u===void 0)return j;var N=(A=j?.toString())!==null&&A!==void 0?A:"";return Hy(N,typeof u=="function"?u(N):u,a??Wy,c??es)},[a,u,c]),M=Uu(S.useState(function(){return C(f.value,f.defaultValue)}),2),_=M[0],F=M[1],L=C(f.defaultValue,f.defaultValue),H=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(_);return Array.isArray(O)?Yu(O,i):Hi(u,_,i)}return typeof u=="string"?Hi(u,_,i):Yu(u,i)},[l,_,i,u]);S.useEffect(function(){if(f.value!==void 0){var O=C(f.value,f.defaultValue);F(O),b.current!==null&&(b.current.value=O)}},[f.value,u,a,f.defaultValue]);var I=function(O){var V,D,A,j,N,q=O.currentTarget,R=O.target.value;if(g.current===void 0)return F(R),(V=p.current)===null||V===void 0||V.call(p,R),(D=m.current)===null||D===void 0||D.call(m,O),d?.(R);var Y=new RegExp(Hi(g.current,R,i)),X=(A=q.selectionEnd)!==null&&A!==void 0?A:0,oe=function(G,Q,B){if(G.type!=="number")return G.setSelectionRange(Q,B)};if(r&&y.current&&R.length>=_.length)return q.value=_,oe(q,X-1,X-1);var ne=!1;R.length<k.length&&(y.current=!1,ne=!0),Y.test(R)&&(y.current=!0);var ee=X,z=R[ee-1],K=Hy(R,typeof g.current=="function"?g.current(R):g.current,a??Wy,c??es);for(q.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==z;)ee+=1;ne?oe(q,X,X):oe(q,ee,ee),O.target.value=K,E(K),(j=p.current)===null||j===void 0||j.call(p,K),(N=m.current)===null||N===void 0||N.call(m,O)};return S.createElement(x,Tt({},f,{ref:b,pattern:H,onChange:I,defaultValue:qy(f.defaultValue)?L:void 0,value:qy(f.value)?C(f.value,f.value):f.value}))}),qy=function(e){return typeof e=="string"},Uy=S.forwardRef(function(e,t){return sM(e.mask)?S.createElement(cM,Tt({},e,{mask:void 0,ref:t})):dM(e.mask)?S.createElement(pM,Tt({},e,{mask:void 0,ref:t})):S.createElement(wM,Tt({},e,{ref:t}))}),Qt=function(e){return function(t){return S.createElement(Uy,Tt({},e,t))}};Qt(Bt.cellTelephone),Qt(Bt.cellphone),Qt(Bt.cep),Qt(Bt.cnpj),Qt(Bt.color),Qt(Bt.cpf),Qt(Bt.cpfCnpj),Qt(Bt.creditCard),Qt(Bt.date),Qt(Bt.int),Qt(Bt.isoDate),Qt(Bt.telephone),Qt(Bt.time),Qt(Bt.uuid);var Ky=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&aM(Bt,t.mask)?Bt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return S.createElement(Uy,Tt({},o,{ref:n}))}),ns={exports:{}},Gu={},rs={exports:{}},Zu={};/**
183
183
  * @license React
184
184
  * use-sync-external-store-shim.production.js
185
185
  *
@@ -187,7 +187,7 @@
187
187
  *
188
188
  * This source code is licensed under the MIT license found in the
189
189
  * LICENSE file in the root directory of this source tree.
190
- */var $y;function cM(){if($y)return Ru;$y=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),m=r({inst:{value:f,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&h({inst:g})},[d,f,p]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Ru.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ru}var Hu={};/**
190
+ */var Yy;function SM(){if(Yy)return Zu;Yy=1;var e=S;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,h){var f=h(),b=r({inst:{value:f,getSnapshot:h}}),m=b[0].inst,p=b[1];return i(function(){m.value=f,m.getSnapshot=h,l(m)&&p({inst:m})},[d,f,h]),o(function(){return l(m)&&p({inst:m}),d(function(){l(m)&&p({inst:m})})},[d]),a(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Zu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Zu}var Xu={};/**
191
191
  * @license React
192
192
  * use-sync-external-store-shim.development.js
193
193
  *
@@ -195,7 +195,7 @@
195
195
  *
196
196
  * This source code is licensed under the MIT license found in the
197
197
  * LICENSE file in the root directory of this source tree.
198
- */var jy;function uM(){return jy||(jy=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!d){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:m}});var y=h[0].inst,x=h[1];return l(function(){y.value=g,y.getSnapshot=m,n(y)&&x({inst:y})},[f,g,m]),s(function(){return n(y)&&x({inst:y}),f(function(){n(y)&&x({inst:y})})},[f]),c(g),g}function n(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!i(f,g)}catch{return!0}}function r(f,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Hu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Hu}var zy;function By(){return zy||(zy=1,process.env.NODE_ENV==="production"?os.exports=cM():os.exports=uM()),os.exports}/**
198
+ */var Gy;function TM(){return Gy||(Gy=1,process.env.NODE_ENV!=="production"&&function(){function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}function t(f,b){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=b();if(!d){var p=b();i(m,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}p=a({inst:{value:m,getSnapshot:b}});var g=p[0].inst,y=p[1];return l(function(){g.value=m,g.getSnapshot=b,n(g)&&y({inst:g})},[f,m,b]),s(function(){return n(g)&&y({inst:g}),f(function(){n(g)&&y({inst:g})})},[f]),c(m),m}function n(f){var b=f.getSnapshot;f=f.value;try{var m=b();return!i(f,m)}catch{return!0}}function r(f,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Xu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Xu}var Zy;function Xy(){return Zy||(Zy=1,process.env.NODE_ENV==="production"?rs.exports=SM():rs.exports=TM()),rs.exports}/**
199
199
  * @license React
200
200
  * use-sync-external-store-shim/with-selector.production.js
201
201
  *
@@ -203,7 +203,7 @@
203
203
  *
204
204
  * This source code is licensed under the MIT license found in the
205
205
  * LICENSE file in the root directory of this source tree.
206
- */var Ry;function dM(){if(Ry)return Bu;Ry=1;var e=E,t=By();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 Bu.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 y(T){if(!x){if(x=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var x=!1,b,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(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},Bu}var Wu={};/**
206
+ */var Qy;function EM(){if(Qy)return Gu;Qy=1;var e=S,t=Xy();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 Gu.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var b=i(null);if(b.current===null){var m={hasValue:!1,value:null};b.current=m}else m=b.current;b=s(function(){function g(E){if(!y){if(y=!0,x=E,E=h(E),f!==void 0&&m.hasValue){var k=m.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=h(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return g(u())},w===null?void 0:function(){return g(w())}]},[u,d,h,f]);var p=o(c,b[0],b[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),l(p),p},Gu}var Qu={};/**
207
207
  * @license React
208
208
  * use-sync-external-store-shim/with-selector.development.js
209
209
  *
@@ -211,37 +211,37 @@
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var Hy;function fM(){return Hy||(Hy=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=By(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Wu.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 y(T){if(!x){if(x=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var x=!1,b,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(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())}()),Wu}var Wy;function pM(){return Wy||(Wy=1,process.env.NODE_ENV==="production"?rs.exports=dM():rs.exports=fM()),rs.exports}pM();var Io=function(){return Io=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},Io.apply(this,arguments)};function Ki(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 qy(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var _o=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},hM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},mM=function(e){return Object.entries(e)},Uy=function(e){return e instanceof Promise},Ky=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)},Io(Io({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},gM=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,qy([],Ki(a),!1)),u=function(d,p){return n(function(f){return Ky(d,f,i,p)})};return Uy(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))}},vM=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,qy([],Ki(a),!1)),c=function(u){return n(function(d){return Ky(u,d,i,o.current)})};return Uy(l)?l.then(function(u){return c(u)}):c(l)}},qu=function(e,t,n){var r,o,i,a=Ki(E.useState(function(){return e}),2),s=a[0],l=a[1],c=_o(s),u=_o((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=_o(t),p=_o((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=_o((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=hM(s),h=_o(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var x=Ki(E.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return mM(w).reduce(function(T,C){var k,_=Ki(C,2),A=_[0],L=_[1];return Io(Io({},T),(k={},k[A]=n!=null&&n.debug?gM(A,L,l,S,y,f.current):vM(A,L,l,S,y,f.current),k))},{})}),1),b=x[0];return[s,b,u.current]};const yM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function bM(e,t){return E.useRef(yM(e,t)).current}const is={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},rr=(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(rr(a,t,n,s))},[]),Yy=(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]:Yy(a,t,n,s)}},{}),Gy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},as=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},xM={default:e=>as(e,{result:Gy.default}),dark:e=>as(e,{result:Gy.dark})},Oo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},wM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Uu=(e,t)=>{const n=rr(e.colors,Oo(t==null?void 0:t.colors)),r=rr(e.spacing,Oo(t==null?void 0:t.spacing)),o=rr(e.rounded,Oo(t==null?void 0:t.rounded)),i=rr(e.shadow,Oo(t==null?void 0:t.rounded)),a=rr(e.zIndex,Oo((t==null?void 0:t.zIndex)??wM)),s=e.custom?rr(e.custom,Oo(t==null?void 0:t.customTokens)):[];return n.concat(r,o,s,a,i)},SM=(e,t)=>as(Uu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),TM=(e,t)=>Uu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),EM=(e,t)=>as(Uu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ss={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>v.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file"},ls={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Mo=E.createContext({tweaks:ls,parser:is.hsla,map:ss,locale:void 0}),Ku=e=>{const t=E.useContext(Mo);if(e)return e;if(t)return t.locale||e};function Zy(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 Et=()=>{const e=E.useContext(Mo);return e?e.map:ss},pn=(e,t=2)=>e.toString(16).padStart(t,"0"),Do=()=>{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,`${pn(t,4)+pn(n,3)}-${pn(r[0])+pn(r[1])}-${pn(r[2])+pn(r[3])}-${pn(r[4])+pn(r[5])}-${pn(r[6])+pn(r[7])+pn(r[8])+pn(r[9])}`},Xy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Qy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Yu=(e,t)=>{const n=Xy(t,Qy.basic,e)||Xy(t,Qy.extend,e);return n===void 0||n===e?void 0:n},or=()=>typeof window>"u",Gu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Jy=(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},CM=e=>!e,Zu=()=>{},eb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},kM={type:"spring",bounce:.3,duration:.6},tb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),nb={enter:tb(1),exit:tb(-1),middle:{x:"0%",opacity:1}},rb={exit:{visibility:"hidden"}},AM=e=>{const t=_n(dy(e));return uy({start:t,end:Co(t,{days:41})})},ob=(e,t)=>e.toLocaleDateString(t,{month:"long"}),PM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=dy(new Date(1970,o,1).setMonth(o)),a=ob(i,n);return v.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Xu={ArrowLeft:(e,t)=>t==="days"?Hi(e,{days:1}):Hi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Co(e,{days:1}):Co(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Hi(e,{weeks:1}):Hi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Co(e,{weeks:1}):Co(e,{years:1})},ib=(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)},Hr=e=>e.getFullYear().toString().padStart(4,"0"),IM=(e,t,n)=>e===void 0||n===void 0?!1:H_(t,e)&&W_(t,n),_M=e=>{var n;const t=Et();return v.jsx(pt.tbody,{layout:!0,variants:nb,custom:e.direction,onKeyDown:e.onKeyDown,className:Ce((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=Fe.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 v.jsx("tr",{className:i,children:r.map(c=>{var y,x,b,S,w,T,C,k,_,A,L,N,$,I,M,D,V,F;const u=c.toISOString(),d=e.rangeMode?u===((x=(y=e.range)==null?void 0:y.to)==null?void 0:x.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=RO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,m=BO(c,e.stateDate),g=!m||f,h=e.rangeMode?IM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return v.jsxs("td",{align:"center",className:Ce("relative",Fe.function((_=e.styles)==null?void 0:_.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(L=e.styles)==null?void 0:L.dayFrame),children:[v.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:Ce(`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":"",Fe.function((N=e.styles)==null?void 0:N.day)?($=e.styles)==null?void 0:$.day(c):(I=e.styles)==null?void 0:I.day),children:[c.getDate(),d&&((M=e.stateRange.from)==null?void 0:M.toISOString())===u?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?v.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},OM=()=>Ao(new Date),ab=({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(Do()),m=Et(),g=Ku(o),h=E.useRef(null),{date:y,range:x}=p,b=y||new Date,S=E.useRef(null),[w,T]=qu({date:b,isAnimating:!1,year:Hr(b),direction:void 0,range:{from:x==null?void 0:x.from,to:x==null?void 0:x.to},months:PM(f.current,b,g),selectMode:l?"from":void 0,week:uy({start:_n(b),end:ZI(b)})},M=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(ib(S.current||null,h,M.state().date,200),S.current=null,{isAnimating:!1}),date:D=>{const V=D(M.state().date);return{date:V,year:Hr(V)}},nextMonth:D=>{D&&(S.current=D.currentTarget);const V=M.state();if(V.isAnimating)return V;const F=Co(V.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Hr(F)}},previousMonth:D=>{D&&(S.current=D.currentTarget);const V=M.state();if(V.isAnimating)return V;const F=Hi(V.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Hr(F)}},onSelectDate:D=>{const V=M.state(),F=D.currentTarget.dataset.range==="true",H=D.currentTarget.dataset.date||"",O=new Date(H);return{date:O,year:Hr(O),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:F?{from:V.selectMode==="from"?O:V.range.from,to:V.selectMode==="to"?O:V.range.to}:V.range}},onChangeMonth:D=>{const V=D.target.value,H=Array.from(D.target.options).find(B=>B.value===V),O=M.state();if(H){const B=H.dataset.index||"",X=new Date(M.state().date);return X.setMonth(+B),{...O,date:X,year:Hr(X)}}return O},onKeyDown:D=>{const V=D.key,F=M.state();if(V in Xu){(V==="ArrowUp"||V==="ArrowDown")&&D.preventDefault();const H=M.state().date,O=Fe.keyof(Xu,V)?Xu[V](H,D.shiftKey?"month":"days"):null;if(O!==null)return ib(D.target,h,O),{...F,date:O,year:Hr(O)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,D,V)=>{var H,O;return(V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&((O=(H=V.props).onChangeMonth)==null||O.call(H,M.date)),M},(M,D,V)=>{var H,O;return V.method==="onChangeYear"&&((O=(H=V.props).onChangeYear)==null||O.call(H,M.date)),M},(M,D,V)=>{const F=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&F&&t?(c==null||c(M.range),M):(F&&t&&(c==null||c(M.date)),M)}]}),C=AM(w.date),k=Jy(C,7),_=w.date.toISOString(),A=ob(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[_,t]);const L=bM(M=>T.date(D=>WO(new Date(D),+M)),1200),N=M=>{const D=M.currentTarget.value;T.onChangeYear(D),s==null||s(new Date(D)),L(D)},$=Zy((M,D)=>(M.preventDefault(),D==="right"?T.previousMonth():T.nextMonth()),10),I=()=>{const M=OM();T.date(()=>M),c==null||c(M)};return v.jsx(ik,{transition:kM,children:v.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Ce("relative overflow-hidden",Fe.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[v.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:v.jsx(er,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:v.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[v.jsxs("header",{className:"relative flex justify-between",children:[v.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:rb,onClick:T.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(SI,{className:"h-4 w-4"})}),v.jsx(pt.span,{layout:!0,variants:nb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:v.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[v.jsx("select",{value:A,onChange:T.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}),v.jsx(Vy,{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"})]})}),v.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:rb,onClick:T.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(Au,{className:"h-4 w-4"})}),v.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%)"}})]}),v.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[v.jsx("thead",{children:v.jsx("tr",{children:w.week.map(M=>v.jsx("th",{role:"columnheader",className:Ce("py-2 text-sm font-medium capitalize",Fe.function(u==null?void 0:u.weekDay)?u.weekDay(M):u==null?void 0:u.weekDay),children:M.toLocaleDateString(g,{weekday:"short"})},M.toString()))})}),v.jsx(_M,{zip:k,range:x,styles:u,date:y||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},A)})}),v.jsx("footer",{className:"mt-2 text-center text-primary",children:v.jsx("button",{type:"button",onClick:I,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Qu=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>v.jsxs(ln,{...s,as:r,"data-component":"card",className:Ce("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?v.jsx("header",{"data-component":"card-title",className:Ce("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,v.jsx("div",{"data-component":"card-body",className:Ce("min-w-full px-4 lg:px-8",a),children:e})]});Qu.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return v.jsxs(i,{...o,title:Fe.string(o.title)?o.title:void 0,className:Ce("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[v.jsx(a,{className:"font-semibold",children:o.title}),r?v.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 sb=e=>{const t=e.Icon??ty,n=Et();return v.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[v.jsx(t,{size:64,className:"text-disabled"}),v.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})};function lb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function cb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=lb(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():lb(e[o],null)}}}}function Qt(...e){return P.useCallback(cb(...e),e)}function cs(e){const t=MM(e),n=P.forwardRef((r,o)=>{const{children:i,...a}=r,s=P.Children.toArray(i),l=s.find(NM);if(l){const c=l.props.children,u=s.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return v.jsx(t,{...a,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var ub=cs("Slot");function MM(e){const t=P.forwardRef((n,r)=>{const{children:o,...i}=n;if(P.isValidElement(o)){const a=LM(o),s=FM(i,o.props);return o.type!==P.Fragment&&(s.ref=r?cb(r,a):a),P.cloneElement(o,s)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DM=Symbol("radix.slottable");function NM(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DM}function FM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function LM(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 VM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lt=VM.reduce((e,t)=>{const n=cs(`Primitive.${t}`),r=P.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function db(e,t){e&&Sa.flushSync(()=>e.dispatchEvent(t))}var $M=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),jM="VisuallyHidden",Ju=P.forwardRef((e,t)=>v.jsx(Lt.span,{...e,ref:t,style:{...$M,...e.style}}));Ju.displayName=jM;function us(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,h=P.useMemo(()=>m,Object.values(m));return v.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=P.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=>P.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,zM(o,...t)]}function zM(...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 P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function fb(e){const t=e+"CollectionProvider",[n,r]=us(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:y}=g,x=E.useRef(null),b=E.useRef(new Map).current;return v.jsx(o,{scope:h,itemMap:b,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=cs(s),c=E.forwardRef((g,h)=>{const{scope:y,children:x}=g,b=i(s,y),S=Qt(h,b.collectionRef);return v.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=cs(u),f=E.forwardRef((g,h)=>{const{scope:y,children:x,...b}=g,S=E.useRef(null),w=Qt(h,S),T=i(u,y);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),v.jsx(p,{[d]:"",ref:w,children:x})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function Pt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var No=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},BM=P[" useInsertionEffect ".trim().toString()]||No;function pb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=RM({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=P.useRef(e!==void 0);P.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=P.useCallback(u=>{var d;if(s){const p=HM(u)?u(e):u;p!==e&&((d=a.current)==null||d.call(a,p))}else i(u)},[s,e,i,a]);return[l,c]}function RM({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),o=P.useRef(n),i=P.useRef(t);return BM(()=>{i.current=t},[t]),P.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function HM(e){return typeof e=="function"}function WM(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var hb=e=>{const{present:t,children:n}=e,r=qM(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),i=Qt(r.ref,UM(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:i}):null};hb.displayName="Presence";function qM(e){const[t,n]=P.useState(),r=P.useRef(null),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[s,l]=WM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=ds(r.current);i.current=s==="mounted"?c:"none"},[s]),No(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ds(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]),No(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ds(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=ds(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:P.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function ds(e){return(e==null?void 0:e.animationName)||"none"}function UM(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 KM=P.createContext(void 0);function YM(e){const t=P.useContext(KM);return e||t||"ltr"}function Wr(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function GM(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e);P.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 ZM="DismissableLayer",ed="dismissableLayer.update",XM="dismissableLayer.pointerDownOutside",QM="dismissableLayer.focusOutside",mb,gb=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vb=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=P.useContext(gb),[u,d]=P.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=P.useState({}),m=Qt(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(h),x=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,w=eD(C=>{const k=C.target,_=[...c.branches].some(A=>A.contains(k));!S||_||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=tD(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 GM(C=>{x===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(mb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),bb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=mb)}},[u,p,n,c]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),bb())},[u,c]),P.useEffect(()=>{const C=()=>f({});return document.addEventListener(ed,C),()=>document.removeEventListener(ed,C)},[]),v.jsx(Lt.div,{...l,ref:m,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Pt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Pt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Pt(e.onPointerDownCapture,w.onPointerDownCapture)})});vb.displayName=ZM;var JM="DismissableLayerBranch",yb=P.forwardRef((e,t)=>{const n=P.useContext(gb),r=P.useRef(null),o=Qt(t,r);return P.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(Lt.div,{...e,ref:o})});yb.displayName=JM;function eD(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){xb(XM,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 tD(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),r=P.useRef(!1);return P.useEffect(()=>{const o=i=>{i.target&&!r.current&&xb(QM,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 bb(){const e=new CustomEvent(ed);document.dispatchEvent(e)}function xb(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?db(o,i):o.dispatchEvent(i)}var nD=vb,rD=yb,oD="Portal",wb=P.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=P.useState(!1);No(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?vi.createPortal(v.jsx(Lt.div,{...r,ref:t}),a):null});wb.displayName=oD;function iD(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function aD(e){const[t,n]=P.useState(void 0);return No(()=>{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 Sb(e,[t,n]){return Math.min(n,Math.max(t,e))}var td="Progress",nd=100,[sD,WB]=us(td),[lD,cD]=sD(td),Tb=P.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=uD,...a}=e;(o||o===0)&&!Ab(o)&&console.error(dD(`${o}`,"Progress"));const s=Ab(o)?o:nd;r!==null&&!Pb(r,s)&&console.error(fD(`${r}`,"Progress"));const l=Pb(r,s)?r:null,c=fs(l)?i(l,s):void 0;return v.jsx(lD,{scope:n,value:l,max:s,children:v.jsx(Lt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":fs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":kb(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Tb.displayName=td;var Eb="ProgressIndicator",Cb=P.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=cD(Eb,n);return v.jsx(Lt.div,{"data-state":kb(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Cb.displayName=Eb;function uD(e,t){return`${Math.round(e/t*100)}%`}function kb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function fs(e){return typeof e=="number"}function Ab(e){return fs(e)&&!isNaN(e)&&e>0}function Pb(e,t){return fs(e)&&!isNaN(e)&&e<=t&&e>=0}function dD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${nd}\`.`}function fD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
214
+ */var Jy;function kM(){return Jy||(Jy=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=Xy(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Qu.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var b=i(null);if(b.current===null){var m={hasValue:!1,value:null};b.current=m}else m=b.current;b=s(function(){function g(E){if(!y){if(y=!0,x=E,E=h(E),f!==void 0&&m.hasValue){var k=m.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=h(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return g(u())},w===null?void 0:function(){return g(w())}]},[u,d,h,f]);var p=o(c,b[0],b[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Qu}var eb;function CM(){return eb||(eb=1,process.env.NODE_ENV==="production"?ns.exports=EM():ns.exports=kM()),ns.exports}CM();var Ao=function(){return Ao=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},Ao.apply(this,arguments)};function Wi(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 tb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Io=function(e){var t=S.useRef(e??{});return S.useEffect(function(){return void(t.current=e)},[e]),t},PM=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},AM=function(e){return Object.entries(e)},nb=function(e){return e instanceof Promise},rb=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)},Ao(Ao({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},IM=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,tb([],Wi(a),!1)),u=function(d,h){return n(function(f){return rb(d,f,i,h)})};return nb(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))}},_M=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,tb([],Wi(a),!1)),c=function(u){return n(function(d){return rb(u,d,i,o.current)})};return nb(l)?l.then(function(u){return c(u)}):c(l)}},Ju=function(e,t,n){var r,o,i,a=Wi(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Io(s),u=Io((r=n?.props)!==null&&r!==void 0?r:{}),d=Io(t),h=Io((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),f=Io((i=n?.interceptor)!==null&&i!==void 0?i:[]),b=S.useRef(e),m=PM(s),p=Io(m),g=S.useRef(null);S.useEffect(function(){if(g.current!==null){var T=g.current;h.current.forEach(function(w){w(s,m,T)})}},[s,h,m]);var y=Wi(S.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:b.current,previousState:function(){return p.current}});return AM(w).reduce(function(E,k){var C,M=Wi(k,2),_=M[0],F=M[1];return Ao(Ao({},E),(C={},C[_]=n?.debug?IM(_,F,l,T,g,f.current):_M(_,F,l,T,g,f.current),C))},{})}),1),x=y[0];return[s,x,u.current]};const OM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function MM(e,t){return S.useRef(OM(e,t)).current}const os={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},lr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(lr(a,t,n,s))},[]),ob=(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]:ob(a,t,n,s)}},{}),ib={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},is=(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)},DM={default:e=>is(e,{result:ib.default}),dark:e=>is(e,{result:ib.dark})},_o=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},NM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),ed=(e,t)=>{const n=lr(e.colors,_o(t?.colors)),r=lr(e.spacing,_o(t?.spacing)),o=lr(e.rounded,_o(t?.rounded)),i=lr(e.shadow,_o(t?.rounded)),a=lr(e.zIndex,_o(t?.zIndex??NM)),s=e.custom?lr(e.custom,_o(t?.customTokens)):[];return n.concat(r,o,s,a,i)},FM=(e,t)=>is(ed(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),LM=(e,t)=>ed(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),VM=(e,t)=>is(ed(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),as={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>v.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file"},ss={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Oo=S.createContext({tweaks:ss,parser:os.hsla,map:as,locale:void 0}),td=e=>{const t=S.useContext(Oo);if(e)return e;if(t)return t.locale||e};function ab(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const Et=()=>{const e=S.useContext(Oo);return e?e.map:as},mn=(e,t=2)=>e.toString(16).padStart(t,"0"),Mo=()=>{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,`${mn(t,4)+mn(n,3)}-${mn(r[0])+mn(r[1])}-${mn(r[2])+mn(r[3])}-${mn(r[4])+mn(r[5])}-${mn(r[6])+mn(r[7])+mn(r[8])+mn(r[9])}`},sb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),lb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},nd=(e,t)=>{const n=sb(t,lb.basic,e)||sb(t,lb.extend,e);return n===void 0||n===e?void 0:n},cr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cb=(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},$M=e=>!e,od=()=>{},ub=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},jM={type:"spring",bounce:.3,duration:.6},db=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),fb={enter:db(1),exit:db(-1),middle:{x:"0%",opacity:1}},pb={exit:{visibility:"hidden"}},zM=e=>{const t=Mn(wy(e));return xy({start:t,end:Eo(t,{days:41})})},hb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),RM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=wy(new Date(1970,o,1).setMonth(o)),a=hb(i,n);return v.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),id={ArrowLeft:(e,t)=>t==="days"?zi(e,{days:1}):zi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Eo(e,{days:1}):Eo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?zi(e,{weeks:1}):zi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Eo(e,{weeks:1}):Eo(e,{years:1})},mb=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Rr=e=>e.getFullYear().toString().padStart(4,"0"),BM=(e,t,n)=>e===void 0||n===void 0?!1:nO(t,e)&&rO(t,n),HM=e=>{const t=Et();return v.jsx(ut.tbody,{layout:!0,variants:fb,custom:e.direction,onKeyDown:e.onKeyDown,className:ke(e.styles?.week),children:e.zip.map((n,r)=>{const o=$e.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return v.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===e.date?.toISOString(),l=tM(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=eM(i,e.stateDate),d=!u||c,h=e.rangeMode?BM(e.range?.from,i,e.range?.to):!1;return v.jsxs("td",{align:"center",className:ke("relative",$e.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[v.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:ke(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",$e.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?v.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},WM=()=>Co(new Date),gb=({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,...h})=>{const f=S.useRef(Mo()),b=Et(),m=td(o),p=S.useRef(null),{date:g,range:y}=h,x=g||new Date,T=S.useRef(null),[w,E]=Ju({date:x,isAnimating:!1,year:Rr(x),direction:void 0,range:{from:y?.from,to:y?.to},months:RM(f.current,x,m),selectMode:l?"from":void 0,week:xy({start:Mn(x),end:c_(x)})},O=>({onChangeYear:V=>({year:V}),onExitComplete:()=>(mb(T.current||null,p,O.state().date,200),T.current=null,{isAnimating:!1}),date:V=>{const D=V(O.state().date);return{date:D,year:Rr(D)}},nextMonth:V=>{V&&(T.current=V.currentTarget);const D=O.state();if(D.isAnimating)return D;const A=Eo(D.date,{months:1});return{date:A,isAnimating:!0,direction:1,year:Rr(A)}},previousMonth:V=>{V&&(T.current=V.currentTarget);const D=O.state();if(D.isAnimating)return D;const A=zi(D.date,{months:1});return{date:A,isAnimating:!0,direction:-1,year:Rr(A)}},onSelectDate:V=>{const D=O.state(),A=V.currentTarget.dataset.range==="true",j=V.currentTarget.dataset.date||"",N=new Date(j);return{date:N,year:Rr(N),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:A?{from:D.selectMode==="from"?N:D.range.from,to:D.selectMode==="to"?N:D.range.to}:D.range}},onChangeMonth:V=>{const D=V.target.value,j=Array.from(V.target.options).find(q=>q.value===D),N=O.state();if(j){const q=j.dataset.index||"",R=new Date(O.state().date);return R.setMonth(+q),{...N,date:R,year:Rr(R)}}return N},onKeyDown:V=>{const D=V.key,A=O.state();if(D in id){(D==="ArrowUp"||D==="ArrowDown")&&V.preventDefault();const j=O.state().date,N=$e.keyof(id,D)?id[D](j,V.shiftKey?"month":"days"):null;if(N!==null)return mb(V.target,p,N),{...A,date:N,year:Rr(N)}}return O.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(O,V,D)=>((D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&D.props.onChangeMonth?.(O.date),O),(O,V,D)=>(D.method==="onChangeYear"&&D.props.onChangeYear?.(O.date),O),(O,V,D)=>{const A=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&A&&t?(c?.(O.range),O):(A&&t&&c?.(O.date),O)}]}),k=zM(w.date),C=cb(k,7),M=w.date.toISOString(),_=hb(w.date,m);S.useEffect(()=>{t||c?.(w.date)},[M,t]);const F=MM(O=>E.date(V=>rM(new Date(V),+O)),1200),L=O=>{const V=O.currentTarget.value;E.onChangeYear(V),s?.(new Date(V)),F(V)},H=ab((O,V)=>(O.preventDefault(),V==="right"?E.previousMonth():E.nextMonth()),10),I=()=>{const O=WM();E.date(()=>O),c?.(O)};return v.jsx(yC,{transition:jM,children:v.jsxs("div",{ref:p,"data-component":"calendar",onTouchEnd:H.onTouchEnd,onTouchStart:H.onTouchStart,className:ke("relative overflow-hidden",$e.function(u?.calendar)?u?.calendar(k):u?.calendar),children:[v.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:v.jsx(ir,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:E.onExitComplete,children:v.jsxs(ut.div,{initial:"enter",animate:"middle",exit:"exit",children:[v.jsxs("header",{className:"relative flex justify-between",children:[v.jsx(ut.button,{layout:!0,type:"button","data-focustrap":"prev",variants:pb,onClick:E.previousMonth,title:b.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(FI,{className:"h-4 w-4"})}),v.jsx(ut.span,{layout:!0,variants:fb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:v.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[v.jsx("select",{value:_,onChange:E.onChangeMonth,"aria-label":b.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),v.jsx(Ky,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:L,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),v.jsx(ut.button,{layout:!0,type:"button","data-focustrap":"next",variants:pb,onClick:E.nextMonth,title:b.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(Fu,{className:"h-4 w-4"})}),v.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%)"}})]}),v.jsxs(ut.table,{className:"mt-2 table min-w-full table-auto border-0",children:[v.jsx("thead",{children:v.jsx("tr",{children:w.week.map(O=>v.jsx("th",{role:"columnheader",className:ke("py-2 text-sm font-medium capitalize",$e.function(u?.weekDay)?u.weekDay(O):u?.weekDay),children:O.toLocaleDateString(m,{weekday:"short"})},O.toString()))})}),v.jsx(HM,{zip:C,range:y,styles:u,date:g||null,dispatch:E,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},_)})}),v.jsx("footer",{className:"mt-2 text-center text-primary",children:v.jsx("button",{type:"button",onClick:I,className:"transition-transform duration-300 hover:scale-105",children:b.calendarToday})})]})})},ad=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>v.jsxs(un,{...s,as:r,"data-component":"card",className:ke("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?v.jsx("header",{"data-component":"card-title",className:ke("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,v.jsx("div",{"data-component":"card-body",className:ke("min-w-full px-4 lg:px-8",a),children:e})]});ad.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return v.jsxs(i,{...o,title:$e.string(o.title)?o.title:void 0,className:ke("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[v.jsx(a,{className:"font-semibold",children:o.title}),r?v.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 vb=e=>{const t=e.Icon??dy,n=Et();return v.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[v.jsx(t,{size:64,className:"text-disabled"}),v.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})};function yb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=yb(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():yb(e[o],null)}}}}function tn(...e){return P.useCallback(bb(...e),e)}function ls(e){const t=qM(e),n=P.forwardRef((r,o)=>{const{children:i,...a}=r,s=P.Children.toArray(i),l=s.find(KM);if(l){const c=l.props.children,u=s.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return v.jsx(t,{...a,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var xb=ls("Slot");function qM(e){const t=P.forwardRef((n,r)=>{const{children:o,...i}=n;if(P.isValidElement(o)){const a=GM(o),s=YM(i,o.props);return o.type!==P.Fragment&&(s.ref=r?bb(r,a):a),P.cloneElement(o,s)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UM=Symbol("radix.slottable");function KM(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UM}function YM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function GM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$t=ZM.reduce((e,t)=>{const n=ls(`Primitive.${t}`),r=P.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wb(e,t){e&&pi.flushSync(()=>e.dispatchEvent(t))}var XM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QM="VisuallyHidden",sd=P.forwardRef((e,t)=>v.jsx($t.span,{...e,ref:t,style:{...XM,...e.style}}));sd.displayName=QM;function cs(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:h,children:f,...b}=d,m=h?.[e]?.[l]||s,p=P.useMemo(()=>b,Object.values(b));return v.jsx(m.Provider,{value:p,children:f})};c.displayName=i+"Provider";function u(d,h){const f=h?.[e]?.[l]||s,b=P.useContext(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>P.createContext(a));return function(s){const l=s?.[e]||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,JM(o,...t)]}function JM(...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 P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Sb(e){const t=e+"CollectionProvider",[n,r]=cs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:p,children:g}=m,y=S.useRef(null),x=S.useRef(new Map).current;return v.jsx(o,{scope:p,itemMap:x,collectionRef:y,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=ls(s),c=S.forwardRef((m,p)=>{const{scope:g,children:y}=m,x=i(s,g),T=tn(p,x.collectionRef);return v.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=ls(u),f=S.forwardRef((m,p)=>{const{scope:g,children:y,...x}=m,T=S.useRef(null),w=tn(p,T),E=i(u,g);return S.useEffect(()=>(E.itemMap.set(T,{ref:T,...x}),()=>void E.itemMap.delete(T))),v.jsx(h,{[d]:"",ref:w,children:y})});f.displayName=u;function b(m){const p=i(e+"CollectionConsumer",m);return S.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(p.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},b,r]}function It(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Do=globalThis?.document?P.useLayoutEffect:()=>{},eD=P[" useInsertionEffect ".trim().toString()]||Do;function Tb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=tD({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=P.useRef(e!==void 0);P.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=P.useCallback(u=>{if(s){const d=nD(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function tD({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),o=P.useRef(n),i=P.useRef(t);return eD(()=>{i.current=t},[t]),P.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function nD(e){return typeof e=="function"}function rD(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var Eb=e=>{const{present:t,children:n}=e,r=oD(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),i=tn(r.ref,iD(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:i}):null};Eb.displayName="Presence";function oD(e){const[t,n]=P.useState(),r=P.useRef(null),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[s,l]=rD(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=us(r.current);i.current=s==="mounted"?c:"none"},[s]),Do(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,f=us(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Do(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const m=us(r.current).includes(f.animationName);if(f.target===t&&m&&(l("ANIMATION_END"),!o.current)){const p=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},h=f=>{f.target===t&&(i.current=us(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:P.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function us(e){return e?.animationName||"none"}function iD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var aD=P.createContext(void 0);function sD(e){const t=P.useContext(aD);return e||t||"ltr"}function Br(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>t.current?.(...n),[])}function lD(e,t=globalThis?.document){const n=Br(e);P.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 cD="DismissableLayer",ld="dismissableLayer.update",uD="dismissableLayer.pointerDownOutside",dD="dismissableLayer.focusOutside",kb,Cb=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pb=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=P.useContext(Cb),[u,d]=P.useState(null),h=u?.ownerDocument??globalThis?.document,[,f]=P.useState({}),b=tn(t,k=>d(k)),m=Array.from(c.layers),[p]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(p),y=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=g,w=pD(k=>{const C=k.target,M=[...c.branches].some(_=>_.contains(C));!T||M||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h),E=hD(k=>{const C=k.target;[...c.branches].some(_=>_.contains(C))||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h);return lD(k=>{y===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ib(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=kb)}},[u,h,n,c]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ib())},[u,c]),P.useEffect(()=>{const k=()=>f({});return document.addEventListener(ld,k),()=>document.removeEventListener(ld,k)},[]),v.jsx($t.div,{...l,ref:b,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:It(e.onFocusCapture,E.onFocusCapture),onBlurCapture:It(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:It(e.onPointerDownCapture,w.onPointerDownCapture)})});Pb.displayName=cD;var fD="DismissableLayerBranch",Ab=P.forwardRef((e,t)=>{const n=P.useContext(Cb),r=P.useRef(null),o=tn(t,r);return P.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx($t.div,{...e,ref:o})});Ab.displayName=fD;function pD(e,t=globalThis?.document){const n=Br(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){_b(uD,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 hD(e,t=globalThis?.document){const n=Br(e),r=P.useRef(!1);return P.useEffect(()=>{const o=i=>{i.target&&!r.current&&_b(dD,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 Ib(){const e=new CustomEvent(ld);document.dispatchEvent(e)}function _b(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?wb(o,i):o.dispatchEvent(i)}var mD=Pb,gD=Ab,vD="Portal",Ob=P.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=P.useState(!1);Do(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?fi.createPortal(v.jsx($t.div,{...r,ref:t}),a):null});Ob.displayName=vD;function Hr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function yD(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function bD(e){const[t,n]=P.useState(void 0);return Do(()=>{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}const Fn=Math.min,nn=Math.max,ds=Math.round,No=Math.floor,ur=e=>({x:e,y:e}),xD={left:"right",right:"left",bottom:"top",top:"bottom"},wD={start:"end",end:"start"};function cd(e,t,n){return nn(e,Fn(t,n))}function Fo(e,t){return typeof e=="function"?e(t):e}function dr(e){return e.split("-")[0]}function Lo(e){return e.split("-")[1]}function Mb(e){return e==="x"?"y":"x"}function ud(e){return e==="y"?"height":"width"}function Wr(e){return["top","bottom"].includes(dr(e))?"y":"x"}function dd(e){return Mb(Wr(e))}function SD(e,t,n){n===void 0&&(n=!1);const r=Lo(e),o=dd(e),i=ud(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=fs(a)),[a,fs(a)]}function TD(e){const t=fs(e);return[fd(e),t,fd(t)]}function fd(e){return e.replace(/start|end/g,t=>wD[t])}function ED(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 kD(e,t,n,r){const o=Lo(e);let i=ED(dr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(fd)))),i}function fs(e){return e.replace(/left|right|bottom|top/g,t=>xD[t])}function CD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Db(e){return typeof e!="number"?CD(e):{top:e,right:e,bottom:e,left:e}}function ps(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}}function Nb(e,t,n){let{reference:r,floating:o}=e;const i=Wr(t),a=dd(t),s=ud(a),l=dr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=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(Lo(t)){case"start":f[a]-=h*(n&&c?-1:1);break;case"end":f[a]+=h*(n&&c?-1:1);break}return f}const PD=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}=Nb(c,r,l),h=r,f={},b=0;for(let m=0;m<s.length;m++){const{name:p,fn:g}=s[m],{x:y,y:x,data:T,reset:w}=await g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[p]:{...f[p],...T}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Nb(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function pd(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:h=!1,padding:f=0}=Fo(t,e),b=Db(f),p=s[h?d==="floating"?"reference":"floating":d],g=ps(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(p)))==null||n?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=ps(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(g.top-w.top+b.top)/T.y,bottom:(w.bottom-g.bottom+b.bottom)/T.y,left:(g.left-w.left+b.left)/T.x,right:(w.right-g.right+b.right)/T.x}}const AD=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}=Fo(e,t)||{};if(c==null)return{};const d=Db(u),h={x:n,y:r},f=dd(o),b=ud(f),m=await a.getDimensions(c),p=f==="y",g=p?"top":"left",y=p?"bottom":"right",x=p?"clientHeight":"clientWidth",T=i.reference[b]+i.reference[f]-h[f]-i.floating[b],w=h[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=E?E[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=s.floating[x]||i.floating[b]);const C=T/2-w/2,M=k/2-m[b]/2-1,_=Fn(d[g],M),F=Fn(d[y],M),L=_,H=k-m[b]-F,I=k/2-m[b]/2+C,O=cd(L,I,H),V=!l.arrow&&Lo(o)!=null&&I!==O&&i.reference[b]/2-(I<L?_:F)-m[b]/2<0,D=V?I<L?I-L:I-H:0;return{[f]:h[f]+D,data:{[f]:O,centerOffset:I-O-D,...V&&{alignmentOffset:D}},reset:V}}}),ID=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:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...p}=Fo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=dr(o),y=Wr(s),x=dr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=h||(x||!m?[fs(s)]:TD(s)),E=b!=="none";!h&&E&&w.push(...kD(s,m,b,T));const k=[s,...w],C=await pd(t,p),M=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&M.push(C[g]),d){const I=SD(o,a,T);M.push(C[I[0]],C[I[1]])}if(_=[..._,{placement:o,overflows:M}],!M.every(I=>I<=0)){var F,L;const I=(((F=i.flip)==null?void 0:F.index)||0)+1,O=k[I];if(O)return{data:{index:I,overflows:_},reset:{placement:O}};let V=(L=_.filter(D=>D.overflows[0]<=0).sort((D,A)=>D.overflows[1]-A.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(f){case"bestFit":{var H;const D=(H=_.filter(A=>{if(E){const j=Wr(A.placement);return j===y||j==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,N)=>j+N,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:H[0];D&&(V=D);break}case"initialPlacement":V=s;break}if(o!==V)return{reset:{placement:V}}}return{}}}};async function _D(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=dr(n),s=Lo(n),l=Wr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Fo(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const OD=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 _D(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}}}}},MD=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:p=>{let{x:g,y}=p;return{x:g,y}}},...l}=Fo(e,t),c={x:n,y:r},u=await pd(t,l),d=Wr(dr(o)),h=Mb(d);let f=c[h],b=c[d];if(i){const p=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=f+u[p],x=f-u[g];f=cd(y,f,x)}if(a){const p=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=b+u[p],x=b-u[g];b=cd(y,b,x)}const m=s.fn({...t,[h]:f,[d]:b});return{...m,data:{x:m.x-n,y:m.y-r}}}}},DD=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}=Fo(e,t),l=await pd(t,s),c=dr(n),u=Lo(n),d=Wr(n)==="y",{width:h,height:f}=r.floating;let b,m;c==="top"||c==="bottom"?(b=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,b=u==="end"?"top":"bottom");const p=f-l.top-l.bottom,g=h-l.left-l.right,y=Fn(f-l[b],p),x=Fn(h-l[m],g),T=!t.middlewareData.shift;let w=y,E=x;if(d?E=u||T?Fn(x,g):g:w=u||T?Fn(y,p):p,T&&!u){const C=nn(l.left,0),M=nn(l.right,0),_=nn(l.top,0),F=nn(l.bottom,0);d?E=h-2*(C!==0||M!==0?C+M:nn(l.left,l.right)):w=f-2*(_!==0||F!==0?_+F:nn(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:w});const k=await o.getDimensions(i.floating);return h!==k.width||f!==k.height?{reset:{rects:!0}}:{}}}};function hs(){return typeof window<"u"}function fr(e){return Fb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xn(e){var t;return(t=(Fb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fb(e){return hs()?e instanceof Node||e instanceof Ut(e).Node:!1}function tt(e){return hs()?e instanceof Element||e instanceof Ut(e).Element:!1}function kt(e){return hs()?e instanceof HTMLElement||e instanceof Ut(e).HTMLElement:!1}function ms(e){return!hs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot}function qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ND(e){return["table","td","th"].includes(fr(e))}function gs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function hd(e){const t=vs(),n=tt(e)?rn(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 FD(e){let t=Jn(e);for(;kt(t)&&!Qn(t);){if(hd(t))return t;if(gs(t))return null;t=Jn(t)}return null}function vs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qn(e){return["html","body","#document"].includes(fr(e))}function rn(e){return Ut(e).getComputedStyle(e)}function ys(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jn(e){if(fr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ms(e)&&e.host||Xn(e);return ms(t)?t.host:t}function Lb(e){const t=Jn(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&qi(t)?t:Lb(t)}function pr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Lb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ut(o);if(i){const s=md(a);return t.concat(a,a.visualViewport||[],qi(o)?o:[],s&&n?pr(s):[])}return t.concat(o,pr(o,[],n))}function md(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vb(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ds(n)!==i||ds(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function gd(e){return tt(e)?e:e.contextElement}function Vo(e){const t=gd(e);if(!kt(t))return ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vb(t);let a=(i?ds(n.width):n.width)/r,s=(i?ds(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LD=ur(0);function $b(e){const t=Ut(e);return!vs()||!t.visualViewport?LD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ut(e)?!1:t}function qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=gd(e);let a=ur(1);t&&(r?tt(r)&&(a=Vo(r)):a=Vo(e));const s=VD(i,n,r)?$b(i):ur(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 h=Ut(i),f=r&&tt(r)?Ut(r):r;let b=h,m=md(b);for(;m&&r&&f!==b;){const p=Vo(m),g=m.getBoundingClientRect(),y=rn(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*p.x,T=g.top+(m.clientTop+parseFloat(y.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=x,c+=T,b=Ut(m),m=md(b)}}return ps({width:u,height:d,x:l,y:c})}function $D(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Xn(r),s=t?gs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ur(1);const u=ur(0),d=kt(r);if((d||!d&&!i)&&((fr(r)!=="body"||qi(a))&&(l=ys(r)),kt(r))){const h=qr(r);c=Vo(r),u.x=h.x+r.clientLeft,u.y=h.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 jD(e){return Array.from(e.getClientRects())}function jb(e){return qr(Xn(e)).left+ys(e).scrollLeft}function zD(e){const t=Xn(e),n=ys(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+jb(e);const s=-n.scrollTop;return rn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function RD(e,t){const n=Ut(e),r=Xn(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=vs();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function BD(e,t){const n=qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?Vo(e):ur(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 zb(e,t,n){let r;if(t==="viewport")r=RD(e,n);else if(t==="document")r=zD(Xn(e));else if(tt(t))r=BD(t,n);else{const o=$b(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ps(r)}function Rb(e,t){const n=Jn(e);return n===t||!tt(n)||Qn(n)?!1:rn(n).position==="fixed"||Rb(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=pr(e,[],!1).filter(s=>tt(s)&&fr(s)!=="body"),o=null;const i=rn(e).position==="fixed";let a=i?Jn(e):e;for(;tt(a)&&!Qn(a);){const s=rn(a),l=hd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||qi(a)&&!l&&Rb(e,a))?r=r.filter(u=>u!==a):o=s,a=Jn(a)}return t.set(e,r),r}function WD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?gs(t)?[]:HD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=zb(t,u,o);return c.top=nn(d.top,c.top),c.right=Fn(d.right,c.right),c.bottom=Fn(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},zb(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qD(e){const{width:t,height:n}=Vb(e);return{width:t,height:n}}function UD(e,t,n){const r=kt(t),o=Xn(t),i=n==="fixed",a=qr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ur(0);if(r||!r&&!i)if((fr(t)!=="body"||qi(o))&&(s=ys(t)),r){const d=qr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=jb(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 vd(e){return rn(e).position==="static"}function Bb(e,t){return!kt(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Hb(e,t){const n=Ut(e);if(gs(e))return n;if(!kt(e)){let o=Jn(e);for(;o&&!Qn(o);){if(tt(o)&&!vd(o))return o;o=Jn(o)}return n}let r=Bb(e,t);for(;r&&ND(r)&&vd(r);)r=Bb(r,t);return r&&Qn(r)&&vd(r)&&!hd(r)?n:r||FD(e)||n}const KD=async function(e){const t=this.getOffsetParent||Hb,n=this.getDimensions,r=await n(e.floating);return{reference:UD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YD(e){return rn(e).direction==="rtl"}const GD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:Xn,getClippingRect:WD,getOffsetParent:Hb,getElementRects:KD,getClientRects:jD,getDimensions:qD,getScale:Vo,isElement:tt,isRTL:YD};function ZD(e,t){let n=null,r;const o=Xn(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:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const f=No(u),b=No(o.clientWidth-(c+d)),m=No(o.clientHeight-(u+h)),p=No(c),y={rootMargin:-f+"px "+-b+"px "+-m+"px "+-p+"px",threshold:nn(0,Fn(1,l))||1};let x=!0;function T(w){const E=w[0].intersectionRatio;if(E!==l){if(!x)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function $o(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=gd(e),u=o||i?[...c?pr(c):[],...pr(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=c&&s?ZD(c,n):null;let h=-1,f=null;a&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let b,m=l?qr(e):null;l&&p();function p(){const g=qr(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,b=requestAnimationFrame(p)}return n(),()=>{var g;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const XD=OD,QD=MD,JD=ID,eN=DD,Wb=AD,tN=(e,t,n)=>{const r=new Map,o={platform:GD,...n},i={...o.platform,_c:r};return PD(e,t,{...o,platform:i})};function qb(e,[t,n]){return Math.min(n,Math.max(t,e))}var yd="Progress",bd=100,[nN,pB]=cs(yd),[rN,oN]=nN(yd),Ub=P.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=iN,...a}=e;(o||o===0)&&!Zb(o)&&console.error(aN(`${o}`,"Progress"));const s=Zb(o)?o:bd;r!==null&&!Xb(r,s)&&console.error(sN(`${r}`,"Progress"));const l=Xb(r,s)?r:null,c=bs(l)?i(l,s):void 0;return v.jsx(rN,{scope:n,value:l,max:s,children:v.jsx($t.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":bs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Gb(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Ub.displayName=yd;var Kb="ProgressIndicator",Yb=P.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=oN(Kb,n);return v.jsx($t.div,{"data-state":Gb(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Yb.displayName=Kb;function iN(e,t){return`${Math.round(e/t*100)}%`}function Gb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function bs(e){return typeof e=="number"}function Zb(e){return bs(e)&&!isNaN(e)&&e>0}function Xb(e,t){return bs(e)&&!isNaN(e)&&e<=t&&e>=0}function aN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bd}\`.`}function sN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
215
215
  - a positive number
216
- - less than the value passed to \`max\` (or ${nd} if no \`max\` prop is set)
216
+ - less than the value passed to \`max\` (or ${bd} if no \`max\` prop is set)
217
217
  - \`null\` or \`undefined\` if the progress is indeterminate.
218
218
 
219
- Defaulting to \`null\`.`}var pD=Tb,hD=Cb,Ib=["PageUp","PageDown"],_b=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ob={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Fo="Slider",[rd,mD,gD]=fb(Fo),[Mb,qB]=us(Fo,[gD]),[vD,ps]=Mb(Fo),Db=P.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=P.useRef(new Set),y=P.useRef(0),b=a==="horizontal"?yD:bD,[S=[],w]=pb({prop:u,defaultProp:c,onChange:L=>{var $;($=[...h.current][y.current])==null||$.focus(),d(L)}}),T=P.useRef(S);function C(L){const N=ED(S,L);A(L,N)}function k(L){A(L,y.current)}function _(){const L=T.current[y.current];S[y.current]!==L&&p(S)}function A(L,N,{commit:$}={commit:!1}){const I=PD(i),M=ID(Math.round((L-r)/i)*i+r,I),D=Sb(M,[r,o]);w((V=[])=>{const F=SD(V,D,N);if(AD(F,l*i)){y.current=F.indexOf(D);const H=String(F)!==String(V);return H&&$&&p(F),H?F:V}else return V})}return v.jsx(vD,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:h.current,values:S,orientation:a,form:m,children:v.jsx(rd.Provider,{scope:e.__scopeSlider,children:v.jsx(rd.Slot,{scope:e.__scopeSlider,children:v.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Pt(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:_,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:N})=>{if(!s){const M=Ib.includes(L.key)||L.shiftKey&&_b.includes(L.key)?10:1,D=y.current,V=S[D],F=i*M*N;A(V+F,D,{commit:!0})}}})})})})});Db.displayName=Fo;var[Nb,Fb]=Mb(Fo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),yD=P.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=P.useState(null),f=Qt(t,b=>p(b)),m=P.useRef(void 0),g=YM(o),h=g==="ltr",y=h&&!i||!h&&i;function x(b){const S=m.current||d.getBoundingClientRect(),w=[0,S.width],C=ad(w,y?[n,r]:[r,n]);return m.current=S,C(b-S.left)}return v.jsx(Nb,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:v.jsx(Lb,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=x(b.clientX);a==null||a(S)},onSlideMove:b=>{const S=x(b.clientX);s==null||s(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=Ob[y?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),bD=P.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=P.useRef(null),d=Qt(t,u),p=P.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),y=[0,h.height],b=ad(y,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return v.jsx(Nb,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:v.jsx(Lb,{"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 y=Ob[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),Lb=P.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ps(Fo,n);return v.jsx(Lt.span,{...c,ref:t,onKeyDown:Pt(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Ib.concat(_b).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Pt(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Pt(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Pt(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),Vb="SliderTrack",$b=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ps(Vb,n);return v.jsx(Lt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});$b.displayName=Vb;var od="SliderRange",jb=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ps(od,n),i=Fb(od,n),a=P.useRef(null),s=Qt(t,a),l=o.values.length,c=o.values.map(p=>Rb(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return v.jsx(Lt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});jb.displayName=od;var id="SliderThumb",zb=P.forwardRef((e,t)=>{const n=mD(e.__scopeSlider),[r,o]=P.useState(null),i=Qt(t,s=>o(s)),a=P.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return v.jsx(xD,{...e,ref:i,index:a})}),xD=P.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ps(id,n),s=Fb(id,n),[l,c]=P.useState(null),u=Qt(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,p=aD(l),f=a.values[r],m=f===void 0?0:Rb(f,a.min,a.max),g=TD(r,a.values.length),h=p==null?void 0:p[s.size],y=h?CD(h,m,s.direction):0;return P.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${y}px)`},children:[v.jsx(rd.ItemSlot,{scope:e.__scopeSlider,children:v.jsx(Lt.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:Pt(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&v.jsx(Bb,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});zb.displayName=id;var wD="RadioBubbleInput",Bb=P.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=P.useRef(null),i=Qt(o,r),a=iD(t);return P.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),v.jsx(Lt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Bb.displayName=wD;function SD(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Rb(e,t,n){const i=100/(n-t)*(e-t);return Sb(i,[0,100])}function TD(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ED(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 CD(e,t,n){const r=e/2,i=ad([0,50],[0,r]);return(r-i(t)*n)*n}function kD(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function AD(e,t){if(t>0){const n=kD(e);return Math.min(...n)>=t}return!0}function ad(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 PD(e){return(String(e).split(".")[1]||"").length}function ID(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var _D=Db,OD=$b,MD=jb,DD=zb,sd="ToastProvider",[ld,ND,FD]=fb("Toast"),[Hb,UB]=us("Toast",[FD]),[LD,hs]=Hb(sd),Wb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=P.useState(null),[c,u]=P.useState(0),d=P.useRef(!1),p=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${sd}\`. Expected non-empty \`string\`.`),v.jsx(ld.Provider,{scope:t,children:v.jsx(LD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:P.useCallback(()=>u(f=>f+1),[]),onToastRemove:P.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Wb.displayName=sd;var qb="ToastViewport",VD=["F8"],cd="toast.viewportPause",ud="toast.viewportResume",Ub=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=VD,label:o="Notifications ({hotkey})",...i}=e,a=hs(qb,n),s=ND(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=Qt(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;P.useEffect(()=>{const h=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),P.useEffect(()=>{const h=l.current,y=d.current;if(m&&h&&y){const x=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(cd);y.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(ud);y.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!h.contains(T.relatedTarget)&&b()},w=()=>{h.contains(document.activeElement)||b()};return h.addEventListener("focusin",x),h.addEventListener("focusout",S),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",w),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[m,a.isClosePausedRef]);const g=P.useCallback(({tabbingDirection:h})=>{const x=s().map(b=>{const S=b.ref.current,w=[S,...XD(S)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?x.reverse():x).flat()},[s]);return P.useEffect(()=>{const h=d.current;if(h){const y=x=>{var w,T,C;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const k=document.activeElement,_=x.shiftKey;if(x.target===h&&_){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:_?"backwards":"forwards"}),$=N.findIndex(I=>I===k);pd(N.slice($+1))?x.preventDefault():_?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[s,g]),v.jsxs(rD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&v.jsx(dd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});pd(h)}}),v.jsx(ld.Slot,{scope:n,children:v.jsx(Lt.ol,{tabIndex:-1,...i,ref:p})}),m&&v.jsx(dd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});pd(h)}})]})});Ub.displayName=qb;var Kb="ToastFocusProxy",dd=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=hs(Kb,n);return v.jsx(Ju,{"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()}})});dd.displayName=Kb;var Yi="Toast",$D="toast.swipeStart",jD="toast.swipeMove",zD="toast.swipeCancel",BD="toast.swipeEnd",Yb=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=pb({prop:r,defaultProp:o??!0,onChange:i,caller:Yi});return v.jsx(hb,{present:n||s,children:v.jsx(WD,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wr(e.onPause),onResume:Wr(e.onResume),onSwipeStart:Pt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Pt(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:Pt(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:Pt(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)})})})});Yb.displayName=Yi;var[RD,HD]=Hb(Yi,{onClose(){}}),WD=P.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=hs(Yi,n),[h,y]=P.useState(null),x=Qt(t,I=>y(I)),b=P.useRef(null),S=P.useRef(null),w=o||g.duration,T=P.useRef(0),C=P.useRef(w),k=P.useRef(0),{onToastAdd:_,onToastRemove:A}=g,L=Wr(()=>{var M;(h==null?void 0:h.contains(document.activeElement))&&((M=g.viewport)==null||M.focus()),a()}),N=P.useCallback(I=>{!I||I===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(L,I))},[L]);P.useEffect(()=>{const I=g.viewport;if(I){const M=()=>{N(C.current),c==null||c()},D=()=>{const V=new Date().getTime()-T.current;C.current=C.current-V,window.clearTimeout(k.current),l==null||l()};return I.addEventListener(cd,D),I.addEventListener(ud,M),()=>{I.removeEventListener(cd,D),I.removeEventListener(ud,M)}}},[g.viewport,w,l,c,N]),P.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),P.useEffect(()=>(_(),()=>A()),[_,A]);const $=P.useMemo(()=>h?ex(h):null,[h]);return g.viewport?v.jsxs(v.Fragment,{children:[$&&v.jsx(qD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),v.jsx(RD,{scope:n,onClose:L,children:Sa.createPortal(v.jsx(ld.ItemSlot,{scope:n,children:v.jsx(nD,{asChild:!0,onEscapeKeyDown:Pt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(Lt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Pt(e.onKeyDown,I=>{I.key==="Escape"&&(s==null||s(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:Pt(e.onPointerDown,I=>{I.button===0&&(b.current={x:I.clientX,y:I.clientY})}),onPointerMove:Pt(e.onPointerMove,I=>{if(!b.current)return;const M=I.clientX-b.current.x,D=I.clientY-b.current.y,V=!!S.current,F=["left","right"].includes(g.swipeDirection),H=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,O=F?H(0,M):0,B=F?0:H(0,D),X=I.pointerType==="touch"?10:2,Q={x:O,y:B},J={originalEvent:I,delta:Q};V?(S.current=Q,ms(jD,d,J,{discrete:!1})):tx(Q,g.swipeDirection,X)?(S.current=Q,ms($D,u,J,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(M)>X||Math.abs(D)>X)&&(b.current=null)}),onPointerUp:Pt(e.onPointerUp,I=>{const M=S.current,D=I.target;if(D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),S.current=null,b.current=null,M){const V=I.currentTarget,F={originalEvent:I,delta:M};tx(M,g.swipeDirection,g.swipeThreshold)?ms(BD,f,F,{discrete:!0}):ms(zD,p,F,{discrete:!0}),V.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),qD=e=>{const{__scopeToast:t,children:n,...r}=e,o=hs(Yi,t),[i,a]=P.useState(!1),[s,l]=P.useState(!1);return GD(()=>a(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:v.jsx(wb,{asChild:!0,children:v.jsx(Ju,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},UD="ToastTitle",Gb=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Lt.div,{...r,ref:t})});Gb.displayName=UD;var KD="ToastDescription",Zb=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Lt.div,{...r,ref:t})});Zb.displayName=KD;var Xb="ToastAction",YD=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(Jb,{altText:n,asChild:!0,children:v.jsx(fd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Xb}\`. Expected non-empty \`string\`.`),null)});YD.displayName=Xb;var Qb="ToastClose",fd=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=HD(Qb,n);return v.jsx(Jb,{asChild:!0,children:v.jsx(Lt.button,{type:"button",...r,ref:t,onClick:Pt(e.onClick,o.onClose)})})});fd.displayName=Qb;var Jb=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx(Lt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function ex(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ZD(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(...ex(r))}}),t}function ms(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?db(o,i):o.dispatchEvent(i)}var tx=(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 GD(e=()=>{}){const t=Wr(e);No(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function ZD(e){return e.nodeType===e.ELEMENT_NODE}function XD(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 pd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var QD=Wb,JD=Ub,eN=Yb,tN=Gb,nN=Zb,rN=fd;const oN=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},iN=ao("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification 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"}}),nx=E.createContext(()=>{throw new Error("Not implemented")}),aN=()=>E.useContext(nx),rx={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]}},sN=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=iN({theme:t.theme||"default"});return v.jsx(eN,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:v.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:rx[t.reversedIndex]||rx.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:v.jsxs("div",{className:a,children:[v.jsxs("div",{className:"flex flex-col p-4",children:[t.title?v.jsx(tN,{className:"text-lg font-medium leading-relaxed select-text truncate",children:"Title"}):null,v.jsx(nN,{className:"select-text truncate",children:t.text})]}),r?v.jsx(rN,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:v.jsx(zi,{className:"w-5 h-5"})}):null]})})})});function lN({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=oN(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 v.jsxs(QD,{duration:n,swipeThreshold:150,children:[v.jsx(nx.Provider,{value:l,children:e}),v.jsx(er,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(sN,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),v.jsx(JD,{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 cN=e=>v.jsxs(pD,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:Ce("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[v.jsx(hD,{style:{transform:Fe.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Ce("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Fe.number(e.percent)?v.jsxs("p",{className:Ce("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:[e.percent," %"]}):null]}),uN=e=>v.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[v.jsxs("header",{className:"flex items-start gap-4 p-6",children:[v.jsx("div",{className:Ce("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:v.jsx("div",{children:v.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx("header",{children:v.jsx("h3",{className:"text-base leading-none",children:e.title})}),v.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?v.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),ox=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},ix={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},ax=E.createContext(""),dN=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",hd=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!dN(a))return a}return n==="backward"?hd(e,e.length-1,"backward"):hd(e,-1,"forward")},sx=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=hd(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},lx={[ix.ArrowLeft]:(e,t)=>sx(t,"backward"),[ix.ArrowRight]:(e,t)=>sx(t,"forward")},fN=e=>{const[t,n]=ox(e.active),r=E.useRef(null),o=Xn(e.onChange);E.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),E.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=E.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Fe.keyof(lx,c)){const u=lx[c],d=u(l,r.current);if(d===null)return;n(d)}};return v.jsx(ax.Provider,{value:t,children:v.jsx(Qu,{className:e.className,container:Ce("pt-0 max-w-full w-full min-w-0",e.container),header:v.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[v.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),v.jsx("nav",{className:"min-w-0",children:v.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return v.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Ce("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:v.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},pN=()=>E.useContext(ax),hN=e=>{const t=pN();return v.jsx(E.Fragment,{children:e.id===t?e.children:null})},gs=e=>v.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[v.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),v.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});gs.Icon=function(t){return v.jsx("header",{...t,className:Ce("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},gs.Body=function(t){return v.jsx(ln,{...t,className:Ce("min-w-0 flex-1",t.className),children:t.children})},gs.Right=function(t){return v.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:v.jsx(ln,{...t,type:"button"})})};const mN=e=>v.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function vs(){return typeof window<"u"}function ir(e){return cx(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(cx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cx(e){return vs()?e instanceof Node||e instanceof qt(e).Node:!1}function nt(e){return vs()?e instanceof Element||e instanceof qt(e).Element:!1}function Ct(e){return vs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function md(e){return!vs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}function Gi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function gN(e){return["table","td","th"].includes(ir(e))}function ys(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gd(e){const t=vd(),n=nt(e)?Jt(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 vN(e){let t=Yn(e);for(;Ct(t)&&!ar(t);){if(gd(t))return t;if(ys(t))return null;t=Yn(t)}return null}function vd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ar(e){return["html","body","#document"].includes(ir(e))}function Jt(e){return qt(e).getComputedStyle(e)}function bs(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||md(e)&&e.host||Kn(e);return md(t)?t.host:t}function ux(e){const t=Yn(e);return ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ct(t)&&Gi(t)?t:ux(t)}function sr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ux(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=yd(a);return t.concat(a,a.visualViewport||[],Gi(o)?o:[],s&&n?sr(s):[])}return t.concat(o,sr(o,[],n))}function yd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bn(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 xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&md(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function bd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function dx(){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 fx(e){return e.mozInputSource===0&&e.isTrusted?!0:Sd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xd(e){return yN()?!1:!Sd()&&e.width===0&&e.height===0||Sd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function wd(){return/apple/i.test(navigator.vendor)}function Sd(){const e=/android/i;return e.test(bd())||e.test(dx())}function px(){return bd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function yN(){return dx().includes("jsdom/")}function Lo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function bN(e){return"nativeEvent"in e}function xN(e){return e.matches("html,body")}function Nt(e){return(e==null?void 0:e.ownerDocument)||document}function Td(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 Dn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const wN="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ed(e){return Ct(e)&&e.matches(wN)}function Vt(e){e.preventDefault(),e.stopPropagation()}function hx(e){return e?e.getAttribute("role")==="combobox"&&Ed(e):!1}const Nn=Math.min,en=Math.max,xs=Math.round,Vo=Math.floor,lr=e=>({x:e,y:e}),SN={left:"right",right:"left",bottom:"top",top:"bottom"},TN={start:"end",end:"start"};function Cd(e,t,n){return en(e,Nn(t,n))}function $o(e,t){return typeof e=="function"?e(t):e}function cr(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function mx(e){return e==="x"?"y":"x"}function kd(e){return e==="y"?"height":"width"}function qr(e){return["top","bottom"].includes(cr(e))?"y":"x"}function Ad(e){return mx(qr(e))}function EN(e,t,n){n===void 0&&(n=!1);const r=jo(e),o=Ad(e),i=kd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ws(a)),[a,ws(a)]}function CN(e){const t=ws(e);return[Pd(e),t,Pd(t)]}function Pd(e){return e.replace(/start|end/g,t=>TN[t])}function kN(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 AN(e,t,n,r){const o=jo(e);let i=kN(cr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Pd)))),i}function ws(e){return e.replace(/left|right|bottom|top/g,t=>SN[t])}function PN(e){return{top:0,right:0,bottom:0,left:0,...e}}function gx(e){return typeof e!="number"?PN(e):{top:e,right:e,bottom:e,left:e}}function Ss(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}}/*!
219
+ Defaulting to \`null\`.`}var lN=Ub,cN=Yb,Qb=["PageUp","PageDown"],Jb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ex={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},jo="Slider",[xd,uN,dN]=Sb(jo),[tx,hB]=cs(jo,[dN]),[fN,xs]=tx(jo),nx=P.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:h=()=>{},inverted:f=!1,form:b,...m}=e,p=P.useRef(new Set),g=P.useRef(0),x=a==="horizontal"?pN:hN,[T=[],w]=Tb({prop:u,defaultProp:c,onChange:F=>{[...p.current][g.current]?.focus(),d(F)}}),E=P.useRef(T);function k(F){const L=bN(T,F);_(F,L)}function C(F){_(F,g.current)}function M(){const F=E.current[g.current];T[g.current]!==F&&h(T)}function _(F,L,{commit:H}={commit:!1}){const I=TN(i),O=EN(Math.round((F-r)/i)*i+r,I),V=qb(O,[r,o]);w((D=[])=>{const A=vN(D,V,L);if(SN(A,l*i)){g.current=A.indexOf(V);const j=String(A)!==String(D);return j&&H&&h(A),j?A:D}else return D})}return v.jsx(fN,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:g,thumbs:p.current,values:T,orientation:a,form:b,children:v.jsx(xd.Provider,{scope:e.__scopeSlider,children:v.jsx(xd.Slot,{scope:e.__scopeSlider,children:v.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:It(m.onPointerDown,()=>{s||(E.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:k,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:M,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:F,direction:L})=>{if(!s){const O=Qb.includes(F.key)||F.shiftKey&&Jb.includes(F.key)?10:1,V=g.current,D=T[V],A=i*O*L;_(D+A,V,{commit:!0})}}})})})})});nx.displayName=jo;var[rx,ox]=tx(jo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),pN=P.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,h]=P.useState(null),f=tn(t,x=>h(x)),b=P.useRef(void 0),m=sD(o),p=m==="ltr",g=p&&!i||!p&&i;function y(x){const T=b.current||d.getBoundingClientRect(),w=[0,T.width],k=Td(w,g?[n,r]:[r,n]);return b.current=T,k(x-T.left)}return v.jsx(rx,{scope:e.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:v.jsx(ix,{dir:m,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a?.(T)},onSlideMove:x=>{const T=y(x.clientX);s?.(T)},onSlideEnd:()=>{b.current=void 0,l?.()},onStepKeyDown:x=>{const w=ex[g?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:w?-1:1})}})})}),hN=P.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=P.useRef(null),d=tn(t,u),h=P.useRef(void 0),f=!o;function b(m){const p=h.current||u.current.getBoundingClientRect(),g=[0,p.height],x=Td(g,f?[r,n]:[n,r]);return h.current=p,x(m-p.top)}return v.jsx(rx,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:v.jsx(ix,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const p=b(m.clientY);i?.(p)},onSlideMove:m=>{const p=b(m.clientY);a?.(p)},onSlideEnd:()=>{h.current=void 0,s?.()},onStepKeyDown:m=>{const g=ex[f?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:g?-1:1})}})})}),ix=P.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=xs(jo,n);return v.jsx($t.span,{...c,ref:t,onKeyDown:It(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Qb.concat(Jb).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:It(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(h)?h.focus():r(d)}),onPointerMove:It(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:It(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),ax="SliderTrack",sx=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=xs(ax,n);return v.jsx($t.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});sx.displayName=ax;var wd="SliderRange",lx=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=xs(wd,n),i=ox(wd,n),a=P.useRef(null),s=tn(t,a),l=o.values.length,c=o.values.map(h=>dx(h,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return v.jsx($t.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});lx.displayName=wd;var Sd="SliderThumb",cx=P.forwardRef((e,t)=>{const n=uN(e.__scopeSlider),[r,o]=P.useState(null),i=tn(t,s=>o(s)),a=P.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return v.jsx(mN,{...e,ref:i,index:a})}),mN=P.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=xs(Sd,n),s=ox(Sd,n),[l,c]=P.useState(null),u=tn(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,h=bD(l),f=a.values[r],b=f===void 0?0:dx(f,a.min,a.max),m=yN(r,a.values.length),p=h?.[s.size],g=p?xN(p,b,s.direction):0;return P.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${g}px)`},children:[v.jsx(xd.ItemSlot,{scope:e.__scopeSlider,children:v.jsx($t.span,{role:"slider","aria-label":e["aria-label"]||m,"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:It(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&v.jsx(ux,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});cx.displayName=Sd;var gN="RadioBubbleInput",ux=P.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=P.useRef(null),i=tn(o,r),a=yD(t);return P.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),v.jsx($t.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});ux.displayName=gN;function vN(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function dx(e,t,n){const i=100/(n-t)*(e-t);return qb(i,[0,100])}function yN(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function bN(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 xN(e,t,n){const r=e/2,i=Td([0,50],[0,r]);return(r-i(t)*n)*n}function wN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function SN(e,t){if(t>0){const n=wN(e);return Math.min(...n)>=t}return!0}function Td(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 TN(e){return(String(e).split(".")[1]||"").length}function EN(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var kN=nx,CN=sx,PN=lx,AN=cx,Ed="ToastProvider",[kd,IN,_N]=Sb("Toast"),[fx,mB]=cs("Toast",[_N]),[ON,ws]=fx(Ed),px=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=P.useState(null),[c,u]=P.useState(0),d=P.useRef(!1),h=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ed}\`. Expected non-empty \`string\`.`),v.jsx(kd.Provider,{scope:t,children:v.jsx(ON,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:P.useCallback(()=>u(f=>f+1),[]),onToastRemove:P.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:a})})};px.displayName=Ed;var hx="ToastViewport",MN=["F8"],Cd="toast.viewportPause",Pd="toast.viewportResume",mx=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=MN,label:o="Notifications ({hotkey})",...i}=e,a=ws(hx,n),s=IN(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),h=tn(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;P.useEffect(()=>{const p=g=>{r.length!==0&&r.every(x=>g[x]||g.code===x)&&d.current?.focus()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[r]),P.useEffect(()=>{const p=l.current,g=d.current;if(b&&p&&g){const y=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Cd);g.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Pd);g.dispatchEvent(E),a.isClosePausedRef.current=!1}},T=E=>{!p.contains(E.relatedTarget)&&x()},w=()=>{p.contains(document.activeElement)||x()};return p.addEventListener("focusin",y),p.addEventListener("focusout",T),p.addEventListener("pointermove",y),p.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{p.removeEventListener("focusin",y),p.removeEventListener("focusout",T),p.removeEventListener("pointermove",y),p.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,a.isClosePausedRef]);const m=P.useCallback(({tabbingDirection:p})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...UN(T)];return p==="forwards"?w:w.reverse()});return(p==="forwards"?y.reverse():y).flat()},[s]);return P.useEffect(()=>{const p=d.current;if(p){const g=y=>{const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const w=document.activeElement,E=y.shiftKey;if(y.target===p&&E){c.current?.focus();return}const M=m({tabbingDirection:E?"backwards":"forwards"}),_=M.findIndex(F=>F===w);_d(M.slice(_+1))?y.preventDefault():E?c.current?.focus():u.current?.focus()}};return p.addEventListener("keydown",g),()=>p.removeEventListener("keydown",g)}},[s,m]),v.jsxs(gD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&v.jsx(Ad,{ref:c,onFocusFromOutsideViewport:()=>{const p=m({tabbingDirection:"forwards"});_d(p)}}),v.jsx(kd.Slot,{scope:n,children:v.jsx($t.ol,{tabIndex:-1,...i,ref:h})}),b&&v.jsx(Ad,{ref:u,onFocusFromOutsideViewport:()=>{const p=m({tabbingDirection:"backwards"});_d(p)}})]})});mx.displayName=hx;var gx="ToastFocusProxy",Ad=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=ws(gx,n);return v.jsx(sd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});Ad.displayName=gx;var Ui="Toast",DN="toast.swipeStart",NN="toast.swipeMove",FN="toast.swipeCancel",LN="toast.swipeEnd",vx=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Tb({prop:r,defaultProp:o??!0,onChange:i,caller:Ui});return v.jsx(Eb,{present:n||s,children:v.jsx(jN,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Br(e.onPause),onResume:Br(e.onResume),onSwipeStart:It(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(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:It(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:It(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)})})})});vx.displayName=Ui;var[VN,$N]=fx(Ui,{onClose(){}}),jN=P.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:h,onSwipeEnd:f,...b}=e,m=ws(Ui,n),[p,g]=P.useState(null),y=tn(t,I=>g(I)),x=P.useRef(null),T=P.useRef(null),w=o||m.duration,E=P.useRef(0),k=P.useRef(w),C=P.useRef(0),{onToastAdd:M,onToastRemove:_}=m,F=Br(()=>{p?.contains(document.activeElement)&&m.viewport?.focus(),a()}),L=P.useCallback(I=>{!I||I===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(F,I))},[F]);P.useEffect(()=>{const I=m.viewport;if(I){const O=()=>{L(k.current),c?.()},V=()=>{const D=new Date().getTime()-E.current;k.current=k.current-D,window.clearTimeout(C.current),l?.()};return I.addEventListener(Cd,V),I.addEventListener(Pd,O),()=>{I.removeEventListener(Cd,V),I.removeEventListener(Pd,O)}}},[m.viewport,w,l,c,L]),P.useEffect(()=>{i&&!m.isClosePausedRef.current&&L(w)},[i,w,m.isClosePausedRef,L]),P.useEffect(()=>(M(),()=>_()),[M,_]);const H=P.useMemo(()=>p?Tx(p):null,[p]);return m.viewport?v.jsxs(v.Fragment,{children:[H&&v.jsx(zN,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),v.jsx(VN,{scope:n,onClose:F,children:pi.createPortal(v.jsx(kd.ItemSlot,{scope:n,children:v.jsx(mD,{asChild:!0,onEscapeKeyDown:It(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||F(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx($t.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:It(e.onKeyDown,I=>{I.key==="Escape"&&(s?.(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:It(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:It(e.onPointerMove,I=>{if(!x.current)return;const O=I.clientX-x.current.x,V=I.clientY-x.current.y,D=!!T.current,A=["left","right"].includes(m.swipeDirection),j=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,N=A?j(0,O):0,q=A?0:j(0,V),R=I.pointerType==="touch"?10:2,Y={x:N,y:q},X={originalEvent:I,delta:Y};D?(T.current=Y,Ss(NN,d,X,{discrete:!1})):Ex(Y,m.swipeDirection,R)?(T.current=Y,Ss(DN,u,X,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(O)>R||Math.abs(V)>R)&&(x.current=null)}),onPointerUp:It(e.onPointerUp,I=>{const O=T.current,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),T.current=null,x.current=null,O){const D=I.currentTarget,A={originalEvent:I,delta:O};Ex(O,m.swipeDirection,m.swipeThreshold)?Ss(LN,f,A,{discrete:!0}):Ss(FN,h,A,{discrete:!0}),D.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),zN=e=>{const{__scopeToast:t,children:n,...r}=e,o=ws(Ui,t),[i,a]=P.useState(!1),[s,l]=P.useState(!1);return WN(()=>a(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:v.jsx(Ob,{asChild:!0,children:v.jsx(sd,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},RN="ToastTitle",yx=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx($t.div,{...r,ref:t})});yx.displayName=RN;var BN="ToastDescription",bx=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx($t.div,{...r,ref:t})});bx.displayName=BN;var xx="ToastAction",HN=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(Sx,{altText:n,asChild:!0,children:v.jsx(Id,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${xx}\`. Expected non-empty \`string\`.`),null)});HN.displayName=xx;var wx="ToastClose",Id=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$N(wx,n);return v.jsx(Sx,{asChild:!0,children:v.jsx($t.button,{type:"button",...r,ref:t,onClick:It(e.onClick,o.onClose)})})});Id.displayName=wx;var Sx=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx($t.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Tx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qN(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(...Tx(r))}}),t}function Ss(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?wb(o,i):o.dispatchEvent(i)}var Ex=(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 WN(e=()=>{}){const t=Br(e);Do(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qN(e){return e.nodeType===e.ELEMENT_NODE}function UN(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 _d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var KN=px,YN=mx,GN=vx,ZN=yx,XN=bx,QN=Id;const JN=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},e2=io("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",default:"border-card-border bg-card-background text-foreground",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",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50"}},defaultVariants:{theme:"default"}}),kx=S.createContext(()=>{throw new Error("Not implemented")}),t2=()=>S.useContext(kx),Cx={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]}},n2=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=e2({theme:t.theme||"default"});return v.jsx(GN,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:v.jsx(ut.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:Cx[t.reversedIndex]||Cx.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:v.jsxs("div",{className:a,children:[v.jsxs("div",{className:"flex flex-col p-4",children:[t.title?v.jsx(ZN,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,v.jsx(XN,{className:"select-text truncate",children:t.text})]}),r?v.jsx(QN,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:v.jsx(Vi,{className:"size-5"})}):null]})})})});function r2({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=JN(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const b=[...f,{...u,id:d,text:c}];return b.length>t?b.slice(b.length-t,b.length+1):b}),{clear:s,close:()=>a(f=>f.filter(b=>b.id!==d))}},[t]);return v.jsxs(KN,{duration:n,swipeThreshold:150,children:[v.jsx(kx.Provider,{value:l,children:e}),v.jsx(ut.ol,{children:v.jsx(ir,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const h=()=>a(f=>f.filter(b=>b.id!==c.id));return S.createElement(n2,{...c,hover:o,index:u,key:c.id,onClose:h,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),v.jsx(YN,{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 o2=e=>v.jsxs(lN,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:ke("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[v.jsx(cN,{style:{transform:$e.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:ke("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),$e.number(e.percent)?v.jsx("p",{className:ke("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),i2=e=>v.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[v.jsxs("header",{className:"flex items-start gap-4 p-6",children:[v.jsx("div",{className:ke("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:v.jsx("div",{children:v.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx("header",{children:v.jsx("h3",{className:"text-base leading-none",children:e.title})}),v.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?v.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Px=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},Ax={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},Ix=S.createContext(""),a2=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Od=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!a2(a))return a}return n==="backward"?Od(e,e.length-1,"backward"):Od(e,-1,"forward")},_x=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Od(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Ox={[Ax.ArrowLeft]:(e,t)=>_x(t,"backward"),[Ax.ArrowRight]:(e,t)=>_x(t,"forward")},s2=e=>{const[t,n]=Px(e.active),r=S.useRef(null),o=nr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if($e.keyof(Ox,c)){const u=Ox[c],d=u(l,r.current);if(d===null)return;n(d)}};return v.jsx(Ix.Provider,{value:t,children:v.jsx(ad,{className:e.className,container:ke("pt-0 max-w-full w-full min-w-0",e.container),header:v.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[v.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),v.jsx("nav",{className:"min-w-0",children:v.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return v.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:ke("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:v.jsx(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},l2=()=>S.useContext(Ix),c2=e=>{const t=l2();return v.jsx(S.Fragment,{children:e.id===t?e.children:null})},Ts=e=>v.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[v.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),v.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Ts.Icon=function(t){return v.jsx("header",{...t,className:ke("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ts.Body=function(t){return v.jsx(un,{...t,className:ke("min-w-0 flex-1",t.className),children:t.children})},Ts.Right=function(t){return v.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:v.jsx(un,{...t,type:"button"})})};const u2=e=>v.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});/*!
220
220
  * tabbable 6.2.0
221
221
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
222
- */var IN=["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])"],Ts=IN.join(","),vx=typeof Element>"u",zo=vx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Es=!vx&&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},Cs=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},_N=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ON=function(t,n,r){if(Cs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ts));return n&&zo.call(t,Ts)&&o.unshift(t),o=o.filter(r),o},MN=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Cs(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=zo.call(a,Ts);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Cs(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},yx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_N(t))&&!yx(t)?0:t.tabIndex},DN=function(t,n){var r=bx(t);return r<0&&n&&!yx(t)?0:r},NN=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xx=function(t){return t.tagName==="INPUT"},FN=function(t){return xx(t)&&t.type==="hidden"},LN=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},VN=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},$N=function(t){if(!t.name)return!0;var n=t.form||Es(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=VN(o,t.form);return!i||i===t},jN=function(t){return xx(t)&&t.type==="radio"},zN=function(t){return jN(t)&&!$N(t)},BN=function(t){var n,r=t&&Es(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=Es(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},wx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},RN=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=zo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(zo.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=Es(t);if(l&&!l.shadowRoot&&o(l)===!0)return wx(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(BN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wx(t);return!1},HN=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 zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},WN=function(t,n){return!(n.disabled||Cs(n)||FN(n)||RN(n,t)||LN(n)||HN(n))},Id=function(t,n){return!(zN(n)||bx(n)<0||!WN(t,n))},qN=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},UN=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=DN(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(NN).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Zi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=MN([t],n.includeContainer,{filter:Id.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qN}):r=ON(t,n.includeContainer,Id.bind(null,n)),UN(r)},KN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Ts)===!1?!1:Id(n,t)};function Sx(e,t,n){let{reference:r,floating:o}=e;const i=qr(t),a=Ad(t),s=kd(a),l=cr(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(jo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const YN=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}=Sx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x,y:b,data:S,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,f={...f,[h]:{...f[h],...S}},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}=Sx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function _d(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}=$o(t,e),m=gx(f),h=s[p?d==="floating"?"reference":"floating":d],y=Ss(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})),x=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)),S=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=Ss(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-w.top+m.top)/S.y,bottom:(w.bottom-y.bottom+m.bottom)/S.y,left:(y.left-w.left+m.left)/S.x,right:(w.right-y.right+m.right)/S.x}}const GN=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}=$o(e,t)||{};if(c==null)return{};const d=gx(u),p={x:n,y:r},f=Ad(o),m=kd(f),g=await a.getDimensions(c),h=f==="y",y=h?"top":"left",x=h?"bottom":"right",b=h?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[b]||i.floating[m]);const k=S/2-w/2,_=C/2-g[m]/2-1,A=Nn(d[y],_),L=Nn(d[x],_),N=A,$=C-g[m]-L,I=C/2-g[m]/2+k,M=Cd(N,I,$),D=!l.arrow&&jo(o)!=null&&I!==M&&i.reference[m]/2-(I<N?A:L)-g[m]/2<0,V=D?I<N?I-N:I-$:0;return{[f]:p[f]+V,data:{[f]:M,centerOffset:I-M-V,...D&&{alignmentOffset:V}},reset:D}}}),ZN=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}=$o(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=cr(o),x=qr(s),b=cr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[ws(s)]:CN(s)),T=m!=="none";!p&&T&&w.push(...AN(s,g,m,S));const C=[s,...w],k=await _d(t,h),_=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&_.push(k[y]),d){const I=EN(o,a,S);_.push(k[I[0]],k[I[1]])}if(A=[...A,{placement:o,overflows:_}],!_.every(I=>I<=0)){var L,N;const I=(((L=i.flip)==null?void 0:L.index)||0)+1,M=C[I];if(M)return{data:{index:I,overflows:A},reset:{placement:M}};let D=(N=A.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var $;const V=($=A.filter(F=>{if(T){const H=qr(F.placement);return H===x||H==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(H=>H>0).reduce((H,O)=>H+O,0)]).sort((F,H)=>F[1]-H[1])[0])==null?void 0:$[0];V&&(D=V);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function XN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=cr(n),s=jo(n),l=qr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=$o(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 QN=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 XN(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}}}}},JN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...l}=$o(e,t),c={x:n,y:r},u=await _d(t,l),d=qr(cr(o)),p=mx(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=f+u[h],b=f-u[y];f=Cd(x,f,b)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=m+u[h],b=m-u[y];m=Cd(x,m,b)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},e2=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}=$o(e,t),l=await _d(t,s),c=cr(n),u=jo(n),d=qr(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,y=p-l.left-l.right,x=Nn(f-l[m],h),b=Nn(p-l[g],y),S=!t.middlewareData.shift;let w=x,T=b;if(d?T=u||S?Nn(b,y):y:w=u||S?Nn(x,h):h,S&&!u){const k=en(l.left,0),_=en(l.right,0),A=en(l.top,0),L=en(l.bottom,0);d?T=p-2*(k!==0||_!==0?k+_:en(l.left,l.right)):w=f-2*(A!==0||L!==0?A+L:en(l.top,l.bottom))}await a({...t,availableWidth:T,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Tx(e){const t=Jt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ct(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=xs(n)!==i||xs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Od(e){return nt(e)?e:e.contextElement}function Bo(e){const t=Od(e);if(!Ct(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Tx(t);let a=(i?xs(n.width):n.width)/r,s=(i?xs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const t2=lr(0);function Ex(e){const t=qt(e);return!vd()||!t.visualViewport?t2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function n2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Ur(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Od(e);let a=lr(1);t&&(r?nt(r)&&(a=Bo(r)):a=Bo(e));const s=n2(i,n,r)?Ex(i):lr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=qt(i),f=r&&nt(r)?qt(r):r;let m=p,g=yd(m);for(;g&&r&&f!==m;){const h=Bo(g),y=g.getBoundingClientRect(),x=Jt(g),b=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*h.x,S=y.top+(g.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=S,m=qt(g),g=yd(m)}}return Ss({width:u,height:d,x:l,y:c})}function r2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Kn(r),s=t?ys(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=lr(1);const u=lr(0),d=Ct(r);if((d||!d&&!i)&&((ir(r)!=="body"||Gi(a))&&(l=bs(r)),Ct(r))){const p=Ur(r);c=Bo(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 o2(e){return Array.from(e.getClientRects())}function Cx(e){return Ur(Kn(e)).left+bs(e).scrollLeft}function i2(e){const t=Kn(e),n=bs(e),r=e.ownerDocument.body,o=en(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=en(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Cx(e);const s=-n.scrollTop;return Jt(r).direction==="rtl"&&(a+=en(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function a2(e,t){const n=qt(e),r=Kn(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=vd();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function s2(e,t){const n=Ur(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ct(e)?Bo(e):lr(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 kx(e,t,n){let r;if(t==="viewport")r=a2(e,n);else if(t==="document")r=i2(Kn(e));else if(nt(t))r=s2(t,n);else{const o=Ex(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ss(r)}function Ax(e,t){const n=Yn(e);return n===t||!nt(n)||ar(n)?!1:Jt(n).position==="fixed"||Ax(n,t)}function l2(e,t){const n=t.get(e);if(n)return n;let r=sr(e,[],!1).filter(s=>nt(s)&&ir(s)!=="body"),o=null;const i=Jt(e).position==="fixed";let a=i?Yn(e):e;for(;nt(a)&&!ar(a);){const s=Jt(a),l=gd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Gi(a)&&!l&&Ax(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function c2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ys(t)?[]:l2(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=kx(t,u,o);return c.top=en(d.top,c.top),c.right=Nn(d.right,c.right),c.bottom=Nn(d.bottom,c.bottom),c.left=en(d.left,c.left),c},kx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function u2(e){const{width:t,height:n}=Tx(e);return{width:t,height:n}}function d2(e,t,n){const r=Ct(t),o=Kn(t),i=n==="fixed",a=Ur(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=lr(0);if(r||!r&&!i)if((ir(t)!=="body"||Gi(o))&&(s=bs(t)),r){const d=Ur(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Cx(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 Md(e){return Jt(e).position==="static"}function Px(e,t){return!Ct(e)||Jt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ix(e,t){const n=qt(e);if(ys(e))return n;if(!Ct(e)){let o=Yn(e);for(;o&&!ar(o);){if(nt(o)&&!Md(o))return o;o=Yn(o)}return n}let r=Px(e,t);for(;r&&gN(r)&&Md(r);)r=Px(r,t);return r&&ar(r)&&Md(r)&&!gd(r)?n:r||vN(e)||n}const f2=async function(e){const t=this.getOffsetParent||Ix,n=this.getDimensions,r=await n(e.floating);return{reference:d2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function p2(e){return Jt(e).direction==="rtl"}const h2={convertOffsetParentRelativeRectToViewportRelativeRect:r2,getDocumentElement:Kn,getClippingRect:c2,getOffsetParent:Ix,getElementRects:f2,getClientRects:o2,getDimensions:u2,getScale:Bo,isElement:nt,isRTL:p2};function m2(e,t){let n=null,r;const o=Kn(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=Vo(u),m=Vo(o.clientWidth-(c+d)),g=Vo(o.clientHeight-(u+p)),h=Vo(c),x={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:en(0,Nn(1,l))||1};let b=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!b)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),i}function Ro(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=Od(e),u=o||i?[...c?sr(c):[],...sr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?m2(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[x]=y;x&&x.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?Ur(e):null;l&&h();function h(){const y=Ur(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const g2=QN,v2=JN,y2=ZN,b2=e2,_x=GN,x2=(e,t,n)=>{const r=new Map,o={platform:h2,...n},i={...o.platform,_c:r};return YN(e,t,{...o,platform:i})};var ks=typeof document<"u"?E.useLayoutEffect:E.useEffect;function As(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(!As(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)&&!As(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ox(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mx(e,t){const n=Ox(e);return Math.round(t*n)/n}function Dd(e){const t=P.useRef(e);return ks(()=>{t.current=e}),t}function w2(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]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(r);As(p,r)||f(r);const[m,g]=P.useState(null),[h,y]=P.useState(null),x=P.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),b=P.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),S=i||m,w=a||h,T=P.useRef(null),C=P.useRef(null),k=P.useRef(u),_=l!=null,A=Dd(l),L=Dd(o),N=Dd(c),$=P.useCallback(()=>{if(!T.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};L.current&&(F.platform=L.current),x2(T.current,C.current,F).then(H=>{const O={...H,isPositioned:N.current!==!1};I.current&&!As(k.current,O)&&(k.current=O,Sa.flushSync(()=>{d(O)}))})},[p,t,n,L,N]);ks(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const I=P.useRef(!1);ks(()=>(I.current=!0,()=>{I.current=!1}),[]),ks(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(A.current)return A.current(S,w,$);$()}},[S,w,$,A,_]);const M=P.useMemo(()=>({reference:T,floating:C,setReference:x,setFloating:b}),[x,b]),D=P.useMemo(()=>({reference:S,floating:w}),[S,w]),V=P.useMemo(()=>{const F={position:n,left:0,top:0};if(!D.floating)return F;const H=Mx(D.floating,u.x),O=Mx(D.floating,u.y);return s?{...F,transform:"translate("+H+"px, "+O+"px)",...Ox(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:O}},[n,s,D.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:M,elements:D,floatingStyles:V}),[u,$,M,D,V])}const S2=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?_x({element:r.current,padding:o}).fn(n):{}:r?_x({element:r,padding:o}).fn(n):{}}}},Xi=(e,t)=>({...g2(e),options:[e,t]}),Nd=(e,t)=>({...v2(e),options:[e,t]}),Fd=(e,t)=>({...y2(e),options:[e,t]}),Dx=(e,t)=>({...b2(e),options:[e,t]}),Nx=(e,t)=>({...S2(e),options:[e,t]}),Fx={...P},T2=Fx.useInsertionEffect||(e=>e());function It(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return T2(()=>{t.current=e}),P.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 Ld="ArrowUp",Qi="ArrowDown",Ho="ArrowLeft",Wo="ArrowRight";function Ps(e,t,n){return Math.floor(e/t)!==n}function Ji(e,t){return t<0||t>=e.current.length}function Vd(e,t){return Bt(e,{disabledIndices:t})}function Lx(e,t){return Bt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bt(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 E2(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===Ld){if(u&&Vt(n),c===-1)d=l;else if(d=Bt(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}Ji(e,d)&&(d=c)}if(n.key===Qi&&(u&&Vt(n),c===-1?d=s:(d=Bt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Bt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Ji(e,d)&&(d=c)),r==="both"){const p=Vo(c/i);n.key===Wo&&(u&&Vt(n),c%i!==i-1?(d=Bt(e,{startingIndex:c,disabledIndices:a}),o&&Ps(d,i,p)&&(d=Bt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Bt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ps(d,i,p)&&(d=c)),n.key===Ho&&(u&&Vt(n),c%i!==0?(d=Bt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ps(d,i,p)&&(d=Bt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Bt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ps(d,i,p)&&(d=c));const f=Vo(l/i)===p;Ji(e,d)&&(o&&f?d=n.key===Ho?l:Bt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function C2(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 k2(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 A2(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 Vx=0;function ur(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Vx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Vx=requestAnimationFrame(i)}var He=typeof document<"u"?E.useLayoutEffect:E.useEffect;function P2(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 I2(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 $x=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function _2(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Map),a=P.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=P.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return He(()=>{const l=new Map(o);Array.from(l.keys()).sort(P2).forEach((u,d)=>{l.set(u,d)}),I2(o,l)||i(l)},[o]),P.createElement($x.Provider,{value:P.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function jx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=P.useContext($x),[s,l]=P.useState(null),c=P.useRef(null),u=P.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 He(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),He(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function qo(){return qo=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},qo.apply(this,arguments)}let zx=!1,O2=0;const Bx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+O2++;function M2(){const[e,t]=P.useState(()=>zx?Bx():void 0);return He(()=>{e==null&&t(Bx())},[]),P.useEffect(()=>{zx=!0},[]),e}const Uo=Fx.useId||M2;let ea;process.env.NODE_ENV!=="production"&&(ea=new Set);function _s(){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=ea)!=null&&e.has(o))){var i;(i=ea)==null||i.add(o),console.warn(o)}}function D2(){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=ea)!=null&&e.has(o))){var i;(i=ea)==null||i.add(o),console.error(o)}}const Rx=P.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||_s("The `ref` prop is required for `FloatingArrow`."));const h=Uo(),[y,x]=P.useState(!1);if(He(()=>{if(!o)return;Jt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const b=c*2,S=b/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),_=!!p,A=C==="top"||C==="bottom",L=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&y&&(N=k==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",I=(i==null?void 0:i.y)!=null?u||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",D={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",qo({},g,{"aria-hidden":!0,ref:n,width:_?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:$,[L]:I,[C]:A||_?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...m}}),b>0&&P.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:M}),P.createElement("path",{stroke:b&&!p?g.fill:"none",d:M}),P.createElement("clipPath",{id:h},P.createElement("rect",{x:-S,y:S*(_?-1:1),width:a+b,height:a})))});function Hx(){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 Wx=P.createContext(null),qx=P.createContext(null),dr=()=>{var e;return((e=P.useContext(Wx))==null?void 0:e.id)||null},fr=()=>P.useContext(qx);function N2(e){const t=Uo(),n=fr(),o=dr();return He(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function F2(e){const{children:t,id:n}=e,r=dr();return P.createElement(Wx.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function L2(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(a=>{n.current=[...n.current,a]},[]),o=P.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=P.useState(()=>Hx())[0];return P.createElement(qx.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function pr(e){return"data-floating-ui-"+e}function $t(e){const t=E.useRef(e);return He(()=>{t.current=e}),t}const Ux=pr("safe-polygon");function $d(e,t,n){return n&&!Lo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Kx(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=fr(),m=dr(),g=$t(c),h=$t(l),y=$t(n),x=P.useRef(),b=P.useRef(-1),S=P.useRef(),w=P.useRef(-1),T=P.useRef(!0),C=P.useRef(!1),k=P.useRef(()=>{}),_=P.useCallback(()=>{var M;const D=(M=o.current.openEvent)==null?void 0:M.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);P.useEffect(()=>{if(!s)return;function M(D){let{open:V}=D;V||(clearTimeout(b.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),P.useEffect(()=>{if(!s||!g.current||!n)return;function M(V){_()&&r(!1,V,"hover")}const D=Nt(a.floating).documentElement;return D.addEventListener("mouseleave",M),()=>{D.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,_]);const A=P.useCallback(function(M,D,V){D===void 0&&(D=!0),V===void 0&&(V="hover");const F=$d(h.current,"close",x.current);F&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,M,V),F)):D&&(clearTimeout(b.current),r(!1,M,V))},[h,r]),L=It(()=>{k.current(),S.current=void 0}),N=It(()=>{if(C.current){const M=Nt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Ux),C.current=!1}});P.useEffect(()=>{if(!s)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(O){if(clearTimeout(b.current),T.current=!1,u&&!Lo(x.current)||d>0&&!$d(h.current,"open"))return;const B=$d(h.current,"open",x.current);B?b.current=window.setTimeout(()=>{y.current||r(!0,O,"hover")},B):r(!0,O,"hover")}function V(O){if(M())return;k.current();const B=Nt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O,!0,"safe-polygon")}});const Q=S.current;B.addEventListener("mousemove",Q),k.current=()=>{B.removeEventListener("mousemove",Q)};return}(x.current==="touch"?!xt(a.floating,O.relatedTarget):!0)&&A(O)}function F(O){M()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O)}})(O))}if(nt(a.domReference)){var H;const O=a.domReference;return n&&O.addEventListener("mouseleave",F),(H=a.floating)==null||H.addEventListener("mouseleave",F),p&&O.addEventListener("mousemove",D,{once:!0}),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",V),()=>{var B;n&&O.removeEventListener("mouseleave",F),(B=a.floating)==null||B.removeEventListener("mouseleave",F),p&&O.removeEventListener("mousemove",D),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,A,L,N,r,n,y,f,h,g,o]),He(()=>{var M;if(s&&n&&(M=g.current)!=null&&M.__options.blockPointerEvents&&_()){const V=Nt(a.floating).body;V.setAttribute(Ux,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(nt(a.domReference)&&F){var D;const H=a.domReference,O=f==null||(D=f.nodesRef.current.find(B=>B.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return O&&(O.style.pointerEvents=""),H.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{H.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,_]),He(()=>{n||(x.current=void 0,L(),N())},[n,L,N]),P.useEffect(()=>()=>{L(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,L,N]);const $=P.useMemo(()=>{function M(D){x.current=D.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(D){const{nativeEvent:V}=D;function F(){!T.current&&!y.current&&r(!0,V,"hover")}u&&!Lo(x.current)||n||d===0||(clearTimeout(w.current),x.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,y,d]),I=P.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(M){A(M.nativeEvent,!1)}}),[A]);return P.useMemo(()=>s?{reference:$,floating:I}:{},[s,$,I])}function V2(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 Kr(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 $2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Kr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Ko=new WeakMap,Os=new WeakSet,Ms={},jd=0;const j2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Yx=e=>e&&(e.host||Yx(e.parentNode)),z2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Yx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function B2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=z2(t,e),s=new Set,l=new Set(a),c=[];Ms[o]||(Ms[o]=new WeakMap);const u=Ms[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(ir(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",y=(Ko.get(m)||0)+1,x=(u.get(m)||0)+1;Ko.set(m,y),u.set(m,x),c.push(m),y===1&&h&&Os.add(m),x===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return jd++,()=>{c.forEach(f=>{const m=(Ko.get(f)||0)-1,g=(u.get(f)||0)-1;Ko.set(f,m),u.set(f,g),m||(!Os.has(f)&&i&&f.removeAttribute(i),Os.delete(f)),g||f.removeAttribute(o)}),jd--,jd||(Ko=new WeakMap,Ko=new WeakMap,Os=new WeakSet,Ms={})}}function Gx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Nt(e[0]).body;return B2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Yo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zx(e,t){const n=Zi(e,Yo());t==="prev"&&n.reverse();const r=n.indexOf(bn(Nt(e)));return n.slice(r+1)[0]}function Xx(){return Zx(document.body,"next")}function Qx(){return Zx(document.body,"prev")}function ta(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function R2(e){Zi(e,Yo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function H2(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 W2(e,t,n){const r=e.indexOf(t);function o(a){const s=pr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||xt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const zd={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 q2;function Jx(e){e.key==="Tab"&&(e.target,clearTimeout(q2))}const Ds=P.forwardRef(function(t,n){const[r,o]=P.useState();He(()=>(wd()&&o("button"),document.addEventListener("keydown",Jx),()=>{document.removeEventListener("keydown",Jx)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[pr("focus-guard")]:"",style:zd};return P.createElement("span",qo({},t,i))}),e0=P.createContext(null),t0=pr("portal");function U2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Uo(),o=n0(),[i,a]=P.useState(null),s=P.useRef(null);return He(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),He(()=>{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(t0,""),l.appendChild(c),s.current=c,a(c)},[t,r]),He(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!nt(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(t0,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Yr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=U2({id:n,root:r}),[a,s]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ta(m)&&(m.type==="focusin"?H2:R2)(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]),P.createElement(e0.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Ds,{"data-type":"outside",ref:l,onFocus:f=>{if(ta(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=Qx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:zd}),i&&Sa.createPortal(t,i),p&&i&&P.createElement(Ds,{"data-type":"outside",ref:c,onFocus:f=>{if(ta(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Xx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const n0=()=>P.useContext(e0),K2=20;let Gr=[];function Bd(e){Gr=Gr.filter(n=>n.isConnected);let t=e;if(!(!t||ir(t)==="body")){if(!KN(t,Yo())){const n=Zi(t,Yo())[0];n&&(t=n)}Gr.push(t),Gr.length>K2&&(Gr=Gr.slice(-20))}}function r0(){return Gr.slice().reverse().find(e=>e.isConnected)}const Y2=P.forwardRef(function(t,n){return P.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:zd}))});function Go(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:y,floatingId:x,elements:{domReference:b,floating:S}}=t,w=typeof a=="number"&&a<0,T=hx(b)&&w,C=j2()?i:!0,k=$t(o),_=$t(a),A=$t(s),L=fr(),N=n0(),$=P.useRef(null),I=P.useRef(null),M=P.useRef(!1),D=P.useRef(!1),V=P.useRef(-1),F=N!=null,H=S==null?void 0:S.firstElementChild,O=(H==null?void 0:H.id)===x?H:S,B=It(function(G){return G===void 0&&(G=O),G?Zi(G,Yo()):[]}),X=It(G=>{const Y=B(G);return k.current.map(Z=>b&&Z==="reference"?b:O&&Z==="floating"?O:Y).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){xt(O,bn(Nt(O)))&&B().length===0&&!T&&Vt(Z);const j=X(),z=Dn(Z);k.current[0]==="reference"&&z===b&&(Vt(Z),Z.shiftKey?ur(j[j.length-1]):ur(j[1])),k.current[1]==="floating"&&z===O&&Z.shiftKey&&(Vt(Z),ur(j[0]))}}const Y=Nt(O);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,b,O,c,k,T,B,X]),P.useEffect(()=>{if(r||!S)return;function G(Y){const Z=Dn(Y),z=B().indexOf(Z);z!==-1&&(V.current=z)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,B]),P.useEffect(()=>{if(r||!d)return;function G(){D.current=!0,setTimeout(()=>{D.current=!1})}function Y(Z){const j=Z.relatedTarget;queueMicrotask(()=>{const z=!(xt(b,j)||xt(S,j)||xt(j,S)||xt(N==null?void 0:N.portalNode,j)||j!=null&&j.hasAttribute(pr("focus-guard"))||L&&(Kr(L.nodesRef.current,m).find(K=>{var ie,R;return xt((ie=K.context)==null?void 0:ie.elements.floating,j)||xt((R=K.context)==null?void 0:R.elements.domReference,j)})||V2(L.nodesRef.current,m).find(K=>{var ie,R;return((ie=K.context)==null?void 0:ie.elements.floating)===j||((R=K.context)==null?void 0:R.elements.domReference)===j})));if(l&&z&&bn(Nt(O))===Nt(O).body){Ct(O)&&(O==null||O.focus());const K=V.current,ie=B(),R=ie[K]||ie[ie.length-1]||O;Ct(R)&&R.focus()}(T||!c)&&j&&z&&!D.current&&j!==r0()&&(M.current=!0,g(!1,Z))})}if(S&&Ct(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,b,S,O,c,m,L,N,g,d,l,B,T]),P.useEffect(()=>{var G;if(r)return;const Y=Array.from((N==null||(G=N.portalNode)==null?void 0:G.querySelectorAll("["+pr("portal")+"]"))||[]);if(S){const Z=[S,...Y,$.current,I.current,k.current.includes("reference")||T?b:null].filter(z=>z!=null),j=c||T?Gx(Z,C,!C):Gx(Z);return()=>{j()}}},[r,b,S,c,k,N,T,C]),He(()=>{if(r||!Ct(O))return;const G=Nt(O),Y=bn(G);queueMicrotask(()=>{const Z=X(O),j=_.current,z=(typeof j=="number"?Z[j]:j.current)||O,K=xt(O,Y);!w&&!K&&p&&ur(z,{preventScroll:z===O})})},[r,p,O,w,X,_]),He(()=>{if(r||!O)return;let G=!1;const Y=Nt(O),Z=bn(Y);let z=y.current.openEvent;const K=f.domReference.current;Bd(Z);function ie(R){let{open:be,reason:Ee,event:Pe,nested:ze}=R;be&&(z=Pe),Ee==="escape-key"&&f.domReference.current&&Bd(f.domReference.current),Ee==="hover"&&Pe.type==="mouseleave"&&(M.current=!0),Ee==="outside-press"&&(ze?(M.current=!1,G=!0):M.current=!(fx(Pe)||xd(Pe)))}return h.on("openchange",ie),()=>{h.off("openchange",ie);const R=bn(Y),be=xt(S,R)||L&&Kr(L.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,R)});(be||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&Bd(f.domReference.current);const Pe=K||Z,ze=Zi(Nt(Pe).body,Yo());queueMicrotask(()=>{let le=r0();!le&&Ct(Pe)&&S&&(le=W2(ze,Pe,S)),A.current&&!M.current&&Ct(le)&&(!(le!==R&&R!==Y.body)||be)&&le.focus({preventScroll:G})})}},[r,S,O,A,y,f,h,L,m]),He(()=>{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]),He(()=>{if(r||!O||typeof MutationObserver!="function"||w)return;const G=()=>{const Z=O.getAttribute("tabindex"),j=B(),z=bn(Nt(S)),K=j.indexOf(z);K!==-1&&(V.current=K),k.current.includes("floating")||z!==f.domReference.current&&j.length===0?Z!=="0"&&O.setAttribute("tabindex","0"):Z!=="-1"&&O.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,O,f,k,B,w]);function Q(G){return r||!u||!c?null:P.createElement(Y2,{ref:G==="start"?$:I,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(F||c);return P.createElement(P.Fragment,null,J&&P.createElement(Ds,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:G=>{if(c){const Z=X();ur(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(M.current=!1,ta(G,N.portalNode)){const Z=Xx()||b;Z==null||Z.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&Q("start"),n,Q("end"),J&&P.createElement(Ds,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:G=>{if(c)ur(X()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(M.current=!0),ta(G,N.portalNode)){const Z=Qx()||b;Z==null||Z.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const Rd=new Set,o0=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Uo();return He(()=>{if(!r)return;Rd.add(i);const a=/iP(hone|ad|od)|iOS/.test(bd()),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()=>{Rd.delete(i),Rd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),P.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function i0(e){return Ct(e.target)&&e.target.tagName==="BUTTON"}function a0(e){return Ed(e)}function na(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=P.useRef(),p=P.useRef(!1),f=P.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(Lo(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}Lo(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||i0(m))&&(m.key===" "&&!a0(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||i0(m)||a0(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function G2(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 s0(e){return e!=null&&e.clientX!=null}function Z2(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=P.useRef(!1),p=P.useRef(null),[f,m]=P.useState(),[g,h]=P.useState([]),y=It((T,C)=>{d.current||r.current.openEvent&&!s0(r.current.openEvent)||a.setPositionReference(G2(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),x=It(T=>{c!=null||u!=null||(n?p.current||h([]):y(T.clientX,T.clientY))}),b=Lo(f)?o:n,S=P.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const T=qt(o);function C(k){const _=Dn(k);xt(o,_)?(T.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||s0(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);P.useEffect(()=>S(),[S,g]),P.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),P.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),He(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const w=P.useMemo(()=>{function T(C){let{pointerType:k}=C;m(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:x,onMouseEnter:x}},[x]);return P.useMemo(()=>s?{reference:w}:{},[s,w])}const X2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Q2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},l0=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 Zr(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=fr(),h=It(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,x=P.useRef(!1),b=P.useRef(!1),{escapeKey:S,outsidePress:w}=l0(f),{escapeKey:T,outsidePress:C}=l0(m),k=It(I=>{var M;if(!n||!a||!s||I.key!=="Escape")return;const D=(M=i.current.floatingContext)==null?void 0:M.nodeId,V=g?Kr(g.nodesRef.current,D):[];if(!S&&(I.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(H=>{var O;if((O=H.context)!=null&&O.open&&!H.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,bN(I)?I.nativeEvent:I,"escape-key")}),_=It(I=>{var M;const D=()=>{var V;k(I),(V=Dn(I))==null||V.removeEventListener("keydown",D)};(M=Dn(I))==null||M.addEventListener("keydown",D)}),A=It(I=>{var M;const D=x.current;x.current=!1;const V=b.current;if(b.current=!1,c==="click"&&V||D||typeof y=="function"&&!y(I))return;const F=Dn(I),H="["+pr("inert")+"]",O=Nt(o.floating).querySelectorAll(H);let B=nt(F)?F:null;for(;B&&!ar(B);){const G=Yn(B);if(ar(G)||!nt(G))break;B=G}if(O.length&&nt(F)&&!xN(F)&&!xt(F,o.floating)&&Array.from(O).every(G=>!xt(B,G)))return;if(Ct(F)&&$){const G=F.clientWidth>0&&F.scrollWidth>F.clientWidth,Y=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let Z=Y&&I.offsetX>F.clientWidth;if(Y&&Jt(F).direction==="rtl"&&(Z=I.offsetX<=F.offsetWidth-F.clientWidth),Z||G&&I.offsetY>F.clientHeight)return}const X=(M=i.current.floatingContext)==null?void 0:M.nodeId,Q=g&&Kr(g.nodesRef.current,X).some(G=>{var Y;return Td(I,(Y=G.context)==null?void 0:Y.elements.floating)});if(Td(I,o.floating)||Td(I,o.domReference)||Q)return;const J=g?Kr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,I,"outside-press")}),L=It(I=>{var M;const D=()=>{var V;A(I),(V=Dn(I))==null||V.removeEventListener(c,D)};(M=Dn(I))==null||M.addEventListener(c,D)});P.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function I(V){r(!1,V,"ancestor-scroll")}const M=Nt(o.floating);s&&M.addEventListener("keydown",T?_:k,T),y&&M.addEventListener(c,C?L:A,C);let D=[];return p&&(nt(o.domReference)&&(D=sr(o.domReference)),nt(o.floating)&&(D=D.concat(sr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(sr(o.reference.contextElement)))),D=D.filter(V=>{var F;return V!==((F=M.defaultView)==null?void 0:F.visualViewport)}),D.forEach(V=>{V.addEventListener("scroll",I,{passive:!0})}),()=>{s&&M.removeEventListener("keydown",T?_:k,T),y&&M.removeEventListener(c,C?L:A,C),D.forEach(V=>{V.removeEventListener("scroll",I)})}},[i,o,s,y,c,n,r,p,a,S,w,k,T,_,A,C,L]),P.useEffect(()=>{x.current=!1},[y,c]);const N=P.useMemo(()=>({onKeyDown:k,[X2[d]]:I=>{u&&r(!1,I.nativeEvent,"reference-press")}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Q2[c]]:()=>{x.current=!0}}),[k,c]);return P.useMemo(()=>a?{reference:N,floating:$}:{},[a,N,$])}function J2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Uo(),i=P.useRef({}),[a]=P.useState(()=>Hx()),s=dr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&D2("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]=P.useState(r.reference),u=It((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=P.useMemo(()=>({setPositionReference:c}),[]),p=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function hr(e){e===void 0&&(e={});const{nodeId:t}=e,n=J2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=P.useState(null),[s,l]=P.useState(null),u=(o==null?void 0:o.reference)||i,d=P.useRef(null),p=fr();He(()=>{u&&(d.current=u)},[u]);const f=w2({...e,elements:{...o,...s&&{reference:s}}}),m=P.useCallback(b=>{const S=nt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=P.useCallback(b=>{(nt(b)||b===null)&&(d.current=b,a(b)),(nt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!nt(b))&&f.refs.setReference(b)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),y=P.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),x=P.useMemo(()=>({...f,...r,refs:h,elements:y,nodeId:t}),[f,h,y,t,r]);return He(()=>{r.dataRef.current.floatingContext=x;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=x)}),P.useMemo(()=>({...f,context:x,refs:h,elements:y}),[f,h,y,x])}function eF(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=P.useRef(!1),u=P.useRef(),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;const f=qt(a.domReference);function m(){!n&&Ct(a.domReference)&&a.domReference===bn(Nt(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]),P.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]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=P.useMemo(()=>({onPointerDown(f){xd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Dn(f.nativeEvent);if(l&&nt(m))try{if(wd()&&px())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Ed(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=nt(m)&&m.hasAttribute(pr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=bn(a.domReference?a.domReference.ownerDocument:document);!m&&x===a.domReference||xt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||xt(a.domReference,x)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return P.useMemo(()=>s?{reference:p}:{},[s,p])}const c0="active",u0="selected";function Hd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[c0]:a,[u0]: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&&[c0,u0].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 mr(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=P.useCallback(s=>Hd(s,e,"reference"),t),i=P.useCallback(s=>Hd(s,e,"floating"),n),a=P.useCallback(s=>Hd(s,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let d0=!1;function Ns(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function f0(e,t){return Ns(t,e===Ld||e===Qi,e===Ho||e===Wo)}function Wd(e,t,n){return Ns(t,e===Qi,n?e===Ho:e===Wo)||e==="Enter"||e===" "||e===""}function tF(e,t,n){return Ns(t,n?e===Ho:e===Wo,e===Qi)}function p0(e,t,n){return Ns(t,n?e===Wo:e===Ho,e===Ld)}function Fs(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:y=!0,disabledIndices:x=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||_s("`useListNavigation` looping must be enabled to allow escaping."),m||_s("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&_s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=dr(),A=fr(),L=It(s),N=P.useRef(g),$=P.useRef(c??-1),I=P.useRef(null),M=P.useRef(!0),D=P.useRef(L),V=P.useRef(!!o.floating),F=P.useRef(n),H=P.useRef(!1),O=P.useRef(!1),B=$t(x),X=$t(n),Q=$t(w),J=$t(o.floating),G=$t(c),[Y,Z]=P.useState(),[j,z]=P.useState(),K=It(function(le,we,ce){ce===void 0&&(ce=!1);function Se(ue){m?(Z(ue.id),A==null||A.events.emit("virtualfocus",ue),T&&(T.current=ue)):ur(ue,{preventScroll:!0,sync:px()&&wd()?d0||H.current:!1})}const oe=le.current[we.current];oe&&Se(oe),requestAnimationFrame(()=>{const ue=le.current[we.current]||oe;if(!ue)return;oe||Se(ue);const te=Q.current;te&&R&&(ce||!M.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof te=="boolean"?{block:"nearest",inline:"nearest"}:te))})});He(()=>{document.createElement("div").focus({get preventScroll(){return d0=!0,!1}})},[]),He(()=>{l&&(n&&o.floating?N.current&&c!=null&&(O.current=!0,$.current=c,L(c)):V.current&&($.current=-1,D.current(null)))},[l,n,o.floating,c,L]),He(()=>{if(l&&n&&o.floating)if(a==null){if(H.current=!1,G.current!=null)return;if(V.current&&($.current=-1,K(i,$)),(!F.current||!V.current)&&N.current&&(I.current!=null||N.current===!0&&I.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):($.current=I.current==null||Wd(I.current,b,f)||p?Vd(i,B.current):Lx(i,B.current),I.current=null,L($.current))};we()}}else Ji(i,a)||($.current=a,K(i,$,O.current),O.current=!1)},[l,n,o.floating,a,G,p,i,b,f,L,K,B]),He(()=>{var le;if(!l||o.floating||!A||m||!V.current)return;const we=A.nodesRef.current,ce=(le=we.find(ue=>ue.id===_))==null||(le=le.context)==null?void 0:le.elements.floating,Se=bn(Nt(o.floating)),oe=we.some(ue=>ue.context&&xt(ue.context.elements.floating,Se));ce&&!oe&&M.current&&ce.focus({preventScroll:!0})},[l,o.floating,A,_,m]),He(()=>{if(!l||!A||!m||_)return;function le(we){z(we.id),T&&(T.current=we)}return A.events.on("virtualfocus",le),()=>{A.events.off("virtualfocus",le)}},[l,A,m,_,T]),He(()=>{D.current=L,V.current=!!o.floating}),He(()=>{n||(I.current=null)},[n]),He(()=>{F.current=n},[n]);const ie=a!=null,R=P.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&L(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!M.current||Se==="touch"||($.current=-1,K(i,$),L(null),m||ur(J.current,{preventScroll:!0}))}}}},[n,J,K,h,i,L,m]),be=It(le=>{if(M.current=!1,H.current=!0,!X.current&&le.currentTarget===J.current)return;if(p&&p0(le.key,b,f)){Vt(le),r(!1,le.nativeEvent,"list-navigation"),Ct(o.domReference)&&!m&&o.domReference.focus();return}const we=$.current,ce=Vd(i,x),Se=Lx(i,x);if(le.key==="Home"&&(Vt(le),$.current=ce,L($.current)),le.key==="End"&&(Vt(le),$.current=Se,L($.current)),S>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=C2(oe,S,k),te=ue.findIndex(ne=>ne!=null&&!Is(i.current,ne,x)),q=ue.reduce((ne,he,Me)=>he!=null&&!Is(i.current,he,x)?Me:ne,-1);if($.current=ue[E2({current:ue.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:b,loop:d,cols:S,disabledIndices:A2([...x||i.current.map((ne,he)=>Is(i.current,he)?he:void 0),void 0],ue),minIndex:te,maxIndex:q,prevIndex:k2($.current>Se?ce:$.current,oe,ue,S,le.key===Qi?"bl":le.key===Wo?"tr":"tl"),stopEvent:!0})],L($.current),b==="both")return}if(f0(le.key,b)){if(Vt(le),n&&!m&&bn(le.currentTarget.ownerDocument)===le.currentTarget){$.current=Wd(le.key,b,f)?ce:Se,L($.current);return}Wd(le.key,b,f)?d?$.current=we>=Se?u&&we!==i.current.length?-1:ce:Bt(i,{startingIndex:we,disabledIndices:x}):$.current=Math.min(Se,Bt(i,{startingIndex:we,disabledIndices:x})):d?$.current=we<=ce?u&&we!==-1?i.current.length:Se:Bt(i,{startingIndex:we,decrement:!0,disabledIndices:x}):$.current=Math.max(ce,Bt(i,{startingIndex:we,decrement:!0,disabledIndices:x})),Ji(i,$.current)?L(null):L($.current)}}),Ee=P.useMemo(()=>m&&n&&ie&&{"aria-activedescendant":j||Y},[m,n,ie,j,Y]),Pe=P.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!hx(o.domReference)&&Ee,onKeyDown:be,onPointerMove(){M.current=!0}}),[Ee,be,o.domReference,b]),ze=P.useMemo(()=>{function le(ce){g==="auto"&&fx(ce.nativeEvent)&&(N.current=!0)}function we(ce){N.current=g,g==="auto"&&xd(ce.nativeEvent)&&(N.current=!0)}return{...Ee,onKeyDown(ce){M.current=!1;const Se=ce.key.indexOf("Arrow")===0,oe=tF(ce.key,b,f),ue=p0(ce.key,b,f),te=f0(ce.key,b),q=(p?oe:te)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const qe=A==null?void 0:A.nodesRef.current.find(jt=>jt.parentId==null),Qe=A&&qe?$2(A.nodesRef.current,qe.id):null;if(Se&&Qe&&T){const jt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(oe||ue){var ne,he;const Cn=((ne=Qe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Rn=ue&&!Cn?(he=Qe.context)==null?void 0:he.elements.domReference:oe?i.current.find(Ar=>(Ar==null?void 0:Ar.id)===Y):null;Rn&&(Vt(ce),Rn.dispatchEvent(jt),z(void 0))}if(te&&Qe.context&&Qe.context.open&&Qe.parentId&&ce.currentTarget!==Qe.context.elements.domReference){var Me;Vt(ce),(Me=Qe.context.elements.domReference)==null||Me.dispatchEvent(jt);return}}return be(ce)}if(!(!n&&!y&&Se)){if(q&&(I.current=p&&te?null:ce.key),p){oe&&(Vt(ce),n?($.current=Vd(i,B.current),L($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}te&&(c!=null&&($.current=c),Vt(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&L($.current))}},onFocus(){n&&!m&&L(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ee,be,B,g,i,p,L,r,n,y,b,f,c,A,m,T]);return P.useMemo(()=>l?{reference:ze,floating:Pe,item:R}:{},[l,ze,Pe,R])}const nF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=nF.get(a))!=null?n:a,l=Uo(),u=dr()!=null,d=P.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=P.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=P.useCallback(m=>{let{active:g,selected:h}=m;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&h};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return P.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const h0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function rF(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function oF(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]=P.useState("unmounted"),c=rF(n,a);return!c&&s==="close"&&l("unmounted"),He(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function m0(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=P.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]=P.useState(()=>({...Zo(i,c),...Zo(n,c)})),{isMounted:g,status:h}=oF(e,{duration:a}),y=$t(n),x=$t(r),b=$t(o),S=$t(i);return He(()=>{const w=Zo(y.current,c),T=Zo(b.current,c),C=Zo(S.current,c),k=Zo(x.current,c)||Object.keys(w).reduce((_,A)=>(_[A]="",_),{});if(h==="initial"&&m(_=>({transitionProperty:_.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(k).map(h0).join(","),transitionDuration:d+"ms",...C,...k}),h==="close"){const _=T||w;m({transitionProperty:Object.keys(_).map(h0).join(","),transitionDuration:p+"ms",...C,..._})}},[p,b,y,x,S,d,h,c]),{isMounted:g,styles:f}}function iF(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=P.useRef(),g=P.useRef(""),h=P.useRef((n=f??a)!=null?n:-1),y=P.useRef(null),x=It(s),b=It(l),S=$t(u),w=$t(p);He(()=>{r&&(clearTimeout(m.current),y.current=null,g.current="")},[r]),He(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const T=It(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=It(A=>{function L(D,V,F){const H=S.current?S.current(V,F):V.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return H?D.indexOf(H):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(L(N,N,g.current)===-1?T(!1):A.key===" "&&Vt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Vt(A),T(!0)),N.every(D=>{var V,F;return D?((V=D[0])==null?void 0:V.toLocaleLowerCase())!==((F=D[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=y.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=y.current,T(!1)},d);const I=h.current,M=L(N,[...N.slice((I||0)+1),...N.slice(0,(I||0)+1)],g.current);M!==-1?(x(M),y.current=M):A.key!==" "&&(g.current="",T(!1))}),k=P.useMemo(()=>({onKeyDown:C}),[C]),_=P.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&T(!1)}}),[C,T]);return P.useMemo(()=>c?{reference:k,floating:_}:{},[c,k,_])}function g0(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 aF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function v0(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,x=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,x}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:y,tree:x}=d;return function(S){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],_=Dn(S),A=S.type==="mouseleave",L=xt(g.floating,_),N=xt(g.domReference,_),$=g.domReference.getBoundingClientRect(),I=g.floating.getBoundingClientRect(),M=m.split("-")[0],D=p>I.right-I.width/2,V=f>I.bottom-I.height/2,F=aF(k,$),H=I.width>$.width,O=I.height>$.height,B=(H?$:I).left,X=(H?$:I).right,Q=(O?$:I).top,J=(O?$:I).bottom;if(L&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&nt(S.relatedTarget)&&xt(g.floating,S.relatedTarget)||x&&Kr(x.nodesRef.current,y).some(Z=>{let{context:j}=Z;return j==null?void 0:j.open}))return;if(M==="top"&&f>=$.bottom-1||M==="bottom"&&f<=$.top+1||M==="left"&&p>=$.right-1||M==="right"&&p<=$.left+1)return w();let G=[];switch(M){case"top":G=[[B,$.top+1],[B,I.bottom-1],[X,I.bottom-1],[X,$.top+1]];break;case"bottom":G=[[B,I.top+1],[B,$.bottom-1],[X,$.bottom-1],[X,I.top+1]];break;case"left":G=[[I.right-1,J],[I.right-1,Q],[$.left+1,Q],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,Q],[I.left+1,Q],[I.left+1,J]];break}function Y(Z){let[j,z]=Z;switch(M){case"top":{const K=[H?j+t/2:D?j+t*4:j-t*4,z+t+1],ie=[H?j-t/2:D?j+t*4:j-t*4,z+t+1],R=[[I.left,D||H?I.bottom-t:I.top],[I.right,D?H?I.bottom-t:I.top:I.bottom-t]];return[K,ie,...R]}case"bottom":{const K=[H?j+t/2:D?j+t*4:j-t*4,z-t],ie=[H?j-t/2:D?j+t*4:j-t*4,z-t],R=[[I.left,D||H?I.top+t:I.bottom],[I.right,D?H?I.top+t:I.bottom:I.top+t]];return[K,ie,...R]}case"left":{const K=[j+t+1,O?z+t/2:V?z+t*4:z-t*4],ie=[j+t+1,O?z-t/2:V?z+t*4:z-t*4];return[...[[V||O?I.right-t:I.left,I.top],[V?O?I.right-t:I.left:I.right-t,I.bottom]],K,ie]}case"right":{const K=[j-t,O?z+t/2:V?z+t*4:z-t*4],ie=[j-t,O?z-t/2:V?z+t*4:z-t*4],R=[[V||O?I.left+t:I.right,I.top],[V?O?I.left+t:I.right:I.left+t,I.bottom]];return[K,ie,...R]}}}if(!g0([T,C],G)){if(i&&!F)return w();if(!A&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return w()}g0([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const sF=/Mac|iPod|iPhone|iPad/,Ls=()=>sF.test(navigator.userAgent),lF=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ls()?"Meta":"Control":n==="Hyper"?Ls()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),y0=e=>e.map(t=>t.trim()).join("+");class cF{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=y0(lF(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=y0(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class xn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof xn&&(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 xn(this);return t?t(n):n}static from(t,n){return new xn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(xn.from(t,n).values())}toArray(){return Array.from(this.values())}}const uF=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},b0=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},x0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},w0=(e,t)=>{const n=b0(t,x0.basic,e);return n!==void 0&&n!==e?n:b0(t,x0.extend,e)},S0=e=>e.replace(/[^0-9]/g,""),Vs=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),T0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?S0(e).includes(S0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?uF(e,t)!==null:!1,dF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>T0(e,o,n,r)):T0(e,t,n,r),qd=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Fe.array(i.value)?i.value.map(Vs):Vs(`${i.value}`)}));return e.forEach(i=>{const a=w0(i,t);o.forEach(s=>{const l=w0(i,s.key);if(!l)return;const c=Vs(`${s.value}`.toLocaleLowerCase()).trim(),u=Vs(`${l}`.toLocaleLowerCase()).trim();if(dF(u,c,s.score,s.match))return void r.set(a,i);Fe.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},fF=e=>(e=e.trim(),e==="Alt"?Ls()?v.jsx(_I,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Ls()?v.jsx(EI,{"aria-label":"Command",size:14}):"Ctrl":e),pF=e=>{const t=e.value.trim().split("+");return v.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return v.jsxs(E.Fragment,{children:[v.jsx("kbd",{"aria-label":n,children:fF(n)}),o?null:v.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},Ud=v.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),hF=(e,t)=>or()?t:window.matchMedia(e).matches,mF=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(hF(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},E0=()=>window.matchMedia("@media (pointer: coarse)"),gF=()=>{var r;const e=E.useRef(or()?null:E0()),[t,n]=E.useState(or()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?E0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},Kd=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=gF(),o=E.useRef(or()?"":document.documentElement.style.overflowY);return E.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||eb())return;document.documentElement.style.padding=Vh(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(rT(c.style.height)):null,p=Fe.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vF=ub,wn="500ms",yF={exit:{x:["0%","-30%"],opacity:0,animationDuration:wn},enter:{x:["-30%","0%"],opacity:1,animationDuration:wn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:wn}},bF={initial:{x:["30%","0%"],opacity:.8},enter:{x:"0%",opacity:1,animationDuration:wn},exit:{x:["0%","30%"],opacity:0,animationDuration:wn}},Yd={drawer:e=>e==="left"?yF:bF,sheet:{initial:{opacity:.5,y:"25%",animationDuration:wn,transformOrigin:"bottom"},enter:{opacity:1,y:"0%",animationDuration:wn,transformOrigin:"bottom"},exit:{opacity:.1,y:"50%",animationDuration:wn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:wn},initial:{opacity:.5,scale:.95,animationDuration:wn,transition:{duration:.5,ease:"easeInOut"}},enter:{opacity:1,scale:[1.05,1],animationDuration:wn}}},xF=ao("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),C0={top:0,left:0,right:0,bottom:0},k0=e=>e*.65,wF=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=k0(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return v.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:C0,whileDrag:{cursor:"grabbing"},className:Ce("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?v.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},$s={drawer:"right",sheet:"none",dialog:"none"},SF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??$s.drawer:$s[o]:t?$s[o]:$s.sheet},TF=[],Gd=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:m=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:x=!1,role:b="dialog",interactions:S=TF,...w},T)=>{const C=Kd(e,"block-only"),k=E.useId(),_=E.useId(),A=mF("(min-width: 64rem)"),L=h!=="dialog",N=SF(A,f,h,y),$=A||f?Yd[h]:Yd.sheet,I=typeof $=="function"?$(N):$,M=A||f?h:"sheet",D=hr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),V=na(D.context),F=Xr(D.context,{role:b}),H=Zr(D.context,{escapeKey:!0,referencePress:!0,outsidePress:x}),O=mr([V,F,H].concat(S)),B=o,X=Ua(void 0);E.useEffect(()=>{X.set(void 0)},[X,M]);const Q=()=>a(!1);E.useImperativeHandle(T,()=>({context:D.context,floating:C.current}),[D.context,C]);const J=(Z,j)=>{const z=D.refs.floating;if(z.current&&M==="sheet"){const ie=z.current.getBoundingClientRect(),R=X.get()||ie.height,be=Math.abs(R-j.delta.y),Ee=k0(window.outerHeight);return be<Ee?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(be)}},G={layoutId:m,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:I},Y=d&&M==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:C0,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:M==="sheet",drag:M==="sheet"?"y":"x"}:G;return v.jsxs(E.Fragment,{children:[o?v.jsx(E.Fragment,{children:r?v.jsx(vF,{ref:D.refs.setReference,...O.getReferenceProps({layoutId:m}),children:B}):v.jsx(pt.button,{ref:D.refs.setReference,...O.getReferenceProps(),layoutId:m,type:"button",children:B})}):null,v.jsx(Yr,{preserveTabOrder:!0,children:v.jsx(er,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?v.jsx(o0,{lockScroll:!0,className:Ce(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${M==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:v.jsx(Go,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:D.context,children:v.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":k,"aria-describedby":_}:{"aria-label":s},...O.getFloatingProps({"aria-modal":e,ref:Hn(D.refs.setFloating,C),className:Ce(xF({position:N,type:M}),l,"overscroll-contain")}),"data-component":"modal",style:M==="drawer"?{width:X}:{height:X},children:[t?v.jsx("header",{className:"relative w-full",children:t?v.jsx("h2",{id:k,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,v.jsx("section",{"data-component":"modal-body",className:Ce("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?v.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?v.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:v.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:v.jsx(zi,{})})}):null,L&&u?v.jsx(wF,{onChange:a,value:X,sheet:M==="sheet",position:N,parent:D.refs.floating}):null]})})}):null},k)})]})}),EF=e=>v.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:dc(e.item.title)?v.jsx(e.item.title,{text:e.text}):e.item.title}),CF=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?v.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:v.jsx(EF,{text:e.text,item:o})}):o.type!=="shortcut"?v.jsx(E.Fragment,{}):v.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ce("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[v.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,v.jsx("span",{children:dc(o.title)?v.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?v.jsx(pF,{value:o.shortcut}):null]})}),kF=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Fe.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Fe.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=qd(o,"title",n),a=r.filter(s=>Fe.function(s.enabled)?s.enabled({text:t}):!1);return xn.unique(i.concat(a),s=>s.title)},AF=[0,0,0,0,0],PF=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Et(),[o,i]=E.useState(""),a=Xn(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=hr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Ro}),p=Fs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:x=>u(b=>Fe.number(x)?x:e.open?b??0:null)}),{getItemProps:f}=mr([p]),m=e.commands.flatMap(x=>x.type==="group"?[x,...x.items]:[x]),g=kF(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(x=>x.type!=="group")];E.useEffect(()=>{const x=new cF;return x.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),m.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&x.add(b.shortcut,S=>b.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),x.register()},[t]);const y=e.Icon??ny;return v.jsx(E.Fragment,{children:v.jsxs(Gd,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[v.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[v.jsx("div",{className:"flex size-10 items-center justify-center",children:v.jsx(y,{Default:ny,text:o,size:16})}),v.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:x=>i(x.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:x=>{var b;if((x.key==="ArrowDown"||x.key==="ArrowUp")&&c!==null&&((b=n.current[c])==null||b.scrollIntoView({block:"start",inline:"start"})),x.key==="Enter"){if(c!==null&&h[c]){x.preventDefault();const S=h[c],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){x.preventDefault();const S=h[0],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[v.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),AF.map((x,b)=>v.jsx("li",{className:Ce("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Ud},`${s}-${b}-skeleton-index`))]}):v.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((x,b)=>E.createElement(CF,{...f({onMouseEnter:()=>u(b),ref(S){n.current[b]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),x.type==="shortcut"&&x.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:x,text:o,active:c===b,key:`${s}-${x.type}-${b}`})),h.length===1?v.jsx("div",{className:Ce("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Fe.number(c)?v.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?v.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},Xo=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Xi(10),Fd({fallbackAxisSideDirection:"end"}),Nd(),Nx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=hr({open:n,middleware:i,transform:!0,whileElementsMounted:Ro,onOpenChange:(m,g)=>{var y;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(y=e.onChange)==null||y.call(e,m))}}),c=na(l),u=Zr(l),d=Xr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=mr([c,u,d]);return v.jsxs(E.Fragment,{children:[v.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&v.jsx(Yr,{preserveTabOrder:!0,id:`${t}-portal`,children:v.jsx(Go,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:v.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[v.jsx(Rx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),v.jsx("header",{className:"mb-2",children:v.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},IF=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}=hr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=na(s,{enabled:e.disabled??!0}),u=Xr(s,{role:"tooltip"}),d=Zr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=mr([c,u,d]);return v.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[v.jsx(ka,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:v.jsx(pt.span,{layoutId:o,children:e.trigger})}),v.jsx(er,{children:i?v.jsx(Yr,{root:t,children:v.jsx(Go,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:v.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},A0=200,_F=500,P0=(e="")=>Ce("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),Zd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),I0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=E.useState(r??!1),[p,f]=E.useState(!1),[m,g]=E.useState(null),h=E.useRef([]),y=E.useRef([]),x=E.useContext(Zd),b=dr(),S=fr(),w=N2(),T=jx(),C=b!==null,{floatingStyles:k,refs:_,context:A}=hr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ro,placement:C?"right":"bottom-start",middleware:[Xi({mainAxis:C?0:4,alignmentAxis:C?-4:0}),Fd(),Nd()]}),L=Xr(A,{role:"menu"}),N=Zr(A,{bubbles:!0}),$=Kx(A,{move:!1,enabled:n,delay:{open:A0},handleClose:v0({blockPointerEvents:!0})}),I=na(A,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),M=Fs(A,{loop:!0,activeIndex:m,nested:C,listRef:h,onNavigate:g}),D=iF(A,{activeIndex:m,listRef:y,resetMs:_F,onMatch:u?g:void 0}),{getReferenceProps:V,getFloatingProps:F,getItemProps:H}=mr([$,I,L,N,M,D]);E.useEffect(()=>{if(!S)return;const B=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===b&&d(!1)};return S.events.on("click",B),S.events.on("menuopen",X),()=>{S.events.off("click",B),S.events.off("menuopen",X)}},[S,w,b]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:b,nodeId:w})},[S,u,w,b]);const O=o?l.className:Ce(P0(l.className));return v.jsxs(F2,{id:w,children:[v.jsx(E.Fragment,{children:l.asChild?v.jsx(ub,{...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:s,className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Hn(_.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0}):v.jsxs("button",{type:"button",className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Hn(_.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0,...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:[s,C&&v.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[v.jsx("span",{className:"sr-only",children:"Next menu"}),v.jsx(Au,{size:14})]})]})}),v.jsx(Zd.Provider,{value:{activeIndex:m,setActiveIndex:g,getItemProps:H,setHasFocusInside:f,isOpen:u},children:v.jsx(_2,{elementsRef:h,labelsRef:y,children:u&&v.jsx(Yr,{preserveTabOrder:!0,children:v.jsx(Go,{context:A,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:v.jsx(t,{...F(),ref:_.setFloating,style:{...l.style,...k},className:Ce("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),OF=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Zd),s=jx({label:n?null:e}),l=fr(),c=s.index===a.activeIndex;return v.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Hn(s.ref,i),className:P0(`${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?v.jsx(t,{size:16}):null]})}),MF=E.forwardRef((e,t)=>dr()===null?v.jsx(L2,{children:v.jsx(I0,{...e,isParent:!0,ref:t})}):v.jsx(I0,{...e,isParent:!1,ref:t})),DF=e=>v.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}),Xd=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=Zu,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),y=t||"span",x=I=>{g(I),d==null||d(I)},{refs:b,floatingStyles:S,context:w}=hr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Ro,onOpenChange:i?void 0:x,middleware:[Nd(),Xi(5),Fd({fallbackAxisSideDirection:"start"}),Nx({padding:5,element:h})]}),T=Kx(w,{move:!0,delay:{open:A0},enabled:l?s:!1,handleClose:c?v0():null}),C=eF(w,{enabled:l?a:!1}),k=na(w,{enabled:l?c:!1}),_=Zr(w,{enabled:l}),A=Xr(w,{role:"tooltip",enabled:l}),L=Z2(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:$}=mr([A,_,L,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),v.jsxs(E.Fragment,{children:[v.jsx(y,{...N(p),ref:Hn(b.setReference,f),children:n}),m&&v.jsx(Yr,{preserveTabOrder:!0,children:v.jsxs(ln,{...$(),ref:b.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[v.jsx(Rx,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),js=0,gr=1,Qo=2,_0=4;function O0(e){return()=>e}function NF(e){e()}function ra(e,t){return n=>e(t(n))}function M0(e,t){return()=>e(t)}function D0(e,t){return n=>e(t,n)}function Qd(e){return e!==void 0}function FF(...e){return()=>{e.map(NF)}}function Jo(){}function zs(e,t){return t(e),e}function LF(e,t){return t(e)}function ct(...e){return e}function tt(e,t){return e(gr,t)}function De(e,t){e(js,t)}function Jd(e){e(Qo)}function Rt(e){return e(_0)}function xe(e,t){return tt(e,D0(t,js))}function Fn(e,t){const n=e(gr,r=>{n(),t(r)});return n}function N0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function F0(e,t){return e===t}function ut(e=F0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ke(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ra(t,e)}function Ln(e){return t=>()=>{t(e)}}function re(e,...t){const n=VF(...t);return(r,o)=>{switch(r){case Qo:Jd(e);return;case gr:return tt(e,n(o))}}}function Vn(e,t){return n=>r=>{n(t=e(t,r))}}function ei(e){return t=>n=>{e>0?e--:t(n)}}function vr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Le(...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);tt(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 VF(...e){return t=>e.reduceRight(LF,t)}function $F(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case gr:return i?n===i?void 0:(r(),n=i,t=tt(e,i),t):(r(),Jo);case Qo:r(),n=null;return}}}function se(e){let t=e;const n=Re();return(r,o)=>{switch(r){case js:t=o;break;case gr:{o(t);break}case _0:return t}return n(r,o)}}function Ht(e,t){return zs(se(t),n=>xe(e,n))}function Re(){const e=[];return(t,n)=>{switch(t){case js:e.slice().forEach(r=>{r(n)});return;case Qo:e.splice(0,e.length);return;case gr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function tn(e){return zs(Re(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:jF(),singleton:n}}const jF=()=>Symbol();function zF(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 _t(...e){const t=Re(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);tt(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case Qo:{Jd(t);return}case gr:return r===o&&a(n),tt(t,a)}}}function Ae(e,t=F0){return re(e,ut(t))}function L0(...e){return function(t,n){switch(t){case Qo:return;case gr:return FF(...e.map(r=>tt(r,n)))}}}var nn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nn||{});const BF={0:"debug",3:"error",1:"log",2:"warn"},RF=()=>typeof globalThis>"u"?window:globalThis,yr=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=RF().VIRTUOSO_LOG_LEVEL)!=null?o:Rt(e);r>=i&&console[BF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function $n(e,t,n){return ef(e,t,n).callbackRef}function ef(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 V0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=HF(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,y=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:y}),i==null||i(s?$0("column-gap",getComputedStyle(u).columnGap,o):$0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return ef(c,n,l)}function HF(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},nn.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 $0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nn.WARN),t==="normal"?0:parseInt(t??"0",10)}function tf(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}=ef(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 Ut=Ye(()=>{const e=Re(),t=Re(),n=se(0),r=Re(),o=se(0),i=Re(),a=Re(),s=se(0),l=se(0),c=se(0),u=se(0),d=Re(),p=Re(),f=se(!1),m=se(!1),g=se(!1);return xe(re(e,pe(({scrollTop:h})=>h)),t),xe(re(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}),oa={lvl:0};function j0(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 ot(e){return e===oa}function ia(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?ia(e.l,t):ia(e.r,t)}function Sn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Sn(e.l,t,n)}function rn(e,t,n){return ot(e)?R0(t,n,1):t===e.k?Ot(e,{k:t,v:n}):t<e.k?H0(Ot(e,{l:rn(e.l,t,n)})):H0(Ot(e,{r:rn(e.r,t,n)}))}function ti(){return oa}function Bs(e,t,n){if(ot(e))return[];const r=Sn(e,t)[0];return WF(rf(e,r,n))}function nf(e,t){if(ot(e))return oa;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=B0(r);return Rs(Ot(e,{k:i,l:z0(r),v:a}))}}else return t<n?Rs(Ot(e,{l:nf(r,t)})):Rs(Ot(e,{r:nf(o,t)}))}function Qr(e){return ot(e)?[]:[...Qr(e.l),{k:e.k,v:e.v},...Qr(e.r)]}function rf(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(rf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(rf(i,t,n))),s}function Rs(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(of(t))return W0(Ot(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Ot(t.r,{l:Ot(t,{r:t.r.l}),lvl:n,r:Ot(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(of(e))return af(Ot(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=of(o)?r.lvl-1:r.lvl;return Ot(o,{l:Ot(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:af(Ot(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ot(e,t){return R0(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 z0(e){return ot(e.r)?e.l:Rs(Ot(e,{r:z0(e.r)}))}function of(e){return ot(e)||e.lvl>e.r.lvl}function B0(e){return ot(e.r)?[e.k,e.v]:B0(e.r)}function R0(e,t,n,r=oa,o=oa){return{k:e,l:r,lvl:n,r:o,v:t}}function H0(e){return af(W0(e))}function W0(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ot(t,{r:Ot(e,{l:t.r})}):e}function af(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ot(n,{l:Ot(e,{r:n.l}),lvl:t+1}):e}function WF(e){return j0(e,({k:t,v:n})=>({index:t,value:n}))}function q0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const sf=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function U0(e,t,n){return e[Hs(e,t,n)]}function Hs(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 qF(e,t,n,r){const o=Hs(e,t,r),i=Hs(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ws(e){return!ot(e.groupOffsetTree)}function lf({index:e},t){return t===e?0:t<e?-1:1}function UF(){return{groupIndices:[],groupOffsetTree:ti(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ti()}}function KF(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=rn(e,0,i);continue}const s=Bs(e,a-1,o+1);if(s.some(eL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=nf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=rn(e,o+1,p));c&&(e=rn(e,a,i))}return[e,n]}function YF(e){return typeof e.groupIndex<"u"}function GF({offset:e},t){return t===e?0:t<e?-1:1}function sa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=U0(t,e,lf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function K0(e,t){if(!Ws(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Y0(e,t,n){if(YF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=K0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function ZF(e,t,n,r=0){return r>0&&(t=Math.max(t,U0(e,r,lf).offset)),j0(qF(e,t,n,GF),JF)}function XF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,nn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>rn(rn(m,g,p),g+1,f),a)}else[a,s]=KF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=cf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>rn(p,f,sa(f,d,o)),ti()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function QF(e){return Qr(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 G0(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function cf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Hs(o,t-1,lf),s=o[l].offset;const c=Sn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Bs(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 JF(e){return{index:e.index,value:e}}function eL(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 tL={offsetHeight:"height",offsetWidth:"width"},jn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=Re(),r=Re(),o=Ht(r,0),i=Re(),a=Re(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,T)=>Tn(w,tL[T])),p=se(void 0),f=se(0),m=UF(),g=Ht(re(n,Le(l,e,f),Vn(XF,m),ut()),m),h=Ht(re(l,ut(),Vn((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);xe(re(l,ke(w=>w.length>0),Le(g,f),pe(([w,T,C])=>{const k=w.reduce((_,A,L)=>rn(_,A,sa(A,T.offsetTree,C)||L),ti());return{...T,groupIndices:w,groupOffsetTree:k}})),g),xe(re(r,Le(g),ke(([w,{lastIndex:T}])=>w<T),pe(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),xe(c,u);const y=Ht(re(c,pe(w=>w===void 0)),!0);xe(re(u,ke(w=>w!==void 0&&ot(Rt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const x=tn(re(n,Le(g),Vn(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),pe(w=>w.changed)));tt(re(s,Vn((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:T}=Rt(g);if(w>0)De(t,!0),De(i,w+G0(w,T));else if(w<0){const C=Rt(h);C.length>0&&(w-=G0(-w,C)),De(a,w)}}),tt(re(s,Le(e)),([w,T])=>{w<0&&T("`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},nn.ERROR)});const b=tn(i);xe(re(i,Le(g),pe(([w,T])=>{const C=T.groupIndices.length>0,k=[],_=T.lastSize;if(C){const A=ia(T.sizeTree,0);let L=0,N=0;for(;L<w;){const I=T.groupIndices[N],M=T.groupIndices.length===N+1?1/0:T.groupIndices[N+1]-I-1;k.push({endIndex:I,size:A,startIndex:I}),k.push({endIndex:I+1+M-1,size:_,startIndex:I+1}),N++,L+=M+1}const $=Qr(T.sizeTree);return L!==w&&$.shift(),$.reduce((I,{k:M,v:D})=>{let V=I.ranges;return I.prevSize!==0&&(V=[...I.ranges,{endIndex:M+w-1,size:I.prevSize,startIndex:I.prevIndex}]),{prevIndex:M+w,prevSize:D,ranges:V}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return Qr(T.sizeTree).reduce((A,{k:L,v:N})=>({prevIndex:L+w,prevSize:N,ranges:[...A.ranges,{endIndex:L+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:_,ranges:[]}).ranges})),n);const S=tn(re(a,Le(g,f),pe(([w,{offsetTree:T},C])=>{const k=-w;return sa(k,T,C)})));return xe(re(a,Le(g,f),pe(([w,T,C])=>{if(T.groupIndices.length>0){if(ot(T.sizeTree))return T;let k=ti();const _=Rt(h);let A=0,L=0,N=0;for(;A<-w;){N=_[L];const $=_[L+1]-N-1;L++,A+=$+1}if(k=Qr(T.sizeTree).reduce(($,{k:I,v:M})=>rn($,Math.max(0,I+w),M),k),A!==-w){const $=ia(T.sizeTree,N);k=rn(k,0,$);const I=Sn(T.sizeTree,-w+1)[1];k=rn(k,1,I)}return{...T,sizeTree:k,...cf(T.offsetTree,0,k,C)}}else{const k=Qr(T.sizeTree).reduce((_,{k:A,v:L})=>rn(_,Math.max(0,A+w),L),ti());return{...T,sizeTree:k,...cf(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},ct(yr,sf),{singleton:!0});function nL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Z0=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Re(),a=Re(),s=tn(re(i,pe(nL)));return xe(re(s,pe(l=>l.totalCount)),n),xe(re(s,pe(l=>l.groupIndices)),e),xe(re(_t(o,t,r),ke(([l,c])=>Ws(c)),pe(([l,c,u])=>Sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ut(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ct(jn,Ut)),br=Ye(([{log:e}])=>{const t=se(!1),n=tn(re(t,ke(r=>r),ut()));return tt(t,r=>{r&&Rt(e)("props updated",{},nn.DEBUG)}),{didMount:n,propsReady:t}},ct(yr),{singleton:!0}),rL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function X0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!rL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const la=Ye(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Re(),m=Re(),g=se(0);let h=null,y=null,x=null;function b(){h&&(h(),h=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),De(l,!1)}return xe(re(f,Le(n,d,r,g,s,a,p),Le(e,i,o),pe(([[S,w,T,C,k,_,A,L],N,$,I])=>{const M=X0(S),{align:D,behavior:V,offset:F}=M,H=C-1,O=Y0(M,w,H);let B=sa(O,w.offsetTree,N)+_;D==="end"?(B+=$+Sn(w.sizeTree,O)[1]-T+I,O===H&&(B+=A)):D==="center"?B+=($+Sn(w.sizeTree,O)[1]-T+I)/2:B-=k,F&&(B+=F);const X=Q=>{b(),Q?(L("retrying to scroll to",{location:S},nn.DEBUG),De(f,S)):(De(m,!0),L("list did not change, scroll successful",{},nn.DEBUG))};if(b(),V==="smooth"){let Q=!1;x=tt(t,J=>{Q=Q||J}),h=Fn(u,()=>{X(Q)})}else h=Fn(re(t,oL(150)),X);return y=setTimeout(()=>{b()},1200),De(l,!0),L("scrolling from index to",{behavior:V,index:O,top:B},nn.DEBUG),{behavior:V,top:B}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ct(jn,Ut,yr),{singleton:!0});function oL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function uf(e,t){e==0?t():requestAnimationFrame(()=>{uf(e-1,t)})}function df(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ca=Ye(([{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(re(a,Le(l),ke(([u,d])=>!!d),Ln(!1)),s),xe(re(a,Le(l),ke(([u,d])=>!!d),Ln(!1)),c),tt(re(_t(t,a),Le(s,n,e,c),ke(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||Qd(f))&&!d&&!m),Le(l)),([,u])=>{Fn(o,()=>{De(c,!0)}),uf(4,()=>{Fn(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ct(jn,Ut,la,br),{singleton:!0});function Q0(e,t){return Math.abs(e-t)<1.01}const ua="up",da="down",iL="none",aL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},sL=0,fa=Ye(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=Re(),c=Re(),u=se(4),d=se(sL),p=Ht(re(L0(re(Ae(o),ei(1),Ln(!0)),re(Ae(o),ei(1),Ln(!1),N0(100))),ut()),!1),f=Ht(re(L0(re(n,Ln(!0)),re(n,Ln(!1),N0(200))),ut()),!1);xe(re(_t(Ae(o),Ae(d)),pe(([x,b])=>x<=b),ut()),s),xe(re(s,vr(50)),c);const m=tn(re(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),Vn((x,[{scrollHeight:b,scrollTop:S},w,T,C,k])=>{const _=S+w-b>-k,A={scrollHeight:b,scrollTop:S,viewportHeight:w};if(_){let N,$;return S>x.state.scrollTop?(N="SCROLLED_DOWN",$=x.state.scrollTop-S):(N="SIZE_DECREASED",$=x.state.scrollTop-S||x.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:A}}let L;return A.scrollHeight>x.state.scrollHeight?L="SIZE_INCREASED":w<x.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":S<x.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:A}},aL),ut((x,b)=>x&&x.atBottom===b.atBottom))),g=Ht(re(r,Vn((x,{scrollHeight:b,scrollTop:S,viewportHeight:w})=>{if(Q0(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const T=b-(S+w)<1;return x.scrollTop!==S&&T?{changed:!0,jump:x.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ke(x=>x.changed),pe(x=>x.jump)),0);xe(re(m,pe(x=>x.atBottom)),a),xe(re(a,vr(50)),l);const h=se(da);xe(re(r,pe(({scrollTop:x})=>x),ut(),Vn((x,b)=>Rt(f)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?ua:da,prevScrollTop:b},{direction:da,prevScrollTop:0}),pe(x=>x.direction)),h),xe(re(r,vr(50),Ln(iL)),h);const y=se(0);return xe(re(p,ke(x=>!x),Ln(0)),y),xe(re(o,vr(100),Le(p),ke(([x,b])=>!!b),Vn(([x,b],[S])=>[b,S],[0,0]),pe(([x,b])=>b-x)),y),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},ct(Ut)),qs="top",Us="bottom",J0="none";function ew(e,t,n){return typeof e=="number"?n===ua&&t===qs||n===da&&t===Us?e:0:n===ua?t===qs?e.main:e.reverse:t===Us?e.main:e.reverse}function tw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const ff=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Re(),a=se(0),s=se(0),l=se(0),c=Ht(re(_t(Ae(r),Ae(o),Ae(n),Ae(i,aa),Ae(l),Ae(a),Ae(t),Ae(e),Ae(s)),pe(([u,d,p,[f,m],g,h,y,x,b])=>{const S=u-x,w=h+y,T=Math.max(p-S,0);let C=J0;const k=tw(b,qs),_=tw(b,Us);return f-=x,f+=p+y,m+=p+y,m-=x,f>u+w-k&&(C=ua),m<u-T+d+_&&(C=da),C!==J0?[Math.max(S-p-ew(g,qs,C)-k,0),S-T-y+d+ew(g,Us,C)+_]:null}),ke(u=>u!=null),ut(aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ct(Ut),{singleton:!0});function lL(e,t,n){if(Ws(t)){const r=K0(e,t);return[{index:Sn(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 pf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ks(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:rw(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:rw(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function nw(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=df(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Ks(c,[],s,o,n,r)}function rw(e,t,n){if(e.length===0)return[];if(!Ws(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=Bs(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 Jr=Ye(([{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),y=Re();xe(i.topItemsIndexes,g);const x=Ht(re(_t(f,m,Ae(l,aa),Ae(o),Ae(r),Ae(c),u,Ae(g),Ae(t),Ae(n),e),ke(([T,C,,k,,,,,,,_])=>{const A=_&&_.length!==k;return T&&!C&&!A}),pe(([,,[T,C],k,_,A,L,N,$,I,M])=>{const D=_,{offsetTree:V,sizeTree:F}=D,H=Rt(h);if(k===0)return{...pf,totalCount:k};if(T===0&&C===0)return H===0?{...pf,totalCount:k}:nw(H,A,_,$,I,M||[]);if(ot(F))return H>0?null:Ks(lL(df(A,k),D,M),[],k,I,D,$);const O=[];if(N.length>0){const G=N[0],Y=N[N.length-1];let Z=0;for(const j of Bs(F,G,Y)){const z=j.value,K=Math.max(j.start,G),ie=Math.min(j.end,Y);for(let R=K;R<=ie;R++)O.push({data:M==null?void 0:M[R],index:R,offset:Z,size:z}),Z+=z}}if(!L)return Ks([],O,k,I,D,$);const B=N.length>0?N[N.length-1]+1:0,X=ZF(V,T,C,B);if(X.length===0)return null;const Q=k-1,J=zs([],G=>{for(const Y of X){const Z=Y.value;let j=Z.offset,z=Y.start;const K=Z.size;if(Z.offset<T){z+=Math.floor((T-Z.offset+I)/(K+I));const R=z-Y.start;j+=R*K+R*I}z<B&&(j+=(B-z)*K,z=B);const ie=Math.min(Y.end,Q);for(let R=z;R<=ie&&!(j>=C);R++)G.push({data:M==null?void 0:M[R],index:R,offset:j,size:K}),j+=K+I}});return Ks(J,O,k,I,D,$)}),ke(T=>T!==null),ut()),pf);xe(re(e,ke(Qd),pe(T=>T==null?void 0:T.length)),o),xe(re(x,pe(T=>T.topListHeight)),d),xe(d,s),xe(re(x,pe(T=>[T.top,T.bottom])),a),xe(re(x,pe(T=>T.items)),y);const b=tn(re(x,ke(({items:T})=>T.length>0),Le(o,e),ke(([{items:T},C])=>T[T.length-1].originalIndex===C-1),pe(([,T,C])=>[T-1,C]),ut(aa),pe(([T])=>T))),S=tn(re(x,vr(200),ke(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),pe(({items:T})=>T[0].index),ut())),w=tn(re(x,ke(({items:T})=>T.length>0),pe(({items:T})=>{let C=0,k=T.length-1;for(;T[C].type==="group"&&C<k;)C++;for(;T[k].type==="group"&&k>C;)k--;return{endIndex:T[k].index,startIndex:T[C].index}}),ut(q0)));return{endReached:b,initialItemCount:h,itemsRendered:y,listState:x,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},ct(jn,Z0,ff,ca,la,fa,br,sf),{singleton:!0}),ow=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Re(),a=Ht(re(_t(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ae(a),i),{totalListHeight:a,totalListHeightChanged:i}},ct(Ut,Jr),{singleton:!0}),cL=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Ht(re(_t(n,e,t),ke(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),vr(0),ut()),0);return{alignToBottom:n,paddingTopAddition:r}},ct(Ut,ow),{singleton:!0});function iw(e){return e?e==="smooth"?"smooth":"auto":!1}const uL=(e,t)=>typeof e=="function"?iw(e(t)):t&&iw(e),dL=Ye(([{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=Re();let p=null;function f(g){De(o,{align:"end",behavior:g,index:"LAST"})}tt(re(_t(re(Ae(t),ei(1)),a),Le(Ae(u),r,i,c),pe(([[g,h],y,x,b,S])=>{let w=h&&b,T="auto";return w&&(T=uL(y,x||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),ke(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Fn(e,()=>{Rt(l)("following output to ",{totalCount:h},nn.DEBUG),f(g),p=null})});function m(g){const h=Fn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rt(l)("scrolling to bottom due to increased size",{},nn.DEBUG),f("auto"))});setTimeout(h,100)}return tt(re(_t(Ae(u),t,s),ke(([g,,h])=>g&&h),Vn(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),ke(({refreshed:g})=>g),Le(u,t)),([,g])=>{Rt(i)&&m(g!==!1)}),tt(d,()=>{m(Rt(u)!==!1)}),tt(_t(Ae(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ct(jn,fa,la,ca,br,yr,Ut)),fL=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Le(i),ke(([,l])=>l!==0),Le(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>nw(l,c,u,d,p,f))),a),{}),ct(jn,ca,Jr,br),{singleton:!0}),pL=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return tt(re(e,Le(r),ke(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Fn(re(n,ei(1),ke(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},ct(br,Ut,Jr),{singleton:!0}),hL=({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,mL=Ye(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Re();return xe(re(u,Le(t,l,n,i,o,r,s),Le(e),pe(([[d,p,f,m,g,h,y,x],b])=>{const{align:S,behavior:w,calculateViewLocation:T=hL,done:C,...k}=d,_=Y0(d,p,m-1),A=sa(_,p.offsetTree,b)+g+h,L=A+Sn(p.sizeTree,_)[1],N=x+h,$=x+f-y,I=T({itemBottom:L,itemTop:A,locationParams:{align:S,behavior:w,...k},viewportBottom:$,viewportTop:N});return I?C&&Fn(re(a,ke(M=>!M),ei(Rt(a)?1:2)),C):C&&C(),I}),ke(d=>d!==null)),c),{scrollIntoView:u}},ct(jn,Ut,la,Jr,yr),{singleton:!0}),aw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=Re(),r=se(!1);return xe(re(e,Le(r,t,n),ke(([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}),ut()),t),tt(re(_t(t,e,n),Le(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ct(fa),{singleton:!0}),hf=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=Re(),r=Re(),o=Re(),i=se(!1),a=se(void 0);return xe(re(_t(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(re(t,Le(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ct(Ut)),gL=Ye(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Re(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),tt(re(c,Le(t,r,a,d,p,n)),([f,m,g,h,y,x,b])=>{const S=QF(m.sizeTree);h&&y!==null&&x!==null&&(g=y.scrollTop-x.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),xe(re(u,ke(Qd),pe(vL)),o),xe(re(i,Le(u),ke(([,f])=>f!==void 0),ut(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ct(jn,Ut,ca,br,hf));function vL(e){return{align:"start",index:0,offset:e.scrollTop}}const yL=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,ke(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ct(Jr));function sw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const bL=sw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),xL=Ye(([{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=tn(re(l,Le(a),Vn(([,y,x,b],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const _=S+T;let A=0;return x===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(A=_-b,A!==0&&(A+=k))),[A,w,C,_]},[0,[],0,0]),ke(([y])=>y!==0),Le(r,s,n,o,f,m),ke(([,y,x,b,,,S])=>!S&&!b&&y!==0&&x===ua),pe(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},nn.DEBUG),y))));function h(y){y>0?(De(t,{behavior:"auto",top:-y}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-y}))}return tt(re(g,Le(e,i)),([y,x,b])=>{b&&bL()?De(e,x-y):h(-y)}),tt(re(_t(Ht(i,!1),e,m),ke(([y,x,b])=>!y&&!b&&x!==0),pe(([y,x])=>x),vr(1)),h),xe(re(d,pe(y=>({top:-y}))),t),tt(re(c,Le(p,u),pe(([y,{groupIndices:x,lastSize:b,sizeTree:S},w])=>{function T(C){return C*(b+w)}if(x.length===0)return T(y);{let C=0;const k=ia(S,0);let _=0,A=0;for(;_<y;){_++,C+=k;let L=x.length===A+1?1/0:x[A+1]-x[A]-1;_+L>y&&(C-=k,L=y-_+1),_+=L,C+=T(L),A++}return C}})),y=>{De(e,y),requestAnimationFrame(()=>{De(t,{top:y}),requestAnimationFrame(()=>{De(e,0),De(m,!1)})})}),{deviation:e}},ct(Ut,fa,Jr,jn,yr,sf)),wL=Ye(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ct(ff,fL,br,aw,ow,pL,cL,hf,mL,yr)),lw=Ye(([{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,y,{listState:x,topItemsIndexes:b,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},_])=>(xe(S.rangeChanged,_.scrollSeekRangeChanged),xe(re(_.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,...y,groupIndices:i,itemSize:a,listState:x,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,..._,...g,sizes:l,...h}),ct(jn,ca,Ut,gL,dL,Jr,la,xL,yL,Z0,wL));function SL(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 Ys=typeof document<"u"?E.useLayoutEffect:E.useEffect;function mf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,y){h.propsReady&&De(h.propsReady,!1);for(const x of r){const b=h[t.required[x]];De(b,y[x])}for(const x of o)if(x in y){const b=h[t.optional[x]];De(b,y[x])}h.propsReady&&De(h.propsReady,!0)}function c(h){return i.reduce((y,x)=>(y[x]=b=>{const S=h[t.methods[x]];De(S,b)},y),{})}function u(h){return a.reduce((y,x)=>(y[x]=$F(h[t.events[x]]),y),{})}const d=E.forwardRef((h,y)=>{const{children:x,...b}=h,[S]=E.useState(()=>zs(zF(e),C=>{l(C,b)})),[w]=E.useState(M0(u,S));Ys(()=>{for(const C of a)C in b&&tt(w[C],b[C]);return()=>{Object.values(w).map(Jd)}},[b,w,S]),Ys(()=>{l(S,b)}),E.useImperativeHandle(y,O0(c(S)));const T=n;return v.jsx(s.Provider,{value:S,children:n?v.jsx(T,{...SL([...r,...o,...a],b),children:x}):x})}),p=h=>E.useCallback(D0(De,E.useContext(s)[h]),[h]),f=h=>{const y=E.useContext(s)[h],x=E.useCallback(b=>tt(y,b),[y]);return E.useSyncExternalStore(x,()=>Rt(y),()=>Rt(y))},m=h=>{const y=E.useContext(s)[h],[x,b]=E.useState(M0(Rt,y));return Ys(()=>tt(y,S=>{S!==x&&b(O0(S))}),[y,x]),x},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,y)=>{const x=E.useContext(s)[h];Ys(()=>tt(x,y),[y,x])},useEmitterValue:g,usePublisher:p}}const Gs=E.createContext(void 0),cw=E.createContext(void 0),uw=typeof document<"u"?E.useLayoutEffect:E.useEffect;function gf(e){return"self"in e}function TL(e){return"body"in e}function dw(e,t,n,r=Jo,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(TL(h)||gf(h)){const x=gf(h)?h:h.defaultView;g=i?x.scrollX:x.scrollY,f=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,m=i?x.innerWidth:x.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?y():vi.flushSync(y),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,y;gf(f)?(h=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=Tn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const x=h-g;if(p.top=Math.ceil(Math.max(Math.min(x,p.top),0)),Q0(g,h)||p.top===y){e({scrollHeight:h,scrollTop:y,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 vf="-webkit-sticky",fw="sticky",pw=sw(()=>{if(typeof document>"u")return fw;const e=document.createElement("div");return e.style.position=vf,e.style.position===vf?vf:fw});function yf(e){return e}const EL=Ye(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(yf),i=se("div"),a=se(Jo),s=(l,c=null)=>Ht(re(r,pe(u=>u[l]),ut()),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")}}),CL=Ye(([e,t])=>({...e,...t}),ct(lw,EL)),kL=({height:e})=>v.jsx("div",{style:{height:e}}),AL={overflowAnchor:"none",position:pw(),zIndex:1},hw={overflowAnchor:"none"},PL={...hw,display:"inline-block",height:"100%"},mw=E.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=hn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=hn("windowScrollContainerState"),a=hn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),p=Ie("itemSize"),f=Ie("log"),m=hn("gap"),g=Ie("horizontalDirection"),{callbackRef:h}=V0(n,p,d,e?Jo:s,f,m,o,g,Ie("skipAnimationFrameInResizeObserver")),[y,x]=E.useState(0);wf("deviation",I=>{y!==I&&x(I)});const b=Ie("EmptyPlaceholder"),S=Ie("ScrollSeekPlaceholder")||kL,w=Ie("ListComponent"),T=Ie("ItemComponent"),C=Ie("GroupComponent"),k=Ie("computeItemKey"),_=Ie("isSeeking"),A=Ie("groupIndices").length>0,L=Ie("alignToBottom"),N=Ie("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:L?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:L?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?v.jsx(b,{...dt(b,c)}):v.jsx(w,{...dt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(I=>{const M=I.originalIndex,D=k(M+t.firstItemIndex,I.data,c);return _?E.createElement(S,{...dt(S,c),height:I.size,index:I.index,key:D,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?E.createElement(C,{...dt(C,c),"data-index":M,"data-item-index":I.index,"data-known-size":I.size,key:D,style:AL},u(I.index,c)):E.createElement(T,{...dt(T,c),...gw(T,I.data),"data-index":M,"data-item-group-index":I.groupIndex,"data-item-index":I.index,"data-known-size":I.size,key:D,style:g?PL:hw},A?l(I.index,I.groupIndex,I.data,c):l(I.index,I.data,c))})})}),IL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},_L={outline:"none",overflowX:"auto",position:"relative"},ni=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),OL={position:pw(),top:0,width:"100%",zIndex:1};function dt(e,t){if(typeof e!="string")return{context:t}}function gw(e,t){return{item:typeof e=="string"?void 0:t}}const ML=E.memo(function(){const e=Ie("HeaderComponent"),t=hn("headerHeight"),n=Ie("HeaderFooterTag"),r=$n(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),DL=E.memo(function(){const e=Ie("FooterComponent"),t=hn("footerHeight"),n=Ie("HeaderFooterTag"),r=$n(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null});function bf({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}=dw(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),v.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?_L:IL,...o},tabIndex:0,...i,...dt(s,u),children:r})})}function xf({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:y}=dw(a,l,s,m,d);return uw(()=>{var x;return h.current=d||((x=f.current)==null?void 0:x.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",y),e("scrollBy",g),v.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...dt(s,p),children:r})})}const NL=({children:e})=>{const t=E.useContext(Gs),n=hn("viewportHeight"),r=hn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=E.useMemo(()=>ra(n,l=>Tn(l,i?"width":"height")),[n,i]),s=$n(a,!0,Ie("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:s,style:ni(o),children:e})},FL=({children:e})=>{const t=E.useContext(Gs),n=hn("windowViewportRect"),r=hn("fixedItemHeight"),o=Ie("customScrollParent"),i=tf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:ni(a),children:e})},LL=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...OL,marginTop:`${n}px`},o=Ie("context");return v.jsx(t,{style:r,...dt(t,o),children:e})},VL=E.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?zL:jL,a=r||t?FL:NL;return v.jsxs(i,{...e,...dt(i,o),children:[n&&v.jsx(LL,{children:v.jsx(mw,{showTopList:!0})}),v.jsxs(a,{children:[v.jsx(ML,{}),v.jsx(mw,{}),v.jsx(DL,{})]})]})}),{Component:$L,useEmitter:wf,useEmitterValue:Ie,usePublisher:hn}=mf(CL,{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:{}},VL),jL=bf({useEmitter:wf,useEmitterValue:Ie,usePublisher:hn}),zL=xf({useEmitter:wf,useEmitterValue:Ie,usePublisher:hn}),Sf=$L,BL=Ye(()=>{const e=se(l=>v.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(yf),a=se(Jo),s=(l,c=null)=>Ht(re(o,pe(u=>u[l]),ut()),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")}}),RL=Ye(([e,t])=>({...e,...t}),ct(lw,BL)),HL=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{height:e}})}),WL=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{border:0,height:e,padding:0}})}),qL={overflowAnchor:"none"},vw=E.memo(function({showTopList:e=!1}){const t=Ve("listState"),n=Ve("computeItemKey"),r=Ve("firstItemIndex"),o=Ve("isSeeking"),i=Ve("ScrollSeekPlaceholder")||HL,a=Ve("context"),s=Ve("TableRowComponent"),l=Ve("fixedHeaderHeight"),c=Ve("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,{...dt(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...dt(s,a),...gw(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}:qL},c(p.index,p.data,a))});return v.jsx(v.Fragment,{children:d})}),UL=E.memo(function(){const e=Ve("listState"),t=Ve("topItemsIndexes").length>0,n=En("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),i=En("windowScrollContainerState"),a=En("scrollContainerState"),s=o||r?i:a,l=Ve("trackItemSizes"),c=Ve("itemSize"),u=Ve("log"),{callbackRef:d,ref:p}=V0(n,c,l,s,u,void 0,o,!1,Ve("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Tf("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=Ve("EmptyPlaceholder"),h=Ve("FillerRow")||WL,y=Ve("TableBodyComponent"),x=Ve("paddingTopAddition"),b=Ve("statefulTotalCount"),S=Ve("context");if(b===0&&g)return v.jsx(g,{...dt(g,S)});const w=(t?e.topItems:[]).reduce((A,L)=>A+L.size,0),T=e.offsetTop+x+f-w,C=e.offsetBottom,k=T>0?v.jsx(h,{context:S,height:T},"padding-top"):null,_=C>0?v.jsx(h,{context:S,height:C},"padding-bottom"):null;return v.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...dt(y,S),children:[k,t&&v.jsx(vw,{showTopList:!0}),v.jsx(vw,{}),_]})}),KL=({children:e})=>{const t=E.useContext(Gs),n=En("viewportHeight"),r=En("fixedItemHeight"),o=$n(E.useMemo(()=>ra(n,i=>Tn(i,"height")),[n]),!0,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:o,style:ni(!1),children:e})},YL=({children:e})=>{const t=E.useContext(Gs),n=En("windowViewportRect"),r=En("fixedItemHeight"),o=Ve("customScrollParent"),i=tf(n,o,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:ni(!1),children:e})},GL=E.memo(function(e){const t=Ve("useWindowScroll"),n=Ve("customScrollParent"),r=En("fixedHeaderHeight"),o=En("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),s=Ve("context"),l=$n(E.useMemo(()=>ra(r,y=>Tn(y,"height")),[r]),!0,Ve("skipAnimationFrameInResizeObserver")),c=$n(E.useMemo(()=>ra(o,y=>Tn(y,"height")),[o]),!0,Ve("skipAnimationFrameInResizeObserver")),u=n||t?QL:XL,d=n||t?YL:KL,p=Ve("TableComponent"),f=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),g=i?v.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...dt(f,s),children:i()},"TableHead"):null,h=a?v.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...dt(m,s),children:a()},"TableFoot"):null;return v.jsx(u,{...e,...dt(u,s),children:v.jsx(d,{children:v.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...dt(p,s),children:[g,v.jsx(UL,{},"TableBody"),h]})})})}),{Component:ZL,useEmitter:Tf,useEmitterValue:Ve,usePublisher:En}=mf(RL,{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:{}},GL),XL=bf({useEmitter:Tf,useEmitterValue:Ve,usePublisher:En}),QL=xf({useEmitter:Tf,useEmitterValue:Ve,usePublisher:En}),JL=ZL,yw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},eV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:bw,floor:Zs,max:pa,min:Ef,round:xw}=Math;function ww(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function tV(e){return{...eV,items:e}}function Xs(e,t){return e&&e.width===t.width&&e.height===t.height}function nV(e,t){return e&&e.column===t.column&&e.row===t.row}const rV=Ye(([{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:y,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S},w])=>{const T=se(0),C=se(0),k=se(yw),_=se({height:0,width:0}),A=se({height:0,width:0}),L=Re(),N=Re(),$=se(0),I=se(null),M=se({column:0,row:0}),D=Re(),V=Re(),F=se(!1),H=se(0),O=se(!0),B=se(!1),X=se(!1);tt(re(m,Le(H),ke(([j,z])=>!!z)),()=>{De(O,!1)}),tt(re(_t(m,O,A,_,H,B),ke(([j,z,K,ie,,R])=>j&&!z&&K.height!==0&&ie.height!==0&&!R)),([,,,,j])=>{De(B,!0),uf(1,()=>{De(L,j)}),Fn(re(c),()=>{De(t,[0,0]),De(O,!0)})}),xe(re(V,ke(j=>j!=null&&j.scrollTop>0),Ln(0)),C),tt(re(m,Le(V),ke(([,j])=>j!=null)),([,j])=>{j&&(De(_,j.viewport),De(A,j.item),De(M,j.gap),j.scrollTop>0&&(De(F,!0),Fn(re(c,ei(1)),z=>{De(F,!1)}),De(l,{top:j.scrollTop})))}),xe(re(_,pe(({height:j})=>j)),d),xe(re(_t(Ae(_,Xs),Ae(A,Xs),Ae(M,(j,z)=>j&&j.column===z.column&&j.row===z.row),Ae(c)),pe(([j,z,K,ie])=>({gap:K,item:z,scrollTop:ie,viewport:j}))),D),xe(re(_t(Ae(T),r,Ae(M,nV),Ae(A,Xs),Ae(_,Xs),Ae(I),Ae(C),Ae(F),Ae(O),Ae(H)),ke(([,,,,,,,j])=>!j),pe(([j,[z,K],ie,R,be,Ee,Pe,,ze,le])=>{const{column:we,row:ce}=ie,{height:Se,width:oe}=R,{width:ue}=be;if(Pe===0&&(j===0||ue===0))return yw;if(oe===0){const Cn=df(le,j),Rn=Cn+Math.max(Pe-1,0);return tV(ww(Cn,Rn,Ee))}const te=Sw(ue,oe,we);let q,ne;ze?z===0&&K===0&&Pe>0?(q=0,ne=Pe-1):(q=te*Zs((z+ce)/(Se+ce)),ne=te*bw((K+ce)/(Se+ce))-1,ne=Ef(j-1,pa(ne,te-1)),q=Ef(ne,pa(0,q))):(q=0,ne=-1);const he=ww(q,ne,Ee),{bottom:Me,top:qe}=Tw(be,ie,R,he),Qe=bw(j/te),jt=Qe*Se+(Qe-1)*ce-Me;return{bottom:Me,itemHeight:Se,items:he,itemWidth:oe,offsetBottom:jt,offsetTop:qe,top:qe}})),k),xe(re(I,ke(j=>j!==null),pe(j=>j.length)),T),xe(re(_t(_,A,k,M),ke(([j,z,{items:K}])=>K.length>0&&z.height!==0&&j.height!==0),pe(([j,z,{items:K},ie])=>{const{bottom:R,top:be}=Tw(j,ie,z,K);return[be,R]}),ut(aa)),t);const Q=se(!1);xe(re(c,Le(Q),pe(([j,z])=>z||j!==0)),Q);const J=tn(re(_t(k,T),ke(([{items:j}])=>j.length>0),Le(Q),ke(([[j,z],K])=>{const ie=j.items[j.items.length-1].index===z-1;return(K||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===z)&&ie}),pe(([[,j]])=>j-1),ut())),G=tn(re(Ae(k),ke(({items:j})=>j.length>0&&j[0].index===0),Ln(0),ut())),Y=tn(re(Ae(k),Le(F),ke(([{items:j},z])=>j.length>0&&!z),pe(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),ut(q0),vr(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(L,Le(_,A,T,M),pe(([j,z,K,ie,R])=>{const be=X0(j),{align:Ee,behavior:Pe,offset:ze}=be;let le=be.index;le==="LAST"&&(le=ie-1),le=pa(0,le,Ef(ie-1,le));let we=Cf(z,R,K,le);return Ee==="end"?we=xw(we-z.height+K.height):Ee==="center"&&(we=xw(we-z.height/2+K.height/2)),ze&&(we+=ze),{behavior:Pe,top:we}})),l);const Z=Ht(re(k,pe(j=>j.offsetBottom+j.bottom)),0);return xe(re(S,pe(j=>({height:j.visibleHeight,width:j.visibleWidth}))),_),{customScrollParent:h,data:I,deviation:$,footerHeight:o,gap:M,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:L,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:y,viewportDimensions:_,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:X,initialTopMostItemIndex:H,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:D,stateRestoreInProgress:F,...w}},ct(ff,Ut,fa,aw,br,hf,yr));function Sw(e,t,n){return pa(1,Zs((e+n)/(Zs(t)+n)))}function Tw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Cf(e,t,n,r[0].index);return{bottom:Cf(e,t,n,r[r.length-1].index)+o,top:i}}function Cf(e,t,n,r){const o=Sw(e.width,n.width,t.column),i=Zs(r/o),a=i*n.height+pa(0,i-1)*t.row;return a>0?a+t.row:a}const oV=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(yf),a=se("div"),s=se(Jo),l=(d,p=null)=>Ht(re(t,pe(f=>f[d]),ut()),p),c=se(!1),u=se(!1);return xe(Ae(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")}}),iV=Ye(([e,t])=>({...e,...t}),ct(rV,oV)),aV=E.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=mn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=mn("itemDimensions"),p=mn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=mn("reportReadyState"),h=$n(E.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const b=y.firstChild;if(b){const{height:S,width:w}=b.getBoundingClientRect();d({height:S,width:w})}p({column:Cw("column-gap",getComputedStyle(y).columnGap,f),row:Cw("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return uw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:v.jsx(l,{className:t,ref:h,...dt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const x=o(y.index,y.data,u);return i?v.jsx(c,{...dt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},x):E.createElement(s,{...dt(s,u),className:n,"data-index":y.index,key:x},r(y.index,y.data,u))})})}),sV=E.memo(function(){const e=ht("HeaderComponent"),t=mn("headerHeight"),n=ht("headerFooterTag"),r=$n(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=ht("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),lV=E.memo(function(){const e=ht("FooterComponent"),t=mn("footerHeight"),n=ht("headerFooterTag"),r=$n(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=ht("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),cV=({children:e})=>{const t=E.useContext(cw),n=mn("itemDimensions"),r=mn("viewportDimensions"),o=$n(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]),v.jsx("div",{ref:o,style:ni(!1),children:e})},uV=({children:e})=>{const t=E.useContext(cw),n=mn("windowViewportRect"),r=mn("itemDimensions"),o=ht("customScrollParent"),i=tf(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]),v.jsx("div",{ref:i,style:ni(!1),children:e})},dV=E.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?pV:fV,o=n||t?uV:cV,i=ht("context");return v.jsx(r,{...e,...dt(r,i),children:v.jsxs(o,{children:[v.jsx(sV,{}),v.jsx(aV,{}),v.jsx(lV,{})]})})}),{useEmitter:Ew,useEmitterValue:ht,usePublisher:mn}=mf(iV,{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"}},dV),fV=bf({useEmitter:Ew,useEmitterValue:ht,usePublisher:mn}),pV=xf({useEmitter:Ew,useEmitterValue:ht,usePublisher:mn});function Cw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nn.WARN),t==="normal"?0:parseInt(t??"0",10)}const kf=()=>{const e=E.useContext(Mo);return e?e.tweaks:ls},kw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>v.jsxs("span",{className:Ce("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:v.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?v.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?v.jsx(Xd,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:v.jsx("span",{className:"cursor-help",children:v.jsx(ry,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:v.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?v.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[v.jsx(Qv,{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}),v.jsx(TI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),ha=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:y=!1,required:x,disabled:b,reportStatus:S},w)=>{const T=kf(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,_=Et(),A=e??_.inputOptionalLabel;return v.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:Ce("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[v.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:[v.jsx(kw,{info:s,hideLeft:y,reportStatus:C,title:m,placeholder:h,children:A||n?v.jsxs(E.Fragment,{children:[x?null:v.jsx("span",{"aria-disabled":b,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:A}),n?v.jsx(E.Fragment,{children:n}):null]}):null}),v.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?v.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?v.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),v.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}),v.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})]})}),hV=e=>v.jsx(E.Fragment,{children:e.children}),mV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},gV=[],vV=E.forwardRef(function(t,n){return v.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(er,{children:t.children})})}),yV=E.forwardRef(function({item:t,context:n,...r},o){return v.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),bV={List:vV,Item:yV},ri=40,xV=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 y=E.useRef(null),x=E.useRef(null),b=E.useRef(null),S=g.value??g.defaultValue??"",w=Et(),[T,C]=E.useState(()=>Math.min(320,ri*o.length)),[k,_]=E.useState(!1),[A,L]=E.useState(""),[N,$]=E.useState(S),[I,M]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===S))==null?void 0:oe.label)??S}),[D,V]=E.useState(null),F=E.useRef(gV),H=Kd(k,"block-only"),O=m&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,B=A?qd(O,"value",[{key:"value",value:A},{key:"label",value:A}]):O,X=()=>{_(!1),C(0)},Q=B.filter(oe=>oe.hidden!==!0),J=m?void 0:`^(${o.map(oe=>`${Gu(oe.value)}${oe.label?"|"+Gu(oe.label):""}`).join("|")})$`,{x:G,y:Y,strategy:Z,refs:j,context:z}=hr({open:k,transform:!0,onOpenChange:_,placement:"bottom-start",whileElementsMounted:Ro,middleware:[Xi(4),Dx({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),te=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=bi(j.reference.current,window.innerHeight),ne=Math.min(te<ri?q:te,q,oe.availableHeight),he=Q.length===0?ri:Math.min(ne,q,te),Me=`${x.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Me,maxWidth:Me,height:he})}})]}),K=m0(z,mV),{getReferenceProps:ie,getFloatingProps:R,getItemProps:be}=mr([Xr(z,{role:"listbox"}),Zr(z),Fs(z,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:D,selectedIndex:D,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);$((oe==null?void 0:oe.label)??g.value)}},[g.value,o.length]),E.useEffect(()=>{if(!k)return C(0);const oe=j.reference;if(oe.current===null)return;const ue=bi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,Q.length*ri)),100)},[A,k,j.reference,Q.length]),E.useEffect(()=>{const oe=j.reference.current;if(oe)return yi(oe)},[]);const Ee=(oe,ue)=>{$(oe.value);const te=j.reference.current;if(!te)return;te==null||te.setAttribute("data-value",oe.value),te.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});te.dispatchEvent(q),g.onChange&&g.onChange(q),M(oe.label??""),X(),L(""),V(ue)},Pe=oe=>{var te;const ue=oe.target.value;return L(ue),!k&&ue===""?_(!0):(oe.target.name=g.name||"",ue?_(!0):(te=g.onChange)==null?void 0:te.call(g,oe))},ze=()=>{var oe;_(!0),L(""),(oe=j.reference.current)==null||oe.focus()},le=()=>{V(oe=>oe===null?0:oe),_(!0),L("")},we=()=>{var oe;(oe=j.reference.current)==null||oe.setAttribute("data-value",""),L(""),$(""),M(""),Lh(j.reference.current),X()},ce=g.id||g.name,Se=Q.length===0;return v.jsxs(ha,{...g,left:e,error:t,ref:x,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:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:ze,children:[v.jsx(ku,{size:20}),v.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?v.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.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:[v.jsx("input",{"data-shadow":"true",...ie({...g,onChange:Pe,onFocus:le,pattern:J,ref:j.setReference,name:`${ce}-shadow`,id:`${ce}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,te;if(oe.key==="Escape")return oe.currentTarget.blur(),X();if(k){if(oe.key==="ArrowDown"){let q=Fe.number(D)?D+1:0;return q>Q.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),V(q)}if(oe.key==="ArrowUp"){let q=Fe.number(D)?D-1:Q.length-1;return q<0&&(q=Q.length-1),(te=b.current)==null||te.scrollIntoView({index:q}),V(q)}if(oe.key==="Enter"){if(D!==null&&Q[D])return oe.preventDefault(),Ee(Q[D],D);if(Q.length===1)return oe.preventDefault(),Ee(Q[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":ce,"data-target":ce,required:f,value:k?A:I||N,"aria-autocomplete":"list",autoComplete:"off",className:Ce("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),v.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||N||void 0}),v.jsx(Yr,{preserveTabOrder:!0,children:k?v.jsx(Go,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs(pt.div,{...R({ref:Hn(H,j.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:Se?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const ue=j.floating.current.querySelectorAll("li").item(0),te=(ue?ue.getBoundingClientRect().height:ri)*Q.length;return vi.flushSync(()=>C(te+2))},children:[Se?v.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,v.jsx(Sf,{overscan:40,ref:b,hidden:Se,data:Q,style:{height:T},defaultItemHeight:ri,components:bV,scrollerRef:oe=>void(y.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const te=ue.Render??hV,q=N===ue.value||N===ue.label,ne=D===oe,he=ue.label??ue.value;return v.jsx("button",{"data-value":ue.value,...be({ref:Me=>void(F.current[oe]=Me),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Ee(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${ne?"bg-floating-hover text-floating-foreground":""}`}),children:v.jsx(te,{...g,label:ue.label,value:ue.value,children:he})})}})]})}):null})]})}),Af=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 v.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ce("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[v.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ce("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,v.jsx("span",{"data-name":"checkbox-label",className:Ce("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Aw=(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:y=!1,loading:x,...b},S)=>{const w=e,T=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,_=yi(C.current),A=r==null?void 0:r(k),L=N=>{const $=N;if($.key==="Enter"&&k.enterKeyHint==="next"){const I=k.getAttribute("data-next");if(I){const M=document.getElementById(I);if(M)return M.focus(),void $.preventDefault()}}};return k.addEventListener("keydown",L),()=>{A==null||A(),_(),k.removeEventListener("keydown",L)}},[]),v.jsx(ha,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:h,hideLeft:y,title:b.title,container:Ce(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:v.jsx(w,{...n,...b,id:T,name:T,type:m,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Hn(S,C),className:Ce("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),ma=Aw(Vy,"input",{type:"text"}),Pw=new Date(1970,11,31),Pf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Iw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},wV={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")},If=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},SV=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Ku(t),l=E.useId(),c=Et(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=If(u,Pw).flatMap(C=>Fe.keyof(Pf,C.type)?Pf[C.type](C.value):[]),h=If(u,Pw).reduce((C,k)=>C+(Fe.keyof(Iw,k.type)?Iw[k.type](k.value):""),""),[y,x]=E.useState(d?If(u,d).reduce((C,k)=>C+(Fe.keyof(Pf,k.type)?wV[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(x(k),g.length===k.length&&g.every((A,L)=>{const N=k.charAt(L);return typeof A=="string"?N===A:A.test(N)})){const A=Ao(jO(k,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),x(C?j_(C,h):"")),w=_u(d),T=w?d.toISOString():void 0;return v.jsx(ma,{...i,mask:g,value:y,id:void 0,name:void 0,"data-value":T,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:v.jsxs(E.Fragment,{children:[v.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),v.jsx(Xo,{open:f,onChange:m,trigger:v.jsxs("span",{"aria-labelledby":l,children:[v.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),v.jsx(wI,{})]}),buttonProps:{"aria-describedby":l},children:v.jsx(ab,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),TV=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],EV=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],CV=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],kV=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_w=(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 AV(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?kV:CV:t.binary?EV:TV,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=_w(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=_w(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Qs={exports:{}},Js={exports:{}},Ze={};/** @license React v16.13.1
222
+ */var d2=["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=d2.join(","),Mx=typeof Element>"u",zo=Mx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ks=!Mx&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Cs=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},f2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Dx=function(t,n,r){if(Cs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&zo.call(t,Es)&&o.unshift(t),o=o.filter(r),o},Nx=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Cs(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=zo.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),h=!Cs(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&h){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},Fx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Lx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||f2(t))&&!Fx(t)?0:t.tabIndex},p2=function(t,n){var r=Lx(t);return r<0&&n&&!Fx(t)?0:r},h2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Vx=function(t){return t.tagName==="INPUT"},m2=function(t){return Vx(t)&&t.type==="hidden"},g2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},v2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},y2=function(t){if(!t.name)return!0;var n=t.form||ks(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=v2(o,t.form);return!i||i===t},b2=function(t){return Vx(t)&&t.type==="radio"},x2=function(t){return b2(t)&&!y2(t)},w2=function(t){var n,r=t&&ks(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=ks(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},$x=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},S2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=zo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(zo.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=ks(t);if(l&&!l.shadowRoot&&o(l)===!0)return $x(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(w2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return $x(t);return!1},T2=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 zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Md=function(t,n){return!(n.disabled||Cs(n)||m2(n)||S2(n,t)||g2(n)||T2(n))},Dd=function(t,n){return!(x2(n)||Lx(n)<0||!Md(t,n))},E2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},k2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=p2(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(h2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ps=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Nx([t],n.includeContainer,{filter:Dd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:E2}):r=Dx(t,n.includeContainer,Dd.bind(null,n)),k2(r)},C2=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Nx([t],n.includeContainer,{filter:Md.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Dx(t,n.includeContainer,Md.bind(null,n)),r},jx=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Es)===!1?!1:Dd(n,t)};function Nd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zx(){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 Rx(){return/apple/i.test(navigator.vendor)}function Fd(){const e=/android/i;return e.test(Nd())||e.test(zx())}function P2(){return Nd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Bx(){return zx().includes("jsdom/")}const Hx="data-floating-ui-focusable",A2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ld="ArrowLeft",Vd="ArrowRight",I2="ArrowUp",_2="ArrowDown";function Ln(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ms(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $d(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 O2(e){return e.matches("html,body")}function jt(e){return e?.ownerDocument||document}function jd(e){return kt(e)&&e.matches(A2)}function zd(e){return e?e.getAttribute("role")==="combobox"&&jd(e):!1}function M2(e){if(!e||Bx())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function As(e){return e?e.hasAttribute(Hx)?e:e.querySelector("["+Hx+"]")||e:null}function Ro(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 D2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Ro(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Wx(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function zt(e){e.preventDefault(),e.stopPropagation()}function N2(e){return"nativeEvent"in e}function qx(e){return e.mozInputSource===0&&e.isTrusted?!0:Fd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ux(e){return Bx()?!1:!Fd()&&e.width===0&&e.height===0||Fd()&&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 Bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var F2=typeof document<"u",L2=function(){},Ue=F2?S.useLayoutEffect:L2;const V2={...P};function Nt(e){const t=P.useRef(e);return Ue(()=>{t.current=e}),t}const $2=V2.useInsertionEffect||(e=>e());function gt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return $2(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Is(e,t,n){return Math.floor(e/t)!==n}function Ki(e,t){return t<0||t>=e.current.length}function Rd(e,t){return Ht(e,{disabledIndices:t})}function Kx(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&_s(e,a,o));return a}function j2(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,h=u;if(n.key===I2){if(d&&zt(n),u===-1)h=c;else if(h=Ht(e,{startingIndex:h,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||h<0)){const f=u%a,b=c%a,m=c-(b-f);b===f?h=c:h=b>f?m:m-a}Ki(e,h)&&(h=u)}if(n.key===_2&&(d&&zt(n),u===-1?h=l:(h=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(h=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Ki(e,h)&&(h=u)),r==="both"){const f=No(u/a);n.key===(i?Ld:Vd)&&(d&&zt(n),u%a!==a-1?(h=Ht(e,{startingIndex:u,disabledIndices:s}),o&&Is(h,a,f)&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),Is(h,a,f)&&(h=u)),n.key===(i?Vd:Ld)&&(d&&zt(n),u%a!==0?(h=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Is(h,a,f)&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Is(h,a,f)&&(h=u));const b=No(c/a)===f;Ki(e,h)&&(o&&b?h=n.key===(i?Vd:Ld)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):h=u)}return h}function z2(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 h=0;h<l;h++)u.push(o+d+h*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function R2(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 B2(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function _s(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Yi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Yx(e,t){const n=Ps(e,Yi()),r=n.length;if(r===0)return;const o=Ln(jt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Gx(e){return Yx(jt(e).body,1)||e}function Zx(e){return Yx(jt(e).body,-1)||e}function Gi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Dt(n,r)}function H2(e){Ps(e,Yi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Xx(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var W2=typeof document<"u",q2=function(){},Os=W2?S.useLayoutEffect:q2;function Ms(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ms(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ms(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Qx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jx(e,t){const n=Qx(e);return Math.round(t*n)/n}function Bd(e){const t=P.useRef(e);return Os(()=>{t.current=e}),t}function U2(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]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=P.useState(r);Ms(h,r)||f(r);const[b,m]=P.useState(null),[p,g]=P.useState(null),y=P.useCallback(A=>{A!==E.current&&(E.current=A,m(A))},[]),x=P.useCallback(A=>{A!==k.current&&(k.current=A,g(A))},[]),T=i||b,w=a||p,E=P.useRef(null),k=P.useRef(null),C=P.useRef(u),M=l!=null,_=Bd(l),F=Bd(o),L=Bd(c),H=P.useCallback(()=>{if(!E.current||!k.current)return;const A={placement:t,strategy:n,middleware:h};F.current&&(A.platform=F.current),tN(E.current,k.current,A).then(j=>{const N={...j,isPositioned:L.current!==!1};I.current&&!Ms(C.current,N)&&(C.current=N,pi.flushSync(()=>{d(N)}))})},[h,t,n,F,L]);Os(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const I=P.useRef(!1);Os(()=>(I.current=!0,()=>{I.current=!1}),[]),Os(()=>{if(T&&(E.current=T),w&&(k.current=w),T&&w){if(_.current)return _.current(T,w,H);H()}},[T,w,H,_,M]);const O=P.useMemo(()=>({reference:E,floating:k,setReference:y,setFloating:x}),[y,x]),V=P.useMemo(()=>({reference:T,floating:w}),[T,w]),D=P.useMemo(()=>{const A={position:n,left:0,top:0};if(!V.floating)return A;const j=Jx(V.floating,u.x),N=Jx(V.floating,u.y);return s?{...A,transform:"translate("+j+"px, "+N+"px)",...Qx(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:N}},[n,s,V.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:H,refs:O,elements:V,floatingStyles:D}),[u,H,O,V,D])}const K2=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?Wb({element:r.current,padding:o}).fn(n):{}:r?Wb({element:r,padding:o}).fn(n):{}}}},Zi=(e,t)=>({...XD(e),options:[e,t]}),Hd=(e,t)=>({...QD(e),options:[e,t]}),Wd=(e,t)=>({...JD(e),options:[e,t]}),e0=(e,t)=>({...eN(e),options:[e,t]}),t0=(e,t)=>({...K2(e),options:[e,t]});function Y2(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const n0=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function G2(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),a=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(Y2).forEach((d,h)=>{c.set(d,h)}),c},[o]);return v.jsx(n0.Provider,{value:P.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function r0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=P.useContext(n0),[s,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var h;const f=t!==void 0;a.current[s]=f?t:(h=d?.textContent)!=null?h:null}},[s,i,a,t]);return Ue(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ue(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const Z2="data-floating-ui-focusable",o0="active",i0="selected",Xi="ArrowLeft",Qi="ArrowRight",a0="ArrowUp",Ds="ArrowDown",X2={...P};let s0=!1,Q2=0;const l0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Q2++;function J2(){const[e,t]=P.useState(()=>s0?l0():void 0);return Ue(()=>{e==null&&t(l0())},[]),P.useEffect(()=>{s0=!0},[]),e}const Ji=X2.useId||J2;let ea;process.env.NODE_ENV!=="production"&&(ea=new Set);function Ns(){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=ea)!=null&&e.has(o))){var i;(i=ea)==null||i.add(o),console.warn(o)}}function eF(){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=ea)!=null&&e.has(o))){var i;(i=ea)==null||i.add(o),console.error(o)}}const c0=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:h,d:f,style:{transform:b,...m}={},...p}=t;process.env.NODE_ENV!=="production"&&(n||Ns("The `ref` prop is required for `FloatingArrow`."));const g=Ji(),[y,x]=P.useState(!1);if(Ue(()=>{if(!o)return;rn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,w]=r.split("-"),E=T==="top"||T==="bottom";let k=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(k=null);const C=u*2,M=C/2,_=s/2*(c/-8+1),F=l/2*c/4,L=!!f,H=k&&w==="end"?"bottom":"top";let I=k&&w==="end"?"right":"left";k&&y&&(I=w==="end"?"left":"right");const O=i?.x!=null?k||i.x:"",V=i?.y!=null?k||i.y:"",D=f||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",A={top:L?"rotate(180deg)":"",left:L?"rotate(90deg)":"rotate(-90deg)",bottom:L?"":"rotate(180deg)",right:L?"rotate(-90deg)":"rotate(90deg)"}[T];return v.jsxs("svg",{...p,"aria-hidden":!0,ref:n,width:L?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[I]:O,[H]:V,[T]:E||L?"100%":"calc(100% - "+C/2+"px)",transform:[A,b].filter(j=>!!j).join(" "),...m},children:[C>0&&v.jsx("path",{clipPath:"url(#"+g+")",fill:"none",stroke:h,strokeWidth:C+(f?0:1),d:D}),v.jsx("path",{stroke:C&&!f?p.fill:"none",d:D}),v.jsx("clipPath",{id:g,children:v.jsx("rect",{x:-M,y:M*(L?-1:1),width:s+C,height:s})})]})});function u0(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const d0=P.createContext(null),f0=P.createContext(null),hr=()=>{var e;return((e=P.useContext(d0))==null?void 0:e.id)||null},mr=()=>P.useContext(f0);function tF(e){const t=Ji(),n=mr(),o=hr();return Ue(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function nF(e){const{children:t,id:n}=e,r=hr();return v.jsx(d0.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function rF(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(a=>{n.current=[...n.current,a]},[]),o=P.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=P.useState(()=>u0());return v.jsx(f0.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function Ur(e){return"data-floating-ui-"+e}function Rt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const p0=Ur("safe-polygon");function qd(e,t,n){if(n&&!Bo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ud(e){return typeof e=="function"?e():e}function h0(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:h=!0}=t,f=mr(),b=hr(),m=Nt(c),p=Nt(l),g=Nt(n),y=Nt(d),x=P.useRef(),T=P.useRef(-1),w=P.useRef(),E=P.useRef(-1),k=P.useRef(!0),C=P.useRef(!1),M=P.useRef(()=>{}),_=P.useRef(!1),F=gt(()=>{var D;const A=(D=o.current.openEvent)==null?void 0:D.type;return A?.includes("mouse")&&A!=="mousedown"});P.useEffect(()=>{if(!s)return;function D(A){let{open:j}=A;j||(Rt(T),Rt(E),k.current=!0,_.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),P.useEffect(()=>{if(!s||!m.current||!n)return;function D(j){F()&&r(!1,j,"hover")}const A=jt(a.floating).documentElement;return A.addEventListener("mouseleave",D),()=>{A.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,m,F]);const L=P.useCallback(function(D,A,j){A===void 0&&(A=!0),j===void 0&&(j="hover");const N=qd(p.current,"close",x.current);N&&!w.current?(Rt(T),T.current=window.setTimeout(()=>r(!1,D,j),N)):A&&(Rt(T),r(!1,D,j))},[p,r]),H=gt(()=>{M.current(),w.current=void 0}),I=gt(()=>{if(C.current){const D=jt(a.floating).body;D.style.pointerEvents="",D.removeAttribute(p0),C.current=!1}}),O=gt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!s)return;function D(R){if(Rt(T),k.current=!1,u&&!Bo(x.current)||Ud(y.current)>0&&!qd(p.current,"open"))return;const Y=qd(p.current,"open",x.current);Y?T.current=window.setTimeout(()=>{g.current||r(!0,R,"hover")},Y):n||r(!0,R,"hover")}function A(R){if(O()){I();return}M.current();const Y=jt(a.floating);if(Rt(E),_.current=!1,m.current&&o.current.floatingContext){n||Rt(T),w.current=m.current({...o.current.floatingContext,tree:f,x:R.clientX,y:R.clientY,onClose(){I(),H(),O()||L(R,!0,"safe-polygon")}});const oe=w.current;Y.addEventListener("mousemove",oe),M.current=()=>{Y.removeEventListener("mousemove",oe)};return}(x.current==="touch"?!Dt(a.floating,R.relatedTarget):!0)&&L(R)}function j(R){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:f,x:R.clientX,y:R.clientY,onClose(){I(),H(),O()||L(R)}})(R))}function N(){Rt(T)}function q(R){O()||L(R,!1)}if(tt(a.domReference)){const R=a.domReference,Y=a.floating;return n&&R.addEventListener("mouseleave",j),h&&R.addEventListener("mousemove",D,{once:!0}),R.addEventListener("mouseenter",D),R.addEventListener("mouseleave",A),Y&&(Y.addEventListener("mouseleave",j),Y.addEventListener("mouseenter",N),Y.addEventListener("mouseleave",q)),()=>{n&&R.removeEventListener("mouseleave",j),h&&R.removeEventListener("mousemove",D),R.removeEventListener("mouseenter",D),R.removeEventListener("mouseleave",A),Y&&(Y.removeEventListener("mouseleave",j),Y.removeEventListener("mouseenter",N),Y.removeEventListener("mouseleave",q))}}},[a,s,e,u,h,L,H,I,r,n,g,f,p,m,o,O,y]),Ue(()=>{var D;if(s&&n&&(D=m.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&F()){C.current=!0;const j=a.floating;if(tt(a.domReference)&&j){var A;const N=jt(a.floating).body;N.setAttribute(p0,"");const q=a.domReference,R=f==null||(A=f.nodesRef.current.find(Y=>Y.id===b))==null||(A=A.context)==null?void 0:A.elements.floating;return R&&(R.style.pointerEvents=""),N.style.pointerEvents="none",q.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{N.style.pointerEvents="",q.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,b,a,f,m,F]),Ue(()=>{n||(x.current=void 0,_.current=!1,H(),I())},[n,H,I]),P.useEffect(()=>()=>{H(),Rt(T),Rt(E),I()},[s,a.domReference,H,I]);const V=P.useMemo(()=>{function D(A){x.current=A.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(A){const{nativeEvent:j}=A;function N(){!k.current&&!g.current&&r(!0,j,"hover")}u&&!Bo(x.current)||n||Ud(y.current)===0||_.current&&A.movementX**2+A.movementY**2<2||(Rt(E),x.current==="touch"?N():(_.current=!0,E.current=window.setTimeout(N,Ud(y.current))))}}},[u,r,n,g,y]);return P.useMemo(()=>s?{reference:V}:{},[s,V])}let m0=0;function Kr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(m0);const i=()=>e?.focus({preventScroll:n});o?i():m0=requestAnimationFrame(i)}function Kd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ms(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function oF(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iF(e){return e?.ownerDocument||document}const Ho={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function g0(e){return e==="inert"?Ho.inert:e==="aria-hidden"?Ho["aria-hidden"]:Ho.none}let Fs=new WeakSet,Ls={},Yd=0;const aF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,v0=e=>e&&(e.host||v0(e.parentNode)),sF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=v0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function lF(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=sF(t,e),s=new Set,l=new Set(a),c=[];Ls[o]||(Ls[o]=new WeakMap);const u=Ls[o];a.forEach(d),h(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(fr(b)!=="script")if(s.has(b))h(b);else{const m=i?b.getAttribute(i):null,p=m!==null&&m!=="false",g=g0(i),y=(g.get(b)||0)+1,x=(u.get(b)||0)+1;g.set(b,y),u.set(b,x),c.push(b),y===1&&p&&Fs.add(b),x===1&&b.setAttribute(o,""),!p&&i&&b.setAttribute(i,i==="inert"?"":"true")}})}return Yd++,()=>{c.forEach(f=>{const b=g0(i),p=(b.get(f)||0)-1,g=(u.get(f)||0)-1;b.set(f,p),u.set(f,g),p||(!Fs.has(f)&&i&&f.removeAttribute(i),Fs.delete(f)),g||f.removeAttribute(o)}),Yd--,Yd||(Ho.inert=new WeakMap,Ho["aria-hidden"]=new WeakMap,Ho.none=new WeakMap,Fs=new WeakSet,Ls={})}}function y0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=iF(e[0]).body;return lF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Vs={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},$s=P.forwardRef(function(t,n){const[r,o]=P.useState();Ue(()=>{Rx()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ur("focus-guard")]:"",style:Vs};return v.jsx("span",{...t,...i})}),b0=P.createContext(null),x0=Ur("portal");function cF(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ji(),o=w0(),[i,a]=P.useState(null),s=P.useRef(null);return Ue(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ue(()=>{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(x0,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ue(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!tt(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(x0,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Yr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=cF({id:n,root:r}),[a,s]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),h=a?.modal,f=a?.open,b=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||h)return;function m(p){i&&Gi(p)&&(p.type==="focusin"?Xx:H2)(i)}return i.addEventListener("focusin",m,!0),i.addEventListener("focusout",m,!0),()=>{i.removeEventListener("focusin",m,!0),i.removeEventListener("focusout",m,!0)}},[i,o,h]),P.useEffect(()=>{i&&(f||Xx(i))},[f,i]),v.jsxs(b0.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[b&&i&&v.jsx($s,{"data-type":"outside",ref:l,onFocus:m=>{if(Gi(m,i)){var p;(p=u.current)==null||p.focus()}else{const g=a?a.domReference:null,y=Zx(g);y?.focus()}}}),b&&i&&v.jsx("span",{"aria-owns":i.id,style:Vs}),i&&pi.createPortal(t,i),b&&i&&v.jsx($s,{"data-type":"outside",ref:c,onFocus:m=>{if(Gi(m,i)){var p;(p=d.current)==null||p.focus()}else{const g=a?a.domReference:null,y=Gx(g);y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const w0=()=>P.useContext(b0);function S0(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const uF=20;let Gr=[];function dF(e){Gr=Gr.filter(t=>t.isConnected),e&&fr(e)!=="body"&&(Gr.push(e),Gr.length>uF&&(Gr=Gr.slice(-20)))}function T0(){return Gr.slice().reverse().find(e=>e.isConnected)}function fF(e){const t=Yi();return jx(e,t)?e:Ps(e,t)[0]||e}function E0(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Yi(),i=C2(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return jx(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const pF=P.forwardRef(function(t,n){return v.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Vs})});function Wo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:h=!1,getInsideElements:f=()=>[]}=e,{open:b,onOpenChange:m,events:p,dataRef:g,elements:{domReference:y,floating:x}}=t,T=gt(()=>{var Q;return(Q=g.current.floatingContext)==null?void 0:Q.nodeId}),w=gt(f),E=typeof a=="number"&&a<0,k=zd(y)&&E,C=aF(),M=C?i:!0,_=!M||C&&h,F=Nt(o),L=Nt(a),H=Nt(s),I=mr(),O=w0(),V=P.useRef(null),D=P.useRef(null),A=P.useRef(!1),j=P.useRef(!1),N=P.useRef(-1),q=O!=null,R=As(x),Y=gt(function(Q){return Q===void 0&&(Q=R),Q?Ps(Q,Yi()):[]}),X=gt(Q=>{const B=Y(Q);return F.current.map(se=>y&&se==="reference"?y:R&&se==="floating"?R:B).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function Q(se){if(se.key==="Tab"){Dt(R,Ln(jt(R)))&&Y().length===0&&!k&&zt(se);const ce=X(),xe=Vn(se);F.current[0]==="reference"&&xe===y&&(zt(se),se.shiftKey?Kr(ce[ce.length-1]):Kr(ce[1])),F.current[1]==="floating"&&xe===R&&se.shiftKey&&(zt(se),Kr(ce[0]))}}const B=jt(R);return B.addEventListener("keydown",Q),()=>{B.removeEventListener("keydown",Q)}},[r,y,R,c,F,k,Y,X]),P.useEffect(()=>{if(r||!x)return;function Q(B){const se=Vn(B),xe=Y().indexOf(se);xe!==-1&&(N.current=xe)}return x.addEventListener("focusin",Q),()=>{x.removeEventListener("focusin",Q)}},[r,x,Y]),P.useEffect(()=>{if(r||!d)return;function Q(){j.current=!0,setTimeout(()=>{j.current=!1})}function B(se){const ce=se.relatedTarget,xe=se.currentTarget,Se=Vn(se);queueMicrotask(()=>{const Te=T(),Ae=!(Dt(y,ce)||Dt(x,ce)||Dt(ce,x)||Dt(O?.portalNode,ce)||ce!=null&&ce.hasAttribute(Ur("focus-guard"))||I&&(Ro(I.nodesRef.current,Te).find(we=>{var be,Re;return Dt((be=we.context)==null?void 0:be.elements.floating,ce)||Dt((Re=we.context)==null?void 0:Re.elements.domReference,ce)})||Wx(I.nodesRef.current,Te).find(we=>{var be,Re,te;return[(be=we.context)==null?void 0:be.elements.floating,As((Re=we.context)==null?void 0:Re.elements.floating)].includes(ce)||((te=we.context)==null?void 0:te.elements.domReference)===ce})));if(xe===y&&R&&E0(R,F),l&&xe!==y&&!(Se!=null&&Se.isConnected)&&Ln(jt(R))===jt(R).body){kt(R)&&R.focus();const we=N.current,be=Y(),Re=be[we]||be[be.length-1]||R;kt(Re)&&Re.focus()}if(g.current.insideReactTree){g.current.insideReactTree=!1;return}(k||!c)&&ce&&Ae&&!j.current&&ce!==T0()&&(A.current=!0,m(!1,se,"focus-out"))})}if(x&&kt(y))return y.addEventListener("focusout",B),y.addEventListener("pointerdown",Q),x.addEventListener("focusout",B),()=>{y.removeEventListener("focusout",B),y.removeEventListener("pointerdown",Q),x.removeEventListener("focusout",B)}},[r,y,x,R,c,I,O,m,d,l,Y,k,T,F,g]);const oe=P.useRef(null),ne=P.useRef(null),ee=S0([oe,O?.beforeInsideRef]),z=S0([ne,O?.afterInsideRef]);P.useEffect(()=>{var Q,B;if(r||!x)return;const se=Array.from((O==null||(Q=O.portalNode)==null?void 0:Q.querySelectorAll("["+Ur("portal")+"]"))||[]),ce=I?Wx(I.nodesRef.current,T()):[],xe=I&&!c?ce.map(we=>{var be;return(be=we.context)==null?void 0:be.elements.floating}):[],Se=(B=ce.find(we=>{var be;return zd(((be=we.context)==null?void 0:be.elements.domReference)||null)}))==null||(B=B.context)==null?void 0:B.elements.domReference,Te=[x,Se,...se,...xe,...w(),V.current,D.current,oe.current,ne.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,F.current.includes("reference")||k?y:null].filter(we=>we!=null),Ae=c||k?y0(Te,!_,_):y0(Te);return()=>{Ae()}},[r,y,x,c,F,O,k,M,_,I,T,w]),Ue(()=>{if(r||!kt(R))return;const Q=jt(R),B=Ln(Q);queueMicrotask(()=>{const se=X(R),ce=L.current,xe=(typeof ce=="number"?se[ce]:ce.current)||R,Se=Dt(R,B);!E&&!Se&&b&&Kr(xe,{preventScroll:xe===R})})},[r,b,R,E,X,L]),Ue(()=>{if(r||!R)return;const Q=jt(R),B=Ln(Q);dF(B);function se(Se){let{reason:Te,event:Ae,nested:we}=Se;if(["hover","safe-polygon"].includes(Te)&&Ae.type==="mouseleave"&&(A.current=!0),Te==="outside-press")if(we)A.current=!1;else if(qx(Ae)||Ux(Ae))A.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?A.current=!1:A.current=!0}}p.on("openchange",se);const ce=Q.createElement("span");ce.setAttribute("tabindex","-1"),ce.setAttribute("aria-hidden","true"),Object.assign(ce.style,Vs),q&&y&&y.insertAdjacentElement("afterend",ce);function xe(){if(typeof H.current=="boolean"){const Se=y||T0();return Se&&Se.isConnected?Se:ce}return H.current.current||ce}return()=>{p.off("openchange",se);const Se=Ln(Q),Te=Dt(x,Se)||I&&Ro(I.nodesRef.current,T()).some(we=>{var be;return Dt((be=we.context)==null?void 0:be.elements.floating,Se)}),Ae=xe();queueMicrotask(()=>{const we=fF(Ae);H.current&&!A.current&&kt(we)&&(!(we!==Se&&Se!==Q.body)||Te)&&we.focus({preventScroll:!0}),ce.remove()})}},[r,x,R,H,g,p,I,q,y,T]),P.useEffect(()=>{queueMicrotask(()=>{A.current=!1})},[r]),Ue(()=>{if(!r&&O)return O.setFocusManagerState({modal:c,closeOnFocusOut:d,open:b,onOpenChange:m,domReference:y}),()=>{O.setFocusManagerState(null)}},[r,O,c,b,m,d,y]),Ue(()=>{r||R&&E0(R,F)},[r,R,F]);function K(Q){return r||!u||!c?null:v.jsx(pF,{ref:Q==="start"?V:D,onClick:B=>m(!1,B.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const G=!r&&M&&(c?!k:!0)&&(q||c);return v.jsxs(v.Fragment,{children:[G&&v.jsx($s,{"data-type":"inside",ref:ee,onFocus:Q=>{if(c){const se=X();Kr(o[0]==="reference"?se[0]:se[se.length-1])}else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(A.current=!1,Gi(Q,O.portalNode)){const se=Gx(y);se?.focus()}else{var B;(B=O.beforeOutsideRef.current)==null||B.focus()}}}),!k&&K("start"),n,K("end"),G&&v.jsx($s,{"data-type":"inside",ref:z,onFocus:Q=>{if(c)Kr(X()[0]);else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(d&&(A.current=!0),Gi(Q,O.portalNode)){const se=Zx(y);se?.focus()}else{var B;(B=O.afterOutsideRef.current)==null||B.focus()}}})]})}let js=0;const k0="--floating-ui-scrollbar-width";function hF(){const e=Nd(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(k0,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(k0),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let C0=()=>{};const P0=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ue(()=>{if(r)return js++,js===1&&(C0=hF()),()=>{js--,js===0&&C0()}},[r]),v.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function A0(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function mF(e){return kt(e.target)&&e.target.tagName==="A"}function I0(e){return jd(e)}function ta(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,h=P.useRef(),f=P.useRef(!1),b=P.useMemo(()=>({onPointerDown(m){h.current=m.pointerType},onMouseDown(m){const p=h.current;m.button===0&&s!=="click"&&(Bo(p,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const p=h.current;if(s==="mousedown"&&h.current){h.current=void 0;return}Bo(p,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){h.current=void 0,!(m.defaultPrevented||!u||A0(m))&&(m.key===" "&&!I0(i)&&(m.preventDefault(),f.current=!0),!mF(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||A0(m)||I0(i)||m.key===" "&&f.current&&(f.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return P.useMemo(()=>a?{reference:b}:{},[a,b])}function gF(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,h=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),h-=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,h=s&&t.x!=null?t.x:h,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:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function _0(e){return e!=null&&e.clientX!=null}function vF(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=P.useRef(!1),h=P.useRef(null),[f,b]=P.useState(),[m,p]=P.useState([]),g=gt((E,k)=>{d.current||r.current.openEvent&&!_0(r.current.openEvent)||a.setPositionReference(gF(i,{x:E,y:k,axis:l,dataRef:r,pointerType:f}))}),y=gt(E=>{c!=null||u!=null||(n?h.current||p([]):g(E.clientX,E.clientY))}),x=Bo(f)?o:n,T=P.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const E=Ut(o);function k(C){const M=Vn(C);Dt(o,M)?(E.removeEventListener("mousemove",k),h.current=null):g(C.clientX,C.clientY)}if(!r.current.openEvent||_0(r.current.openEvent)){E.addEventListener("mousemove",k);const C=()=>{E.removeEventListener("mousemove",k),h.current=null};return h.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,g]);P.useEffect(()=>T(),[T,m]),P.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),P.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ue(()=>{s&&(c!=null||u!=null)&&(d.current=!1,g(c,u))},[s,c,u,g]);const w=P.useMemo(()=>{function E(k){let{pointerType:C}=k;b(C)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return P.useMemo(()=>s?{reference:w}:{},[s,w])}const yF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},bF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},O0=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Zr(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:h=!1,bubbles:f,capture:b}=t,m=mr(),p=gt(typeof l=="function"?l:()=>!1),g=typeof l=="function"?p:l,y=P.useRef(!1),{escapeKey:x,outsidePress:T}=O0(f),{escapeKey:w,outsidePress:E}=O0(b),k=P.useRef(!1),C=P.useRef(-1),M=gt(O=>{var V;if(!n||!a||!s||O.key!=="Escape"||k.current)return;const D=(V=i.current.floatingContext)==null?void 0:V.nodeId,A=m?Ro(m.nodesRef.current,D):[];if(!x&&(O.stopPropagation(),A.length>0)){let j=!0;if(A.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,N2(O)?O.nativeEvent:O,"escape-key")}),_=gt(O=>{var V;const D=()=>{var A;M(O),(A=Vn(O))==null||A.removeEventListener("keydown",D)};(V=Vn(O))==null||V.addEventListener("keydown",D)}),F=gt(O=>{var V;const D=i.current.insideReactTree;i.current.insideReactTree=!1;const A=y.current;if(y.current=!1,c==="click"&&A||D||typeof g=="function"&&!g(O))return;const j=Vn(O),N="["+Ur("inert")+"]",q=jt(o.floating).querySelectorAll(N);let R=tt(j)?j:null;for(;R&&!Qn(R);){const ne=Jn(R);if(Qn(ne)||!tt(ne))break;R=ne}if(q.length&&tt(j)&&!O2(j)&&!Dt(j,o.floating)&&Array.from(q).every(ne=>!Dt(R,ne)))return;if(kt(j)&&I){const ne=Qn(j),ee=rn(j),z=/auto|scroll/,K=ne||z.test(ee.overflowX),G=ne||z.test(ee.overflowY),Q=K&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,B=G&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,se=ee.direction==="rtl",ce=B&&(se?O.offsetX<=j.offsetWidth-j.clientWidth:O.offsetX>j.clientWidth),xe=Q&&O.offsetY>j.clientHeight;if(ce||xe)return}const Y=(V=i.current.floatingContext)==null?void 0:V.nodeId,X=m&&Ro(m.nodesRef.current,Y).some(ne=>{var ee;return $d(O,(ee=ne.context)==null?void 0:ee.elements.floating)});if($d(O,o.floating)||$d(O,o.domReference)||X)return;const oe=m?Ro(m.nodesRef.current,Y):[];if(oe.length>0){let ne=!0;if(oe.forEach(ee=>{var z;if((z=ee.context)!=null&&z.open&&!ee.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}r(!1,O,"outside-press")}),L=gt(O=>{var V;const D=()=>{var A;F(O),(A=Vn(O))==null||A.removeEventListener(c,D)};(V=Vn(O))==null||V.addEventListener(c,D)});P.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let O=-1;function V(q){r(!1,q,"ancestor-scroll")}function D(){window.clearTimeout(O),k.current=!0}function A(){O=window.setTimeout(()=>{k.current=!1},vs()?5:0)}const j=jt(o.floating);s&&(j.addEventListener("keydown",w?_:M,w),j.addEventListener("compositionstart",D),j.addEventListener("compositionend",A)),g&&j.addEventListener(c,E?L:F,E);let N=[];return h&&(tt(o.domReference)&&(N=pr(o.domReference)),tt(o.floating)&&(N=N.concat(pr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(pr(o.reference.contextElement)))),N=N.filter(q=>{var R;return q!==((R=j.defaultView)==null?void 0:R.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",V,{passive:!0})}),()=>{s&&(j.removeEventListener("keydown",w?_:M,w),j.removeEventListener("compositionstart",D),j.removeEventListener("compositionend",A)),g&&j.removeEventListener(c,E?L:F,E),N.forEach(q=>{q.removeEventListener("scroll",V)}),window.clearTimeout(O)}},[i,o,s,g,c,n,r,h,a,x,T,M,w,_,F,E,L]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,g,c]);const H=P.useMemo(()=>({onKeyDown:M,...u&&{[yF[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[M,r,u,d]),I=P.useMemo(()=>({onKeyDown:M,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[bF[c]]:()=>{i.current.insideReactTree=!0},onBlurCapture(){m||(Rt(C),i.current.insideReactTree=!0,C.current=window.setTimeout(()=>{i.current.insideReactTree=!1}))}}),[M,c,i,m]);return P.useMemo(()=>a?{reference:H,floating:I}:{},[a,H,I])}function xF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ji(),i=P.useRef({}),[a]=P.useState(()=>u0()),s=hr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!tt(f)&&eF("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]=P.useState(r.reference),u=gt((f,b,m)=>{i.current.openEvent=f?b:void 0,a.emit("openchange",{open:f,event:b,reason:m,nested:s}),n?.(f,b,m)}),d=P.useMemo(()=>({setPositionReference:c}),[]),h=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:a,floatingId:o,refs:d}),[t,u,h,a,o,d])}function gr(e){e===void 0&&(e={});const{nodeId:t}=e,n=xF({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=P.useState(null),[s,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),h=mr();Ue(()=>{u&&(d.current=u)},[u]);const f=U2({...e,elements:{...o,...s&&{reference:s}}}),b=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),m=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,a(x)),(tt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!tt(x))&&f.refs.setReference(x)},[f.refs]),p=P.useMemo(()=>({...f.refs,setReference:m,setPositionReference:b,domReference:d}),[f.refs,m,b]),g=P.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=P.useMemo(()=>({...f,...r,refs:p,elements:g,nodeId:t}),[f,p,g,t,r]);return Ue(()=>{r.dataRef.current.floatingContext=y;const x=h?.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),P.useMemo(()=>({...f,context:y,refs:p,elements:g}),[f,p,g,y])}function Gd(){return P2()&&Rx()}function wF(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=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;const f=Ut(a.domReference);function b(){!n&&kt(a.domReference)&&a.domReference===Ln(jt(a.domReference))&&(c.current=!0)}function m(){d.current=!0}function p(){d.current=!1}return f.addEventListener("blur",b),Gd()&&(f.addEventListener("keydown",m,!0),f.addEventListener("pointerdown",p,!0)),()=>{f.removeEventListener("blur",b),Gd()&&(f.removeEventListener("keydown",m,!0),f.removeEventListener("pointerdown",p,!0))}},[a.domReference,n,s]),P.useEffect(()=>{if(!s)return;function f(b){let{reason:m}=b;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),P.useEffect(()=>()=>{Rt(u)},[]);const h=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const b=Vn(f.nativeEvent);if(l&&tt(b)){if(Gd()&&!f.relatedTarget){if(!d.current&&!jd(b))return}else if(!M2(b))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const b=f.relatedTarget,m=f.nativeEvent,p=tt(b)&&b.hasAttribute(Ur("focus-guard"))&&b.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const y=Ln(a.domReference?a.domReference.ownerDocument:document);!b&&y===a.domReference||Dt((g=i.current.floatingContext)==null?void 0:g.refs.floating.current,y)||Dt(a.domReference,y)||p||r(!1,m,"focus")})}}),[i,a.domReference,r,l]);return P.useMemo(()=>s?{reference:h}:{},[s,h])}function Zd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[o0]:a,[i0]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[Z2]:""},...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&&[o0,i0].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 h,f=arguments.length,b=new Array(f),m=0;m<f;m++)b[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(p=>p(...b)).find(p=>p!==void 0)}}}else a[c]=u}),a),{})}}function vr(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=P.useCallback(s=>Zd(s,e,"reference"),t),i=P.useCallback(s=>Zd(s,e,"floating"),n),a=P.useCallback(s=>Zd(s,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const SF="Escape";function zs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rs(e,t){return zs(t,e===a0||e===Ds,e===Xi||e===Qi)}function Xd(e,t,n){return zs(t,e===Ds,n?e===Xi:e===Qi)||e==="Enter"||e===" "||e===""}function M0(e,t,n){return zs(t,n?e===Xi:e===Qi,e===Ds)}function D0(e,t,n,r){const o=n?e===Qi:e===Xi,i=e===a0;return t==="both"||t==="horizontal"&&r&&r>1?e===SF:zs(t,o,i)}function Bs(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:h=!1,nested:f=!1,rtl:b=!1,virtual:m=!1,focusItemOnOpen:p="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:k=!0,virtualItemRef:C,itemSizes:M,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(h||Ns("`useListNavigation` looping must be enabled to allow escaping."),m||Ns("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&E>1&&Ns("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=As(o.floating),L=Nt(F),H=hr(),I=mr();Ue(()=>{e.dataRef.current.orientation=T},[e,T]);const O=gt(()=>{l(A.current===-1?null:A.current)}),V=zd(o.domReference),D=P.useRef(p),A=P.useRef(u??-1),j=P.useRef(null),N=P.useRef(!0),q=P.useRef(O),R=P.useRef(!!o.floating),Y=P.useRef(n),X=P.useRef(!1),oe=P.useRef(!1),ne=Nt(x),ee=Nt(n),z=Nt(k),K=Nt(u),[G,Q]=P.useState(),[B,se]=P.useState(),ce=gt(()=>{function te(de){if(m){var ye;(ye=de.id)!=null&&ye.endsWith("-fui-option")&&(de.id=i+"-"+Math.random().toString(16).slice(2,10)),Q(de.id),I?.events.emit("virtualfocus",de),C&&(C.current=de)}else Kr(de,{sync:X.current,preventScroll:!0})}const Z=a.current[A.current],$=oe.current;Z&&te(Z),(X.current?de=>de():requestAnimationFrame)(()=>{const de=a.current[A.current]||Z;if(!de)return;Z||te(de);const ye=z.current;ye&&Se&&($||!N.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ye=="boolean"?{block:"nearest",inline:"nearest"}:ye))})});Ue(()=>{c&&(n&&o.floating?D.current&&u!=null&&(oe.current=!0,A.current=u,O()):R.current&&(A.current=-1,q.current()))},[c,n,o.floating,u,O]),Ue(()=>{if(c&&n&&o.floating)if(s==null){if(X.current=!1,K.current!=null)return;if(R.current&&(A.current=-1,ce()),(!Y.current||!R.current)&&D.current&&(j.current!=null||D.current===!0&&j.current==null)){let te=0;const Z=()=>{a.current[0]==null?(te<2&&(te?requestAnimationFrame:queueMicrotask)(Z),te++):(A.current=j.current==null||Xd(j.current,T,b)||f?Rd(a,ne.current):Kx(a,ne.current),j.current=null,O())};Z()}}else Ki(a,s)||(A.current=s,ce(),oe.current=!1)},[c,n,o.floating,s,K,f,a,T,b,O,ce,ne]),Ue(()=>{var te;if(!c||o.floating||!I||m||!R.current)return;const Z=I.nodesRef.current,$=(te=Z.find(ye=>ye.id===H))==null||(te=te.context)==null?void 0:te.elements.floating,J=Ln(jt(o.floating)),de=Z.some(ye=>ye.context&&Dt(ye.context.elements.floating,J));$&&!de&&N.current&&$.focus({preventScroll:!0})},[c,o.floating,I,H,m]),Ue(()=>{if(!c||!I||!m||H)return;function te(Z){se(Z.id),C&&(C.current=Z)}return I.events.on("virtualfocus",te),()=>{I.events.off("virtualfocus",te)}},[c,I,m,H,C]),Ue(()=>{q.current=O,Y.current=n,R.current=!!o.floating}),Ue(()=>{n||(j.current=null,D.current=p)},[n,p]);const xe=s!=null,Se=P.useMemo(()=>{function te($){if(!ee.current)return;const J=a.current.indexOf($);J!==-1&&A.current!==J&&(A.current=J,O())}return{onFocus($){let{currentTarget:J}=$;X.current=!0,te(J)},onClick:$=>{let{currentTarget:J}=$;return J.focus({preventScroll:!0})},...g&&{onMouseMove($){let{currentTarget:J}=$;X.current=!0,oe.current=!1,te(J)},onPointerLeave($){let{pointerType:J}=$;if(!(!N.current||J==="touch")&&(X.current=!0,A.current=-1,O(),!m)){var de;(de=L.current)==null||de.focus({preventScroll:!0})}}}}},[ee,L,g,a,O,m]),Te=P.useCallback(()=>{var te;return w??(I==null||(te=I.nodesRef.current.find(Z=>Z.id===H))==null||(te=te.context)==null||(te=te.dataRef)==null?void 0:te.current.orientation)},[H,I,w]),Ae=gt(te=>{if(N.current=!1,X.current=!0,te.which===229||!ee.current&&te.currentTarget===L.current)return;if(f&&D0(te.key,T,b,E)){Rs(te.key,Te())||zt(te),r(!1,te.nativeEvent,"list-navigation"),kt(o.domReference)&&(m?I?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const Z=A.current,$=Rd(a,x),J=Kx(a,x);if(V||(te.key==="Home"&&(zt(te),A.current=$,O()),te.key==="End"&&(zt(te),A.current=J,O())),E>1){const de=M||Array.from({length:a.current.length},()=>({width:1,height:1})),ye=z2(de,E,_),Ne=ye.findIndex(xt=>xt!=null&&!_s(a,xt,x)),st=ye.reduce((xt,Yt,qn)=>Yt!=null&&!_s(a,Yt,x)?qn:xt,-1),Lt=ye[j2({current:ye.map(xt=>xt!=null?a.current[xt]:null)},{event:te,orientation:T,loop:h,rtl:b,cols:E,disabledIndices:B2([...(typeof x!="function"?x:null)||a.current.map((xt,Yt)=>_s(a,Yt,x)?Yt:void 0),void 0],ye),minIndex:Ne,maxIndex:st,prevIndex:R2(A.current>J?$:A.current,de,ye,E,te.key===Ds?"bl":te.key===(b?Xi:Qi)?"tr":"tl"),stopEvent:!0})];if(Lt!=null&&(A.current=Lt,O()),T==="both")return}if(Rs(te.key,T)){if(zt(te),n&&!m&&Ln(te.currentTarget.ownerDocument)===te.currentTarget){A.current=Xd(te.key,T,b)?$:J,O();return}Xd(te.key,T,b)?h?A.current=Z>=J?d&&Z!==a.current.length?-1:$:Ht(a,{startingIndex:Z,disabledIndices:x}):A.current=Math.min(J,Ht(a,{startingIndex:Z,disabledIndices:x})):h?A.current=Z<=$?d&&Z!==-1?a.current.length:J:Ht(a,{startingIndex:Z,decrement:!0,disabledIndices:x}):A.current=Math.max($,Ht(a,{startingIndex:Z,decrement:!0,disabledIndices:x})),Ki(a,A.current)&&(A.current=-1),O()}}),we=P.useMemo(()=>m&&n&&xe&&{"aria-activedescendant":B||G},[m,n,xe,B,G]),be=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...V?{}:we,onKeyDown:Ae,onPointerMove(){N.current=!0}}),[we,Ae,T,V]),Re=P.useMemo(()=>{function te($){p==="auto"&&qx($.nativeEvent)&&(D.current=!0)}function Z($){D.current=p,p==="auto"&&Ux($.nativeEvent)&&(D.current=!0)}return{...we,onKeyDown($){N.current=!1;const J=$.key.startsWith("Arrow"),de=["Home","End"].includes($.key),ye=J||de,Ne=M0($.key,T,b),st=D0($.key,T,b,E),Lt=M0($.key,Te(),b),xt=Rs($.key,T),Yt=(f?Lt:xt)||$.key==="Enter"||$.key.trim()==="";if(m&&n){const W=I?.nodesRef.current.find(Fe=>Fe.parentId==null),U=I&&W?D2(I.nodesRef.current,W.id):null;if(ye&&U&&C){const Fe=new KeyboardEvent("keydown",{key:$.key,bubbles:!0});if(Ne||st){var qn,Cn;const Xe=((qn=U.context)==null?void 0:qn.elements.domReference)===$.currentTarget,nt=st&&!Xe?(Cn=U.context)==null?void 0:Cn.elements.domReference:Ne?a.current.find(Me=>Me?.id===G):null;nt&&(zt($),nt.dispatchEvent(Fe),se(void 0))}if((xt||de)&&U.context&&U.context.open&&U.parentId&&$.currentTarget!==U.context.elements.domReference){var Pn;zt($),(Pn=U.context.elements.domReference)==null||Pn.dispatchEvent(Fe);return}}return Ae($)}if(!(!n&&!y&&J)){if(Yt){const W=Rs($.key,Te());j.current=f&&W?null:$.key}if(f){Lt&&(zt($),n?(A.current=Rd(a,ne.current),O()):r(!0,$.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(A.current=u),zt($),!n&&y?r(!0,$.nativeEvent,"list-navigation"):Ae($),n&&O())}},onFocus(){n&&!m&&(A.current=-1,O())},onPointerDown:Z,onPointerEnter:Z,onMouseDown:te,onClick:te}},[G,we,E,Ae,ne,p,a,f,O,r,n,y,T,Te,b,u,I,m,C]);return P.useMemo(()=>c?{reference:Re,floating:be,item:Se}:{},[c,Re,be,Se])}const TF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Ji(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var y;return((y=As(i.floating))==null?void 0:y.id)||a},[i.floating,a]),h=(r=TF.get(l))!=null?r:l,b=hr()!=null,m=P.useMemo(()=>h==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":h==="alertdialog"?"dialog":h,"aria-controls":o?d:void 0,...h==="listbox"&&{role:"combobox"},...h==="menu"&&{id:u},...h==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[h,d,b,o,u,l]),p=P.useMemo(()=>{const y={id:d,...h&&{role:h}};return h==="tooltip"||l==="label"?y:{...y,...h==="menu"&&{"aria-labelledby":u}}},[h,d,u,l]),g=P.useCallback(y=>{let{active:x,selected:T}=y;const w={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":return{...w,"aria-selected":x&&T};case"combobox":return{...w,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>s?{reference:m,floating:p,item:g}:{},[s,m,p,g])}const N0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function qo(e,t){return typeof e=="function"?e(t):e}function EF(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function kF(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]=P.useState("unmounted"),c=EF(n,a);return!c&&s==="close"&&l("unmounted"),Ue(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{pi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function F0(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=P.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,h=(u?a:a.close)||0,[f,b]=P.useState(()=>({...qo(i,c),...qo(n,c)})),{isMounted:m,status:p}=kF(e,{duration:a}),g=Nt(n),y=Nt(r),x=Nt(o),T=Nt(i);return Ue(()=>{const w=qo(g.current,c),E=qo(x.current,c),k=qo(T.current,c),C=qo(y.current,c)||Object.keys(w).reduce((M,_)=>(M[_]="",M),{});if(p==="initial"&&b(M=>({transitionProperty:M.transitionProperty,...k,...w})),p==="open"&&b({transitionProperty:Object.keys(C).map(N0).join(","),transitionDuration:d+"ms",...k,...C}),p==="close"){const M=E||w;b({transitionProperty:Object.keys(M).map(N0).join(","),transitionDuration:h+"ms",...k,...M})}},[h,x,g,y,T,d,p,c]),{isMounted:m,styles:f}}function CF(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:h=[],selectedIndex:f=null}=t,b=P.useRef(-1),m=P.useRef(""),p=P.useRef((n=f??a)!=null?n:-1),g=P.useRef(null),y=gt(s),x=gt(l),T=Nt(u),w=Nt(h);Ue(()=>{r&&(Rt(b),g.current=null,m.current="")},[r]),Ue(()=>{if(r&&m.current===""){var _;p.current=(_=f??a)!=null?_:-1}},[r,f,a]);const E=gt(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),k=gt(_=>{function F(V,D,A){const j=T.current?T.current(D,A):D.find(N=>N?.toLocaleLowerCase().indexOf(A.toLocaleLowerCase())===0);return j?V.indexOf(j):-1}const L=i.current;if(m.current.length>0&&m.current[0]!==" "&&(F(L,L,m.current)===-1?E(!1):_.key===" "&&zt(_)),L==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(zt(_),E(!0)),L.every(V=>{var D,A;return V?((D=V[0])==null?void 0:D.toLocaleLowerCase())!==((A=V[1])==null?void 0:A.toLocaleLowerCase()):!0})&&m.current===_.key&&(m.current="",p.current=g.current),m.current+=_.key,Rt(b),b.current=window.setTimeout(()=>{m.current="",p.current=g.current,E(!1)},d);const I=p.current,O=F(L,[...L.slice((I||0)+1),...L.slice(0,(I||0)+1)],m.current);O!==-1?(y(O),g.current=O):_.key!==" "&&(m.current="",E(!1))}),C=P.useMemo(()=>({onKeyDown:k}),[k]),M=P.useMemo(()=>({onKeyDown:k,onKeyUp(_){_.key===" "&&E(!1)}}),[k,E]);return P.useMemo(()=>c?{reference:C,floating:M}:{},[c,C,M])}function PF(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 L0(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 AF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function V0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=performance.now();function c(d,h){const f=performance.now(),b=f-l;if(a===null||s===null||b===0)return a=d,s=h,l=f,null;const m=d-a,p=h-s,y=Math.sqrt(m*m+p*p)/b;return a=d,s=h,l=f,y}const u=d=>{let{x:h,y:f,placement:b,elements:m,onClose:p,nodeId:g,tree:y}=d;return function(T){function w(){Rt(o),p()}if(Rt(o),!m.domReference||!m.floating||b==null||h==null||f==null)return;const{clientX:E,clientY:k}=T,C=[E,k],M=oF(T),_=T.type==="mouseleave",F=Kd(m.floating,M),L=Kd(m.domReference,M),H=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),O=b.split("-")[0],V=h>I.right-I.width/2,D=f>I.bottom-I.height/2,A=AF(C,H),j=I.width>H.width,N=I.height>H.height,q=(j?H:I).left,R=(j?H:I).right,Y=(N?H:I).top,X=(N?H:I).bottom;if(F&&(i=!0,!_))return;if(L&&(i=!1),L&&!_){i=!0;return}if(_&&tt(T.relatedTarget)&&Kd(m.floating,T.relatedTarget)||y&&PF(y.nodesRef.current,g).length)return;if(O==="top"&&f>=H.bottom-1||O==="bottom"&&f<=H.top+1||O==="left"&&h>=H.right-1||O==="right"&&h<=H.left+1)return w();let oe=[];switch(O){case"top":oe=[[q,H.top+1],[q,I.bottom-1],[R,I.bottom-1],[R,H.top+1]];break;case"bottom":oe=[[q,I.top+1],[q,H.bottom-1],[R,H.bottom-1],[R,I.top+1]];break;case"left":oe=[[I.right-1,X],[I.right-1,Y],[H.left+1,Y],[H.left+1,X]];break;case"right":oe=[[H.right-1,X],[H.right-1,Y],[I.left+1,Y],[I.left+1,X]];break}function ne(ee){let[z,K]=ee;switch(O){case"top":{const G=[j?z+t/2:V?z+t*4:z-t*4,K+t+1],Q=[j?z-t/2:V?z+t*4:z-t*4,K+t+1],B=[[I.left,V||j?I.bottom-t:I.top],[I.right,V?j?I.bottom-t:I.top:I.bottom-t]];return[G,Q,...B]}case"bottom":{const G=[j?z+t/2:V?z+t*4:z-t*4,K-t],Q=[j?z-t/2:V?z+t*4:z-t*4,K-t],B=[[I.left,V||j?I.top+t:I.bottom],[I.right,V?j?I.top+t:I.bottom:I.top+t]];return[G,Q,...B]}case"left":{const G=[z+t+1,N?K+t/2:D?K+t*4:K-t*4],Q=[z+t+1,N?K-t/2:D?K+t*4:K-t*4];return[...[[D||N?I.right-t:I.left,I.top],[D?N?I.right-t:I.left:I.right-t,I.bottom]],G,Q]}case"right":{const G=[z-t,N?K+t/2:D?K+t*4:K-t*4],Q=[z-t,N?K-t/2:D?K+t*4:K-t*4],B=[[D||N?I.left+t:I.right,I.top],[D?N?I.left+t:I.right:I.left+t,I.bottom]];return[G,Q,...B]}}}if(!L0([E,k],oe)){if(i&&!A)return w();if(!_&&r){const ee=c(T.clientX,T.clientY);if(ee!==null&&ee<.1)return w()}L0([E,k],ne([h,f]))?!i&&r&&(o.current=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const IF=/Mac|iPod|iPhone|iPad/,Hs=()=>IF.test(navigator.userAgent),_F=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Hs()?"Meta":"Control":n==="Hyper"?Hs()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),$0=e=>e.map(t=>t.trim()).join("+");class OF{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=$0(_F(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=$0(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class wn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof wn&&(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 wn(this);return t?t(n):n}static from(t,n){return new wn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(wn.from(t,n).values())}toArray(){return Array.from(this.values())}}const MF=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},j0=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},z0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},R0=(e,t)=>{const n=j0(t,z0.basic,e);return n!==void 0&&n!==e?n:j0(t,z0.extend,e)},B0=e=>e.replace(/[^0-9]/g,""),Ws=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),H0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?B0(e).includes(B0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?MF(e,t)!==null:!1,DF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>H0(e,o,n,r)):H0(e,t,n,r),Qd=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:$e.array(i.value)?i.value.map(Ws):Ws(`${i.value}`)}));return e.forEach(i=>{const a=R0(i,t);o.forEach(s=>{const l=R0(i,s.key);if(!l)return;const c=Ws(`${s.value}`.toLocaleLowerCase()).trim(),u=Ws(`${l}`.toLocaleLowerCase()).trim();if(DF(u,c,s.score,s.match))return void r.set(a,i);$e.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},NF=e=>(e=e.trim(),e==="Alt"?Hs()?v.jsx(HI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Hs()?v.jsx(VI,{"aria-label":"Command",size:14}):"Ctrl":e),FF=e=>{const t=e.value.trim().split("+");return v.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return v.jsxs(S.Fragment,{children:[v.jsx("kbd",{"aria-label":n,children:NF(n)}),o?null:v.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},Jd=v.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),LF=(e,t)=>cr()?t:window.matchMedia(e).matches,VF=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(LF(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},W0=()=>window.matchMedia("@media (pointer: coarse)"),$F=()=>{const e=S.useRef(cr()?null:W0()),[t,n]=S.useState(cr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?W0():e.current).addEventListener("change",o=>n(o.matches))},[]),t},ef=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=$F(),o=S.useRef(cr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||ub())return;document.documentElement.style.padding=Yh(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(TT(c.style.height)):null,h=$e.number(d)?d:u.height,f=c.scrollHeight<=h;return h===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},jF=xb,Sn="500ms",zF={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},RF={initial:{x:["30%","0%"],opacity:.8},enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn}},tf={drawer:e=>e==="left"?zF:RF,sheet:{initial:{opacity:.5,y:"25%",animationDuration:Sn,transformOrigin:"bottom"},enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.1,y:"50%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn}}},BF=io("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),q0={top:0,left:0,right:0,bottom:0},U0=e=>e*.6,HF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const u=e.parent.current,d=e.value.get()||u.getBoundingClientRect().width,h=e.position==="right"?-r.delta.x:r.delta.x,f=Math.abs(d+h);return e.value.set(f)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=window.outerHeight,c=U0(l);return s>=c?e.value.set(s):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}};return v.jsx(ut.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:q0,whileDrag:{cursor:"grabbing"},className:ke("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?v.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},qs={drawer:"right",sheet:"none",dialog:"none"},WF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??qs.drawer:qs[o]:t?qs[o]:qs.sheet},qF=[],nf=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:h=!0,forceType:f=!1,layoutId:b=void 0,overlayClassName:m="",type:p="dialog",position:g,overlayClickClose:y=!1,role:x="dialog",interactions:T=qF,...w},E)=>{const k=ef(e,"block-only"),C=S.useId(),M=S.useId(),_=VF("(min-width: 64rem)"),F=p!=="dialog",L=WF(_,f,p,g),H=_||f?tf[p]:tf.sheet,I=typeof H=="function"?H(L):H,O=_||f?p:"sheet",V=gr({open:e,onOpenChange:a}),D=ta(V.context,{}),A=Xr(V.context,{role:x}),j=Zr(V.context,{escapeKey:!0,outsidePress:y}),N=vr([D,A,j].concat(T)),q=o,R=qa(void 0);S.useEffect(()=>{R.set(void 0)},[O]);const Y=()=>a(!1);S.useImperativeHandle(E,()=>({context:V.context,floating:k.current}),[V.context,k]);const X=(ee,z)=>{const K=V.refs.floating;if(K.current&&O==="sheet"){const Q=K.current.getBoundingClientRect(),B=R.get()||Q.height,se=Math.abs(B-z.delta.y),ce=U0(window.outerHeight);return se<ce?(Y(),setTimeout(()=>R.set(window.outerHeight),350)):R.set(se)}},oe={layoutId:b,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:I},ne=d&&O==="sheet"?{...oe,dragElastic:0,onDrag:X,dragConstraints:q0,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:O==="sheet",drag:O==="sheet"?"y":"x"}:oe;return S.useEffect(()=>{console.log({open:e})},[e]),v.jsxs(S.Fragment,{children:[o?v.jsx(S.Fragment,{children:r?v.jsx(jF,{ref:V.refs.setReference,...N.getReferenceProps({layoutId:b}),children:q}):v.jsx(ut.button,{ref:V.refs.setReference,...N.getReferenceProps(),layoutId:b,type:"button",children:q})}):null,v.jsx(Yr,{preserveTabOrder:!0,children:v.jsx(ir,{propagate:!0,mode:"wait",initial:!1,children:e?v.jsx(P0,{lockScroll:!1,className:ke("inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70",O==="drawer"?"":"flex items-start justify-center p-10",m),children:v.jsx(Wo,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:V.context,children:v.jsxs(ut.div,{...w,...ne,...t?{"aria-labelledby":C,"aria-describedby":M}:{"aria-label":s},...N.getFloatingProps({"aria-modal":e,ref:Kn(V.refs.setFloating,k),className:ke(BF({position:L,type:O}),l,"overscroll-contain")}),"data-component":"modal",style:O==="drawer"?{width:R}:{height:R},children:[t?v.jsx("header",{className:"relative w-full",children:t?v.jsx("h2",{id:C,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,v.jsx("section",{"data-component":"modal-body",className:ke("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?v.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,h?v.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:v.jsx("button",{type:"button",onClick:Y,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:v.jsx(Vi,{})})}):null,F&&u?v.jsx(HF,{onChange:a,value:R,sheet:O==="sheet",position:L,parent:V.refs.floating}):null]})})}):null},C)})]})}),UF=e=>v.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:yc(e.item.title)?v.jsx(e.item.title,{text:e.text}):e.item.title}),KF=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?v.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:v.jsx(UF,{text:e.text,item:o})}):o.type!=="shortcut"?v.jsx(S.Fragment,{}):v.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[v.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,v.jsx("span",{children:yc(o.title)?v.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?v.jsx(FF,{value:o.shortcut}):null]})}),YF=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:$e.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=$e.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=Qd(o,"title",n),a=r.filter(s=>$e.function(s.enabled)?s.enabled({text:t}):!1);return wn.unique(i.concat(a),s=>s.title)},GF=[0,0,0,0,0],ZF=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=Et(),[o,i]=S.useState(""),a=nr(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=gr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:$o}),h=Bs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:y=>u(x=>$e.number(y)?y:e.open?x??0:null)}),{getItemProps:f}=vr([h]),b=e.commands.flatMap(y=>y.type==="group"?[y,...y.items]:[y]),m=YF(b,o),p=o===""?b:[{type:"group",title:"Results",items:[]},...m.filter(y=>y.type!=="group")];S.useEffect(()=>{const y=new OF;return y.add(t,()=>e.onChangeVisibility?.(!0)),b.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&y.add(x.shortcut,T=>x.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),y.register()},[t]);const g=e.Icon??fy;return v.jsx(S.Fragment,{children:v.jsxs(nf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[h],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[v.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[v.jsx("div",{className:"flex size-10 items-center justify-center",children:v.jsx(g,{Default:fy,text:o,size:16})}),v.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:y=>i(y.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:y=>{if((y.key==="ArrowDown"||y.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),y.key==="Enter"){if(c!==null&&p[c]){y.preventDefault();const x=p[c],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}if(p.length===1){y.preventDefault();const x=p[0],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}}}})]}),e.loading?v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[v.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),GF.map((y,x)=>v.jsx("li",{className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Jd},`${s}-${x}-skeleton-index`))]}):v.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[p.map((y,x)=>S.createElement(KF,{...f({onMouseEnter:()=>u(x),ref(T){n.current[x]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),y.type==="shortcut"&&y.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:y,text:o,active:c===x,key:`${s}-${y.type}-${x}`})),p.length===1?v.jsx("div",{className:ke("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&$e.number(c)?v.jsx(e.Preview,{command:p[c],text:o}):null]}),e.footer?v.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},Uo=e=>{const t=S.useId(),[n,r]=S.useState(e.open),o=S.useRef(null),i=S.useMemo(()=>[Zi(10),Wd({fallbackAxisSideDirection:"end"}),Hd(),t0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=gr({open:n,middleware:i,transform:!0,whileElementsMounted:$o,onOpenChange:(b,m)=>{const p=m?.relatedTarget;p&&p.dataset.floating==="true"&&!b||(r(b),e.onChange?.(b))}}),c=ta(l),u=Zr(l),d=Xr(l,{role:"tooltip"}),{getReferenceProps:h,getFloatingProps:f}=vr([c,u,d]);return v.jsxs(S.Fragment,{children:[v.jsx("button",{ref:a.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&v.jsx(Yr,{preserveTabOrder:!0,id:`${t}-portal`,children:v.jsx(Wo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:v.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[v.jsx(c0,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),v.jsx("header",{className:"mb-2",children:v.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},XF=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=gr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=ta(s,{enabled:e.disabled??!0}),u=Xr(s,{role:"tooltip"}),d=Zr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=vr([c,u,d]);return v.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[v.jsx(ka,{...f(e),as:ut.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:v.jsx(ut.span,{layoutId:o,children:e.trigger})}),v.jsx(ir,{children:i?v.jsx(Yr,{root:t,children:v.jsx(Wo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:v.jsx(ut.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},K0=200,QF=500,Y0=(e="")=>ke("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),rf=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),G0=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[h,f]=S.useState(!1),[b,m]=S.useState(null),p=S.useRef([]),g=S.useRef([]),y=S.useContext(rf),x=hr(),T=mr(),w=tF(),E=r0(),k=x!==null,{floatingStyles:C,refs:M,context:_}=gr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:$o,placement:k?"right":"bottom-start",middleware:[Zi({mainAxis:k?0:4,alignmentAxis:k?-4:0}),Wd(),Hd()]}),F=Xr(_,{role:"menu"}),L=Zr(_,{bubbles:!0}),H=h0(_,{move:!1,enabled:n,delay:{open:K0},handleClose:V0({blockPointerEvents:!0,requireIntent:!1})}),I=ta(_,{toggle:!k,event:"mousedown",ignoreMouse:k,keyboardHandlers:!0}),O=Bs(_,{loop:!0,activeIndex:b,nested:k,listRef:p,onNavigate:m}),V=CF(_,{activeIndex:b,listRef:g,resetMs:QF,onMatch:u?m:void 0}),{getReferenceProps:D,getFloatingProps:A,getItemProps:j}=vr([H,I,F,L,O,V]);S.useEffect(()=>{if(!T)return;const q=()=>d(!1),R=Y=>{Y.nodeId!==w&&Y.parentId===x&&d(!1)};return T.events.on("click",q),T.events.on("menuopen",R),()=>{T.events.off("click",q),T.events.off("menuopen",R)}},[T,w,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:w})},[T,u,w,x]);const N=o?l.className:ke(Y0(l.className));return v.jsxs(nF,{id:w,children:[v.jsx(S.Fragment,{children:l.asChild?v.jsx(xb,{...D(y.getItemProps({...l,onFocus(q){l.onFocus?.(q),f(!1),y.setHasFocusInside(!0)}})),children:s,className:N,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Kn(M.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0}):v.jsxs("button",{type:"button",className:N,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Kn(M.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0,...D(y.getItemProps({...l,onFocus(q){l.onFocus?.(q),f(!1),y.setHasFocusInside(!0)}})),children:[s,k&&v.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[v.jsx("span",{className:"sr-only",children:"Next menu"}),v.jsx(Fu,{size:14})]})]})}),v.jsx(rf.Provider,{value:{activeIndex:b,setActiveIndex:m,getItemProps:j,setHasFocusInside:f,isOpen:u},children:v.jsx(G2,{elementsRef:p,labelsRef:g,children:u&&v.jsx(Yr,{preserveTabOrder:!0,children:v.jsx(Wo,{context:_,modal:!1,initialFocus:k?-1:0,returnFocus:o?i:!k,children:v.jsx(t,{...A(),ref:M.setFloating,style:{...l.style,...C},className:ke("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),JF=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(rf),s=r0({label:n?null:e}),l=mr(),c=s.index===a.activeIndex;return v.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Kn(s.ref,i),className:Y0(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?v.jsx(t,{size:16}):null]})}),eL=S.forwardRef((e,t)=>hr()===null?v.jsx(rF,{children:v.jsx(G0,{...e,isParent:!0,ref:t})}):v.jsx(G0,{...e,isParent:!1,ref:t})),tL=e=>v.jsx(ut.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),of=S.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=od,...h},f){const[b,m]=S.useState(i??!1),p=S.useRef(null),g=t||"span",y=I=>{m(I),d?.(I)},{refs:x,floatingStyles:T,context:w}=gr({open:b,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:$o,onOpenChange:i?void 0:y,middleware:[Hd(),Zi(5),Wd({fallbackAxisSideDirection:"start"}),t0({padding:5,element:p})]}),E=h0(w,{move:!0,delay:{open:K0},enabled:l?s:!1,handleClose:c?V0():null}),k=wF(w,{enabled:l?a:!1}),C=ta(w,{enabled:l?c:!1}),M=Zr(w,{enabled:l}),_=Xr(w,{role:"tooltip",enabled:l}),F=vF(w,{enabled:!!l&&!!u}),{getReferenceProps:L,getFloatingProps:H}=vr([_,M,F,a?k:void 0,s?E:void 0,c?C:void 0]);return S.useEffect(()=>m(i===void 0?!1:i),[i]),v.jsxs(S.Fragment,{children:[v.jsx(g,{...L(h),ref:Kn(x.setReference,f),children:n}),b&&v.jsx(Yr,{preserveTabOrder:!0,children:v.jsxs(un,{...H(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[v.jsx(c0,{ref:p,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Us=0,yr=1,Ko=2,Z0=4;function X0(e){return()=>e}function nL(e){e()}function na(e,t){return n=>e(t(n))}function Q0(e,t){return()=>e(t)}function rL(e,t){return n=>e(t,n)}function af(e){return e!==void 0}function oL(...e){return()=>{e.map(nL)}}function Yo(){}function Ks(e,t){return t(e),e}function iL(e,t){return t(e)}function dt(...e){return e}function et(e,t){return e(yr,t)}function Ve(e,t){e(Us,t)}function sf(e){e(Ko)}function Ft(e){return e(Z0)}function ve(e,t){return et(e,rL(t,Us))}function $n(e,t){const n=e(yr,r=>{n(),t(r)});return n}function J0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function ew(e,t){return e===t}function ft(e=ew){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function fe(e){return t=>na(t,e)}function jn(e){return t=>()=>{t(e)}}function ie(e,...t){const n=aL(...t);return(r,o)=>{switch(r){case Ko:sf(e);return;case yr:return et(e,n(o))}}}function zn(e,t){return n=>r=>{n(t=e(t,r))}}function Go(e){return t=>n=>{e>0?e--:t(n)}}function br(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function je(...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);et(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 aL(...e){return t=>e.reduceRight(iL,t)}function sL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case yr:return i?n===i?void 0:(r(),n=i,t=et(e,i),t):(r(),Yo);case Ko:r(),n=null;return}}}function le(e){let t=e;const n=Be();return(r,o)=>{switch(r){case Us:t=o;break;case yr:{o(t);break}case Z0:return t}return n(r,o)}}function Wt(e,t){return Ks(le(t),n=>ve(e,n))}function Be(){const e=[];return(t,n)=>{switch(t){case Us:e.slice().forEach(r=>{r(n)});return;case Ko:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function on(e){return Ks(Be(),t=>ve(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:lL(),singleton:n}}const lL=()=>Symbol();function cL(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 _t(...e){const t=Be(),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);et(i,l=>{n[a]=l,r=r|s,r===o&&Ve(t,n)})}),function(i,a){switch(i){case Ko:{sf(t);return}case yr:return r===o&&a(n),et(t,a)}}}function Pe(e,t=ew){return ie(e,ft(t))}function tw(...e){return function(t,n){switch(t){case Ko:return;case yr:return oL(...e.map(r=>et(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const uL={0:"debug",3:"error",1:"log",2:"warn"},dL=()=>typeof globalThis>"u"?window:globalThis,xr=Ke(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=dL().VIRTUOSO_LOG_LEVEL)!=null?o:Ft(e);r>=i&&console[uL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Rn(e,t,n){return lf(e,t,n).callbackRef}function lf(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function nw(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=fL(u.children,t,s?"offsetWidth":"offsetHeight",o);let h=u.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const f=h.lastElementChild.dataset.viewportType==="window";let b;f&&(b=h.ownerDocument.defaultView);const m=a?s?a.scrollLeft:a.scrollTop:f?s?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:s?h.scrollLeft:h.scrollTop,p=a?s?a.scrollWidth:a.scrollHeight:f?s?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:s?h.scrollWidth:h.scrollHeight,g=a?s?a.offsetWidth:a.offsetHeight:f?s?b.innerWidth:b.innerHeight:s?h.offsetWidth:h.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(m,0),viewportHeight:g}),i?.(s?rw("column-gap",getComputedStyle(u).columnGap,o):rw("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return lf(c,n,l)}function fL(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},Jt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function rw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function cf(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,h;if(t){const f=t.getBoundingClientRect(),b=c.top-f.top;h=f.height-Math.max(0,b),d=b+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;h=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:h,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=lf(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const Kt=Ke(()=>{const e=Be(),t=Be(),n=le(0),r=Be(),o=le(0),i=Be(),a=Be(),s=le(0),l=le(0),c=le(0),u=le(0),d=Be(),h=Be(),f=le(!1),b=le(!1),m=le(!1);return ve(ie(e,fe(({scrollTop:p})=>p)),t),ve(ie(e,fe(({scrollHeight:p})=>p)),a),ve(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:b,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ra={lvl:0};function ow(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 rt(e){return e===ra}function oa(e,t){if(!rt(e))return t===e.k?e.v:t<e.k?oa(e.l,t):oa(e.r,t)}function Tn(e,t,n="k"){if(rt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Tn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Tn(e.l,t,n)}function an(e,t,n){return rt(e)?sw(t,n,1):t===e.k?Ot(e,{k:t,v:n}):t<e.k?lw(Ot(e,{l:an(e.l,t,n)})):lw(Ot(e,{r:an(e.r,t,n)}))}function Zo(){return ra}function Ys(e,t,n){if(rt(e))return[];const r=Tn(e,t)[0];return pL(df(e,r,n))}function uf(e,t){if(rt(e))return ra;const{k:n,l:r,r:o}=e;if(t===n){if(rt(r))return o;if(rt(o))return r;{const[i,a]=aw(r);return Gs(Ot(e,{k:i,l:iw(r),v:a}))}}else return t<n?Gs(Ot(e,{l:uf(r,t)})):Gs(Ot(e,{r:uf(o,t)}))}function Qr(e){return rt(e)?[]:[...Qr(e.l),{k:e.k,v:e.v},...Qr(e.r)]}function df(e,t,n){if(rt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(df(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(df(i,t,n))),s}function Gs(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(ff(t))return cw(Ot(e,{lvl:n-1}));if(!rt(t)&&!rt(t.r))return Ot(t.r,{l:Ot(t,{r:t.r.l}),lvl:n,r:Ot(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ff(e))return pf(Ot(e,{lvl:n-1}));if(!rt(r)&&!rt(r.l)){const o=r.l,i=ff(o)?r.lvl-1:r.lvl;return Ot(o,{l:Ot(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:pf(Ot(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ot(e,t){return sw(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 iw(e){return rt(e.r)?e.l:Gs(Ot(e,{r:iw(e.r)}))}function ff(e){return rt(e)||e.lvl>e.r.lvl}function aw(e){return rt(e.r)?[e.k,e.v]:aw(e.r)}function sw(e,t,n,r=ra,o=ra){return{k:e,l:r,lvl:n,r:o,v:t}}function lw(e){return pf(cw(e))}function cw(e){const{l:t}=e;return!rt(t)&&t.lvl===e.lvl?Ot(t,{r:Ot(e,{l:t.r})}):e}function pf(e){const{lvl:t,r:n}=e;return!rt(n)&&!rt(n.r)&&n.lvl===t&&n.r.lvl===t?Ot(n,{l:Ot(e,{r:n.l}),lvl:t+1}):e}function pL(e){return ow(e,({k:t,v:n})=>({index:t,value:n}))}function uw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ia(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const hf=Ke(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function dw(e,t,n){return e[Zs(e,t,n)]}function Zs(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 hL(e,t,n,r){const o=Zs(e,t,r),i=Zs(e,n,r,o);return e.slice(o,i+1)}function En(e,t){return Math.round(e.getBoundingClientRect()[t])}function Xs(e){return!rt(e.groupOffsetTree)}function mf({index:e},t){return t===e?0:t<e?-1:1}function mL(){return{groupIndices:[],groupOffsetTree:Zo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Zo()}}function gL(e,t){let n=rt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),rt(e)){e=an(e,0,i);continue}const s=Ys(e,a-1,o+1);if(s.some(TL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:h}of s)l?(o>=d||i===h)&&(e=uf(e,d)):(c=h!==i,l=!0),u>o&&o>=d&&h!==i&&(e=an(e,o+1,h));c&&(e=an(e,a,i))}return[e,n]}function vL(e){return typeof e.groupIndex<"u"}function yL({offset:e},t){return t===e?0:t<e?-1:1}function aa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=dw(t,e,mf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function fw(e,t){if(!Xs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function pw(e,t,n){if(vL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=fw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function bL(e,t,n,r=0){return r>0&&(t=Math.max(t,dw(e,r,mf).offset)),ow(hL(e,t,n,yL),SL)}function xL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&rt(i)&&t.length===2){const h=t[0].size,f=t[1].size;a=n.reduce((b,m)=>an(an(b,m,h),m+1,f),a)}else[a,s]=gL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=gf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((h,f)=>an(h,f,aa(f,d,o)),Zo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function wL(e){return Qr(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 hw(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 gf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Zs(o,t-1,mf),s=o[l].offset;const c=Tn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Tn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ys(n,t,1/0)){const d=c-i,h=d*a+s+d*r;o.push({index:c,offset:h,size:u}),i=c,s=h,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function SL(e){return{index:e.index,value:e}}function TL(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 EL={offsetHeight:"height",offsetWidth:"width"},Bn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Be(),r=Be(),o=Wt(r,0),i=Be(),a=Be(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((w,E)=>En(w,EL[E])),h=le(void 0),f=le(0),b=mL(),m=Wt(ie(n,je(l,e,f),zn(xL,b),ft()),b),p=Wt(ie(l,ft(),zn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),fe(({prev:w})=>w)),[]);ve(ie(l,Ce(w=>w.length>0),je(m,f),fe(([w,E,k])=>{const C=w.reduce((M,_,F)=>an(M,_,aa(_,E.offsetTree,k)||F),Zo());return{...E,groupIndices:w,groupOffsetTree:C}})),m),ve(ie(r,je(m),Ce(([w,{lastIndex:E}])=>w<E),fe(([w,{lastIndex:E,lastSize:k}])=>[{endIndex:E,size:k,startIndex:w}])),n),ve(c,u);const g=Wt(ie(c,fe(w=>w===void 0)),!0);ve(ie(u,Ce(w=>w!==void 0&&rt(Ft(m).sizeTree)),fe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=on(ie(n,je(m),zn(({sizes:w},[E,k])=>({changed:k!==w,sizes:k}),{changed:!1,sizes:b}),fe(w=>w.changed)));et(ie(s,zn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),fe(w=>w.diff)),w=>{const{groupIndices:E}=Ft(m);if(w>0)Ve(t,!0),Ve(i,w+hw(w,E));else if(w<0){const k=Ft(p);k.length>0&&(w-=hw(-w,k)),Ve(a,w)}}),et(ie(s,je(e)),([w,E])=>{w<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Jt.ERROR)});const x=on(i);ve(ie(i,je(m),fe(([w,E])=>{const k=E.groupIndices.length>0,C=[],M=E.lastSize;if(k){const _=oa(E.sizeTree,0);let F=0,L=0;for(;F<w;){const I=E.groupIndices[L],O=E.groupIndices.length===L+1?1/0:E.groupIndices[L+1]-I-1;C.push({endIndex:I,size:_,startIndex:I}),C.push({endIndex:I+1+O-1,size:M,startIndex:I+1}),L++,F+=O+1}const H=Qr(E.sizeTree);return F!==w&&H.shift(),H.reduce((I,{k:O,v:V})=>{let D=I.ranges;return I.prevSize!==0&&(D=[...I.ranges,{endIndex:O+w-1,size:I.prevSize,startIndex:I.prevIndex}]),{prevIndex:O+w,prevSize:V,ranges:D}},{prevIndex:w,prevSize:0,ranges:C}).ranges}return Qr(E.sizeTree).reduce((_,{k:F,v:L})=>({prevIndex:F+w,prevSize:L,ranges:[..._.ranges,{endIndex:F+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:M,ranges:[]}).ranges})),n);const T=on(ie(a,je(m,f),fe(([w,{offsetTree:E},k])=>{const C=-w;return aa(C,E,k)})));return ve(ie(a,je(m,f),fe(([w,E,k])=>{if(E.groupIndices.length>0){if(rt(E.sizeTree))return E;let C=Zo();const M=Ft(p);let _=0,F=0,L=0;for(;_<-w;){L=M[F];const H=M[F+1]-L-1;F++,_+=H+1}if(C=Qr(E.sizeTree).reduce((H,{k:I,v:O})=>an(H,Math.max(0,I+w),O),C),_!==-w){const H=oa(E.sizeTree,L);C=an(C,0,H);const I=Tn(E.sizeTree,-w+1)[1];C=an(C,1,I)}return{...E,sizeTree:C,...gf(E.offsetTree,0,C,k)}}else{const C=Qr(E.sizeTree).reduce((M,{k:_,v:F})=>an(M,Math.max(0,_+w),F),Zo());return{...E,sizeTree:C,...gf(E.offsetTree,0,C,k)}}})),m),{beforeUnshiftWith:x,data:h,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:m,statefulTotalCount:o,totalCount:r,trackItemSizes:g,unshiftWith:i}},dt(xr,hf),{singleton:!0});function kL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const mw=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Be(),a=Be(),s=on(ie(i,fe(kL)));return ve(ie(s,fe(l=>l.totalCount)),n),ve(ie(s,fe(l=>l.groupIndices)),e),ve(ie(_t(o,t,r),Ce(([l,c])=>Xs(c)),fe(([l,c,u])=>Tn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ft(),fe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Bn,Kt)),wr=Ke(([{log:e}])=>{const t=le(!1),n=on(ie(t,Ce(r=>r),ft()));return et(t,r=>{r&&Ft(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},dt(xr),{singleton:!0}),CL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function gw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const sa=Ke(([{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:h}])=>{const f=Be(),b=Be(),m=le(0);let p=null,g=null,y=null;function x(){p&&(p(),p=null),y&&(y(),y=null),g&&(clearTimeout(g),g=null),Ve(l,!1)}return ve(ie(f,je(n,d,r,m,s,a,h),je(e,i,o),fe(([[T,w,E,k,C,M,_,F],L,H,I])=>{const O=gw(T),{align:V,behavior:D,offset:A}=O,j=k-1,N=pw(O,w,j);let q=aa(N,w.offsetTree,L)+M;V==="end"?(q+=H+Tn(w.sizeTree,N)[1]-E+I,N===j&&(q+=_)):V==="center"?q+=(H+Tn(w.sizeTree,N)[1]-E+I)/2:q-=C,A&&(q+=A);const R=Y=>{x(),Y?(F("retrying to scroll to",{location:T},Jt.DEBUG),Ve(f,T)):(Ve(b,!0),F("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),D==="smooth"){let Y=!1;y=et(t,X=>{Y=Y||X}),p=$n(u,()=>{R(Y)})}else p=$n(ie(t,PL(150)),R);return g=setTimeout(()=>{x()},1200),Ve(l,!0),F("scrolling from index to",{behavior:D,index:N,top:q},Jt.DEBUG),{behavior:D,top:q}})),c),{scrollTargetReached:b,scrollToIndex:f,topListHeight:m}},dt(Bn,Kt,xr),{singleton:!0});function PL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function vf(e,t){e==0?t():requestAnimationFrame(()=>{vf(e-1,t)})}function yf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const la=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=le(!0),l=le(0),c=le(!0);return ve(ie(a,je(l),Ce(([u,d])=>!!d),jn(!1)),s),ve(ie(a,je(l),Ce(([u,d])=>!!d),jn(!1)),c),et(ie(_t(t,a),je(s,n,e,c),Ce(([[,u],d,{sizeTree:h},f,b])=>u&&(!rt(h)||af(f))&&!d&&!b),je(l)),([,u])=>{$n(o,()=>{Ve(c,!0)}),vf(4,()=>{$n(r,()=>{Ve(s,!0)}),Ve(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Bn,Kt,sa,wr),{singleton:!0});function vw(e,t){return Math.abs(e-t)<1.01}const ca="up",ua="down",AL="none",IL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},_L=0,da=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=Be(),c=Be(),u=le(4),d=le(_L),h=Wt(ie(tw(ie(Pe(o),Go(1),jn(!0)),ie(Pe(o),Go(1),jn(!1),J0(100))),ft()),!1),f=Wt(ie(tw(ie(n,jn(!0)),ie(n,jn(!1),J0(200))),ft()),!1);ve(ie(_t(Pe(o),Pe(d)),fe(([y,x])=>y<=x),ft()),s),ve(ie(s,br(50)),c);const b=on(ie(_t(r,Pe(i),Pe(t),Pe(e),Pe(u)),zn((y,[{scrollHeight:x,scrollTop:T},w,E,k,C])=>{const M=T+w-x>-C,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(M){let L,H;return T>y.state.scrollTop?(L="SCROLLED_DOWN",H=y.state.scrollTop-T):(L="SIZE_DECREASED",H=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:H,state:_}}let F;return _.scrollHeight>y.state.scrollHeight?F="SIZE_INCREASED":w<y.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},IL),ft((y,x)=>y&&y.atBottom===x.atBottom))),m=Wt(ie(r,zn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(vw(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const E=x-(T+w)<1;return y.scrollTop!==T&&E?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),fe(y=>y.jump)),0);ve(ie(b,fe(y=>y.atBottom)),a),ve(ie(a,br(50)),l);const p=le(ua);ve(ie(r,fe(({scrollTop:y})=>y),ft(),zn((y,x)=>Ft(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ca:ua,prevScrollTop:x},{direction:ua,prevScrollTop:0}),fe(y=>y.direction)),p),ve(ie(r,br(50),jn(AL)),p);const g=le(0);return ve(ie(h,Ce(y=>!y),jn(0)),g),ve(ie(o,br(100),je(h),Ce(([y,x])=>!!x),zn(([y,x],[T])=>[x,T],[0,0]),fe(([y,x])=>x-y)),g),{atBottomState:b,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:m,scrollDirection:p,scrollVelocity:g}},dt(Kt)),Qs="top",Js="bottom",yw="none";function bw(e,t,n){return typeof e=="number"?n===ca&&t===Qs||n===ua&&t===Js?e:0:n===ca?t===Qs?e.main:e.reverse:t===Js?e.main:e.reverse}function xw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const bf=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Be(),a=le(0),s=le(0),l=le(0),c=Wt(ie(_t(Pe(r),Pe(o),Pe(n),Pe(i,ia),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),fe(([u,d,h,[f,b],m,p,g,y,x])=>{const T=u-y,w=p+g,E=Math.max(h-T,0);let k=yw;const C=xw(x,Qs),M=xw(x,Js);return f-=y,f+=h+g,b+=h+g,b-=y,f>u+w-C&&(k=ca),b<u-E+d+M&&(k=ua),k!==yw?[Math.max(T-h-bw(m,Qs,k)-C,0),T-E-g+d+bw(m,Js,k)+M]:null}),Ce(u=>u!=null),ft(ia)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Kt),{singleton:!0});function OL(e,t,n){if(Xs(t)){const r=fw(e,t);return[{index:Tn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const xf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function el(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 m=e[e.length-1];u=m.offset+m.size}const d=n-a,h=s+d*l+(d-1)*r,f=c,b=h-u;return{bottom:u,firstItemIndex:i,items:Sw(e,o,i),offsetBottom:b,offsetTop:c,top:f,topItems:Sw(t,o,i),topListHeight:t.reduce((m,p)=>p.size+m,0),totalCount:n}}function ww(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=yf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return el(c,[],s,o,n,r)}function Sw(e,t,n){if(e.length===0)return[];if(!Xs(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=Ys(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 Jr=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:b}])=>{const m=le([]),p=le(0),g=Be();ve(i.topItemsIndexes,m);const y=Wt(ie(_t(f,b,Pe(l,ia),Pe(o),Pe(r),Pe(c),u,Pe(m),Pe(t),Pe(n),e),Ce(([E,k,,C,,,,,,,M])=>{const _=M&&M.length!==C;return E&&!k&&!_}),fe(([,,[E,k],C,M,_,F,L,H,I,O])=>{const V=M,{offsetTree:D,sizeTree:A}=V,j=Ft(p);if(C===0)return{...xf,totalCount:C};if(E===0&&k===0)return j===0?{...xf,totalCount:C}:ww(j,_,M,H,I,O||[]);if(rt(A))return j>0?null:el(OL(yf(_,C),V,O),[],C,I,V,H);const N=[];if(L.length>0){const oe=L[0],ne=L[L.length-1];let ee=0;for(const z of Ys(A,oe,ne)){const K=z.value,G=Math.max(z.start,oe),Q=Math.min(z.end,ne);for(let B=G;B<=Q;B++)N.push({data:O?.[B],index:B,offset:ee,size:K}),ee+=K}}if(!F)return el([],N,C,I,V,H);const q=L.length>0?L[L.length-1]+1:0,R=bL(D,E,k,q);if(R.length===0)return null;const Y=C-1,X=Ks([],oe=>{for(const ne of R){const ee=ne.value;let z=ee.offset,K=ne.start;const G=ee.size;if(ee.offset<E){K+=Math.floor((E-ee.offset+I)/(G+I));const B=K-ne.start;z+=B*G+B*I}K<q&&(z+=(q-K)*G,K=q);const Q=Math.min(ne.end,Y);for(let B=K;B<=Q&&!(z>=k);B++)oe.push({data:O?.[B],index:B,offset:z,size:G}),z+=G+I}});return el(X,N,C,I,V,H)}),Ce(E=>E!==null),ft()),xf);ve(ie(e,Ce(af),fe(E=>E?.length)),o),ve(ie(y,fe(E=>E.topListHeight)),d),ve(d,s),ve(ie(y,fe(E=>[E.top,E.bottom])),a),ve(ie(y,fe(E=>E.items)),g);const x=on(ie(y,Ce(({items:E})=>E.length>0),je(o,e),Ce(([{items:E},k])=>E[E.length-1].originalIndex===k-1),fe(([,E,k])=>[E-1,k]),ft(ia),fe(([E])=>E))),T=on(ie(y,br(200),Ce(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),fe(({items:E})=>E[0].index),ft())),w=on(ie(y,Ce(({items:E})=>E.length>0),fe(({items:E})=>{let k=0,C=E.length-1;for(;E[k].type==="group"&&k<C;)k++;for(;E[C].type==="group"&&C>k;)C--;return{endIndex:E[C].index,startIndex:E[k].index}}),ft(uw)));return{endReached:x,initialItemCount:p,itemsRendered:g,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:m,...h}},dt(Bn,mw,bf,la,sa,da,wr,hf),{singleton:!0}),Tw=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Be(),a=Wt(ie(_t(n,e,r,t,o),fe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return ve(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Kt,Jr),{singleton:!0}),ML=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=Wt(ie(_t(n,e,t),Ce(([o])=>o),fe(([,o,i])=>Math.max(0,o-i)),br(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Kt,Tw),{singleton:!0});function Ew(e){return e?e==="smooth"?"smooth":"auto":!1}const DL=(e,t)=>typeof e=="function"?Ew(e(t)):t&&Ew(e),NL=Ke(([{listRefresh:e,totalCount:t,fixedItemSize:n},{atBottomState:r,isAtBottom:o},{scrollToIndex:i},{scrolledToInitialItem:a},{didMount:s,propsReady:l},{log:c},{scrollingInProgress:u}])=>{const d=le(!1),h=Be();let f=null;function b(p){Ve(i,{align:"end",behavior:p,index:"LAST"})}et(ie(_t(ie(Pe(t),Go(1)),s),je(Pe(d),o,a,u),fe(([[p,g],y,x,T,w])=>{let E=g&&T,k="auto";return E&&(k=DL(y,x||w),E=E&&!!k),{followOutputBehavior:k,shouldFollow:E,totalCount:p}}),Ce(({shouldFollow:p})=>p)),({followOutputBehavior:p,totalCount:g})=>{f&&(f(),f=null),Ft(n)?requestAnimationFrame(()=>{Ft(c)("following output to ",{totalCount:g},Jt.DEBUG),b(p)}):f=$n(e,()=>{Ft(c)("following output to ",{totalCount:g},Jt.DEBUG),b(p),f=null})});function m(p){const g=$n(r,y=>{p&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Ft(c)("scrolling to bottom due to increased size",{},Jt.DEBUG),b("auto"))});setTimeout(g,100)}return et(ie(_t(Pe(d),t,l),Ce(([p,,g])=>p&&g),zn(({value:p},[,g])=>({refreshed:p===g,value:g}),{refreshed:!1,value:0}),Ce(({refreshed:p})=>p),je(d,t)),([,p])=>{Ft(a)&&m(p!==!1)}),et(h,()=>{m(Ft(d)!==!1)}),et(_t(Pe(d),r),([p,g])=>{p&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")}),{autoscrollToBottom:h,followOutput:d}},dt(Bn,da,sa,la,wr,xr,Kt)),FL=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(ve(ie(s,je(i),Ce(([,l])=>l!==0),je(o,r,t,n,e),fe(([[,l],c,u,d,h,f=[]])=>ww(l,c,u,d,h,f))),a),{}),dt(Bn,la,Jr,wr),{singleton:!0}),LL=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return et(ie(e,je(r),Ce(([,o])=>o!==0),fe(([,o])=>({top:o}))),o=>{$n(ie(n,Go(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ve(t,o)})})}),{initialScrollTop:r}},dt(wr,Kt,Jr),{singleton:!0}),VL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,$L=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Be();return ve(ie(u,je(t,l,n,i,o,r,s),je(e),fe(([[d,h,f,b,m,p,g,y],x])=>{const{align:T,behavior:w,calculateViewLocation:E=VL,done:k,...C}=d,M=pw(d,h,b-1),_=aa(M,h.offsetTree,x)+m+p,F=_+Tn(h.sizeTree,M)[1],L=y+p,H=y+f-g,I=E({itemBottom:F,itemTop:_,locationParams:{align:T,behavior:w,...C},viewportBottom:H,viewportTop:L});return I?k&&$n(ie(a,Ce(O=>!O),Go(Ft(a)?1:2)),k):k&&k(),I}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(Bn,Kt,sa,Jr,xr),{singleton:!0}),kw=Ke(([{scrollVelocity:e}])=>{const t=le(!1),n=Be(),r=le(!1);return ve(ie(e,je(r,t,n),Ce(([o,i])=>!!i),fe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),ft()),t),et(ie(_t(t,e,n),je(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(da),{singleton:!0}),wf=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Be(),r=Be(),o=Be(),i=le(!1),a=le(void 0);return ve(ie(_t(n,r),fe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),ve(ie(t,je(r),fe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Kt)),jL=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Be(),u=le(void 0),d=le(null),h=le(null);return ve(s,d),ve(l,h),et(ie(c,je(t,r,a,d,h,n)),([f,b,m,p,g,y,x])=>{const T=wL(b.sizeTree);p&&g!==null&&y!==null&&(m=g.scrollTop-y.offsetTop),m-=x,f({ranges:T,scrollTop:m})}),ve(ie(u,Ce(af),fe(zL)),o),ve(ie(i,je(u),Ce(([,f])=>f!==void 0),ft(),fe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Bn,Kt,la,wr,wf));function zL(e){return{align:"start",index:0,offset:e.scrollTop}}const RL=Ke(([{topItemsIndexes:e}])=>{const t=le(0);return ve(ie(t,Ce(n=>n>=0),fe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(Jr));function Cw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const BL=Cw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),HL=Ke(([{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:h},{log:f},{recalcInProgress:b}])=>{const m=on(ie(l,je(a),zn(([,g,y,x],[{bottom:T,items:w,offsetBottom:E,totalCount:k},C])=>{const M=T+E;let _=0;return y===k&&g.length>0&&w.length>0&&(w[0].originalIndex===0&&g[0].originalIndex===0||(_=M-x,_!==0&&(_+=C))),[_,w,k,M]},[0,[],0,0]),Ce(([g])=>g!==0),je(r,s,n,o,f,b),Ce(([,g,y,x,,,T])=>!T&&!x&&g!==0&&y===ca),fe(([[g],,,,,y])=>(y("Upward scrolling compensation",{amount:g},Jt.DEBUG),g))));function p(g){g>0?(Ve(t,{behavior:"auto",top:-g}),Ve(e,0)):(Ve(e,0),Ve(t,{behavior:"auto",top:-g}))}return et(ie(m,je(e,i)),([g,y,x])=>{x&&BL()?Ve(e,y-g):p(-g)}),et(ie(_t(Wt(i,!1),e,b),Ce(([g,y,x])=>!g&&!x&&y!==0),fe(([g,y])=>y),br(1)),p),ve(ie(d,fe(g=>({top:-g}))),t),et(ie(c,je(h,u),fe(([g,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function E(k){return k*(x+w)}if(y.length===0)return E(g);{let k=0;const C=oa(T,0);let M=0,_=0;for(;M<g;){M++,k+=C;let F=y.length===_+1?1/0:y[_+1]-y[_]-1;M+F>g&&(k-=C,F=g-M+1),M+=F,k+=E(F),_++}return k}})),g=>{Ve(e,g),requestAnimationFrame(()=>{Ve(t,{top:g}),requestAnimationFrame(()=>{Ve(e,0),Ve(b,!1)})})}),{deviation:e}},dt(Kt,da,Jr,Bn,xr,hf)),WL=Ke(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),dt(bf,FL,wr,kw,Tw,LL,ML,wf,$L,xr)),Pw=Ke(([{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:h,initialTopMostItemIndex:f,scrolledToInitialItem:b},m,p,g,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},E,{topItemCount:k},{groupCounts:C},M])=>(ve(T.rangeChanged,M.scrollSeekRangeChanged),ve(ie(M.windowViewportRect,fe(_=>_.visibleHeight)),m.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:C,initialItemFinalLocationReached:h,initialTopMostItemIndex:f,scrolledToInitialItem:b,sizeRanges:s,topItemCount:k,topItemsIndexes:x,totalCount:u,...g,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...M,...m,sizes:l,...p}),dt(Bn,la,Kt,jL,NL,Jr,sa,HL,RL,mw,WL));function qL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const tl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Sf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(p,g){p.propsReady&&Ve(p.propsReady,!1);for(const y of r){const x=p[t.required[y]];Ve(x,g[y])}for(const y of o)if(y in g){const x=p[t.optional[y]];Ve(x,g[y])}p.propsReady&&Ve(p.propsReady,!0)}function c(p){return i.reduce((g,y)=>(g[y]=x=>{const T=p[t.methods[y]];Ve(T,x)},g),{})}function u(p){return a.reduce((g,y)=>(g[y]=sL(p[t.events[y]]),g),{})}const d=S.forwardRef((p,g)=>{const{children:y,...x}=p,[T]=S.useState(()=>Ks(cL(e),k=>{l(k,x)})),[w]=S.useState(Q0(u,T));tl(()=>{for(const k of a)k in x&&et(w[k],x[k]);return()=>{Object.values(w).map(sf)}},[x,w,T]),tl(()=>{l(T,x)}),S.useImperativeHandle(g,X0(c(T)));const E=n;return v.jsx(s.Provider,{value:T,children:n?v.jsx(E,{...qL([...r,...o,...a],x),children:y}):y})}),h=p=>{const g=S.useContext(s);return S.useCallback(y=>{Ve(g[p],y)},[g,p])},f=p=>{const g=S.useContext(s)[p],y=S.useCallback(x=>et(g,x),[g]);return S.useSyncExternalStore(y,()=>Ft(g),()=>Ft(g))},b=p=>{const g=S.useContext(s)[p],[y,x]=S.useState(Q0(Ft,g));return tl(()=>et(g,T=>{T!==y&&x(X0(T))}),[g,y]),y},m=S.version.startsWith("18")?f:b;return{Component:d,useEmitter:(p,g)=>{const y=S.useContext(s)[p];tl(()=>et(y,g),[g,y])},useEmitterValue:m,usePublisher:h}}const nl=S.createContext(void 0),Aw=S.createContext(void 0),Iw=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Tf(e){return"self"in e}function UL(e){return"body"in e}function _w(e,t,n,r=Yo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(h=>{let f,b,m;const p=h.target;if(UL(p)||Tf(p)){const y=Tf(p)?p:p.defaultView;m=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,b=i?y.innerWidth:y.innerHeight}else m=i?p.scrollLeft:p.scrollTop,f=i?p.scrollWidth:p.scrollHeight,b=i?p.offsetWidth:p.offsetHeight;const g=()=>{e({scrollHeight:f,scrollTop:Math.max(m,0),viewportHeight:b})};h.suppressFlushSync?g():fi.flushSync(g),s.current!==null&&(m===s.current||m<=0||m===f-b)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const h=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(h){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const b=h.behavior==="smooth";let m,p,g;Tf(f)?(p=Math.max(En(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),m=i?f.innerWidth:f.innerHeight,g=i?window.scrollX:window.scrollY):(p=f[i?"scrollWidth":"scrollHeight"],m=En(f,i?"width":"height"),g=f[i?"scrollLeft":"scrollTop"]);const y=p-m;if(h.top=Math.ceil(Math.max(Math.min(y,h.top),0)),vw(m,p)||h.top===g){e({scrollHeight:p,scrollTop:g,viewportHeight:m}),b&&t(!0);return}b?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(h={behavior:h.behavior,left:h.top}),f.scrollTo(h)}function d(h){i&&(h={behavior:h.behavior,left:h.top}),a.current.scrollBy(h)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const Ef="-webkit-sticky",Ow="sticky",kf=Cw(()=>{if(typeof document>"u")return Ow;const e=document.createElement("div");return e.style.position=Ef,e.style.position===Ef?Ef:Ow});function Cf(e){return e}const KL=Ke(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(Cf),i=le("div"),a=le(Yo),s=(l,c=null)=>Wt(ie(r,fe(u=>u[l]),ft()),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")}}),YL=Ke(([e,t])=>({...e,...t}),dt(Pw,KL)),GL=({height:e})=>v.jsx("div",{style:{height:e}}),ZL={overflowAnchor:"none",position:kf(),zIndex:1},Mw={overflowAnchor:"none"},XL={...Mw,display:"inline-block",height:"100%"},Dw=S.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=gn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=gn("windowScrollContainerState"),a=gn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),h=Ie("itemSize"),f=Ie("log"),b=gn("gap"),m=Ie("horizontalDirection"),{callbackRef:p}=nw(n,h,d,e?Yo:s,f,b,o,m,Ie("skipAnimationFrameInResizeObserver")),[g,y]=S.useState(0);If("deviation",I=>{g!==I&&y(I)});const x=Ie("EmptyPlaceholder"),T=Ie("ScrollSeekPlaceholder")||GL,w=Ie("ListComponent"),E=Ie("ItemComponent"),k=Ie("GroupComponent"),C=Ie("computeItemKey"),M=Ie("isSeeking"),_=Ie("groupIndices").length>0,F=Ie("alignToBottom"),L=Ie("initialItemFinalLocationReached"),H=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:g!==0?g:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:g!==0?g:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?v.jsx(x,{...at(x,c)}):v.jsx(w,{...at(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:p,style:H,children:(e?t.topItems:t.items).map(I=>{const O=I.originalIndex,V=C(O+t.firstItemIndex,I.data,c);return M?S.createElement(T,{...at(T,c),height:I.size,index:I.index,key:V,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?S.createElement(k,{...at(k,c),"data-index":O,"data-item-index":I.index,"data-known-size":I.size,key:V,style:ZL},u(I.index,c)):S.createElement(E,{...at(E,c),...Nw(E,I.data),"data-index":O,"data-item-group-index":I.groupIndex,"data-item-index":I.index,"data-known-size":I.size,key:V,style:m?XL:Mw},_?l(I.index,I.groupIndex,I.data,c):l(I.index,I.data,c))})})}),QL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},JL={outline:"none",overflowX:"auto",position:"relative"},Xo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),eV={position:kf(),top:0,width:"100%",zIndex:1};function at(e,t){if(typeof e!="string")return{context:t}}function Nw(e,t){return{item:typeof e=="string"?void 0:t}}const tV=S.memo(function(){const e=Ie("HeaderComponent"),t=gn("headerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...at(e,o)})}):null}),nV=S.memo(function(){const e=Ie("FooterComponent"),t=gn("footerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...at(e,o)})}):null});function Pf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:f,scrollToCallback:b}=_w(a,l,s,c,void 0,d);return e("scrollTo",b),e("scrollBy",h),v.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?JL:QL,...o},tabIndex:0,...i,...at(s,u),children:r})})}function Af({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),h=t("context"),f=S.useRef(null),b=t("scrollerRef"),{scrollByCallback:m,scrollerRef:p,scrollToCallback:g}=_w(a,l,s,b,d);return Iw(()=>{var y;return p.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{p.current=null}},[p,d]),e("windowScrollTo",g),e("scrollBy",m),v.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...at(s,h),children:r})})}const rV=({children:e})=>{const t=S.useContext(nl),n=gn("viewportHeight"),r=gn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=S.useMemo(()=>na(n,l=>En(l,i?"width":"height")),[n,i]),s=Rn(a,!0,Ie("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:s,style:Xo(o),children:e})},oV=({children:e})=>{const t=S.useContext(nl),n=gn("windowViewportRect"),r=gn("fixedItemHeight"),o=Ie("customScrollParent"),i=cf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:Xo(a),children:e})},iV=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...eV,marginTop:`${n}px`},o=Ie("context");return v.jsx(t,{style:r,...at(t,o),children:e})},aV=S.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?cV:lV,a=r||t?oV:rV;return v.jsxs(i,{...e,...at(i,o),children:[n&&v.jsx(iV,{children:v.jsx(Dw,{showTopList:!0})}),v.jsxs(a,{children:[v.jsx(tV,{}),v.jsx(Dw,{}),v.jsx(nV,{})]})]})}),{Component:sV,useEmitter:If,useEmitterValue:Ie,usePublisher:gn}=Sf(YL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},aV),lV=Pf({useEmitter:If,useEmitterValue:Ie,usePublisher:gn}),cV=Af({useEmitter:If,useEmitterValue:Ie,usePublisher:gn}),_f=sV,uV=Ke(()=>{const e=le(c=>v.jsxs("td",{children:["Item $",c]})),t=le(null),n=le(c=>v.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=le(null),o=le(null),i=le({}),a=le(Cf),s=le(Yo),l=(c,u=null)=>Wt(ie(i,fe(d=>d[c]),ft()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),dV=Ke(([e,t])=>({...e,...t}),dt(Pw,uV)),fV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{height:e}})}),pV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{border:0,height:e,padding:0}})}),hV={overflowAnchor:"none"},Fw={position:kf(),zIndex:2,overflowAnchor:"none"},Lw=S.memo(function({showTopList:e=!1}){const t=De("listState"),n=De("computeItemKey"),r=De("firstItemIndex"),o=De("context"),i=De("isSeeking"),a=De("fixedHeaderHeight"),s=De("groupIndices").length>0,l=De("itemContent"),c=De("groupContent"),u=De("ScrollSeekPlaceholder")||fV,d=De("GroupComponent"),h=De("TableRowComponent"),f=(e?t.topItems:[]).reduce((m,p,g)=>(g===0?m.push(p.size):m.push(m[g-1]+p.size),m),[]),b=(e?t.topItems:t.items).map(m=>{const p=m.originalIndex,g=n(p+r,m.data,o),y=e?p===0?0:f[p-1]:0;return i?S.createElement(u,{...at(u,o),height:m.size,index:m.index,key:g,type:m.type||"item"}):m.type==="group"?S.createElement(d,{...at(d,o),"data-index":p,"data-item-index":m.index,"data-known-size":m.size,key:g,style:{...Fw,top:a}},c(m.index,o)):S.createElement(h,{...at(h,o),...Nw(h,m.data),"data-index":p,"data-item-index":m.index,"data-known-size":m.size,"data-item-group-index":m.groupIndex,key:g,style:e?{...Fw,top:a+y}:hV},s?l(m.index,m.groupIndex,m.data,o):l(m.index,m.data,o))});return v.jsx(v.Fragment,{children:b})}),mV=S.memo(function(){const e=De("listState"),t=De("topItemsIndexes").length>0,n=kn("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=kn("windowScrollContainerState"),a=kn("scrollContainerState"),s=o||r?i:a,l=De("trackItemSizes"),c=De("itemSize"),u=De("log"),{callbackRef:d,ref:h}=nw(n,c,l,s,u,void 0,o,!1,De("skipAnimationFrameInResizeObserver")),[f,b]=S.useState(0);Of("deviation",_=>{f!==_&&(h.current.style.marginTop=`${_}px`,b(_))});const m=De("EmptyPlaceholder"),p=De("FillerRow")||pV,g=De("TableBodyComponent"),y=De("paddingTopAddition"),x=De("statefulTotalCount"),T=De("context");if(x===0&&m)return v.jsx(m,{...at(m,T)});const w=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),E=e.offsetTop+y+f-w,k=e.offsetBottom,C=E>0?v.jsx(p,{context:T,height:E},"padding-top"):null,M=k>0?v.jsx(p,{context:T,height:k},"padding-bottom"):null;return v.jsxs(g,{"data-testid":"virtuoso-item-list",ref:d,...at(g,T),children:[C,t&&v.jsx(Lw,{showTopList:!0}),v.jsx(Lw,{}),M]})}),gV=({children:e})=>{const t=S.useContext(nl),n=kn("viewportHeight"),r=kn("fixedItemHeight"),o=Rn(S.useMemo(()=>na(n,i=>En(i,"height")),[n]),!0,De("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:o,style:Xo(!1),children:e})},vV=({children:e})=>{const t=S.useContext(nl),n=kn("windowViewportRect"),r=kn("fixedItemHeight"),o=De("customScrollParent"),i=cf(n,o,De("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:Xo(!1),children:e})},yV=S.memo(function(e){const t=De("useWindowScroll"),n=De("customScrollParent"),r=kn("fixedHeaderHeight"),o=kn("fixedFooterHeight"),i=De("fixedHeaderContent"),a=De("fixedFooterContent"),s=De("context"),l=Rn(S.useMemo(()=>na(r,g=>En(g,"height")),[r]),!0,De("skipAnimationFrameInResizeObserver")),c=Rn(S.useMemo(()=>na(o,g=>En(g,"height")),[o]),!0,De("skipAnimationFrameInResizeObserver")),u=n||t?wV:xV,d=n||t?vV:gV,h=De("TableComponent"),f=De("TableHeadComponent"),b=De("TableFooterComponent"),m=i?v.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...at(f,s),children:i()},"TableHead"):null,p=a?v.jsx(b,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...at(b,s),children:a()},"TableFoot"):null;return v.jsx(u,{...e,...at(u,s),children:v.jsx(d,{children:v.jsxs(h,{style:{borderSpacing:0,overflowAnchor:"none"},...at(h,s),children:[m,v.jsx(mV,{},"TableBody"),p]})})})}),{Component:bV,useEmitter:Of,useEmitterValue:De,usePublisher:kn}=Sf(dV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},yV),xV=Pf({useEmitter:Of,useEmitterValue:De,usePublisher:kn}),wV=Af({useEmitter:Of,useEmitterValue:De,usePublisher:kn}),SV=bV,Vw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},TV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:$w,floor:rl,max:fa,min:Mf,round:jw}=Math;function zw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function EV(e){return{...TV,items:e}}function ol(e,t){return e&&e.width===t.width&&e.height===t.height}function kV(e,t){return e&&e.column===t.column&&e.row===t.row}const CV=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},h,f,{didMount:b,propsReady:m},{customScrollParent:p,useWindowScroll:g,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const E=le(0),k=le(0),C=le(Vw),M=le({height:0,width:0}),_=le({height:0,width:0}),F=Be(),L=Be(),H=le(0),I=le(null),O=le({column:0,row:0}),V=Be(),D=Be(),A=le(!1),j=le(0),N=le(!0),q=le(!1),R=le(!1);et(ie(b,je(j),Ce(([z,K])=>!!K)),()=>{Ve(N,!1)}),et(ie(_t(b,N,_,M,j,q),Ce(([z,K,G,Q,,B])=>z&&!K&&G.height!==0&&Q.height!==0&&!B)),([,,,,z])=>{Ve(q,!0),vf(1,()=>{Ve(F,z)}),$n(ie(c),()=>{Ve(t,[0,0]),Ve(N,!0)})}),ve(ie(D,Ce(z=>z!=null&&z.scrollTop>0),jn(0)),k),et(ie(b,je(D),Ce(([,z])=>z!=null)),([,z])=>{z&&(Ve(M,z.viewport),Ve(_,z.item),Ve(O,z.gap),z.scrollTop>0&&(Ve(A,!0),$n(ie(c,Go(1)),K=>{Ve(A,!1)}),Ve(l,{top:z.scrollTop})))}),ve(ie(M,fe(({height:z})=>z)),d),ve(ie(_t(Pe(M,ol),Pe(_,ol),Pe(O,(z,K)=>z&&z.column===K.column&&z.row===K.row),Pe(c)),fe(([z,K,G,Q])=>({gap:G,item:K,scrollTop:Q,viewport:z}))),V),ve(ie(_t(Pe(E),r,Pe(O,kV),Pe(_,ol),Pe(M,ol),Pe(I),Pe(k),Pe(A),Pe(N),Pe(j)),Ce(([,,,,,,,z])=>!z),fe(([z,[K,G],Q,B,se,ce,xe,,Se,Te])=>{const{column:Ae,row:we}=Q,{height:be,width:Re}=B,{width:te}=se;if(xe===0&&(z===0||te===0))return Vw;if(Re===0){const xt=yf(Te,z),Yt=xt+Math.max(xe-1,0);return EV(zw(xt,Yt,ce))}const Z=Rw(te,Re,Ae);let $,J;Se?K===0&&G===0&&xe>0?($=0,J=xe-1):($=Z*rl((K+we)/(be+we)),J=Z*$w((G+we)/(be+we))-1,J=Mf(z-1,fa(J,Z-1)),$=Mf(J,fa(0,$))):($=0,J=-1);const de=zw($,J,ce),{bottom:ye,top:Ne}=Bw(se,Q,B,de),st=$w(z/Z),Lt=st*be+(st-1)*we-ye;return{bottom:ye,itemHeight:be,items:de,itemWidth:Re,offsetBottom:Lt,offsetTop:Ne,top:Ne}})),C),ve(ie(I,Ce(z=>z!==null),fe(z=>z.length)),E),ve(ie(_t(M,_,C,O),Ce(([z,K,{items:G}])=>G.length>0&&K.height!==0&&z.height!==0),fe(([z,K,{items:G},Q])=>{const{bottom:B,top:se}=Bw(z,Q,K,G);return[se,B]}),ft(ia)),t);const Y=le(!1);ve(ie(c,je(Y),fe(([z,K])=>K||z!==0)),Y);const X=on(ie(_t(C,E),Ce(([{items:z}])=>z.length>0),je(Y),Ce(([[z,K],G])=>{const Q=z.items[z.items.length-1].index===K-1;return(G||z.bottom>0&&z.itemHeight>0&&z.offsetBottom===0&&z.items.length===K)&&Q}),fe(([[,z]])=>z-1),ft())),oe=on(ie(Pe(C),Ce(({items:z})=>z.length>0&&z[0].index===0),jn(0),ft())),ne=on(ie(Pe(C),je(A),Ce(([{items:z},K])=>z.length>0&&!K),fe(([{items:z}])=>({endIndex:z[z.length-1].index,startIndex:z[0].index})),ft(uw),br(0)));ve(ne,f.scrollSeekRangeChanged),ve(ie(F,je(M,_,E,O),fe(([z,K,G,Q,B])=>{const se=gw(z),{align:ce,behavior:xe,offset:Se}=se;let Te=se.index;Te==="LAST"&&(Te=Q-1),Te=fa(0,Te,Mf(Q-1,Te));let Ae=Df(K,B,G,Te);return ce==="end"?Ae=jw(Ae-K.height+G.height):ce==="center"&&(Ae=jw(Ae-K.height/2+G.height/2)),Se&&(Ae+=Se),{behavior:xe,top:Ae}})),l);const ee=Wt(ie(C,fe(z=>z.offsetBottom+z.bottom)),0);return ve(ie(T,fe(z=>({height:z.visibleHeight,width:z.visibleWidth}))),M),{customScrollParent:p,data:I,deviation:H,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:_,overscan:n,restoreStateFrom:D,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:E,useWindowScroll:g,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:C,horizontalDirection:R,initialTopMostItemIndex:j,totalListHeight:ee,...h,endReached:X,propsReady:m,rangeChanged:ne,startReached:oe,stateChanged:V,stateRestoreInProgress:A,...w}},dt(bf,Kt,da,kw,wr,wf,xr));function Rw(e,t,n){return fa(1,rl((e+n)/(rl(t)+n)))}function Bw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Df(e,t,n,r[0].index);return{bottom:Df(e,t,n,r[r.length-1].index)+o,top:i}}function Df(e,t,n,r){const o=Rw(e.width,n.width,t.column),i=rl(r/o),a=i*n.height+fa(0,i-1)*t.row;return a>0?a+t.row:a}const PV=Ke(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(Cf),a=le("div"),s=le(Yo),l=(d,h=null)=>Wt(ie(t,fe(f=>f[d]),ft()),h),c=le(!1),u=le(!1);return ve(Pe(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")}}),AV=Ke(([e,t])=>({...e,...t}),dt(CV,PV)),IV=S.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),o=pt("computeItemKey"),i=pt("isSeeking"),a=vn("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),c=pt("ScrollSeekPlaceholder"),u=pt("context"),d=vn("itemDimensions"),h=vn("gap"),f=pt("log"),b=pt("stateRestoreInProgress"),m=vn("reportReadyState"),p=Rn(S.useMemo(()=>g=>{const y=g.parentElement.parentElement.scrollHeight;a(y);const x=g.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}h({column:Ww("column-gap",getComputedStyle(g).columnGap,f),row:Ww("row-gap",getComputedStyle(g).rowGap,f)})},[a,d,h,f]),!0,!1);return Iw(()=>{e.itemHeight>0&&e.itemWidth>0&&m(!0)},[e]),b?null:v.jsx(l,{className:t,ref:p,...at(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(g=>{const y=o(g.index,g.data,u);return i?v.jsx(c,{...at(c,u),height:e.itemHeight,index:g.index,width:e.itemWidth},y):S.createElement(s,{...at(s,u),className:n,"data-index":g.index,key:y},r(g.index,g.data,u))})})}),_V=S.memo(function(){const e=pt("HeaderComponent"),t=vn("headerHeight"),n=pt("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=pt("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...at(e,o)})}):null}),OV=S.memo(function(){const e=pt("FooterComponent"),t=vn("footerHeight"),n=pt("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=pt("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...at(e,o)})}):null}),MV=({children:e})=>{const t=S.useContext(Aw),n=vn("itemDimensions"),r=vn("viewportDimensions"),o=Rn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),v.jsx("div",{ref:o,style:Xo(!1),children:e})},DV=({children:e})=>{const t=S.useContext(Aw),n=vn("windowViewportRect"),r=vn("itemDimensions"),o=pt("customScrollParent"),i=cf(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),v.jsx("div",{ref:i,style:Xo(!1),children:e})},NV=S.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?LV:FV,o=n||t?DV:MV,i=pt("context");return v.jsx(r,{...e,...at(r,i),children:v.jsxs(o,{children:[v.jsx(_V,{}),v.jsx(IV,{}),v.jsx(OV,{})]})})}),{useEmitter:Hw,useEmitterValue:pt,usePublisher:vn}=Sf(AV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},NV),FV=Pf({useEmitter:Hw,useEmitterValue:pt,usePublisher:vn}),LV=Af({useEmitter:Hw,useEmitterValue:pt,usePublisher:vn});function Ww(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Nf=()=>{const e=S.useContext(Oo);return e?e.tweaks:ss},qw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>v.jsxs("span",{className:ke("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:v.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?v.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?v.jsx(of,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:v.jsx("span",{className:"cursor-help",children:v.jsx(py,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:v.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?v.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[v.jsx(ly,{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}),v.jsx(LI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),pa=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:h="",name:f,title:b,componentName:m,placeholder:p,hideLeft:g=!1,required:y,disabled:x,reportStatus:T},w)=>{const E=Nf(),k=T!==void 0?T:E.input.iconFeedback,C=d??f,M=Et(),_=e??M.inputOptionalLabel;return v.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":m,"data-interactive":!!i,className:ke("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[v.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[v.jsx(qw,{info:s,hideLeft:g,reportStatus:k,title:b,placeholder:p,children:_||n?v.jsxs(S.Fragment,{children:[y?null:v.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:_}),n?v.jsx(S.Fragment,{children:n}):null]}):null}),v.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 ${h}`,children:[t?v.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?v.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),v.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}),v.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})]})}),VV=e=>v.jsx(S.Fragment,{children:e.children}),$V={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},jV=[],zV=S.forwardRef(function(t,n){return v.jsx(ut.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:v.jsx(ir,{children:t.children})})}),RV=S.forwardRef(function({item:t,context:n,...r},o){return v.jsx(ut.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),BV={List:zV,Item:RV},Qo=44,HV=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:h=!1,required:f=!1,dynamicOption:b=!1,...m},p)=>{const g=S.useRef(null),y=S.useRef(null),x=S.useRef(null),T=m.value??m.defaultValue??"",w=Et(),[E,k]=S.useState(()=>Math.min(320,Qo*o.length)),[C,M]=S.useState(!1),[_,F]=S.useState(""),[L,H]=S.useState(T),[I,O]=S.useState(()=>o.find(te=>te.value===T)?.label??T),[V,D]=S.useState(null),A=S.useRef(jV),j=ef(C,"block-only"),N=b&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,q=_?Qd(N,"value",[{key:"value",value:_},{key:"label",value:_}]):N,R=()=>{M(!1),k(0)},Y=q.filter(te=>te.hidden!==!0),X=b?void 0:`^(${o.map(te=>`${rd(te.value)}${te.label?"|"+rd(te.label):""}`).join("|")})$`,{x:oe,y:ne,strategy:ee,refs:z,context:K}=gr({open:C,transform:!0,onOpenChange:M,placement:"bottom-start",whileElementsMounted:$o,middleware:[Zi(4),e0({padding:10,elementContext:"reference",apply(te){const $=te.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,J=gi(z.reference.current,window.innerHeight),de=Math.min($<Qo?J:$,J,te.availableHeight),ye=Y.length===0?Qo:Math.min(de,J,$),Ne=`${y.current.getBoundingClientRect().width}px`;Object.assign(te.elements.floating.style,{width:Ne,maxWidth:Ne,height:ye})}})]}),G=F0(K,$V),{getReferenceProps:Q,getFloatingProps:B,getItemProps:se}=vr([Xr(K,{role:"listbox"}),Zr(K),Bs(K,{cols:0,listRef:A,loop:!0,virtual:!0,allowEscape:!0,activeIndex:V,selectedIndex:V,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(m.value){const te=o.find(Z=>Z.value===m.value);H(te?.label??m.value)}},[m.value,o.length]),S.useEffect(()=>{if(!C)return k(0);const te=z.reference;if(te.current===null)return;const Z=gi(te.current,window.innerHeight);setTimeout(()=>k(Math.min(Z,Y.length*Qo)),100)},[_,C,z.reference,Y.length]),S.useEffect(()=>{const te=z.reference.current;if(te)return mi(te)},[]);const ce=(te,Z)=>{H(te.value);const $=z.reference.current;if(!$)return;$?.setAttribute("data-value",te.value),$.value=te.value;const J=new Event("change",{bubbles:!1,cancelable:!0});$.dispatchEvent(J),m.onChange&&m.onChange(J),O(te.label??""),R(),F(""),D(Z)},xe=te=>{const Z=te.target.value;return F(Z),!C&&Z===""?M(!0):(te.target.name=m.name||"",Z?M(!0):m.onChange?.(te))},Se=()=>{M(!0),F(""),z.reference.current?.focus()},Te=()=>{D(te=>te===null?0:te),M(!0),F("")},Ae=()=>{z.reference.current?.setAttribute("data-value",""),F(""),H(""),O(""),Kh(z.reference.current),R()},we=m.id||m.name,be=`${we}-shadow`,Re=Y.length===0;return v.jsxs(pa,{...m,left:e,error:t,ref:y,form:m.form,loading:r,name:m.name,feedback:d,hideLeft:h,required:f,title:m.title,container:i,rightLabel:a,interactive:s,id:be,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Se,children:[v.jsx(Nu,{size:20}),v.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),L?v.jsx("button",{type:"button",onClick:Ae,className:"p-2 transition-colors link:text-danger md:p-1",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.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:[v.jsx("input",{"data-shadow":"true",...Q({...m,onFocus:Te,pattern:X,onChange:xe,id:be,name:be,ref:z.setReference,onClick:te=>te.currentTarget.focus(),onKeyDown(te){if(te.key==="Escape")return te.currentTarget.blur(),R();if(C){if(te.key==="ArrowDown"){let Z=$e.number(V)?V+1:0;return Z>Y.length-1&&(Z=0),x.current?.scrollIntoView({index:Z}),D(Z)}if(te.key==="ArrowUp"){let Z=$e.number(V)?V-1:Y.length-1;return Z<0&&(Z=Y.length-1),x.current?.scrollIntoView({index:Z}),D(Z)}if(te.key==="Enter"){if(V!==null&&Y[V])return te.preventDefault(),ce(Y[V],V);if(Y.length===1)return te.preventDefault(),ce(Y[0],0)}}}}),"data-value":L,"data-error":!!t,"data-name":we,"data-target":we,required:f,value:C?_:I||L,"aria-autocomplete":"list",autoComplete:"off",className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",m.className)}),v.jsx("input",{id:we,name:we,type:"hidden","data-origin":we,ref:p,required:f,defaultValue:m.value||L||void 0}),v.jsx(Yr,{preserveTabOrder:!0,children:C?v.jsx(Wo,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs(ut.div,{...B({ref:Kn(j,z.setFloating),style:{...G.styles,left:oe,top:ne??0,position:ee}}),initial:!1,"data-floating":"true",animate:{height:Re?"auto":E},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!C)return k(0);const Z=z.floating.current.querySelectorAll("li").item(0),$=(Z?Z.getBoundingClientRect().height:Qo)*Y.length;return fi.flushSync(()=>k($+10))},children:[Re?v.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,v.jsx(_f,{overscan:40,ref:x,hidden:Re,data:Y,style:{height:E-10},defaultItemHeight:Qo,components:BV,scrollerRef:te=>void(g.current=te),className:"max-h-[calc(100%-2px)] overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(te,Z)=>{const $=Z.Render??VV,J=L===Z.value||L===Z.label,de=V===te,ye=Z.label??Z.value;return v.jsx("button",{"data-value":Z.value,...se({ref:Ne=>void(A.current[te]=Ne),role:"option",type:"button","aria-checked":J,"aria-current":J,"aria-selected":J,"aria-busy":Z.disabled,onClick:()=>ce(Z,te),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${J?"bg-primary-hover text-primary-foreground":""} ${de?"bg-floating-hover text-floating-foreground":""}`}),children:v.jsx($,{...m,label:Z.label,value:Z.value,children:ye})})}})]})}):null})]})}),Ff=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return v.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:ke("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[v.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:ke("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,v.jsx("span",{"data-name":"checkbox-label",className:ke("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Uw=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:h,optionalText:f,type:b="text",labelClassName:m,feedback:p=null,hideLeft:g=!1,loading:y,...x},T)=>{const w=e,E=x.id??x.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const C=k.current,M=mi(k.current),_=r?.(C),F=L=>{const H=L;if(H.key==="Enter"&&C.enterKeyHint==="next"){const I=C.getAttribute("data-next");if(I){const O=document.getElementById(I);if(O)return O.focus(),void H.preventDefault()}}};return C.addEventListener("keydown",F),()=>{_?.(),M(),C.removeEventListener("keydown",F)}},[]),v.jsx(pa,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:p,hideLeft:g,title:x.title,container:ke(u,n.container),rightLabel:d,disabled:x.disabled,interactive:h,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:m,placeholder:x.placeholder,children:v.jsx(w,{...n,...x,id:E,name:E,type:b,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Kn(T,k),className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ha=Uw(Ky,"input",{type:"text"}),Kw=new Date(1970,11,31),Lf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Yw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},WV={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")},Vf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},qV=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=td(t),l=S.useId(),c=Et(),u=S.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,h]=S.useState(e||void 0),[f,b]=S.useState(!1),m=Vf(u,Kw).flatMap(k=>$e.keyof(Lf,k.type)?Lf[k.type](k.value):[]),p=Vf(u,Kw).reduce((k,C)=>k+($e.keyof(Yw,C.type)?Yw[C.type](C.value):""),""),[g,y]=S.useState(d?Vf(u,d).reduce((k,C)=>k+($e.keyof(Lf,C.type)?WV[C.type](d,C.value):""),""):""),x=k=>{const C=k.target.value;if(y(C),m.length===C.length&&m.every((_,F)=>{const L=C.charAt(F);return typeof _=="string"?L===_:_.test(L)})){const _=Co(QO(C,p,new Date));return h(_),r?.(_)}return h(void 0),r?.(void 0)},T=k=>(h(k),r?.(k),y(k?Q_(k,p):"")),w=$u(d),E=w?d.toISOString():void 0;return v.jsx(ha,{...i,mask:m,value:g,id:void 0,name:void 0,"data-value":E,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??p,right:v.jsxs(S.Fragment,{children:[v.jsx("input",{"data-origin":i.name,defaultValue:E,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),v.jsx(Uo,{open:f,onChange:b,trigger:v.jsxs("span",{"aria-labelledby":l,children:[v.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),v.jsx(NI,{})]}),buttonProps:{"aria-describedby":l},children:v.jsx(gb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),UV=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],KV=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],YV=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],GV=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Gw=(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},Zw=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},ZV=e=>typeof e=="number"?Math.log(e):Zw(e)*Math.log(10),XV=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t};function QV(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?GV:YV:t.binary?KV:UV,r=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Gw(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?ZV(e)/Math.log(1024):Zw(e)/3),n.length-1);e=XV(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));const l=Gw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var il={exports:{}},al={exports:{}},Ge={};/** @license React v16.13.1
223
223
  * react-is.production.min.js
224
224
  *
225
225
  * Copyright (c) Facebook, Inc. and its affiliates.
226
226
  *
227
227
  * This source code is licensed under the MIT license found in the
228
228
  * LICENSE file in the root directory of this source tree.
229
- */var Ow;function PV(){if(Ow)return Ze;Ow=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return T}}case n:return T}}}function S(w){return b(w)===c}return Ze.AsyncMode=l,Ze.ConcurrentMode=c,Ze.ContextConsumer=s,Ze.ContextProvider=a,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=r,Ze.Lazy=m,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=i,Ze.StrictMode=o,Ze.Suspense=d,Ze.isAsyncMode=function(w){return S(w)||b(w)===l},Ze.isConcurrentMode=S,Ze.isContextConsumer=function(w){return b(w)===s},Ze.isContextProvider=function(w){return b(w)===a},Ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ze.isForwardRef=function(w){return b(w)===u},Ze.isFragment=function(w){return b(w)===r},Ze.isLazy=function(w){return b(w)===m},Ze.isMemo=function(w){return b(w)===f},Ze.isPortal=function(w){return b(w)===n},Ze.isProfiler=function(w){return b(w)===i},Ze.isStrictMode=function(w){return b(w)===o},Ze.isSuspense=function(w){return b(w)===d},Ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===y||w.$$typeof===x||w.$$typeof===g)},Ze.typeOf=b,Ze}var Xe={};/** @license React v16.13.1
229
+ */var Xw;function JV(){if(Xw)return Ge;Xw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case b:case f:case a:return w;default:return E}}case n:return E}}}function T(w){return x(w)===c}return Ge.AsyncMode=l,Ge.ConcurrentMode=c,Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=b,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(w){return T(w)||x(w)===l},Ge.isConcurrentMode=T,Ge.isContextConsumer=function(w){return x(w)===s},Ge.isContextProvider=function(w){return x(w)===a},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return x(w)===u},Ge.isFragment=function(w){return x(w)===r},Ge.isLazy=function(w){return x(w)===b},Ge.isMemo=function(w){return x(w)===f},Ge.isPortal=function(w){return x(w)===n},Ge.isProfiler=function(w){return x(w)===i},Ge.isStrictMode=function(w){return x(w)===o},Ge.isSuspense=function(w){return x(w)===d},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===p||w.$$typeof===g||w.$$typeof===y||w.$$typeof===m)},Ge.typeOf=x,Ge}var Ze={};/** @license React v16.13.1
230
230
  * react-is.development.js
231
231
  *
232
232
  * Copyright (c) Facebook, Inc. and its affiliates.
233
233
  *
234
234
  * This source code is licensed under the MIT license found in the
235
235
  * LICENSE file in the root directory of this source tree.
236
- */var Mw;function IV(){return Mw||(Mw=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,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===d||R===p||typeof R=="object"&&R!==null&&(R.$$typeof===m||R.$$typeof===f||R.$$typeof===a||R.$$typeof===s||R.$$typeof===u||R.$$typeof===h||R.$$typeof===y||R.$$typeof===x||R.$$typeof===g)}function S(R){if(typeof R=="object"&&R!==null){var be=R.$$typeof;switch(be){case t:var Ee=R.type;switch(Ee){case l:case c:case r:case i:case o:case d:return Ee;default:var Pe=Ee&&Ee.$$typeof;switch(Pe){case s:case u:case m:case f:case a:return Pe;default:return be}}case n:return be}}}var w=l,T=c,C=s,k=a,_=t,A=u,L=r,N=m,$=f,I=n,M=i,D=o,V=d,F=!1;function H(R){return F||(F=!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.")),O(R)||S(R)===l}function O(R){return S(R)===c}function B(R){return S(R)===s}function X(R){return S(R)===a}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function J(R){return S(R)===u}function G(R){return S(R)===r}function Y(R){return S(R)===m}function Z(R){return S(R)===f}function j(R){return S(R)===n}function z(R){return S(R)===i}function K(R){return S(R)===o}function ie(R){return S(R)===d}Xe.AsyncMode=w,Xe.ConcurrentMode=T,Xe.ContextConsumer=C,Xe.ContextProvider=k,Xe.Element=_,Xe.ForwardRef=A,Xe.Fragment=L,Xe.Lazy=N,Xe.Memo=$,Xe.Portal=I,Xe.Profiler=M,Xe.StrictMode=D,Xe.Suspense=V,Xe.isAsyncMode=H,Xe.isConcurrentMode=O,Xe.isContextConsumer=B,Xe.isContextProvider=X,Xe.isElement=Q,Xe.isForwardRef=J,Xe.isFragment=G,Xe.isLazy=Y,Xe.isMemo=Z,Xe.isPortal=j,Xe.isProfiler=z,Xe.isStrictMode=K,Xe.isSuspense=ie,Xe.isValidElementType=b,Xe.typeOf=S}()),Xe}var Dw;function Nw(){return Dw||(Dw=1,process.env.NODE_ENV==="production"?Js.exports=PV():Js.exports=IV()),Js.exports}/*
236
+ */var Qw;function e$(){return Qw||(Qw=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===h||typeof B=="object"&&B!==null&&(B.$$typeof===b||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===p||B.$$typeof===g||B.$$typeof===y||B.$$typeof===m)}function T(B){if(typeof B=="object"&&B!==null){var se=B.$$typeof;switch(se){case t:var ce=B.type;switch(ce){case l:case c:case r:case i:case o:case d:return ce;default:var xe=ce&&ce.$$typeof;switch(xe){case s:case u:case b:case f:case a:return xe;default:return se}}case n:return se}}}var w=l,E=c,k=s,C=a,M=t,_=u,F=r,L=b,H=f,I=n,O=i,V=o,D=d,A=!1;function j(B){return A||(A=!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.")),N(B)||T(B)===l}function N(B){return T(B)===c}function q(B){return T(B)===s}function R(B){return T(B)===a}function Y(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function X(B){return T(B)===u}function oe(B){return T(B)===r}function ne(B){return T(B)===b}function ee(B){return T(B)===f}function z(B){return T(B)===n}function K(B){return T(B)===i}function G(B){return T(B)===o}function Q(B){return T(B)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=E,Ze.ContextConsumer=k,Ze.ContextProvider=C,Ze.Element=M,Ze.ForwardRef=_,Ze.Fragment=F,Ze.Lazy=L,Ze.Memo=H,Ze.Portal=I,Ze.Profiler=O,Ze.StrictMode=V,Ze.Suspense=D,Ze.isAsyncMode=j,Ze.isConcurrentMode=N,Ze.isContextConsumer=q,Ze.isContextProvider=R,Ze.isElement=Y,Ze.isForwardRef=X,Ze.isFragment=oe,Ze.isLazy=ne,Ze.isMemo=ee,Ze.isPortal=z,Ze.isProfiler=K,Ze.isStrictMode=G,Ze.isSuspense=Q,Ze.isValidElementType=x,Ze.typeOf=T}()),Ze}var Jw;function e1(){return Jw||(Jw=1,process.env.NODE_ENV==="production"?al.exports=JV():al.exports=e$()),al.exports}/*
237
237
  object-assign
238
238
  (c) Sindre Sorhus
239
239
  @license MIT
240
- */var _f,Fw;function _V(){if(Fw)return _f;Fw=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 _f=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},_f}var Of,Lw;function Mf(){if(Lw)return Of;Lw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Of=e,Of}var Df,Vw;function $w(){return Vw||(Vw=1,Df=Function.call.bind(Object.prototype.hasOwnProperty)),Df}var Nf,jw;function OV(){if(jw)return Nf;jw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Mf(),n={},r=$w();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={})},Nf=o,Nf}var Ff,zw;function MV(){if(zw)return Ff;zw=1;var e=Nw(),t=_V(),n=Mf(),r=$w(),o=OV(),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 Ff=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(O){var B=O&&(c&&O[c]||O[u]);if(typeof B=="function")return B}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:S(),elementType:w(),instanceOf:T,node:A(),objectOf:k,oneOf:C,oneOfType:_,shape:N,exact:$};function m(O,B){return O===B?O!==0||1/O===1/B:O!==O&&B!==B}function g(O,B){this.message=O,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h(O){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q(G,Y,Z,j,z,K,ie){if(j=j||p,K=K||Z,ie!==n){if(l){var R=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 R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=j+":"+Z;!B[be]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+j+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[be]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:O(Y,Z,j,z,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function y(O){function B(X,Q,J,G,Y,Z){var j=X[Q],z=D(j);if(z!==O){var K=V(j);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return h(B)}function x(){return h(a)}function b(O){function B(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var j=D(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an array."))}for(var z=0;z<Z.length;z++){var K=O(Z,z,J,G,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return h(B)}function S(){function O(B,X,Q,J,G){var Y=B[X];if(!s(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return h(O)}function w(){function O(B,X,Q,J,G){var Y=B[X];if(!e.isValidElementType(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return h(O)}function T(O){function B(X,Q,J,G,Y){if(!(X[Q]instanceof O)){var Z=O.name||p,j=H(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return h(B)}function C(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(X,Q,J,G,Y){for(var Z=X[Q],j=0;j<O.length;j++)if(m(Z,O[j]))return null;var z=JSON.stringify(O,function(ie,R){var be=V(R);return be==="symbol"?String(R):R});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+z+"."))}return h(B)}function k(O){function B(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an object."));for(var z in Z)if(r(Z,z)){var K=O(Z,z,J,G,Y+"."+z,n);if(K instanceof Error)return K}return null}return h(B)}function _(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<O.length;B++){var X=O[B];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(X)+" at index "+B+"."),a}function Q(J,G,Y,Z,j){for(var z=[],K=0;K<O.length;K++){var ie=O[K],R=ie(J,G,Y,Z,j,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&z.push(R.data.expectedType)}var be=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+Z+" `"+j+"` supplied to "+("`"+Y+"`"+be+"."))}return h(Q)}function A(){function O(B,X,Q,J,G){return I(B[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return h(O)}function L(O,B,X,Q,J){return new g((O||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(O){function B(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));for(var z in O){var K=O[z];if(typeof K!="function")return L(J,G,Y,z,V(K));var ie=K(Z,z,J,G,Y+"."+z,n);if(ie)return ie}return null}return h(B)}function $(O){function B(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));var z=t({},X[Q],O);for(var K in z){var ie=O[K];if(r(O,K)&&typeof ie!="function")return L(J,G,Y,K,V(ie));if(!ie)return new g("Invalid "+G+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
241
- Valid keys: `+JSON.stringify(Object.keys(O),null," "));var R=ie(Z,K,J,G,Y+"."+K,n);if(R)return R}return null}return h(B)}function I(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(I);if(O===null||s(O))return!0;var B=d(O);if(B){var X=B.call(O),Q;if(B!==O.entries){for(;!(Q=X.next()).done;)if(!I(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!I(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(O,B){return O==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function D(O){var B=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":M(B,O)?"symbol":B}function V(O){if(typeof O>"u"||O===null)return""+O;var B=D(O);if(B==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return B}function F(O){var B=V(O);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function H(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Ff}var Lf,Bw;function DV(){if(Bw)return Lf;Bw=1;var e=Mf();function t(){}function n(){}return n.resetWarningCache=t,Lf=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},Lf}var Rw;function NV(){if(Rw)return Qs.exports;if(Rw=1,process.env.NODE_ENV!=="production"){var e=Nw(),t=!0;Qs.exports=MV()(e.isElement,t)}else Qs.exports=DV()();return Qs.exports}var FV=NV();const it=Pp(FV);function eo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const LV=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 oi(e,t,n){const r=VV(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Hw(r,"path",i),Hw(r,"relativePath",i),r}function VV(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=LV.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Hw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const $V=[".DS_Store","Thumbs.db"];function jV(e){return eo(this,void 0,void 0,function*(){return el(e)&&zV(e.dataTransfer)?WV(e.dataTransfer,e.type):BV(e)?RV(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?HV(e):[]})}function zV(e){return el(e)}function BV(e){return el(e)&&el(e.target)}function el(e){return typeof e=="object"&&e!==null}function RV(e){return Vf(e.target.files).map(t=>oi(t))}function HV(e){return eo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>oi(n))})}function WV(e,t){return eo(this,void 0,void 0,function*(){if(e.items){const n=Vf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(qV));return Ww(qw(r))}return Ww(Vf(e.files).map(n=>oi(n)))})}function Ww(e){return e.filter(t=>$V.indexOf(t.name)===-1)}function Vf(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 qV(e){if(typeof e.webkitGetAsEntry!="function")return Uw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Kw(t):Uw(e,t)}function qw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?qw(n):[n]],[])}function Uw(e,t){return eo(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,oi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return oi(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function UV(e){return eo(this,void 0,void 0,function*(){return e.isDirectory?Kw(e):KV(e)})}function Kw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>eo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(UV));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function KV(e){return eo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=oi(r,e.fullPath);t(o)},r=>{n(r)})})})}var tl={},Yw;function YV(){return Yw||(Yw=1,tl.__esModule=!0,tl.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}),tl}var GV=YV();const $f=Pp(GV);function Gw(e){return QV(e)||XV(e)||Jw(e)||ZV()}function ZV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
242
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QV(e){if(Array.isArray(e))return jf(e)}function Zw(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 Xw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zw(Object(n),!0).forEach(function(r){Qw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ga(e,t){return t$(e)||e$(e,t)||Jw(e,t)||JV()}function JV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
243
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jw(e,t){if(e){if(typeof e=="string")return jf(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 jf(e,t)}}function jf(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 e$(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 t$(e){if(Array.isArray(e))return e}var n$=typeof $f=="function"?$f:$f.default,r$="file-invalid-type",o$="file-too-large",i$="file-too-small",a$="too-many-files",s$=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:r$,message:"File type must be ".concat(r)}},e1=function(t){return{code:o$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},t1=function(t){return{code:i$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},l$={code:a$,message:"Too many files"};function n1(e,t){var n=e.type==="application/x-moz-file"||n$(e,t);return[n,n?null:s$(t)]}function r1(e,t,n){if(to(e.size))if(to(t)&&to(n)){if(e.size>n)return[!1,e1(n)];if(e.size<t)return[!1,t1(t)]}else{if(to(t)&&e.size<t)return[!1,t1(t)];if(to(n)&&e.size>n)return[!1,e1(n)]}return[!0,null]}function to(e){return e!=null}function c$(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=n1(l,n),u=ga(c,1),d=u[0],p=r1(l,r,o),f=ga(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function nl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function rl(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 o1(e){e.preventDefault()}function u$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function d$(e){return e.indexOf("Edge/")!==-1}function f$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return u$(e)||d$(e)}function zn(){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!nl(r)&&s&&s.apply(void 0,[r].concat(i)),nl(r)})}}function p$(){return"showOpenFilePicker"in window}function h$(e){if(to(e)){var t=Object.entries(e).filter(function(n){var r=ga(n,2),o=r[0],i=r[1],a=!0;return i1(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(a1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ga(r,2),i=o[0],a=o[1];return Xw(Xw({},n),{},Qw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function m$(e){if(to(e))return Object.entries(e).reduce(function(t,n){var r=ga(n,2),o=r[0],i=r[1];return[].concat(Gw(t),[o],Gw(i))},[]).filter(function(t){return i1(t)||a1(t)}).join(",")}function g$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function v$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function i1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function a1(e){return/^.*\.[\w]+$/.test(e)}var y$=["children"],b$=["open"],x$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],w$=["refKey","onChange","onClick"];function S$(e){return C$(e)||E$(e)||s1(e)||T$()}function T$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
244
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function C$(e){if(Array.isArray(e))return Bf(e)}function zf(e,t){return P$(e)||A$(e,t)||s1(e,t)||k$()}function k$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s1(e,t){if(e){if(typeof e=="string")return Bf(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 Bf(e,t)}}function Bf(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 A$(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 P$(e){if(Array.isArray(e))return e}function l1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l1(Object(n),!0).forEach(function(r){Rf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ol(e,t){if(e==null)return{};var n=I$(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 I$(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 Hf=E.forwardRef(function(e,t){var n=e.children,r=ol(e,y$),o=u1(r),i=o.open,a=ol(o,b$);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});Hf.displayName="Dropzone";var c1={disabled:!1,getFilesFromEvent:jV,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};Hf.defaultProps=c1,Hf.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var Wf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function u1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},c1),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,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,_=t.validator,A=E.useMemo(function(){return m$(n)},[n]),L=E.useMemo(function(){return h$(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:d1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:d1},[g]),I=E.useRef(null),M=E.useRef(null),D=E.useReducer(_$,Wf),V=zf(D,2),F=V[0],H=V[1],O=F.isFocused,B=F.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&p$()),Q=function(){!X.current&&B&&setTimeout(function(){if(M.current){var ne=M.current.files;ne.length||(H({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[M,B,$,X]);var J=E.useRef([]),G=function(ne){I.current&&I.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",o1,!1),document.addEventListener("drop",G,!1)),function(){b&&(document.removeEventListener("dragover",o1),document.removeEventListener("drop",G))}},[I,b]),E.useEffect(function(){return!r&&x&&I.current&&I.current.focus(),function(){}},[I,x,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(S$(J.current),[q.target]),rl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(nl(q)&&!C)){var he=ne.length,Me=he>0&&c$({files:ne,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:_}),qe=he>0&&!Me;H({isDragAccept:Me,isDragReject:qe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(ne){return Y(ne)})},[o,c,Y,C,A,a,i,s,l,_]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=rl(q);if(ne&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(q),!1},[d,C]),z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=J.current.filter(function(Me){return I.current&&I.current.contains(Me)}),he=ne.indexOf(q.target);he!==-1&&ne.splice(he,1),J.current=ne,!(ne.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),rl(q)&&u&&u(q))},[I,u,C]),K=E.useCallback(function(q,ne){var he=[],Me=[];q.forEach(function(qe){var Qe=n1(qe,A),jt=zf(Qe,2),Cn=jt[0],Rn=jt[1],Ar=r1(qe,a,i),Pr=zf(Ar,2),Ir=Pr[0],W=Pr[1],U=_?_(qe):null;if(Cn&&Ir&&!U)he.push(qe);else{var Be=[Rn,W];U&&(Be=Be.concat(U)),Me.push({file:qe,errors:Be.filter(function(rt){return rt})})}}),(!s&&he.length>1||s&&l>=1&&he.length>l)&&(he.forEach(function(qe){Me.push({file:qe,errors:[l$]})}),he.splice(0)),H({acceptedFiles:he,fileRejections:Me,isDragReject:Me.length>0,type:"setFiles"}),p&&p(he,Me,ne),Me.length>0&&m&&m(Me,ne),he.length>0&&f&&f(he,ne)},[H,s,A,a,i,l,p,f,m,_]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],rl(q)&&Promise.resolve(o(q)).then(function(ne){nl(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),H({type:"reset"})},[o,K,Y,C]),R=E.useCallback(function(){if(X.current){H({type:"openDialog"}),N();var q={multiple:s,types:L};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),H({type:"closeDialog"})}).catch(function(ne){g$(ne)?($(ne),H({type:"closeDialog"})):v$(ne)?(X.current=!1,M.current?(M.current.value=null,M.current.click()):Y(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."))):Y(ne)});return}M.current&&(H({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[H,N,$,y,K,Y,L,s]),be=E.useCallback(function(q){!I.current||!I.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),R())},[I,R]),Ee=E.useCallback(function(){H({type:"focus"})},[]),Pe=E.useCallback(function(){H({type:"blur"})},[]),ze=E.useCallback(function(){S||(f$()?setTimeout(R,0):R())},[S,R]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return T?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,he=ne===void 0?"ref":ne,Me=q.role,qe=q.onKeyDown,Qe=q.onFocus,jt=q.onBlur,Cn=q.onClick,Rn=q.onDragEnter,Ar=q.onDragOver,Pr=q.onDragLeave,Ir=q.onDrop,W=ol(q,x$);return vt(vt(Rf({onKeyDown:we(zn(qe,be)),onFocus:we(zn(Qe,Ee)),onBlur:we(zn(jt,Pe)),onClick:le(zn(Cn,ze)),onDragEnter:ce(zn(Rn,Z)),onDragOver:ce(zn(Ar,j)),onDragLeave:ce(zn(Pr,z)),onDrop:ce(zn(Ir,ie)),role:typeof Me=="string"&&Me!==""?Me:"presentation"},he,I),!r&&!w?{tabIndex:0}:{}),W)}},[I,be,Ee,Pe,ze,Z,j,z,ie,w,T,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),te=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,he=ne===void 0?"ref":ne,Me=q.onChange,qe=q.onClick,Qe=ol(q,w$),jt=Rf({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:le(zn(Me,ie)),onClick:le(zn(qe,ue)),tabIndex:-1},he,M);return vt(vt({},jt),Qe)}},[M,n,s,ie,r]);return vt(vt({},F),{},{isFocused:O&&!r,getRootProps:oe,getInputProps:te,rootRef:I,inputRef:M,open:le(R)})}function _$(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},Wf),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},Wf);default:return e}}function d1(){}const f1=E.createContext([null,()=>{}]),O$=()=>E.useContext(f1),M$=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,D$={csv:Iu,xls:Iu,mov:ey,mp4:ey,xlsx:Iu,pdf:Jv,txt:Jv,json:CI,mp3:xI},N$=e=>{const[,t]=O$(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:M$(l),size:AV(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{var c;l.preventDefault(),l.stopPropagation(),(c=e.onDeleteFile)==null||c.call(e,e.file)},a=D$[e.file.name.split(".").at(-1)]??ty,s=n.type==="img"?v.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):v.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return v.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[v.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),v.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[v.jsx("span",{children:e.file.name}),v.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?v.jsx("div",{className:"flex-1 min-w-full",children:v.jsx(e.File,{file:e.file})}):null]}),v.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:v.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:v.jsx(zi,{size:16})})})]})},F$=e=>v.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>v.jsx(N$,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),p1=e=>{const t=Et(),n=e.dragging?kI:AI;return v.jsxs("div",{className:"flex flex-col justify-center items-center",children:[v.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:v.jsx(n,{className:"text-primary",size:80})}),v.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[v.jsx("p",{children:t.uploadIdle}),v.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},L$=e=>e.isDragActive?v.jsx(p1,{files:e.files,dragging:!0}):e.files.length>0?v.jsx(F$,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):v.jsx(E.Fragment,{children:e.idle}),V$=v.jsx(p1,{dragging:!1}),$$=e=>{const t=e.item.file,n=e.item.type;return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),v.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?v.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?v.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?v.jsx("figure",{children:v.jsx("audio",{controls:!0,src:e.item.url})}):null]})},j$=({idle:e=V$,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Et(),a=E.useState(null),[s,l]=E.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r==null||r(g),l(h=>h.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:m}=u1({onDrop:d});return v.jsxs(f1.Provider,{value:a,children:[v.jsx(Gd,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?v.jsx($$,{item:a[0]}):null}),v.jsxs("div",{...p(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[v.jsx("input",{...f(o),name:o.name,id:o.name}),v.jsx(L$,{File:n,onDeleteFile:t,isDragActive:m,idle:e,files:c})]})]})},z$=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return v.jsx("form",{...e,onSubmit:t})},h1=40,B$=e=>v.jsx(E.Fragment,{children:e.children}),R$={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},m1=[],H$=E.forwardRef(function(t,n){return v.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(er,{children:t.children})})}),W$=E.forwardRef(function({item:t,context:n,...r},o){return v.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),q$={List:H$,Item:W$},U$=e=>{const t=Et(),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]),v.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?v.jsxs(Aa,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},K$=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},y)=>{const x=E.useMemo(()=>new xn(r.map(te=>[te.value,te])),[r]),b=E.useRef(null),S=E.useRef(null),w=h.value??h.defaultValue??m1,T=Et(),[C,k]=E.useState(0),[_,A]=E.useState(!1),[L,N]=E.useState(""),[$,I]=E.useState(()=>{const te=new xn;return w.forEach(q=>{const ne=x.get(q);return ne?te.set(q,ne):void 0}),te}),M=E.useMemo(()=>Array.from($.keys()),[$]),[D,V]=E.useState(()=>{const te=new Set(w);return r.reduce((q,ne)=>te.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,H]=E.useState(null),O=E.useRef(m1),B=m&&L!==""?[{value:L,label:L,"data-dynamic":"true"},...r]:r,X=L.length===0?B:qd(B,"value",[{key:"value",value:L},{key:"label",value:L}]),Q=Kd(_,"block-only"),J=X.filter(te=>te.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:j,refs:z,context:K}=hr({open:_,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:Ro,middleware:[Xi(4),Dx({padding:10,elementContext:"reference",apply(te){const q=te.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,he=bi(z.reference.current,window.innerHeight),Me=Math.min(ne<h1?he:ne,he,te.availableHeight),qe=J.length===0?h1:Math.min(Me,he,ne),Qe=`${b.current.getBoundingClientRect().width}px`;Object.assign(te.elements.floating.style,{width:Qe,maxWidth:Qe,height:qe})}})]}),ie=m0(K,R$),{getReferenceProps:R,getFloatingProps:be,getItemProps:Ee}=mr([Xr(K,{role:"listbox"}),Zr(K),Fs(K,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>H(q=>te??q)})]);E.useEffect(()=>{if(!_)return k(0);const te=z.reference;if(te.current===null)return;const q=bi(te.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[L,_,z.reference]),E.useEffect(()=>{h.value&&I(new xn(h.value.map(te=>[te,x.get(te)])))},[h.value,x]),E.useEffect(()=>{const te=z.reference.current;if(te)return yi(te)},[]);const Pe=(te,q)=>{const ne=$.clone(qe=>qe.has(te.value)?qe.remove(te.value):qe.set(te.value,te));I(ne);const he=z.reference.current;if(!he)return;const Me=ne.map(qe=>qe.value);he==null||he.setAttribute("data-value",JSON.stringify(Me)),g&&g(Me),V(qe=>qe.concat(te.label??"")),N(""),H(q)},ze=te=>{const q=te.target.value;return N(q),!_&&q===""?A(!0):(te.target.name=h.name||"",q?A(!0):void 0)},le=()=>{var te;A(!0),N(""),(te=z.reference.current)==null||te.focus()},we=()=>{A(!0),N("")},ce=()=>{var te;(te=z.reference.current)==null||te.setAttribute("data-value","[]"),N(""),A(!1),I(new xn),g==null||g([])},Se=h.id||h.name,oe=$.map((te,q)=>v.jsx(Aa,{size:"small",icon:v.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),Pe(te,q)},children:v.jsx(zi,{size:14})}),children:te.label??te.value},`MultiSelect-${te.value}-x`)),ue={height:G?"0":$.size===0?C-49:C-86};return v.jsxs(ha,{...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:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[v.jsx(ku,{size:20}),v.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?v.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.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:[v.jsxs("ul",{...R({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),className:Ce("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:[M.length>0?null:v.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),v.jsx(U$,{label:c,children:oe})]}),v.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:y,required:f,defaultValue:h.value||M||void 0}),v.jsx(Yr,{preserveTabOrder:!0,children:_?v.jsx(o0,{lockScroll:!0,children:v.jsx(Go,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs("div",{...be({ref:z.setFloating,style:{...ie.styles,top:Z??0,position:j,left:Y,height:C-(M.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[v.jsx("input",{autoFocus:!0,value:L,onChange:ze,title:h.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:te=>{var q,ne;if(te.key==="ArrowDown"){let he=F+1;return he>J.length-1&&(he=0),(q=S.current)==null||q.scrollIntoView({index:he}),H(he)}if(te.key==="ArrowUp"){let he=F-1;return he<0&&(he=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:he}),H(he)}if(te.key==="Escape")return te.currentTarget.blur(),A(!1);if(te.key==="Enter"){if(F!==null&&J[F])return te.preventDefault(),Pe(J[F],F);if(J.length===1)return te.preventDefault(),Pe(J[0],0)}}}),G?v.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:v.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!_)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return vi.flushSync(()=>k(ne+2))},children:v.jsx(Sf,{ref:S,hidden:G,data:J,components:q$,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(te,q)=>{const ne=q.Render??B$,he=$.has(q.value)||$.has(q.label??""),Me=F===te,qe=q.label??q.value;return v.jsxs("button",{"data-value":q.value,...Ee({ref:Qe=>void(O.current[te]=Qe),role:"option",type:"button","aria-checked":he,"aria-current":he,"aria-selected":he,"aria-busy":q.disabled,onClick:()=>Pe(q,te)}),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 ${he||Me?"bg-floating-hover text-floating-foreground":""}`,children:[v.jsx(Af,{onChange:Zu,checked:he,"aria-checked":he,onClick:Qe=>{Qe.stopPropagation(),Pe(q,te)}}),v.jsx(ne,{...h,label:q.label,value:q.value,children:qe})]})}})}),v.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:$.size===0?v.jsx(Aa,{theme:"muted",size:"small",children:T.autocompleteEmpty}):oe})]})})}):null})]})}),Y$=({children:e,className:t="",size:n,...r})=>v.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:[v.jsx("input",{...r,type:"radio",className:Ce("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]}),no=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 y=Et(),x=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(h,()=>x.current),E.useEffect(()=>{if(x.current===null)return;const w=new AbortController,T=x.current,C=yi(x.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=x.current)==null?void 0:w.focus()};return v.jsx(ha,{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:v.jsxs("label",{htmlFor:b,children:[p,v.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[v.jsx(ku,{size:20}),v.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:v.jsxs("select",{...g,id:b,name:b,required:e,ref:Hn(h,x),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Ce("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:[v.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}`}))]})})}),G$=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"));Fe.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Fe.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),v.jsx(Xd,{title:"",ref:r,as:DD,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},Z$=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(Do()),s=r||o||[];return v.jsxs(_D,{...i,defaultValue:r,value:o,className:Ce("relative flex h-5 w-full touch-none select-none items-center",n),children:[v.jsx(OD,{className:"relative h-2 rounded-full grow bg-background",children:v.jsx(MD,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>v.jsx(G$,{tooltip:t??!1},`${a.current}-${c}`))]})},X$=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=Xn(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 v.jsxs("fieldset",{className:Ce("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[v.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[v.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)}),v.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:v.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"})}),v.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:v.jsx("span",{className:"font-medium text-foreground",children:e})})]}),v.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Q$=e=>{const[t,n]=nI();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:fI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),v.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},J$=Aw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ej=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},tj={Item:E.forwardRef(function(t,n){return v.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return v.jsx("ul",{...t,ref:n,className:"space-y-3"})})},nj=e=>{const t=E.useRef(null),n=ej(t);return v.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[v.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:[v.jsx("header",{className:"border-b border-card-border pb-2"}),v.jsxs("div",{className:"px-8 space-y-2",children:[v.jsx(ma,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),v.jsx(Sf,{height:n,useWindowScroll:!0,data:e.source,components:tj,itemContent:(r,o)=>v.jsx(E.Fragment,{children:v.jsx(Af,{children:v.jsx(e.Item,{data:o})})})})]})]}),v.jsx("div",{children:v.jsx(ka,{children:v.jsx(Au,{})})}),v.jsx("div",{})]})};var rj=Object.defineProperty,g1=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,ij=Object.prototype.propertyIsEnumerable,v1=(e,t,n)=>t in e?rj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aj=(e,t)=>{for(var n in t||(t={}))oj.call(t,n)&&v1(e,n,t[n]);if(g1)for(var n of g1(t))ij.call(t,n)&&v1(e,n,t[n]);return e},qf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},sj=(e,t,n,r)=>al(qf,e,t,n,r),ii=e=>typeof e=="object",xr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ii(e)&&!ii(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=>xr(e[r],t[r]))},lj=(e,t)=>(ii(e)||Array.isArray(e))&&t?e[t]:e,cj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,il=e=>/[0-9.]+/.test(e),y1=e=>["string","number"].includes(typeof e),b1=e=>e==null||(e==null?void 0:e.length)===0||e==="",x1={eq:xr,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:b1,notEmpty:e=>!b1(e),in:(e,t)=>qf(t,n=>xr(e,n)),notIn:(e,t)=>w1(t,n=>!xr(e,n))},uj=e=>{if(e in x1)return x1[e];throw new Error("Linq - Symbol not found")},ai=(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},al=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=uj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},dj=(e,t,n,r)=>al(ai,e,t,n,r),w1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},fj=(e,t,n,r)=>al(w1,e,t,n,r),S1=e=>{if(e===null)return null;const t=aj({},e);return Object.keys(t).forEach(n=>t[n]=ii(e[n])?S1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},T1=(e,t)=>{if(ii(t)){for(let n=0;n<e.length;n++){const r=e[n];if(xr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(xr(t,r))return!0}return!1},pj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},hj=e=>ai(e,(t,n,r)=>ii(t)?n===r.findIndex(o=>xr(o,t)):n===r.indexOf(t)),mj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},E1=(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())},gj=(e,t)=>E1(e,n=>n[t]),C1=(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},vj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},yj=(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 il(e)&&il(t)?r.map(a=>Number.parseInt(a)):r},Uf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&il(e)&&il(t)){const o=[],[i,a]=vj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return yj(e,t,r)},bj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Uf(r,o,1):Uf(r,i,Number.parseInt(o,10))}return y1(e)&&y1(t)?Uf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Kf=(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},k1=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},xj=(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)},wj=(e,t,n,r)=>al(xj,e,t,n,r),A1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(cj(t))},P1=(e=>(e.Asc="asc",e.Desc="desc",e))(P1||{}),Sj=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),Tj=(e,t)=>e.sort(Sj(t)),Ej=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ai(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Cj=class wp{constructor(t=[]){this.array=t}static Range(...t){return bj(...t)}static New(t){return new wp(t)}Where(t,n,r){return this.array=dj(this.array,t,n,r),this}Some(t,n,r){return sj(this.array,t,n,r)}All(t,n,r){return fj(this.array,t,n,r)}Reverse(){return this.array=k1(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=wj(this.array,t,n,r),this}Distinct(){return this.array=hj(this.array),this}First(t){return t===void 0?this.array[0]:mj(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?Kf((n,r)=>n+r,0,this.array):Kf((n,r)=>n+lj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return gj(this.array,t)}GroupWith(t){return E1(this.array,t)}Except(t){return ai(this.array,n=>!T1(t,n))}Intersect(t){return ai(this.array,n=>T1(t,n))}OrderBy(t,n){let r;return r=t?A1(this.array,t):this.array.toSorted(),this.array=n==="desc"?k1(r):r,this}Includes(t){return qf(this.array,n=>xr(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 Kf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(C1(this.array,n=>[t,n]))}Zip(t,n){return C1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ai(this.array,t).length}Get(t){return this.array[t]}Clone(){return new wp(S1(this.array))}ToObject(t){return pj(this.array,t)}Sort(t){return Array.isArray(t)?Tj(this.array,t):A1(this.array,t)}Unique(t){return Ej(this.array,t)}},I1=Cj,Yf={},_1;function kj(){return _1||(_1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(x){window.console.log(x)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const x=y.getItem(h);try{return JSON.parse(x)}catch{return x??null}},i=h=>Object.keys(h).reduce((y,x)=>({...y,[x]:o(x,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=p.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,x={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((w,T)=>{const C=T.parse(x);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=S,u()}},f=h=>{const y=new Set,x=b=>{h().removeItem(b);const S=i(h());y.forEach(w=>w(S))};return{delete:x,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const S=h().getItem(b);return!n(S)},deleteAll:()=>{t(h(),x),y.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,S)=>{h().setItem(b,JSON.stringify(S)),y.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(Yf)),Yf}var va=kj();const Gf=e=>e.headerLabel??e.thead??e.id,Zf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var si=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(si||{});const Xf=e=>e.type==="number"?e.valueAsNumber:e.value,Aj=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},Pj={},Ij=(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})},_j=(e,t,n=Pj)=>{const r=or()?null:va.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=qu({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:Ij(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return or()||va.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Oj=e=>{const t=Xn(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]},Mj=()=>or()?void 0:document.querySelector('[data-component="modal-body"]'),Qf=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??si.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:Do(),operation:l,label:Gf(e),name:o,type:i,value:"",...r}},Jf=()=>{const e=Et(),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(()=>({[si.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[si.Boolean]:[t.is,t.isNot],[si.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},Dj=e=>{const t=Et(),n=Jf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Qf(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 Qf(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=Xf(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return v.jsx(E.Fragment,{children:v.jsx(Xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:v.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[v.jsx(II,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(no,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),v.jsx(no,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),v.jsx(ma,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),v.jsx("div",{className:"flex justify-center items-center mt-5",children:v.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:v.jsx(Ka,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[v.jsx(Pu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Nj=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=Jf(),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=Xf(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return v.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[v.jsx(no,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),v.jsx(ma,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),v.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:v.jsx(Ka,{className:"text-danger",size:14})})]})},Fj=({item:e,onPointerDown:t})=>{const n=Ua(0);return v.jsxs(Yv,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[v.jsx("button",{type:"button",className:"cursor-grab",children:v.jsx(PI,{size:14})}),v.jsx("span",{children:e.groupName})]},e.groupId)},Lj=e=>{var l;const t=Et(),n=Zf(e.cols),r=iI(),[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 I1(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(nT(m).map((y,x)=>{const b=m[y];return{...g,groupId:Do(),groupKey:d,index:x,rows:b,groupName:y}}))},s=()=>e.setGroups([]);return v.jsx(E.Fragment,{children:v.jsxs(Xo,{arrow:!1,title:t.tableGroupLabel,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(NI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[v.jsxs("div",{className:"flex flex-nowrap items-center",children:[v.jsx(no,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),v.jsx(ka,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:v.jsx(Ka,{size:16,className:"text-danger"})})]}),e.groups.length>0?v.jsxs("section",{className:"my-4",children:[v.jsx("header",{children:v.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),v.jsx(tk,{children:v.jsx(Uv,{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=>v.jsx(Fj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Vj=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),$j=(e,t)=>e.toSorted(Vj(t)),O1=(e,t,n)=>({label:t,id:Do(),type:n,value:e.id}),jj=e=>{const t=Et(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,O1(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 v.jsx(E.Fragment,{children:v.jsx(Xo,{title:t.tableSortDropdownTitle,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(Xv,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(no,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),v.jsx(no,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),v.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:v.jsx(Ka,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[v.jsx(Pu,{size:14})," ",t.tableSortAddButton]})})]})})})},zj=e=>{const t=Et(),[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=O1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Gf(e.col);return v.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[v.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?v.jsx(bI,{size:14}):null,n==="desc"?v.jsx(yI,{size:14}):null,n==="undefined"?v.jsx(Xv,{size:14}):null]})},Bj=e=>v.jsx("header",{className:"min-w-full mb-1",children:v.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[v.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[v.jsx("span",{children:v.jsx(Dj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),v.jsx("span",{children:v.jsx(jj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),v.jsx("span",{children:v.jsx(Lj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),v.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=>v.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[v.jsxs("span",{children:[v.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),v.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[v.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),v.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=Xf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function Rj(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 Hj=e=>{const t=E.useId(),n=Et(),r=E.useMemo(()=>Rj(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return v.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[v.jsx("p",{children:v.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?v.jsxs(E.Fragment,{children:[v.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),v.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=>v.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),v.jsx("nav",{children:v.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?v.jsx("li",{children:v.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:v.jsx(E.Fragment,{children:typeof i=="string"?v.jsx("li",{children:"..."}):v.jsx("li",{children:v.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?v.jsx("li",{children:v.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},Wj=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()},[]),v.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:v.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},qj=(e,t,n)=>{const r=n.cols,o=n.loading;return v.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=Yu(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 py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?v.jsx(Wj,{children:v.jsx(p,{col:i,row:t,rowIndex:e})}):null,v.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),v.jsx("span",{className:"relative",children:o?Ud:c?v.jsx(E.Fragment,{children:v.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):v.jsx(E.Fragment,{children:Fe.nil(l)?"":l})}))})})},Uj={top:0,left:0,right:0,bottom:-1},Kj=e=>{var g;const t=kf(),n=Et(),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=Jf(),l=o?OI:MI,c=E.useRef(null),u=h=>{const y=h.currentTarget.dataset.id||"";return e.setFilters(x=>x.filter(b=>b.id!==y))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const y=new AbortController;return h.addEventListener("pointerdown",x=>{if(x.target.dataset.type==="resizer")return x.stopPropagation(),x.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===P1.Asc?"ascending":"descending":"none",m=Gf(e.header);return v.jsxs(Yv,{...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 min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[v.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:v.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?v.jsx(Xo,{arrow:!0,trigger:v.jsxs("span",{children:[v.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),v.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:v.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",v.jsx("span",{className:"font-medium",children:m})]}),children:v.jsxs("ul",{className:"font-medium",children:[r.length===0?null:v.jsx(E.Fragment,{children:r.map(h=>v.jsx("li",{className:"my-1",children:v.jsx(Nj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),v.jsx("li",{children:v.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(Qf(e.header,s.options,s.operations))),children:[v.jsx(Pu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,v.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?v.jsx(zj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:v.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:Uj,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 y=c.current.getBoundingClientRect().width,b=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const x=c.current.getBoundingClientRect().width,b=y.delta.x;c.current.style.width=`${Math.abs(x+b)}px`}})]})},Yj=e=>{const[t,n]=Oj(e.setCols);return v.jsx(Uv,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:v.jsx(er,{children:e.headers.map((r,o)=>v.jsx(Kj,{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}`))})})},M1=E.createContext({}),Gj=()=>E.useContext(M1),Zj=E.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:v.jsx(er,{children:n.children})})),Xj=E.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-separate text-left ${t??""}`})),Qj=E.forwardRef(({context:e,...t},n)=>{const r=Gj(),o={...t==null?void 0:t.style,top:Fe.number(r.sticky)?`${r.sticky}px`:void 0};return v.jsx("thead",{...t,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group shadow-shadow-card group:sticky",ref:n})}),Jj=E.forwardRef(({context:e,item:t,...n},r)=>v.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),ez=E.forwardRef((e,t)=>e.context.loadingMore?v.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:v.jsx("tr",{role:"row",className:"bg-card-background",children:v.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:v.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),tz={TableHead:Qj,Table:Xj,TableBody:Zj,TableRow:Jj,TableFoot:ez},nz=[0,0,0,0,0,0,0,0,0,0],rz=e=>v.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Ud:v.jsx(sb,{})}),oz=()=>v.jsx(E.Fragment,{}),iz=()=>v.jsx(E.Fragment,{}),az=[],D1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const p=E.useRef(null),[f,m]=E.useState(!1),g=Xn(a),h=Xn(d.loadingMore),y=E.useMemo(()=>{if(d.loading)return nz;if(u)return d.rows;const S=new I1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:S.Where(w.name,w.operation.symbol,w.value)),r.length===0?S.Select():$j(S.Select(),r)},[d.loading,d.rows,u,t,r]);E.useEffect(()=>{if(p.current===null)return()=>{};const S=p.current,w=new IntersectionObserver(T=>{var _;return T[T.length-1].isIntersecting&&h.current?((_=g.current)==null||_.call(g),void m(!0)):m(!1)});return w.observe(S),()=>w.disconnect()},[h,g]);const x=y.length===0,b={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return v.jsxs("div",{className:"min-w-full",children:[v.jsxs("div",{className:`group w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[v.jsx(JL,{context:b,components:tz,totalCount:y.length,style:{height:"100%"},itemContent:x?oz:qj,data:x?az:y,useWindowScroll:!s,fixedFooterContent:f?iz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>v.jsx(Yj,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),x?v.jsx(rz,{loading:d.loading}):null,v.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"})]}),c!==null?v.jsx(Hj,{...c}):null]})},sz=(e,t)=>typeof t=="function"?t(e):t,sl=(e,t,n)=>e===t||n==null?void 0:n(t),lz=e=>{const t=kf(),n=E.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>Zf(e.cols),[e.cols]),[i,a]=qu({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:sz(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),sl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),sl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),sl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),sl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return v.jsxs(M1.Provider,{value:n,children:[r?v.jsx(Bj,{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?v.jsx(D1,{...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}):v.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>v.jsx("div",{className:"min-w-full",children:v.jsx(D1,{...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}`))})]})},cz=["INPUT","SELECT"],N1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{cz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var ep,F1;function tp(){if(F1)return ep;F1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return ep={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},ep}var np,L1;function V1(){if(L1)return np;L1=1;var e=tp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),o=function(y){for(;y.length>1;){var x=y.pop(),b=x.obj[x.prop];if(n(b)){for(var S=[],w=0;w<b.length;++w)typeof b[w]<"u"&&S.push(b[w]);x.obj[x.prop]=S}}},i=function(y,x){for(var b=x&&x.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(b[S]=y[S]);return b},a=function h(y,x,b){if(!x)return y;if(typeof x!="object"&&typeof x!="function"){if(n(y))y.push(x);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,x))&&(y[x]=!0);else return[y,x];return y}if(!y||typeof y!="object")return[y].concat(x);var S=y;return n(y)&&!n(x)&&(S=i(y,b)),n(y)&&n(x)?(x.forEach(function(w,T){if(t.call(y,T)){var C=y[T];C&&typeof C=="object"&&w&&typeof w=="object"?y[T]=h(C,w,b):y.push(w)}else y[T]=w}),y):Object.keys(x).reduce(function(w,T){var C=x[T];return t.call(w,T)?w[T]=h(w[T],C,b):w[T]=C,w},S)},s=function(y,x){return Object.keys(x).reduce(function(b,S){return b[S]=x[S],b},y)},l=function(h,y,x){var b=h.replace(/\+/g," ");if(x==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(y,x,b,S,w){if(y.length===0)return y;var T=y;if(typeof y=="symbol"?T=Symbol.prototype.toString.call(y):typeof y!="string"&&(T=String(y)),b==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var _=T.length>=c?T.slice(k,k+c):T,A=[],L=0;L<_.length;++L){var N=_.charCodeAt(L);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]=_.charAt(L);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}L+=1,N=65536+((N&1023)<<10|_.charCodeAt(L)&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(y){for(var x=[{obj:{o:y},prop:"o"}],b=[],S=0;S<x.length;++S)for(var w=x[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var _=C[k],A=T[_];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(x.push({obj:T,prop:_}),b.push(A))}return o(x),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},m=function(y,x){return[].concat(y,x)},g=function(y,x){if(n(y)){for(var b=[],S=0;S<y.length;S+=1)b.push(x(y[S]));return b}return x(y)};return np={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},np}var rp,$1;function uz(){if($1)return rp;$1=1;var e=XS(),t=V1(),n=tp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,y,x,b,S,w,T,C,k,_,A,L,N,$,I,M,D,V){for(var F=h,H=V,O=0,B=!1;(H=H.get(p))!==void 0&&!B;){var X=H.get(h);if(O+=1,typeof X<"u"){if(X===O)throw new RangeError("Cyclic object value");B=!0}typeof H.get(p)>"u"&&(O=0)}if(typeof _=="function"?F=_(y,F):F instanceof Date?F=N(F):x==="comma"&&i(F)&&(F=t.maybeMap(F,function(Pe){return Pe instanceof Date?N(Pe):Pe})),F===null){if(w)return k&&!M?k(y,u.encoder,D,"key",$):y;F=""}if(d(F)||t.isBuffer(F)){if(k){var Q=M?y:k(y,u.encoder,D,"key",$);return[I(Q)+"="+I(k(F,u.encoder,D,"value",$))]}return[I(y)+"="+I(String(F))]}var J=[];if(typeof F>"u")return J;var G;if(x==="comma"&&i(F))M&&k&&(F=t.maybeMap(F,k)),G=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(_))G=_;else{var Y=Object.keys(F);G=A?Y.sort(A):Y}var Z=C?String(y).replace(/\./g,"%2E"):String(y),j=b&&i(F)&&F.length===1?Z+"[]":Z;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<G.length;++z){var K=G[z],ie=typeof K=="object"&&K&&typeof K.value<"u"?K.value:F[K];if(!(T&&ie===null)){var R=L&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(F)?typeof x=="function"?x(j,R):j:j+(L?"."+R:"["+R+"]");V.set(h,O);var Ee=e();Ee.set(p,V),s(J,g(ie,be,x,b,S,w,T,C,x==="comma"&&M&&i(F)?null:k,_,A,L,N,$,I,M,D,Ee))}}return J},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 y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");x=h.format}var b=n.formatters[x],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=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 T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:x,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 rp=function(g,h){var y=g,x=m(h),b,S;typeof x.filter=="function"?(S=x.filter,y=S("",y)):i(x.filter)&&(S=x.filter,b=S);var w=[];if(typeof y!="object"||y===null)return"";var T=o[x.arrayFormat],C=T==="comma"&&x.commaRoundTrip;b||(b=Object.keys(y)),x.sort&&b.sort(x.sort);for(var k=e(),_=0;_<b.length;++_){var A=b[_],L=y[A];x.skipNulls&&L===null||s(w,f(L,A,T,C,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,k))}var N=w.join(x.delimiter),$=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},rp}var op,j1;function dz(){if(j1)return op;j1=1;var e=V1(),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 y=m.parameterLimit===1/0?void 0:m.parameterLimit,x=h.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&x.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var b=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===s?w="utf-8":x[S]===a&&(w="iso-8859-1"),b=S,S=x.length);for(S=0;S<x.length;++S)if(S!==b){var T=x[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,_,A;k===-1?(_=m.decoder(T,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(_=m.decoder(T.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(T.slice(k+1),m,n(g[_])?g[_].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),T.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var L=t.call(g,_);L&&m.duplicates==="combine"?g[_]=e.combine(g[_],A):(!L||m.duplicates==="last")&&(g[_]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");h=Array.isArray(f)&&f[y]?f[y].length:0}for(var x=g?f:i(f,m,h),b=p.length-1;b>=0;--b){var S,w=p[b];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(x===""||m.strictNullHandling&&x===null)?[]:e.combine([],x);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!m.parseArrays&&C===""?S={0:x}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(S=[],S[k]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(f,m,g,h){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,x=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&x.exec(y),w=S?y.slice(0,S.index):y,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=b.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+y.slice(S.index)+"]")}return c(T,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 op=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}:{},y=Object.keys(g),x=0;x<y.length;++x){var b=y[x],S=u(b,g[b],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},op}var ip,z1;function fz(){if(z1)return ip;z1=1;var e=uz(),t=dz(),n=tp();return ip={formats:n,parse:t,stringify:e},ip}var pz=fz(),Ue;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ue||(Ue={}));var B1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(B1||(B1={}));const ve=Ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wr=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},ae=Ue.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 Gn 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 Gn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ue.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()}}Gn.create=e=>new Gn(e);const ap=(e,t)=>{let n;switch(e.code){case ae.invalid_type:e.received===ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ue.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ue.joinValues(e.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ue.joinValues(e.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${Ue.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.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}"`:Ue.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ae.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 ae.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 ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ue.assertNever(e)}return{message:n}};let hz=ap;function mz(){return hz}const gz=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 de(e,t){const n=mz(),r=gz({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ap?void 0:ap].filter(o=>!!o)});e.common.issues.push(r)}class on{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 _e;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 on.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 _e;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 _e=Object.freeze({status:"aborted"}),ya=e=>({status:"dirty",value:e}),gn=e=>({status:"valid",value:e}),R1=e=>e.status==="aborted",H1=e=>e.status==="dirty",li=e=>e.status==="valid",ll=e=>typeof Promise<"u"&&e instanceof Promise;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ye||(ye={}));class Sr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const W1=(e,t)=>{if(li(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 Gn(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class We{get description(){return this._def.description}_getType(t){return wr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:wr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:wr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ll(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return W1(r,o)}"~validate"(t){var r,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return li(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>li(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ll(o)?o:Promise.resolve(o));return W1(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:ae.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 fi({schema:this,typeName:Oe.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 Er.create(this,this._def)}nullable(){return pi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bn.create(this)}promise(){return fl.create(this,this._def)}or(t){return ul.create([this,t],this._def)}and(t){return dl.create(this,t,this._def)}transform(t){return new fi({...$e(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new cp({...$e(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new jz({typeName:Oe.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new up({...$e(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return dp.create(this,t)}readonly(){return fp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vz=/^c[^\s-]{8,}$/i,yz=/^[0-9a-z]+$/,bz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,xz=/^[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,wz=/^[a-z0-9_-]{21}$/i,Sz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tz=/^[-+]?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)?)??$/,Ez=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sp;const kz=/^(?:(?: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])$/,Az=/^(?:(?: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])$/,Pz=/^(([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]))$/,Iz=/^(([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])$/,_z=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Oz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,q1="((\\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])))",Mz=new RegExp(`^${q1}$`);function U1(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Dz(e){return new RegExp(`^${U1(e)}$`)}function Nz(e){let t=`${q1}T${U1(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 Fz(e,t){return!!((t==="v4"||!t)&&kz.test(e)||(t==="v6"||!t)&&Pz.test(e))}function Lz(e,t){if(!Sz.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Vz(e,t){return!!((t==="v4"||!t)&&Az.test(e)||(t==="v6"||!t)&&Iz.test(e))}class ro extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const i=this._getOrReturnCtx(t);return de(i,{code:ae.invalid_type,expected:ve.string,received:i.parsedType}),_e}const r=new on;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:ae.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),de(o,{code:ae.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?de(o,{code:ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&de(o,{code:ae.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Ez.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"email",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")sp||(sp=new RegExp(Cz,"u")),sp.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"emoji",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")xz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"uuid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")wz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"nanoid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")vz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")yz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid2",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")bz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ulid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),de(o,{validation:"url",code:ae.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),de(o,{validation:"regex",code:ae.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),de(o,{code:ae.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),de(o,{code:ae.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),de(o,{code:ae.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Nz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:ae.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Mz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:ae.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Dz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:ae.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Tz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"duration",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Fz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ip",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Lz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"jwt",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Vz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cidr",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?_z.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Oz.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64url",code:ae.invalid_string,message:i.message}),r.dirty()):Ue.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ae.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new ro({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ye.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,...ye.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ye.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new ro({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ro({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ro({...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}}ro.create=e=>new ro({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});function $z(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class ci extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){const i=this._getOrReturnCtx(t);return de(i,{code:ae.invalid_type,expected:ve.number,received:i.parsedType}),_e}let r;const o=new on;for(const i of this._def.checks)i.kind==="int"?Ue.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:ae.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),de(r,{code:ae.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),de(r,{code:ae.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?$z(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),de(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:ae.not_finite,message:i.message}),o.dirty()):Ue.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ue.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ci.create=e=>new ci({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class ba extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ve.bigint)return this._getInvalidInput(t);let r;const o=new on;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),de(r,{code:ae.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),de(r,{code:ae.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),de(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ue.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return de(n,{code:ae.invalid_type,expected:ve.bigint,received:n.parsedType}),_e}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ba({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ba({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ba.create=e=>new ba({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});class K1 extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const r=this._getOrReturnCtx(t);return de(r,{code:ae.invalid_type,expected:ve.boolean,received:r.parsedType}),_e}return gn(t.data)}}K1.create=e=>new K1({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class cl extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const i=this._getOrReturnCtx(t);return de(i,{code:ae.invalid_type,expected:ve.date,received:i.parsedType}),_e}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return de(i,{code:ae.invalid_date}),_e}const r=new on;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:ae.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),de(o,{code:ae.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ue.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new cl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}cl.create=e=>new cl({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...$e(e)});class Y1 extends We{_parse(t){if(this._getType(t)!==ve.symbol){const r=this._getOrReturnCtx(t);return de(r,{code:ae.invalid_type,expected:ve.symbol,received:r.parsedType}),_e}return gn(t.data)}}Y1.create=e=>new Y1({typeName:Oe.ZodSymbol,...$e(e)});class G1 extends We{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:ae.invalid_type,expected:ve.undefined,received:r.parsedType}),_e}return gn(t.data)}}G1.create=e=>new G1({typeName:Oe.ZodUndefined,...$e(e)});class Z1 extends We{_parse(t){if(this._getType(t)!==ve.null){const r=this._getOrReturnCtx(t);return de(r,{code:ae.invalid_type,expected:ve.null,received:r.parsedType}),_e}return gn(t.data)}}Z1.create=e=>new Z1({typeName:Oe.ZodNull,...$e(e)});class X1 extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return gn(t.data)}}X1.create=e=>new X1({typeName:Oe.ZodAny,...$e(e)});class Q1 extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return gn(t.data)}}Q1.create=e=>new Q1({typeName:Oe.ZodUnknown,...$e(e)});class Tr extends We{_parse(t){const n=this._getOrReturnCtx(t);return de(n,{code:ae.invalid_type,expected:ve.never,received:n.parsedType}),_e}}Tr.create=e=>new Tr({typeName:Oe.ZodNever,...$e(e)});class J1 extends We{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:ae.invalid_type,expected:ve.void,received:r.parsedType}),_e}return gn(t.data)}}J1.create=e=>new J1({typeName:Oe.ZodVoid,...$e(e)});class Bn extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ve.array)return de(n,{code:ae.invalid_type,expected:ve.array,received:n.parsedType}),_e;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(de(n,{code:a?ae.too_big:ae.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&&(de(n,{code:ae.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&&(de(n,{code:ae.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 Sr(n,a,n.path,s)))).then(a=>on.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Sr(n,a,n.path,s)));return on.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Bn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Bn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Bn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Bn.create=(e,t)=>new Bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...$e(t)});function ui(e){if(e instanceof Mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Er.create(ui(r))}return new Mt({...e._def,shape:()=>t})}else return e instanceof Bn?new Bn({...e._def,type:ui(e.element)}):e instanceof Er?Er.create(ui(e.unwrap())):e instanceof pi?pi.create(ui(e.unwrap())):e instanceof oo?oo.create(e.items.map(t=>ui(t))):e}class Mt extends We{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=Ue.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ve.object){const c=this._getOrReturnCtx(t);return de(c,{code:ae.invalid_type,expected:ve.object,received:c.parsedType}),_e}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Tr&&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 Sr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Tr){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&&(de(o,{code:ae.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 Sr(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=>on.mergeObjectSync(r,c)):on.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new Mt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a;const o=((a=(i=this._def).errorMap)==null?void 0:a.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ye.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Mt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ue.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ue.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}deepPartial(){return ui(this)}partial(t){const n={};for(const r of Ue.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Mt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ue.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Er;)i=i._def.innerType;n[r]=i}return new Mt({...this._def,shape:()=>n})}keyof(){return rS(Ue.objectKeys(this.shape))}}Mt.create=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strip",catchall:Tr.create(),typeName:Oe.ZodObject,...$e(t)}),Mt.strictCreate=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strict",catchall:Tr.create(),typeName:Oe.ZodObject,...$e(t)}),Mt.lazycreate=(e,t)=>new Mt({shape:e,unknownKeys:"strip",catchall:Tr.create(),typeName:Oe.ZodObject,...$e(t)});class ul extends We{_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 Gn(s.ctx.common.issues));return de(n,{code:ae.invalid_union,unionErrors:a}),_e}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 Gn(l));return de(n,{code:ae.invalid_union,unionErrors:s}),_e}}get options(){return this._def.options}}ul.create=(e,t)=>new ul({options:e,typeName:Oe.ZodUnion,...$e(t)});function lp(e,t){const n=wr(e),r=wr(t);if(e===t)return{valid:!0,data:e};if(n===ve.object&&r===ve.object){const o=Ue.objectKeys(t),i=Ue.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=lp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===ve.array&&r===ve.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=lp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ve.date&&r===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class dl extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(R1(i)||R1(a))return _e;const s=lp(i.value,a.value);return s.valid?((H1(i)||H1(a))&&n.dirty(),{status:n.value,value:s.data}):(de(r,{code:ae.invalid_intersection_types}),_e)};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}))}}dl.create=(e,t,n)=>new dl({left:e,right:t,typeName:Oe.ZodIntersection,...$e(n)});class oo extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.array)return de(r,{code:ae.invalid_type,expected:ve.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return de(r,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(de(r,{code:ae.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 Sr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>on.mergeArray(n,a)):on.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new oo({...this._def,rest:t})}}oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new oo({items:e,typeName:Oe.ZodTuple,rest:null,...$e(t)})};class eS extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.map)return de(r,{code:ae.invalid_type,expected:ve.map,received:r.parsedType}),_e;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Sr(r,s,r.path,[c,"key"])),value:i._parse(new Sr(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 _e;(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 _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}eS.create=(e,t,n)=>new eS({valueType:t,keyType:e,typeName:Oe.ZodMap,...$e(n)});class xa extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.set)return de(r,{code:ae.invalid_type,expected:ve.set,received:r.parsedType}),_e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(de(r,{code:ae.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&&(de(r,{code:ae.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 _e;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 Sr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new xa({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new xa({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}xa.create=(e,t)=>new xa({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...$e(t)});class tS extends We{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})}}tS.create=(e,t)=>new tS({getter:e,typeName:Oe.ZodLazy,...$e(t)});class nS extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return de(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}nS.create=(e,t)=>new nS({value:e,typeName:Oe.ZodLiteral,...$e(t)});function rS(e,t){return new di({values:e,typeName:Oe.ZodEnum,...$e(t)})}class di extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{expected:Ue.joinValues(r),received:n.parsedType,code:ae.invalid_type}),_e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{received:n.data,code:ae.invalid_enum_value,options:r}),_e}return gn(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 di.create(t,{...this._def,...n})}exclude(t,n=this._def){return di.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}di.create=rS;class oS extends We{_parse(t){const n=Ue.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ve.string&&r.parsedType!==ve.number){const o=Ue.objectValues(n);return de(r,{expected:Ue.joinValues(o),received:r.parsedType,code:ae.invalid_type}),_e}if(this._cache||(this._cache=new Set(Ue.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ue.objectValues(n);return de(r,{received:r.data,code:ae.invalid_enum_value,options:o}),_e}return gn(t.data)}get enum(){return this._def.values}}oS.create=(e,t)=>new oS({values:e,typeName:Oe.ZodNativeEnum,...$e(t)});class fl extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.promise&&n.common.async===!1)return de(n,{code:ae.invalid_type,expected:ve.promise,received:n.parsedType}),_e;const r=n.parsedType===ve.promise?n.data:Promise.resolve(n.data);return gn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fl.create=(e,t)=>new fl({type:e,typeName:Oe.ZodPromise,...$e(t)});class fi extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.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=>{de(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 _e;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?_e:l.status==="dirty"||n.value==="dirty"?ya(l.value):l});{if(n.value==="aborted")return _e;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?_e:s.status==="dirty"||n.value==="dirty"?ya(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?_e:(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"?_e:(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(!li(a))return _e;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=>li(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):_e);Ue.assertNever(o)}}fi.create=(e,t,n)=>new fi({schema:e,typeName:Oe.ZodEffects,effect:t,...$e(n)}),fi.createWithPreprocess=(e,t,n)=>new fi({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...$e(n)});class Er extends We{_parse(t){return this._getType(t)===ve.undefined?gn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Er.create=(e,t)=>new Er({innerType:e,typeName:Oe.ZodOptional,...$e(t)});class pi extends We{_parse(t){return this._getType(t)===ve.null?gn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pi.create=(e,t)=>new pi({innerType:e,typeName:Oe.ZodNullable,...$e(t)});class cp extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}cp.create=(e,t)=>new cp({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class up extends We{_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 ll(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Gn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}up.create=(e,t)=>new up({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class iS extends We{_parse(t){if(this._getType(t)!==ve.nan){const r=this._getOrReturnCtx(t);return de(r,{code:ae.invalid_type,expected:ve.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}iS.create=e=>new iS({typeName:Oe.ZodNaN,...$e(e)});class jz extends We{_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 dp extends We{_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"?_e:i.status==="dirty"?(n.dirty(),ya(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?_e: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 dp({in:t,out:n,typeName:Oe.ZodPipeline})}}class fp extends We{_parse(t){const n=this._def.innerType._parse(t),r=o=>(li(o)&&(o.value=Object.freeze(o.value)),o);return ll(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}fp.create=(e,t)=>new fp({innerType:e,typeName:Oe.ZodReadonly,...$e(t)});var Oe;(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"})(Oe||(Oe={})),Tr.create,Bn.create,ul.create,dl.create,oo.create,di.create,fl.create,Er.create,pi.create;const zz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Bz=(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]}}},aS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),an=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):aS(t),o=structuredClone(e);return Bz(o,r,n),o},Rz=(e,t)=>e.localeCompare(t),hi={},sS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return lS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=sS(e._def.innerType);return t==="ZodArray"?n??[]:n}},lS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,sS(n)])),cS=(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]=cS(i,o):n[r]=o||i)}return n},Hz={sort:Rz,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},uS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return pz.parse(n.toString(),Hz)},Cr=(e,t)=>aS(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),kr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),pp=e=>{const t=e.dataset.target;if(!t)return kr(e);const n=document.querySelector(`[data-origin="${t}"]`);return kr(n||e)},Wz={state:{},loading:!1,useOnChange:!1},dS=e=>e.dataset.target||e.name,qz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=va.LocalStorage.get(t);return zz(n)?n:{}},clear:()=>void va.LocalStorage.delete(t),set:n=>va.LocalStorage.set(t,n)}},Uz=(e,t,n=Wz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Fe.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??lS(e)??{}),l=E.useCallback(b=>{var A;const S=b.target,w=b.currentTarget;if(S.dataset.optional==="true")return;const C=dS(S),k=pp(S)||(w?kr(w):""),_=Cr(C,e);if(S.setAttribute("data-initialized","true"),_){const L=_.safeParse(k),N=L.success?void 0:((A=L.error.issues[0])==null?void 0:A.message)??"";o($=>an($??{},C,N))}},[e]),c=E.useCallback(b=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,_)=>{var I;const A=_.element,L=_.schema.safeParse(kr(A));if(A.dataset.ignore==="ignore"||L.success)return k;const N=(I=L.error.issues[0])==null?void 0:I.message;A.setAttribute("data-initialized","true");const $=A.dataset.name||A.name||"";return an(k,$,N)},{}),C=Fe.empty(T)?null:T;o(C),console.error(C),b==null||b({form:w,errors:C||{}})},[]),u=(b,S=hi)=>{const w=Cr(b,e),T=C=>{var _;if(!_u(C))return;s(A=>an(A,b,C.toISOString())),o(A=>an(A,b,void 0));const k=i.current[b].element;if(k){const A=k.getAttribute("data-origin"),L=document.querySelector(`input[data-target="${A}"]`);L&&L.setCustomValidity("")}(_=S==null?void 0:S.onChange)==null||_.call(S,C)};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,date:Fe.string(a[b])?new Date(a[b]):a[b],required:S.required??!w.isOptional(),error:An(r,b),ref:C=>{C!==null&&(i.current[b]={element:C,schema:w})}}},d=(b,S=hi)=>{const w=Cr(b,e);return{...S,name:b,id:b,onChange:C=>{var _;const k=C.target.value;s(A=>an(A,b,k)),(_=S==null?void 0:S.onChange)==null||_.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:An(r,b,void 0),value:An(a,b,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[b]={element:C,schema:w}:void 0}},p=(b,S=hi)=>{const w=Cr(b,e);return{...S,name:b,id:b,onChange:C=>{var _;const k=C.target.checked;s(A=>an(A??{},b,k)),(_=S==null?void 0:S.onChange)==null||_.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:An(r,b,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[b]={element:C,schema:w}):void 0}},f=(b,S=hi)=>{const w=Cr(b,e),T=C=>{var _,A;(_=C.persist)==null||_.call(C);const k=C.target.value;(A=S==null?void 0:S.onChange)==null||A.call(S,C),s(L=>an(L,b,k))};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,onInvalid:l,error:An(r,b,void 0),required:S.required??!w.isOptional(),value:An(a,b,void 0)||(S==null?void 0:S.value)||"",type:Fe.instance(w,ci)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[b]={element:C,schema:w}}},m=(b,S=hi)=>{const w=Cr(b,e);return{...S,name:b,id:b,onChangeOptions:C=>{s(k=>an(k,b,C))},form:t,loading:n.loading,onInvalid:l,error:An(r,b,void 0),required:S.required??!w.isOptional(),value:An(a,b,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[b]={element:C,schema:w})}},g=(b,S=hi)=>{const w=Cr(b,e),T=w._def.typeName==="ZodNumber";return{...S,name:b,id:b,onChange:k=>{var A,L;(A=k.persist)==null||A.call(k);const _=T?k.target.valueAsNumber:k.target.value;(L=S==null?void 0:S.onChange)==null||L.call(S,k),s(N=>an(N,b,_))},form:t,loading:n.loading,onInvalid:l,error:An(r,b,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:An(a,b,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:w})}};E.useEffect(()=>{const b=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(kr(T)),k=N=>{var V;const $=dS(N.target);if(!$)return!1;const I=N.target,M=pp(N.target)||(N.relatedTarget?kr(N.relatedTarget):""),D=w.schema.safeParse(M);if(I.setAttribute("value",M),D.success)return T.setCustomValidity&&T.setCustomValidity(""),o(F=>{if(Fe.null(F))return null;const H=an(F,$,void 0);return Fe.empty(F)||Fe.nil(F)||Fe.empty(H)?null:H}),!1;if(T.required){const F=((V=D.error.issues[0])==null?void 0:V.message)||"";T.setCustomValidity&&T.setCustomValidity(F),o(H=>{if(Fe.null(H))return null;const O=an(H,$,F||void 0);return Fe.empty(O)?null:O})}return!1},_=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,k,{signal:_.signal});const L=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>_.abort()}});return b.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>b.forEach(w=>w.unsubscribe())});const h=b=>S=>{var L;S.preventDefault();const w=S.currentTarget;let T=uS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const $=N;T=an(T,$.name,$.value)}if(N.tagName==="INPUT"){const $=N,I=pp($)||($?kr($):"");T=an(T,$.dataset.target||$.name,I)}});const k=cS(T,a),_=e.safeParse(k),A=()=>{var N;N1(w),(N=n.interceptor)==null||N.clear()};if(_.success){const N=JSON.stringify(_.data);return w.setAttribute("data-json",N),(L=n.interceptor)==null||L.clear(),b==null?void 0:b(S,{form:w,event:S,reset:A,setErrors:o,errors:[],success:!0,data:_.data,json:_.data})}return console.group("useForm error"),console.info(_),console.info(_.error.issues),console.error(_.error),console.groupEnd(),w.reportValidity(),b==null?void 0:b(S,{form:w,json:T,event:S,reset:A,setErrors:o,data:T,success:!1,errors:_.error.issues.map(N=>({message:N.message,path:N.path.map($=>String($))}))})},y=b=>Yu(a,b)||"",x=b=>({...b,id:t,name:t});return E.useEffect(()=>{var b;n.interceptor&&((b=n.interceptor)==null||b.set(a))},[a]),{get:y,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:m,disabled:r!==null}},Kz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Yz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},fS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},pS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",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"},hS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Gz={name:"dark",zIndex:hS,rounded:fS,spacing:pS,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(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%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},Zz={rounded:fS,spacing:pS,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:hS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(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%)"}}}},Xz=Gz,Qz=Zz,Jz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...ls,...e.tweaks},parser:e.parser||is.hsla,map:{...ss,...e.map}}),[e]);return v.jsx(Mo.Provider,{value:t,children:e.children})},eB=()=>{const e=E.useContext(Mo);return e?e.parser:is.hsla};ee.Alert=VI,ee.Autocomplete=xV,ee.Button=ka,ee.Calendar=ab,ee.Card=Qu,ee.Checkbox=Af,ee.ColType=si,ee.Collapse=iy,ee.CommandPalette=PF,ee.ComponentsProvider=Jz,ee.Context=Mo,ee.DatePicker=SV,ee.Dict=xn,ee.Dropdown=Xo,ee.Empty=sb,ee.Expand=IF,ee.FileUpload=j$,ee.Form=z$,ee.Input=ma,ee.InputFeedback=kw,ee.InputField=ha,ee.Menu=MF,ee.MenuItem=OF,ee.Modal=Gd,ee.MultiSelect=K$,ee.Notifications=lN,ee.Polymorph=ln,ee.Progress=cN,ee.Radiobox=Y$,ee.RenderOnView=GT,ee.Select=no,ee.Slider=Z$,ee.Stats=uN,ee.Switch=X$,ee.Tab=hN,ee.Table=lz,ee.Tabs=fN,ee.Tag=Aa,ee.TaskList=Q$,ee.Textarea=J$,ee.Timeline=mN,ee.TimelineItem=gs,ee.Toolbar=DF,ee.Tooltip=Xd,ee.TransferList=nj,ee.createColumns=Aj,ee.createCssProperties=TM,ee.createDesignTokens=Yy,ee.createFormStorage=qz,ee.createOptionCols=Zf,ee.createStyles=xM,ee.createTheme=SM,ee.createTokenStyles=EM,ee.css=Ce,ee.defaultDarkTheme=Xz,ee.defaultLightTheme=Qz,ee.defaultTranslations=ss,ee.defaultTweaks=ls,ee.dispatchInput=Lh,ee.formReset=N1,ee.formToJson=uS,ee.getCoords=qT,ee.getJsonForm=Kz,ee.getModalScrollerRef=Mj,ee.getRemainingSize=bi,ee.getSchemaShape=Cr,ee.hasVerticalScroll=Vh,ee.initializeInputDataset=yi,ee.isMobile=eb,ee.isReactComponent=WT,ee.isReactFC=dc,ee.isSsr=or,ee.mergeRefs=Hn,ee.negate=CM,ee.noop=Zu,ee.parsers=is,ee.path=Yu,ee.reduceTokens=rr,ee.safeRegex=Gu,ee.splitInto=Jy,ee.useColorParser=eB,ee.useForm=Uz,ee.useLocale=Ku,ee.useNotification=aN,ee.usePrevious=Yz,ee.useReactive=ox,ee.useStableRef=Xn,ee.useSwipe=Zy,ee.useTablePreferences=_j,ee.useTranslations=Et,ee.uuid=Do,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
240
+ */var $f,t1;function t$(){if(t1)return $f;t1=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 $f=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 h=0;h<c.length;h++)n.call(s,c[h])&&(l[c[h]]=s[c[h]])}}return l},$f}var jf,n1;function zf(){if(n1)return jf;n1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return jf=e,jf}var Rf,r1;function o1(){return r1||(r1=1,Rf=Function.call.bind(Object.prototype.hasOwnProperty)),Rf}var Bf,i1;function n$(){if(i1)return Bf;i1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zf(),n={},r=o1();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 h=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 h.name="Invariant Violation",h}d=i[u](a,u,l,s,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Bf=o,Bf}var Hf,a1;function r$(){if(a1)return Hf;a1=1;var e=e1(),t=t$(),n=zf(),r=o1(),o=n$(),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 Hf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(N){var q=N&&(c&&N[c]||N[u]);if(typeof q=="function")return q}var h="<<anonymous>>",f={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:y(),arrayOf:x,element:T(),elementType:w(),instanceOf:E,node:_(),objectOf:C,oneOf:k,oneOfType:M,shape:L,exact:H};function b(N,q){return N===q?N!==0||1/N===1/q:N!==N&&q!==q}function m(N,q){this.message=N,this.data=q&&typeof q=="object"?q:{},this.stack=""}m.prototype=Error.prototype;function p(N){if(process.env.NODE_ENV!=="production")var q={},R=0;function Y(oe,ne,ee,z,K,G,Q){if(z=z||h,G=G||ee,Q!==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 se=z+":"+ee;!q[se]&&R<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+z+"`. 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."),q[se]=!0,R++)}}return ne[ee]==null?oe?ne[ee]===null?new m("The "+K+" `"+G+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+K+" `"+G+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:N(ne,ee,z,K,G)}var X=Y.bind(null,!1);return X.isRequired=Y.bind(null,!0),X}function g(N){function q(R,Y,X,oe,ne,ee){var z=R[Y],K=V(z);if(K!==N){var G=D(z);return new m("Invalid "+oe+" `"+ne+"` of type "+("`"+G+"` supplied to `"+X+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return p(q)}function y(){return p(a)}function x(N){function q(R,Y,X,oe,ne){if(typeof N!="function")return new m("Property `"+ne+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var ee=R[Y];if(!Array.isArray(ee)){var z=V(ee);return new m("Invalid "+oe+" `"+ne+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an array."))}for(var K=0;K<ee.length;K++){var G=N(ee,K,X,oe,ne+"["+K+"]",n);if(G instanceof Error)return G}return null}return p(q)}function T(){function N(q,R,Y,X,oe){var ne=q[R];if(!s(ne)){var ee=V(ne);return new m("Invalid "+X+" `"+oe+"` of type "+("`"+ee+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return p(N)}function w(){function N(q,R,Y,X,oe){var ne=q[R];if(!e.isValidElementType(ne)){var ee=V(ne);return new m("Invalid "+X+" `"+oe+"` of type "+("`"+ee+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return p(N)}function E(N){function q(R,Y,X,oe,ne){if(!(R[Y]instanceof N)){var ee=N.name||h,z=j(R[Y]);return new m("Invalid "+oe+" `"+ne+"` of type "+("`"+z+"` supplied to `"+X+"`, expected ")+("instance of `"+ee+"`."))}return null}return p(q)}function k(N){if(!Array.isArray(N))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 q(R,Y,X,oe,ne){for(var ee=R[Y],z=0;z<N.length;z++)if(b(ee,N[z]))return null;var K=JSON.stringify(N,function(Q,B){var se=D(B);return se==="symbol"?String(B):B});return new m("Invalid "+oe+" `"+ne+"` of value `"+String(ee)+"` "+("supplied to `"+X+"`, expected one of "+K+"."))}return p(q)}function C(N){function q(R,Y,X,oe,ne){if(typeof N!="function")return new m("Property `"+ne+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var ee=R[Y],z=V(ee);if(z!=="object")return new m("Invalid "+oe+" `"+ne+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an object."));for(var K in ee)if(r(ee,K)){var G=N(ee,K,X,oe,ne+"."+K,n);if(G instanceof Error)return G}return null}return p(q)}function M(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var q=0;q<N.length;q++){var R=N[q];if(typeof R!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(R)+" at index "+q+"."),a}function Y(X,oe,ne,ee,z){for(var K=[],G=0;G<N.length;G++){var Q=N[G],B=Q(X,oe,ne,ee,z,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&K.push(B.data.expectedType)}var se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+ee+" `"+z+"` supplied to "+("`"+ne+"`"+se+"."))}return p(Y)}function _(){function N(q,R,Y,X,oe){return I(q[R])?null:new m("Invalid "+X+" `"+oe+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return p(N)}function F(N,q,R,Y,X){return new m((N||"React class")+": "+q+" type `"+R+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function L(N){function q(R,Y,X,oe,ne){var ee=R[Y],z=V(ee);if(z!=="object")return new m("Invalid "+oe+" `"+ne+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));for(var K in N){var G=N[K];if(typeof G!="function")return F(X,oe,ne,K,D(G));var Q=G(ee,K,X,oe,ne+"."+K,n);if(Q)return Q}return null}return p(q)}function H(N){function q(R,Y,X,oe,ne){var ee=R[Y],z=V(ee);if(z!=="object")return new m("Invalid "+oe+" `"+ne+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));var K=t({},R[Y],N);for(var G in K){var Q=N[G];if(r(N,G)&&typeof Q!="function")return F(X,oe,ne,G,D(Q));if(!Q)return new m("Invalid "+oe+" `"+ne+"` key `"+G+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(R[Y],null," ")+`
241
+ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var B=Q(ee,G,X,oe,ne+"."+G,n);if(B)return B}return null}return p(q)}function I(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(I);if(N===null||s(N))return!0;var q=d(N);if(q){var R=q.call(N),Y;if(q!==N.entries){for(;!(Y=R.next()).done;)if(!I(Y.value))return!1}else for(;!(Y=R.next()).done;){var X=Y.value;if(X&&!I(X[1]))return!1}}else return!1;return!0;default:return!1}}function O(N,q){return N==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function V(N){var q=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":O(q,N)?"symbol":q}function D(N){if(typeof N>"u"||N===null)return""+N;var q=V(N);if(q==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return q}function A(N){var q=D(N);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function j(N){return!N.constructor||!N.constructor.name?h:N.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Hf}var Wf,s1;function o$(){if(s1)return Wf;s1=1;var e=zf();function t(){}function n(){}return n.resetWarningCache=t,Wf=function(){function r(a,s,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}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},Wf}var l1;function i$(){if(l1)return il.exports;if(l1=1,process.env.NODE_ENV!=="production"){var e=e1(),t=!0;il.exports=r$()(e.isElement,t)}else il.exports=o$()();return il.exports}var a$=i$();const ot=Lp(a$),s$=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 Jo(e,t,n){const r=l$(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&c1(r,"path",i),c1(r,"relativePath",i),r}function l$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=s$.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function c1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const c$=[".DS_Store","Thumbs.db"];function u$(e){return Hr(this,void 0,void 0,function*(){return sl(e)&&d$(e.dataTransfer)?m$(e.dataTransfer,e.type):f$(e)?p$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?h$(e):[]})}function d$(e){return sl(e)}function f$(e){return sl(e)&&sl(e.target)}function sl(e){return typeof e=="object"&&e!==null}function p$(e){return qf(e.target.files).map(t=>Jo(t))}function h$(e){return Hr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Jo(n))})}function m$(e,t){return Hr(this,void 0,void 0,function*(){if(e.items){const n=qf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(g$));return u1(d1(r))}return u1(qf(e.files).map(n=>Jo(n)))})}function u1(e){return e.filter(t=>c$.indexOf(t.name)===-1)}function qf(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 g$(e){if(typeof e.webkitGetAsEntry!="function")return f1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?p1(t):f1(e,t)}function d1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?d1(n):[n]],[])}function f1(e,t){return Hr(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,Jo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Jo(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function v$(e){return Hr(this,void 0,void 0,function*(){return e.isDirectory?p1(e):y$(e)})}function p1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>Hr(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(v$));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function y$(e){return Hr(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Jo(r,e.fullPath);t(o)},r=>{n(r)})})})}var ll={},h1;function b$(){return h1||(h1=1,ll.__esModule=!0,ll.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}),ll}var x$=b$();const Uf=Lp(x$);function m1(e){return T$(e)||S$(e)||b1(e)||w$()}function w$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
242
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function T$(e){if(Array.isArray(e))return Kf(e)}function g1(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 v1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(n),!0).forEach(function(r){y1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ma(e,t){return C$(e)||k$(e,t)||b1(e,t)||E$()}function E$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
243
+ 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 Kf(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 Kf(e,t)}}function Kf(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 k$(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 C$(e){if(Array.isArray(e))return e}var P$=typeof Uf=="function"?Uf:Uf.default,A$="file-invalid-type",I$="file-too-large",_$="file-too-small",O$="too-many-files",M$=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:A$,message:"File type must be ".concat(r)}},x1=function(t){return{code:I$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},w1=function(t){return{code:_$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},D$={code:O$,message:"Too many files"};function S1(e,t){var n=e.type==="application/x-moz-file"||P$(e,t);return[n,n?null:M$(t)]}function T1(e,t,n){if(eo(e.size))if(eo(t)&&eo(n)){if(e.size>n)return[!1,x1(n)];if(e.size<t)return[!1,w1(t)]}else{if(eo(t)&&e.size<t)return[!1,w1(t)];if(eo(n)&&e.size>n)return[!1,x1(n)]}return[!0,null]}function eo(e){return e!=null}function N$(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=S1(l,n),u=ma(c,1),d=u[0],h=T1(l,r,o),f=ma(h,1),b=f[0],m=s?s(l):null;return d&&b&&!m})}function cl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ul(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 E1(e){e.preventDefault()}function F$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function L$(e){return e.indexOf("Edge/")!==-1}function V$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return F$(e)||L$(e)}function Hn(){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!cl(r)&&s&&s.apply(void 0,[r].concat(i)),cl(r)})}}function $$(){return"showOpenFilePicker"in window}function j$(e){if(eo(e)){var t=Object.entries(e).filter(function(n){var r=ma(n,2),o=r[0],i=r[1],a=!0;return k1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(C1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ma(r,2),i=o[0],a=o[1];return v1(v1({},n),{},y1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function z$(e){if(eo(e))return Object.entries(e).reduce(function(t,n){var r=ma(n,2),o=r[0],i=r[1];return[].concat(m1(t),[o],m1(i))},[]).filter(function(t){return k1(t)||C1(t)}).join(",")}function R$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function B$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function k1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function C1(e){return/^.*\.[\w]+$/.test(e)}var H$=["children"],W$=["open"],q$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],U$=["refKey","onChange","onClick"];function K$(e){return Z$(e)||G$(e)||P1(e)||Y$()}function Y$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
244
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z$(e){if(Array.isArray(e))return Gf(e)}function Yf(e,t){return J$(e)||Q$(e,t)||P1(e,t)||X$()}function X$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P1(e,t){if(e){if(typeof e=="string")return Gf(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 Gf(e,t)}}function Gf(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 Q$(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 J$(e){if(Array.isArray(e))return e}function A1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A1(Object(n),!0).forEach(function(r){Zf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dl(e,t){if(e==null)return{};var n=ej(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 ej(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 Xf=S.forwardRef(function(e,t){var n=e.children,r=dl(e,H$),o=_1(r),i=o.open,a=dl(o,W$);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},a),{},{open:i})))});Xf.displayName="Dropzone";var I1={disabled:!1,getFilesFromEvent:u$,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};Xf.defaultProps=I1,Xf.propTypes={children:ot.func,accept:ot.objectOf(ot.arrayOf(ot.string)),multiple:ot.bool,preventDropOnDocument:ot.bool,noClick:ot.bool,noKeyboard:ot.bool,noDrag:ot.bool,noDragEventsBubbling:ot.bool,minSize:ot.number,maxSize:ot.number,maxFiles:ot.number,disabled:ot.bool,getFilesFromEvent:ot.func,onFileDialogCancel:ot.func,onFileDialogOpen:ot.func,useFsAccessApi:ot.bool,autoFocus:ot.bool,onDragEnter:ot.func,onDragLeave:ot.func,onDragOver:ot.func,onDrop:ot.func,onDropAccepted:ot.func,onDropRejected:ot.func,onError:ot.func,validator:ot.func};var Qf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},I1),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,h=t.onDrop,f=t.onDropAccepted,b=t.onDropRejected,m=t.onFileDialogCancel,p=t.onFileDialogOpen,g=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,M=t.validator,_=S.useMemo(function(){return z$(n)},[n]),F=S.useMemo(function(){return j$(n)},[n]),L=S.useMemo(function(){return typeof p=="function"?p:O1},[p]),H=S.useMemo(function(){return typeof m=="function"?m:O1},[m]),I=S.useRef(null),O=S.useRef(null),V=S.useReducer(tj,Qf),D=Yf(V,2),A=D[0],j=D[1],N=A.isFocused,q=A.isFileDialogActive,R=S.useRef(typeof window<"u"&&window.isSecureContext&&g&&$$()),Y=function(){!R.current&&q&&setTimeout(function(){if(O.current){var J=O.current.files;J.length||(j({type:"closeDialog"}),H())}},300)};S.useEffect(function(){return window.addEventListener("focus",Y,!1),function(){window.removeEventListener("focus",Y,!1)}},[O,q,H,R]);var X=S.useRef([]),oe=function(J){I.current&&I.current.contains(J.target)||(J.preventDefault(),X.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",E1,!1),document.addEventListener("drop",oe,!1)),function(){x&&(document.removeEventListener("dragover",E1),document.removeEventListener("drop",oe))}},[I,x]),S.useEffect(function(){return!r&&y&&I.current&&I.current.focus(),function(){}},[I,y,r]);var ne=S.useCallback(function($){C?C($):console.error($)},[C]),ee=S.useCallback(function($){$.preventDefault(),$.persist(),be($),X.current=[].concat(K$(X.current),[$.target]),ul($)&&Promise.resolve(o($)).then(function(J){if(!(cl($)&&!k)){var de=J.length,ye=de>0&&N$({files:J,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:M}),Ne=de>0&&!ye;j({isDragAccept:ye,isDragReject:Ne,isDragActive:!0,type:"setDraggedFiles"}),c&&c($)}}).catch(function(J){return ne(J)})},[o,c,ne,k,_,a,i,s,l,M]),z=S.useCallback(function($){$.preventDefault(),$.persist(),be($);var J=ul($);if(J&&$.dataTransfer)try{$.dataTransfer.dropEffect="copy"}catch{}return J&&d&&d($),!1},[d,k]),K=S.useCallback(function($){$.preventDefault(),$.persist(),be($);var J=X.current.filter(function(ye){return I.current&&I.current.contains(ye)}),de=J.indexOf($.target);de!==-1&&J.splice(de,1),X.current=J,!(J.length>0)&&(j({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ul($)&&u&&u($))},[I,u,k]),G=S.useCallback(function($,J){var de=[],ye=[];$.forEach(function(Ne){var st=S1(Ne,_),Lt=Yf(st,2),xt=Lt[0],Yt=Lt[1],qn=T1(Ne,a,i),Cn=Yf(qn,2),Pn=Cn[0],W=Cn[1],U=M?M(Ne):null;if(xt&&Pn&&!U)de.push(Ne);else{var Fe=[Yt,W];U&&(Fe=Fe.concat(U)),ye.push({file:Ne,errors:Fe.filter(function(Xe){return Xe})})}}),(!s&&de.length>1||s&&l>=1&&de.length>l)&&(de.forEach(function(Ne){ye.push({file:Ne,errors:[D$]})}),de.splice(0)),j({acceptedFiles:de,fileRejections:ye,isDragReject:ye.length>0,type:"setFiles"}),h&&h(de,ye,J),ye.length>0&&b&&b(ye,J),de.length>0&&f&&f(de,J)},[j,s,_,a,i,l,h,f,b,M]),Q=S.useCallback(function($){$.preventDefault(),$.persist(),be($),X.current=[],ul($)&&Promise.resolve(o($)).then(function(J){cl($)&&!k||G(J,$)}).catch(function(J){return ne(J)}),j({type:"reset"})},[o,G,ne,k]),B=S.useCallback(function(){if(R.current){j({type:"openDialog"}),L();var $={multiple:s,types:F};window.showOpenFilePicker($).then(function(J){return o(J)}).then(function(J){G(J,null),j({type:"closeDialog"})}).catch(function(J){R$(J)?(H(J),j({type:"closeDialog"})):B$(J)?(R.current=!1,O.current?(O.current.value=null,O.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(J)});return}O.current&&(j({type:"openDialog"}),L(),O.current.value=null,O.current.click())},[j,L,H,g,G,ne,F,s]),se=S.useCallback(function($){!I.current||!I.current.isEqualNode($.target)||($.key===" "||$.key==="Enter"||$.keyCode===32||$.keyCode===13)&&($.preventDefault(),B())},[I,B]),ce=S.useCallback(function(){j({type:"focus"})},[]),xe=S.useCallback(function(){j({type:"blur"})},[]),Se=S.useCallback(function(){T||(V$()?setTimeout(B,0):B())},[T,B]),Te=function(J){return r?null:J},Ae=function(J){return w?null:Te(J)},we=function(J){return E?null:Te(J)},be=function(J){k&&J.stopPropagation()},Re=S.useMemo(function(){return function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=$.refKey,de=J===void 0?"ref":J,ye=$.role,Ne=$.onKeyDown,st=$.onFocus,Lt=$.onBlur,xt=$.onClick,Yt=$.onDragEnter,qn=$.onDragOver,Cn=$.onDragLeave,Pn=$.onDrop,W=dl($,q$);return vt(vt(Zf({onKeyDown:Ae(Hn(Ne,se)),onFocus:Ae(Hn(st,ce)),onBlur:Ae(Hn(Lt,xe)),onClick:Te(Hn(xt,Se)),onDragEnter:we(Hn(Yt,ee)),onDragOver:we(Hn(qn,z)),onDragLeave:we(Hn(Cn,K)),onDrop:we(Hn(Pn,Q)),role:typeof ye=="string"&&ye!==""?ye:"presentation"},de,I),!r&&!w?{tabIndex:0}:{}),W)}},[I,se,ce,xe,Se,ee,z,K,Q,w,E,r]),te=S.useCallback(function($){$.stopPropagation()},[]),Z=S.useMemo(function(){return function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=$.refKey,de=J===void 0?"ref":J,ye=$.onChange,Ne=$.onClick,st=dl($,U$),Lt=Zf({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Te(Hn(ye,Q)),onClick:Te(Hn(Ne,te)),tabIndex:-1},de,O);return vt(vt({},Lt),st)}},[O,n,s,Q,r]);return vt(vt({},A),{},{isFocused:N&&!r,getRootProps:Re,getInputProps:Z,rootRef:I,inputRef:O,open:Te(B)})}function tj(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},Qf),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},Qf);default:return e}}function O1(){}const M1=S.createContext([null,()=>{}]),nj=()=>S.useContext(M1),rj=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,oj={csv:Vu,xls:Vu,mov:uy,mp4:uy,xlsx:Vu,pdf:cy,txt:cy,json:$I,mp3:DI},ij=e=>{const[,t]=nj(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:rj(l),size:QV(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},a=oj[e.file.name.split(".").at(-1)]??dy,s=n.type==="img"?v.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):v.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return v.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[v.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),v.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[v.jsx("span",{children:e.file.name}),v.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?v.jsx("div",{className:"flex-1 min-w-full",children:v.jsx(e.File,{file:e.file})}):null]}),v.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:v.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:v.jsx(Vi,{size:16})})})]})},aj=e=>v.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>v.jsx(ij,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),D1=e=>{const t=Et(),n=e.dragging?jI:zI;return v.jsxs("div",{className:"flex flex-col justify-center items-center",children:[v.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:v.jsx(n,{className:"text-primary",size:80})}),v.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[v.jsx("p",{children:t.uploadIdle}),v.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},sj=e=>e.isDragActive?v.jsx(D1,{files:e.files,dragging:!0}):e.files.length>0?v.jsx(aj,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):v.jsx(S.Fragment,{children:e.idle}),lj=v.jsx(D1,{dragging:!1}),cj=e=>{const t=e.item.file,n=e.item.type;return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),v.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?v.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?v.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?v.jsx("figure",{children:v.jsx("audio",{controls:!0,src:e.item.url})}):null]})},uj=({idle:e=lj,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Et(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=m=>{r?.(m),l(p=>p.concat(m))},{getRootProps:h,getInputProps:f,isDragActive:b}=_1({onDrop:d});return v.jsxs(M1.Provider,{value:a,children:[v.jsx(nf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?v.jsx(cj,{item:a[0]}):null}),v.jsxs("div",{...h(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[v.jsx("input",{...f(o),name:o.name,id:o.name}),v.jsx(sj,{File:n,onDeleteFile:t,isDragActive:b,idle:e,files:c})]})]})},dj=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return v.jsx("form",{...e,onSubmit:t})},N1=40,fj=e=>v.jsx(S.Fragment,{children:e.children}),pj={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},F1=[],hj=S.forwardRef(function(t,n){return v.jsx(ut.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(ir,{children:t.children})})}),mj=S.forwardRef(function({item:t,context:n,...r},o){return v.jsx(ut.li,{...r,ref:o,className:"last:rounded-t-lg"})}),gj={List:hj,Item:mj},vj=e=>{const t=Et(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),v.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?v.jsxs(Ca,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},yj=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:h=!1,required:f=!1,dynamicOption:b=!1,onChangeOptions:m,...p},g)=>{const y=S.useMemo(()=>new wn(r.map(Z=>[Z.value,Z])),[r]),x=S.useRef(null),T=S.useRef(null),w=p.value??p.defaultValue??F1,E=Et(),[k,C]=S.useState(0),[M,_]=S.useState(!1),[F,L]=S.useState(""),[H,I]=S.useState(()=>{const Z=new wn;return w.forEach($=>{const J=y.get($);return J?Z.set($,J):void 0}),Z}),O=S.useMemo(()=>Array.from(H.keys()),[H]),[V,D]=S.useState(()=>{const Z=new Set(w);return r.reduce(($,J)=>Z.has(J.value)?[...$,J.label??J.value]:$,[])??w}),[A,j]=S.useState(null),N=S.useRef(F1),q=b&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,R=F.length===0?q:Qd(q,"value",[{key:"value",value:F},{key:"label",value:F}]),Y=ef(M,"block-only"),X=R.filter(Z=>Z.hidden!==!0),oe=X.length===0,{x:ne,y:ee,strategy:z,refs:K,context:G}=gr({open:M,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:$o,middleware:[Zi(4),e0({padding:10,elementContext:"reference",apply(Z){const J=Z.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,de=gi(K.reference.current,window.innerHeight),ye=Math.min(J<N1?de:J,de,Z.availableHeight),Ne=X.length===0?N1:Math.min(ye,de,J),st=`${x.current.getBoundingClientRect().width}px`;Object.assign(Z.elements.floating.style,{width:st,maxWidth:st,height:Ne})}})]}),Q=F0(G,pj),{getReferenceProps:B,getFloatingProps:se,getItemProps:ce}=vr([Xr(G,{role:"listbox"}),Zr(G),Bs(G,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:A,selectedIndex:A,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Z=>j($=>Z??$)})]);S.useEffect(()=>{if(!M)return C(0);const Z=K.reference;if(Z.current===null)return;const $=gi(Z.current,window.innerHeight);setTimeout(()=>C(Math.min($,X.length*40)),100)},[F,M,K.reference]),S.useEffect(()=>{p.value&&I(new wn(p.value.map(Z=>[Z,y.get(Z)])))},[p.value,y]),S.useEffect(()=>{const Z=K.reference.current;if(Z)return mi(Z)},[]);const xe=(Z,$)=>{const J=H.clone(Ne=>Ne.has(Z.value)?Ne.remove(Z.value):Ne.set(Z.value,Z));I(J);const de=K.reference.current;if(!de)return;const ye=J.map(Ne=>Ne.value);de?.setAttribute("data-value",JSON.stringify(ye)),m&&m(ye),D(Ne=>Ne.concat(Z.label??"")),L(""),j($)},Se=Z=>{const $=Z.target.value;return L($),!M&&$===""?_(!0):(Z.target.name=p.name||"",$?_(!0):void 0)},Te=()=>{_(!0),L(""),K.reference.current?.focus()},Ae=()=>{_(!0),L("")},we=()=>{K.reference.current?.setAttribute("data-value","[]"),L(""),_(!1),I(new wn),m?.([])},be=p.id||p.name,Re=H.map((Z,$)=>v.jsx(Ca,{size:"small",icon:v.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:J=>{J.preventDefault(),J.stopPropagation(),xe(Z,$)},children:v.jsx(Vi,{size:14})}),children:Z.label??Z.value},`MultiSelect-${Z.value}-x`)),te={height:oe?"0":H.size===0?k-49:k-86};return v.jsxs(pa,{...p,left:e,error:t,ref:x,form:p.form,name:p.name,feedback:d,hideLeft:h,required:f,title:p.title,container:o,rightLabel:i,interactive:a,id:p.name||p.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:p.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Te,children:[v.jsx(Nu,{size:20}),v.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),H?v.jsx("button",{type:"button",onClick:we,className:"transition-colors link:text-danger",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.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:[v.jsxs("ul",{...B({...p,onFocus:Ae,id:`${be}-shadow`,name:`${be}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),className:ke("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",p.className),children:[O.length>0?null:v.jsx("li",{className:"text-input-placeholder",children:p.placeholder}),v.jsx(vj,{label:c,children:Re})]}),v.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:g,required:f,defaultValue:p.value||O||void 0}),v.jsx(Yr,{preserveTabOrder:!0,children:M?v.jsx(P0,{lockScroll:!0,children:v.jsx(Wo,{modal:!0,guards:!0,returnFocus:!1,context:G,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs("div",{...se({ref:K.setFloating,style:{...Q.styles,top:ee??0,position:z,left:ne,height:k-(O.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[v.jsx("input",{autoFocus:!0,value:F,onChange:Se,title:p.title,placeholder:E.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:Z=>{if(Z.key==="ArrowDown"){let $=A+1;return $>X.length-1&&($=0),T.current?.scrollIntoView({index:$}),j($)}if(Z.key==="ArrowUp"){let $=A-1;return $<0&&($=X.length-1),T.current?.scrollIntoView({index:$}),j($)}if(Z.key==="Escape")return Z.currentTarget.blur(),_(!1);if(Z.key==="Enter"){if(A!==null&&X[A])return Z.preventDefault(),xe(X[A],A);if(X.length===1)return Z.preventDefault(),xe(X[0],0)}}}),oe?v.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||E.autocompleteEmpty})}):null,oe?null:v.jsx(ut.div,{initial:!1,"data-floating":"true",ref:Y,animate:{height:oe?"auto":k},style:te,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!M)return C(0);const $=K.floating.current.querySelectorAll("li").item(0),J=($?$.getBoundingClientRect().height:40)*X.length;return fi.flushSync(()=>C(J+2))},children:v.jsx(_f,{ref:T,hidden:oe,data:X,components:gj,style:te,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Z,$)=>{const J=$.Render??fj,de=H.has($.value)||H.has($.label??""),ye=A===Z,Ne=$.label??$.value;return v.jsxs("button",{"data-value":$.value,...ce({ref:st=>void(N.current[Z]=st),role:"option",type:"button","aria-checked":de,"aria-current":de,"aria-selected":de,"aria-busy":$.disabled,onClick:()=>xe($,Z)}),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 ${de||ye?"bg-floating-hover text-floating-foreground":""}`,children:[v.jsx(Ff,{onChange:od,checked:de,"aria-checked":de,onClick:st=>{st.stopPropagation(),xe($,Z)}}),v.jsx(J,{...p,label:$.label,value:$.value,children:Ne})]})}})}),v.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:H.size===0?v.jsx(Ca,{theme:"muted",size:"small",children:E.autocompleteEmpty}):Re})]})})}):null})]})}),bj=({children:e,className:t="",size:n,...r})=>v.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:[v.jsx("input",{...r,type:"radio",className:ke("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]}),to=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:h,left:f,error:b,...m},p)=>{const g=Et(),y=S.useRef(null),x=m.id??m.name;S.useImperativeHandle(p,()=>y.current),S.useEffect(()=>{if(y.current===null)return;const w=new AbortController,E=y.current,k=mi(y.current);return E.addEventListener("change",()=>E.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{k(),w.abort()}},[]);const T=()=>y.current?.focus();return v.jsx(pa,{info:n,left:f,error:b,form:m.form,loading:l,name:m.name,feedback:o,hideLeft:d,required:e,title:m.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:m.name||m.id,optionalText:c,labelClassName:i,placeholder:m.placeholder,right:v.jsxs("label",{htmlFor:x,children:[h,v.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[v.jsx(Nu,{size:20}),v.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})]}),children:v.jsxs("select",{...m,id:x,name:x,required:e,ref:Kn(p,y),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:ke("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",m.className),children:[v.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(w=>S.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})}),xj=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));$e.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n($e.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),v.jsx(of,{title:"",ref:r,as:AN,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},wj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Mo()),s=r||o||[];return v.jsxs(kN,{...i,defaultValue:r,value:o,className:ke("relative flex h-5 w-full touch-none select-none items-center",n),children:[v.jsx(CN,{className:"relative h-2 rounded-full grow bg-background",children:v.jsx(PN,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>v.jsx(xj,{tooltip:t??!1},`${a.current}-${c}`))]})},Sj=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=nr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const f=m=>{d.current&&d.current(m)},b=u.current;return b.addEventListener("change",f),()=>b?.removeEventListener("change",f)}},[]);const h=()=>{const f=!u.current?.checked;l(f),o?.onCheck?.(f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return v.jsxs("fieldset",{className:ke("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[v.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[v.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)}),v.jsx("button",{type:"button",role:"switch",onClick:h,"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:v.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"})}),v.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:v.jsx("span",{className:"font-medium text-foreground",children:e})})]}),v.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Tj=e=>{const[t,n]=mI();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:kI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),v.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Ej=Uw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),kj=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},Cj={Item:S.forwardRef(function(t,n){return v.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return v.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Pj=e=>{const t=S.useRef(null),n=kj(t);return v.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[v.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:[v.jsx("header",{className:"border-b border-card-border pb-2"}),v.jsxs("div",{className:"px-8 space-y-2",children:[v.jsx(ha,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),v.jsx(_f,{height:n,useWindowScroll:!0,data:e.source,components:Cj,itemContent:(r,o)=>v.jsx(S.Fragment,{children:v.jsx(Ff,{children:v.jsx(e.Item,{data:o})})})})]})]}),v.jsx("div",{children:v.jsx(ka,{children:v.jsx(Fu,{})})}),v.jsx("div",{})]})};var Aj=Object.defineProperty,L1=Object.getOwnPropertySymbols,Ij=Object.prototype.hasOwnProperty,_j=Object.prototype.propertyIsEnumerable,V1=(e,t,n)=>t in e?Aj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oj=(e,t)=>{for(var n in t||(t={}))Ij.call(t,n)&&V1(e,n,t[n]);if(L1)for(var n of L1(t))_j.call(t,n)&&V1(e,n,t[n]);return e},Jf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Mj=(e,t,n,r)=>pl(Jf,e,t,n,r),ei=e=>typeof e=="object",Sr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ei(e)&&!ei(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=>Sr(e[r],t[r]))},Dj=(e,t)=>(ei(e)||Array.isArray(e))&&t?e[t]:e,Nj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,fl=e=>/[0-9.]+/.test(e),$1=e=>["string","number"].includes(typeof e),j1=e=>e==null||e?.length===0||e==="",z1={eq:Sr,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:j1,notEmpty:e=>!j1(e),in:(e,t)=>Jf(t,n=>Sr(e,n)),notIn:(e,t)=>R1(t,n=>!Sr(e,n))},Fj=e=>{if(e in z1)return z1[e];throw new Error("Linq - Symbol not found")},ti=(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},pl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=Fj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},Lj=(e,t,n,r)=>pl(ti,e,t,n,r),R1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Vj=(e,t,n,r)=>pl(R1,e,t,n,r),B1=e=>{if(e===null)return null;const t=Oj({},e);return Object.keys(t).forEach(n=>t[n]=ei(e[n])?B1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},H1=(e,t)=>{if(ei(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Sr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Sr(t,r))return!0}return!1},$j=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},jj=e=>ti(e,(t,n,r)=>ei(t)?n===r.findIndex(o=>Sr(o,t)):n===r.indexOf(t)),zj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},W1=(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())},Rj=(e,t)=>W1(e,n=>n[t]),q1=(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},Bj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Hj=(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 fl(e)&&fl(t)?r.map(a=>Number.parseInt(a)):r},ep=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&fl(e)&&fl(t)){const o=[],[i,a]=Bj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Hj(e,t,r)},Wj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?ep(r,o,1):ep(r,i,Number.parseInt(o,10))}return $1(e)&&$1(t)?ep(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},tp=(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},U1=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},qj=(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)},Uj=(e,t,n,r)=>pl(qj,e,t,n,r),K1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Nj(t))},Y1=(e=>(e.Asc="asc",e.Desc="desc",e))(Y1||{}),Kj=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),Yj=(e,t)=>e.sort(Kj(t)),Gj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ti(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Zj=class Ip{constructor(t=[]){this.array=t}static Range(...t){return Wj(...t)}static New(t){return new Ip(t)}Where(t,n,r){return this.array=Lj(this.array,t,n,r),this}Some(t,n,r){return Mj(this.array,t,n,r)}All(t,n,r){return Vj(this.array,t,n,r)}Reverse(){return this.array=U1(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=Uj(this.array,t,n,r),this}Distinct(){return this.array=jj(this.array),this}First(t){return t===void 0?this.array[0]:zj(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?tp((n,r)=>n+r,0,this.array):tp((n,r)=>n+Dj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Rj(this.array,t)}GroupWith(t){return W1(this.array,t)}Except(t){return ti(this.array,n=>!H1(t,n))}Intersect(t){return ti(this.array,n=>H1(t,n))}OrderBy(t,n){let r;return r=t?K1(this.array,t):this.array.toSorted(),this.array=n==="desc"?U1(r):r,this}Includes(t){return Jf(this.array,n=>Sr(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 tp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(q1(this.array,n=>[t,n]))}Zip(t,n){return q1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ti(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Ip(B1(this.array))}ToObject(t){return $j(this.array,t)}Sort(t){return Array.isArray(t)?Yj(this.array,t):K1(this.array,t)}Unique(t){return Gj(this.array,t)}},G1=Zj,np={},Z1;function Xj(){return Z1||(Z1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(p,g)=>{try{Object.keys(p).forEach(g)}catch(y){window.console.log(y)}},n=p=>p==null,r=p=>{const g=typeof p;return g==="string"||g==="number"||g==="boolean"||n(p)},o=(p,g)=>{const y=g.getItem(p);try{return JSON.parse(y)}catch{return y??null}},i=p=>Object.keys(p).reduce((g,y)=>({...g,[y]:o(y,p)}),{}),a=p=>p instanceof Date?p:typeof p=="number"?new Date(new Date*1+p*864e5):p,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(p=>p.split("=")).reduce((p,g)=>(p[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),p),{}),c=new Set,u=()=>{const p=l();c.forEach(g=>g(p))},d=[{name:"expires",parse:p=>`expires=${a(p.expires??s)}`},{name:"maxAge",parse:p=>p.maxAge?`max-age=${a(p.expires??s)}`:""},{name:"path",parse:p=>`path=${p.path??"/"}`},{name:"sameSite",parse:p=>`samesite=${p.sameSite??"strict"}`},{name:"useSecure",parse:p=>`${p.useSecure??!0?"secure":""}`},{name:"domain",parse:p=>{const g=p.domain??"";return g===""?"":`domain=${p.multiDomain?".":""}${g}`}},{name:"partitioned",parse:p=>p.partitioned?"Partitioned":""}],h={json:l,listener:p=>(c.add(p),()=>c.delete(p)),clearListeners:()=>c.clear(),has:p=>document.cookie.split(";").some(g=>g.trim().startsWith(`${p}=`)),deleteAll:()=>{document.cookie.split(";").forEach(p=>{document.cookie=p.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:p=>{const g=h.json()[p];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:p=>{document.cookie=`${encodeURIComponent(p)}=;expires=${new Date().toUTCString()}`,u()},set:(p,g,y={})=>{const x=r(g)?g:encodeURIComponent(JSON.stringify(g)),T=d.reduce((w,E)=>{const k=E.parse(y);return k===""?w:w.concat(k)},[`${encodeURIComponent(p)}=${x}`]).join(";");document.cookie=T,u()}},f=p=>{const g=new Set,y=x=>{p().removeItem(x);const T=i(p());g.forEach(w=>w(T))};return{delete:y,listener:x=>(g.add(x),()=>g.delete(x)),clearListeners:()=>g.clear(),json:(x=!1)=>x?i(p()):p(),has:x=>{const T=p().getItem(x);return!n(T)},deleteAll:()=>{t(p(),y),g.forEach(x=>x(p()))},get:x=>o(x,p()),set:(x,T)=>{p().setItem(x,JSON.stringify(T)),g.forEach(w=>w(p()))}}},b=f(()=>window.sessionStorage),m=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=b,e.createStorage=f}(np)),np}var ga=Xj();const rp=e=>e.headerLabel??e.thead??e.id,op=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ni=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ni||{});const ip=e=>e.type==="number"?e.valueAsNumber:e.value,Qj=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},Jj={},ez=(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})},tz=(e,t,n=Jj)=>{const r=cr()?null:ga.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Ju({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:ez(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return cr()||ga.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},nz=e=>{const t=nr(e),n=S.useRef(null),r=S.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]},rz=()=>cr()?void 0:document.querySelector('[data-component="modal-body"]'),ap=(e,t,n,r={})=>{const o=e.id,i=e.type??ni.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Mo(),operation:l,label:rp(e),name:o,type:i,value:"",...r}},sp=()=>{const e=Et(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[ni.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ni.Boolean]:[t.is,t.isNot],[ni.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},oz=e=>{const t=Et(),n=sp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,ap(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>{if(c!==h.id)return h;const f=e.cols.find(b=>u===b.id);return ap(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},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=ip(l.target);e.set(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return v.jsx(S.Fragment,{children:v.jsx(Uo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:v.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[v.jsx(BI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(to,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),v.jsx(to,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),v.jsx(ha,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),v.jsx("div",{className:"flex justify-center items-center mt-5",children:v.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:v.jsx(Ua,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[v.jsx(Lu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},iz=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=sp(),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=ip(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return v.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[v.jsx(to,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),v.jsx(ha,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),v.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:v.jsx(Ua,{className:"text-danger",size:14})})]})},az=({item:e,onPointerDown:t})=>{const n=qa(0);return v.jsxs(oy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[v.jsx("button",{type:"button",className:"cursor-grab",children:v.jsx(RI,{size:14})}),v.jsx("span",{children:e.groupName})]},e.groupId)},sz=e=>{const t=Et(),n=op(e.cols),r=yI(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,h=c.options.item(d)?.label||"";i(h);const f=new G1(e.rows).GroupBy(u),b=e.cols.find(m=>m.id===u);e.setGroups(ST(f).map((m,p)=>{const g=f[m];return{...b,groupId:Mo(),groupKey:u,index:p,rows:g,groupName:m}}))},s=()=>e.setGroups([]);return v.jsx(S.Fragment,{children:v.jsxs(Uo,{arrow:!1,title:t.tableGroupLabel,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(KI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[v.jsxs("div",{className:"flex flex-nowrap items-center",children:[v.jsx(to,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),v.jsx(ka,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:v.jsx(Ua,{size:16,className:"text-danger"})})]}),e.groups.length>0?v.jsxs("section",{className:"my-4",children:[v.jsx("header",{children:v.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),v.jsx(hC,{children:v.jsx(ny,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>v.jsx(az,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},lz=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),cz=(e,t)=>e.toSorted(lz(t)),X1=(e,t,n)=>({label:t,id:Mo(),type:n,value:e.id}),uz=e=>{const t=Et(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,X1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return v.jsx(S.Fragment,{children:v.jsx(Uo,{title:t.tableSortDropdownTitle,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(sy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(to,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),v.jsx(to,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),v.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:v.jsx(Ua,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[v.jsx(Lu,{size:14})," ",t.tableSortAddButton]})})]})})})},dz=e=>{const t=Et(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=X1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=rp(e.col);return v.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[v.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?v.jsx(MI,{size:14}):null,n==="desc"?v.jsx(OI,{size:14}):null,n==="undefined"?v.jsx(sy,{size:14}):null]})},fz=e=>v.jsx("header",{className:"min-w-full mb-1",children:v.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[v.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[v.jsx("span",{children:v.jsx(oz,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),v.jsx("span",{children:v.jsx(uz,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),v.jsx("span",{children:v.jsx(sz,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),v.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=>v.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[v.jsxs("span",{children:[v.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),v.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[v.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),v.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=ip(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function pz(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 hz=e=>{const t=S.useId(),n=Et(),r=S.useMemo(()=>pz(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return v.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[v.jsx("p",{children:v.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?v.jsxs(S.Fragment,{children:[v.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),v.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>v.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),v.jsx("nav",{children:v.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?v.jsx("li",{children:v.jsx(un,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:v.jsx(S.Fragment,{children:typeof i=="string"?v.jsx("li",{children:"..."}):v.jsx("li",{children:v.jsx(un,{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?v.jsx("li",{children:v.jsx(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},mz=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),v.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:v.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},gz=(e,t,n)=>{const r=n.cols,o=n.loading;return v.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=nd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,h=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?v.jsx(mz,{children:v.jsx(h,{col:i,row:t,rowIndex:e})}):null,v.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),v.jsx("span",{className:"relative",children:o?Jd:c?v.jsx(S.Fragment,{children:v.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):v.jsx(S.Fragment,{children:$e.nil(l)?"":l})}))})})},vz={top:0,left:0,right:0,bottom:-1},yz=e=>{const t=Nf(),n=Et(),r=e.filters.filter(m=>m.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=sp(),l=o?WI:qI,c=S.useRef(null),u=m=>{const p=m.currentTarget.dataset.id||"";return e.setFilters(g=>g.filter(y=>y.id!==p))},d=S.useCallback(m=>{if(m===null)return;c.current=m;const p=new AbortController;return m.addEventListener("pointerdown",g=>{if(g.target.dataset.type==="resizer")return g.stopPropagation(),g.stopImmediatePropagation()},{signal:p.signal}),()=>p.abort()},[]),h=e.sorters.find(m=>e.header.id===m.value),f=h?.type?h.type===Y1.Asc?"ascending":"descending":"none",b=rp(e.header);return v.jsxs(oy,{...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 min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[v.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:v.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?v.jsx(Uo,{arrow:!0,trigger:v.jsxs("span",{children:[v.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",b]}),v.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:v.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",v.jsx("span",{className:"font-medium",children:b})]}),children:v.jsxs("ul",{className:"font-medium",children:[r.length===0?null:v.jsx(S.Fragment,{children:r.map(m=>v.jsx("li",{className:"my-1",children:v.jsx(iz,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),v.jsx("li",{children:v.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(ap(e.header,s.options,s.operations))),children:[v.jsx(Lu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,v.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?v.jsx(dz,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:v.jsx(ut.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:vz,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:m=>void m.currentTarget.focus(),onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const p=c.current.getBoundingClientRect().width,y=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(p+y)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,p)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const g=c.current.getBoundingClientRect().width,y=p.delta.x;c.current.style.width=`${Math.abs(g+y)}px`}})]})},bz=e=>{const[t,n]=nz(e.setCols);return v.jsx(ny,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:v.jsx(ir,{children:e.headers.map((r,o)=>v.jsx(yz,{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}`))})})},Q1=S.createContext({}),xz=()=>S.useContext(Q1),wz=S.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:v.jsx(ir,{children:n.children})})),Sz=S.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-separate text-left ${t??""}`})),Tz=S.forwardRef(({context:e,...t},n)=>{const r=xz(),o={...t?.style,top:$e.number(r.sticky)?`${r.sticky}px`:void 0};return v.jsx("thead",{...t,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group shadow-shadow-card group:sticky",ref:n})}),Ez=S.forwardRef(({context:e,item:t,...n},r)=>v.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})),kz=S.forwardRef((e,t)=>e.context.loadingMore?v.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:v.jsx("tr",{role:"row",className:"bg-card-background",children:v.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:v.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),Cz={TableHead:Tz,Table:Sz,TableBody:wz,TableRow:Ez,TableFoot:kz},Pz=[0,0,0,0,0,0,0,0,0,0],Az=e=>v.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Jd:v.jsx(vb,{})}),Iz=()=>v.jsx(S.Fragment,{}),_z=()=>v.jsx(S.Fragment,{}),Oz=[],J1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const h=S.useRef(null),[f,b]=S.useState(!1),m=nr(a),p=nr(d.loadingMore),g=S.useMemo(()=>{if(d.loading)return Pz;if(u)return d.rows;const T=new G1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:T.Where(w.name,w.operation.symbol,w.value)),r.length===0?T.Select():cz(T.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(h.current===null)return()=>{};const T=h.current,w=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&p.current?(m.current?.(),void b(!0)):b(!1));return w.observe(T),()=>w.disconnect()},[p,m]);const y=g.length===0,x={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return v.jsxs("div",{className:"min-w-full",children:[v.jsxs("div",{className:`group w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[v.jsx(SV,{context:x,components:Cz,totalCount:g.length,style:{height:"100%"},itemContent:y?Iz:gz,data:y?Oz:g,useWindowScroll:!s,fixedFooterContent:f?_z:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>v.jsx(bz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),y?v.jsx(Az,{loading:d.loading}):null,v.jsx("div",{"aria-hidden":"true",ref:h,className:"w-full h-0.5"})]}),c!==null?v.jsx(hz,{...c}):null]})},Mz=(e,t)=>typeof t=="function"?t(e):t,hl=(e,t,n)=>e===t?void 0:n?.(t),Dz=e=>{const t=Nf(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>op(e.cols),[e.cols]),[i,a]=Ju({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:Mz(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),hl(l?.filters??[],s.filters??[],e.setFilters),hl(l?.sorters??[],s.sorters??[],e.setSorters),hl(l?.groups??[],s.groups??[],e.setGroups),hl(l?.cols??[],s.cols??[],e.setCols),s)]});return v.jsxs(Q1.Provider,{value:n,children:[r?v.jsx(fz,{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?v.jsx(J1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):v.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>v.jsx("div",{className:"min-w-full",children:v.jsx(J1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})},Nz=["INPUT","SELECT"],eS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{Nz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var lp,tS;function cp(){if(tS)return lp;tS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return lp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},lp}var up,nS;function rS(){if(nS)return up;nS=1;var e=cp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var p=[],g=0;g<256;++g)p.push("%"+((g<16?"0":"")+g.toString(16)).toUpperCase());return p}(),o=function(g){for(;g.length>1;){var y=g.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(g,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<g.length;++T)typeof g[T]<"u"&&(x[T]=g[T]);return x},a=function p(g,y,x){if(!y)return g;if(typeof y!="object"&&typeof y!="function"){if(n(g))g.push(y);else if(g&&typeof g=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(g[y]=!0);else return[g,y];return g}if(!g||typeof g!="object")return[g].concat(y);var T=g;return n(g)&&!n(y)&&(T=i(g,x)),n(g)&&n(y)?(y.forEach(function(w,E){if(t.call(g,E)){var k=g[E];k&&typeof k=="object"&&w&&typeof w=="object"?g[E]=p(k,w,x):g.push(w)}else g[E]=w}),g):Object.keys(y).reduce(function(w,E){var k=y[E];return t.call(w,E)?w[E]=p(w[E],k,x):w[E]=k,w},T)},s=function(g,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},g)},l=function(p,g,y){var x=p.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(g,y,x,T,w){if(g.length===0)return g;var E=g;if(typeof g=="symbol"?E=Symbol.prototype.toString.call(g):typeof g!="string"&&(E=String(g)),x==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(H){return"%26%23"+parseInt(H.slice(2),16)+"%3B"});for(var k="",C=0;C<E.length;C+=c){for(var M=E.length>=c?E.slice(C,C+c):E,_=[],F=0;F<M.length;++F){var L=M.charCodeAt(F);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||w===e.RFC1738&&(L===40||L===41)){_[_.length]=M.charAt(F);continue}if(L<128){_[_.length]=r[L];continue}if(L<2048){_[_.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){_[_.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}F+=1,L=65536+((L&1023)<<10|M.charCodeAt(F)&1023),_[_.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}k+=_.join("")}return k},d=function(g){for(var y=[{obj:{o:g},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],E=w.obj[w.prop],k=Object.keys(E),C=0;C<k.length;++C){var M=k[C],_=E[M];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(y.push({obj:E,prop:M}),x.push(_))}return o(y),g},h=function(g){return Object.prototype.toString.call(g)==="[object RegExp]"},f=function(g){return!g||typeof g!="object"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))},b=function(g,y){return[].concat(g,y)},m=function(g,y){if(n(g)){for(var x=[],T=0;T<g.length;T+=1)x.push(y(g[T]));return x}return y(g)};return up={arrayToObject:i,assign:s,combine:b,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:h,maybeMap:m,merge:a},up}var dp,oS;function Fz(){if(oS)return dp;oS=1;var e=vT(),t=rS(),n=cp(),r=Object.prototype.hasOwnProperty,o={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,g){return p+"["+g+"]"},repeat:function(p){return p}},i=Array.isArray,a=Array.prototype.push,s=function(m,p){a.apply(m,i(p)?p:[p])},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(p){return l.call(p)},skipNulls:!1,strictNullHandling:!1},d=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},h={},f=function m(p,g,y,x,T,w,E,k,C,M,_,F,L,H,I,O,V,D){for(var A=p,j=D,N=0,q=!1;(j=j.get(h))!==void 0&&!q;){var R=j.get(p);if(N+=1,typeof R<"u"){if(R===N)throw new RangeError("Cyclic object value");q=!0}typeof j.get(h)>"u"&&(N=0)}if(typeof M=="function"?A=M(g,A):A instanceof Date?A=L(A):y==="comma"&&i(A)&&(A=t.maybeMap(A,function(xe){return xe instanceof Date?L(xe):xe})),A===null){if(w)return C&&!O?C(g,u.encoder,V,"key",H):g;A=""}if(d(A)||t.isBuffer(A)){if(C){var Y=O?g:C(g,u.encoder,V,"key",H);return[I(Y)+"="+I(C(A,u.encoder,V,"value",H))]}return[I(g)+"="+I(String(A))]}var X=[];if(typeof A>"u")return X;var oe;if(y==="comma"&&i(A))O&&C&&(A=t.maybeMap(A,C)),oe=[{value:A.length>0?A.join(",")||null:void 0}];else if(i(M))oe=M;else{var ne=Object.keys(A);oe=_?ne.sort(_):ne}var ee=k?String(g).replace(/\./g,"%2E"):String(g),z=x&&i(A)&&A.length===1?ee+"[]":ee;if(T&&i(A)&&A.length===0)return z+"[]";for(var K=0;K<oe.length;++K){var G=oe[K],Q=typeof G=="object"&&G&&typeof G.value<"u"?G.value:A[G];if(!(E&&Q===null)){var B=F&&k?String(G).replace(/\./g,"%2E"):String(G),se=i(A)?typeof y=="function"?y(z,B):z:z+(F?"."+B:"["+B+"]");D.set(p,N);var ce=e();ce.set(h,D),s(X,m(Q,se,y,x,T,w,E,k,y==="comma"&&O&&i(A)?null:C,M,_,F,L,H,I,O,V,ce))}}return X},b=function(p){if(!p)return u;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.encodeDotInKeys<"u"&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var g=p.charset||u.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.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 p.format<"u"){if(!r.call(n.formatters,p.format))throw new TypeError("Unknown format option provided.");y=p.format}var x=n.formatters[y],T=u.filter;(typeof p.filter=="function"||i(p.filter))&&(T=p.filter);var w;if(p.arrayFormat in o?w=p.arrayFormat:"indices"in p?w=p.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof p.allowDots>"u"?p.encodeDotInKeys===!0?!0:u.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:u.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:g,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?u.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:u.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:u.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:u.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:u.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:u.strictNullHandling}};return dp=function(m,p){var g=m,y=b(p),x,T;typeof y.filter=="function"?(T=y.filter,g=T("",g)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof g!="object"||g===null)return"";var E=o[y.arrayFormat],k=E==="comma"&&y.commaRoundTrip;x||(x=Object.keys(g)),y.sort&&x.sort(y.sort);for(var C=e(),M=0;M<x.length;++M){var _=x[M],F=g[_];y.skipNulls&&F===null||s(w,f(F,_,E,k,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}var L=w.join(y.delimiter),H=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?H+="utf8=%26%2310003%3B&":H+="utf8=%E2%9C%93&"),L.length>0?H+L:""},dp}var fp,iS;function Lz(){if(iS)return fp;iS=1;var e=rS(),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(h){return h.replace(/&#(\d+);/g,function(f,b){return String.fromCharCode(parseInt(b,10))})},i=function(h,f,b){if(h&&typeof h=="string"&&f.comma&&h.indexOf(",")>-1)return h.split(",");if(f.throwOnLimitExceeded&&b>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return h},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,b){var m={__proto__:null},p=b.ignoreQueryPrefix?f.replace(/^\?/,""):f;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var g=b.parameterLimit===1/0?void 0:b.parameterLimit,y=p.split(b.delimiter,b.throwOnLimitExceeded?g+1:g);if(b.throwOnLimitExceeded&&y.length>g)throw new RangeError("Parameter limit exceeded. Only "+g+" parameter"+(g===1?"":"s")+" allowed.");var x=-1,T,w=b.charset;if(b.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var E=y[T],k=E.indexOf("]="),C=k===-1?E.indexOf("="):k+1,M,_;C===-1?(M=b.decoder(E,r.decoder,w,"key"),_=b.strictNullHandling?null:""):(M=b.decoder(E.slice(0,C),r.decoder,w,"key"),_=e.maybeMap(i(E.slice(C+1),b,n(m[M])?m[M].length:0),function(L){return b.decoder(L,r.decoder,w,"value")})),_&&b.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),E.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var F=t.call(m,M);F&&b.duplicates==="combine"?m[M]=e.combine(m[M],_):(!F||b.duplicates==="last")&&(m[M]=_)}return m},c=function(h,f,b,m){var p=0;if(h.length>0&&h[h.length-1]==="[]"){var g=h.slice(0,-1).join("");p=Array.isArray(f)&&f[g]?f[g].length:0}for(var y=m?f:i(f,b,p),x=h.length-1;x>=0;--x){var T,w=h[x];if(w==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(y===""||b.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=b.plainObjects?{__proto__:null}:{};var E=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,k=b.decodeDotInKeys?E.replace(/%2E/g,"."):E,C=parseInt(k,10);!b.parseArrays&&k===""?T={0:y}:!isNaN(C)&&w!==k&&String(C)===k&&C>=0&&b.parseArrays&&C<=b.arrayLimit?(T=[],T[C]=y):k!=="__proto__"&&(T[k]=y)}y=T}return y},u=function(f,b,m,p){if(f){var g=m.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=m.depth>0&&y.exec(g),w=T?g.slice(0,T.index):g,E=[];if(w){if(!m.plainObjects&&t.call(Object.prototype,w)&&!m.allowPrototypes)return;E.push(w)}for(var k=0;m.depth>0&&(T=x.exec(g))!==null&&k<m.depth;){if(k+=1,!m.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!m.allowPrototypes)return;E.push(T[1])}if(T){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");E.push("["+g.slice(T.index)+"]")}return c(E,b,m,p)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof f.charset>"u"?r.charset:f.charset,m=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:p,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:b,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:m,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 fp=function(h,f){var b=d(f);if(h===""||h===null||typeof h>"u")return b.plainObjects?{__proto__:null}:{};for(var m=typeof h=="string"?l(h,b):h,p=b.plainObjects?{__proto__:null}:{},g=Object.keys(m),y=0;y<g.length;++y){var x=g[y],T=u(x,m[x],b,typeof h=="string");p=e.merge(p,T,b)}return b.allowSparse===!0?p:e.compact(p)},fp}var pp,aS;function Vz(){if(aS)return pp;aS=1;var e=Fz(),t=Lz(),n=cp();return pp={formats:n,parse:t,stringify:e},pp}var $z=Vz(),We;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(We||(We={}));var sS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(sS||(sS={}));const me=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Tr=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(e)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(e)?me.array:e===null?me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?me.promise:typeof Map<"u"&&e instanceof Map?me.map:typeof Set<"u"&&e instanceof Set?me.set:typeof Date<"u"&&e instanceof Date?me.date:me.object;default:return me.unknown}},ae=We.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 er 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 er))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,We.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()}}er.create=e=>new er(e);const hp=(e,t)=>{let n;switch(e.code){case ae.invalid_type:e.received===me.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,We.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(e.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(e.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${We.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.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}"`:We.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ae.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 ae.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 ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=t.defaultError,We.assertNever(e)}return{message:n}};let jz=hp;function zz(){return jz}const Rz=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=zz(),r=Rz({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===hp?void 0:hp].filter(o=>!!o)});e.common.issues.push(r)}class sn{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 _e;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 sn.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 _e;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 _e=Object.freeze({status:"aborted"}),va=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),lS=e=>e.status==="aborted",cS=e=>e.status==="dirty",ri=e=>e.status==="valid",ml=e=>typeof Promise<"u"&&e instanceof Promise;var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ge||(ge={}));class Er{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const uS=(e,t)=>{if(ri(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 er(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class He{get description(){return this._def.description}_getType(t){return Tr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Tr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sn,ctx:{common:t.parent.common,data:t.data,parsedType:Tr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ml(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Tr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return uS(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Tr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ri(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>ri(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Tr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ml(o)?o:Promise.resolve(o));return uS(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:ae.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 si({schema:this,typeName:Oe.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 Cr.create(this,this._def)}nullable(){return li.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this)}promise(){return bl.create(this,this._def)}or(t){return vl.create([this,t],this._def)}and(t){return yl.create(this,t,this._def)}transform(t){return new si({...ze(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new vp({...ze(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new uR({typeName:Oe.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new yp({...ze(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return bp.create(this,t)}readonly(){return xp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bz=/^c[^\s-]{8,}$/i,Hz=/^[0-9a-z]+$/,Wz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qz=/^[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,Uz=/^[a-z0-9_-]{21}$/i,Kz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yz=/^[-+]?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)?)??$/,Gz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Zz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mp;const Xz=/^(?:(?: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])$/,Qz=/^(?:(?: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])$/,Jz=/^(([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]))$/,eR=/^(([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])$/,tR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dS="((\\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])))",rR=new RegExp(`^${dS}$`);function fS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function oR(e){return new RegExp(`^${fS(e)}$`)}function iR(e){let t=`${dS}T${fS(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 aR(e,t){return!!((t==="v4"||!t)&&Xz.test(e)||(t==="v6"||!t)&&Jz.test(e))}function sR(e,t){if(!Kz.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function lR(e,t){return!!((t==="v4"||!t)&&Qz.test(e)||(t==="v6"||!t)&&eR.test(e))}class no extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){const i=this._getOrReturnCtx(t);return ue(i,{code:ae.invalid_type,expected:me.string,received:i.parsedType}),_e}const r=new sn;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:ae.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:ae.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:ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:ae.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Gz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")mp||(mp=new RegExp(Zz,"u")),mp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")qz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Uz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Hz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Wz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:ae.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:ae.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:ae.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:ae.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:ae.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:ae.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?iR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ae.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?rR.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ae.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?oR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ae.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?aR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?sR(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?lR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?tR.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?nR.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:ae.invalid_string,message:i.message}),r.dirty()):We.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ae.invalid_string,...ge.errToObj(r)})}_addCheck(t){return new no({...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){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ge.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ge.errToObj(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?.position,...ge.errToObj(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 no({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new no({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new no({...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}}no.create=e=>new no({checks:[],typeName:Oe.ZodString,coerce:e?.coerce??!1,...ze(e)});function cR(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class oi extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==me.number){const i=this._getOrReturnCtx(t);return ue(i,{code:ae.invalid_type,expected:me.number,received:i.parsedType}),_e}let r;const o=new sn;for(const i of this._def.checks)i.kind==="int"?We.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:ae.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:ae.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:ae.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?cR(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ae.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:ae.not_finite,message:i.message}),o.dirty()):We.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 oi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new oi({...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"&&We.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)}}oi.create=e=>new oi({checks:[],typeName:Oe.ZodNumber,coerce:e?.coerce||!1,...ze(e)});class ya extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==me.bigint)return this._getInvalidInput(t);let r;const o=new sn;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:ae.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:ae.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:ae.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ae.invalid_type,expected:me.bigint,received:n.parsedType}),_e}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 ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new ya({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message: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}}ya.create=e=>new ya({checks:[],typeName:Oe.ZodBigInt,coerce:e?.coerce??!1,...ze(e)});class pS extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:ae.invalid_type,expected:me.boolean,received:r.parsedType}),_e}return yn(t.data)}}pS.create=e=>new pS({typeName:Oe.ZodBoolean,coerce:e?.coerce||!1,...ze(e)});class gl extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){const i=this._getOrReturnCtx(t);return ue(i,{code:ae.invalid_type,expected:me.date,received:i.parsedType}),_e}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:ae.invalid_date}),_e}const r=new sn;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:ae.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:ae.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):We.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new gl({...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}}gl.create=e=>new gl({checks:[],coerce:e?.coerce||!1,typeName:Oe.ZodDate,...ze(e)});class hS extends He{_parse(t){if(this._getType(t)!==me.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:ae.invalid_type,expected:me.symbol,received:r.parsedType}),_e}return yn(t.data)}}hS.create=e=>new hS({typeName:Oe.ZodSymbol,...ze(e)});class mS extends He{_parse(t){if(this._getType(t)!==me.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ae.invalid_type,expected:me.undefined,received:r.parsedType}),_e}return yn(t.data)}}mS.create=e=>new mS({typeName:Oe.ZodUndefined,...ze(e)});class gS extends He{_parse(t){if(this._getType(t)!==me.null){const r=this._getOrReturnCtx(t);return ue(r,{code:ae.invalid_type,expected:me.null,received:r.parsedType}),_e}return yn(t.data)}}gS.create=e=>new gS({typeName:Oe.ZodNull,...ze(e)});class vS extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}vS.create=e=>new vS({typeName:Oe.ZodAny,...ze(e)});class yS extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}yS.create=e=>new yS({typeName:Oe.ZodUnknown,...ze(e)});class kr extends He{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ae.invalid_type,expected:me.never,received:n.parsedType}),_e}}kr.create=e=>new kr({typeName:Oe.ZodNever,...ze(e)});class bS extends He{_parse(t){if(this._getType(t)!==me.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ae.invalid_type,expected:me.void,received:r.parsedType}),_e}return yn(t.data)}}bS.create=e=>new bS({typeName:Oe.ZodVoid,...ze(e)});class Wn extends He{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==me.array)return ue(n,{code:ae.invalid_type,expected:me.array,received:n.parsedType}),_e;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?ae.too_big:ae.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:ae.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:ae.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 Er(n,a,n.path,s)))).then(a=>sn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Er(n,a,n.path,s)));return sn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Wn({...this._def,minLength:{value:t,message:ge.toString(n)}})}max(t,n){return new Wn({...this._def,maxLength:{value:t,message:ge.toString(n)}})}length(t,n){return new Wn({...this._def,exactLength:{value:t,message:ge.toString(n)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...ze(t)});function ii(e){if(e instanceof Mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Cr.create(ii(r))}return new Mt({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:ii(e.element)}):e instanceof Cr?Cr.create(ii(e.unwrap())):e instanceof li?li.create(ii(e.unwrap())):e instanceof ro?ro.create(e.items.map(t=>ii(t))):e}class Mt extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=We.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==me.object){const c=this._getOrReturnCtx(t);return ue(c,{code:ae.invalid_type,expected:me.object,received:c.parsedType}),_e}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof kr&&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 Er(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof kr){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:ae.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 Er(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>sn.mergeObjectSync(r,c)):sn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new Mt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ge.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Mt({...this._def,catchall:t})}pick(t){const n={};for(const r of We.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of We.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}deepPartial(){return ii(this)}partial(t){const n={};for(const r of We.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Mt({...this._def,shape:()=>n})}required(t){const n={};for(const r of We.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Cr;)i=i._def.innerType;n[r]=i}return new Mt({...this._def,shape:()=>n})}keyof(){return TS(We.objectKeys(this.shape))}}Mt.create=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strip",catchall:kr.create(),typeName:Oe.ZodObject,...ze(t)}),Mt.strictCreate=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strict",catchall:kr.create(),typeName:Oe.ZodObject,...ze(t)}),Mt.lazycreate=(e,t)=>new Mt({shape:e,unknownKeys:"strip",catchall:kr.create(),typeName:Oe.ZodObject,...ze(t)});class vl extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new er(s.ctx.common.issues));return ue(n,{code:ae.invalid_union,unionErrors:a}),_e}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 er(l));return ue(n,{code:ae.invalid_union,unionErrors:s}),_e}}get options(){return this._def.options}}vl.create=(e,t)=>new vl({options:e,typeName:Oe.ZodUnion,...ze(t)});function gp(e,t){const n=Tr(e),r=Tr(t);if(e===t)return{valid:!0,data:e};if(n===me.object&&r===me.object){const o=We.objectKeys(t),i=We.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=gp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===me.array&&r===me.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=gp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===me.date&&r===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class yl extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(lS(i)||lS(a))return _e;const s=gp(i.value,a.value);return s.valid?((cS(i)||cS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:ae.invalid_intersection_types}),_e)};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}))}}yl.create=(e,t,n)=>new yl({left:e,right:t,typeName:Oe.ZodIntersection,...ze(n)});class ro extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.array)return ue(r,{code:ae.invalid_type,expected:me.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return ue(r,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:ae.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 Er(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>sn.mergeArray(n,a)):sn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ro({...this._def,rest:t})}}ro.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ro({items:e,typeName:Oe.ZodTuple,rest:null,...ze(t)})};class xS extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.map)return ue(r,{code:ae.invalid_type,expected:me.map,received:r.parsedType}),_e;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Er(r,s,r.path,[c,"key"])),value:i._parse(new Er(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 _e;(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 _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}xS.create=(e,t,n)=>new xS({valueType:t,keyType:e,typeName:Oe.ZodMap,...ze(n)});class ba extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.set)return ue(r,{code:ae.invalid_type,expected:me.set,received:r.parsedType}),_e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:ae.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:ae.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 _e;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 Er(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new ba({...this._def,minSize:{value:t,message:ge.toString(n)}})}max(t,n){return new ba({...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)}}ba.create=(e,t)=>new ba({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...ze(t)});class wS extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}wS.create=(e,t)=>new wS({getter:e,typeName:Oe.ZodLazy,...ze(t)});class SS extends He{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}SS.create=(e,t)=>new SS({value:e,typeName:Oe.ZodLiteral,...ze(t)});function TS(e,t){return new ai({values:e,typeName:Oe.ZodEnum,...ze(t)})}class ai extends He{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:We.joinValues(r),received:n.parsedType,code:ae.invalid_type}),_e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:ae.invalid_enum_value,options:r}),_e}return yn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ai.create(t,{...this._def,...n})}exclude(t,n=this._def){return ai.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ai.create=TS;class ES extends He{_parse(t){const n=We.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==me.string&&r.parsedType!==me.number){const o=We.objectValues(n);return ue(r,{expected:We.joinValues(o),received:r.parsedType,code:ae.invalid_type}),_e}if(this._cache||(this._cache=new Set(We.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=We.objectValues(n);return ue(r,{received:r.data,code:ae.invalid_enum_value,options:o}),_e}return yn(t.data)}get enum(){return this._def.values}}ES.create=(e,t)=>new ES({values:e,typeName:Oe.ZodNativeEnum,...ze(t)});class bl extends He{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==me.promise&&n.common.async===!1)return ue(n,{code:ae.invalid_type,expected:me.promise,received:n.parsedType}),_e;const r=n.parsedType===me.promise?n.data:Promise.resolve(n.data);return yn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}bl.create=(e,t)=>new bl({type:e,typeName:Oe.ZodPromise,...ze(t)});class si extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.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 _e;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?_e:l.status==="dirty"||n.value==="dirty"?va(l.value):l});{if(n.value==="aborted")return _e;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?_e:s.status==="dirty"||n.value==="dirty"?va(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"?_e:(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"?_e:(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(!ri(a))return _e;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=>ri(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):_e);We.assertNever(o)}}si.create=(e,t,n)=>new si({schema:e,typeName:Oe.ZodEffects,effect:t,...ze(n)}),si.createWithPreprocess=(e,t,n)=>new si({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...ze(n)});class Cr extends He{_parse(t){return this._getType(t)===me.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Cr.create=(e,t)=>new Cr({innerType:e,typeName:Oe.ZodOptional,...ze(t)});class li extends He{_parse(t){return this._getType(t)===me.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}li.create=(e,t)=>new li({innerType:e,typeName:Oe.ZodNullable,...ze(t)});class vp extends He{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===me.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}vp.create=(e,t)=>new vp({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class yp extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ml(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}yp.create=(e,t)=>new yp({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class kS extends He{_parse(t){if(this._getType(t)!==me.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:ae.invalid_type,expected:me.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}kS.create=e=>new kS({typeName:Oe.ZodNaN,...ze(e)});class uR extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class bp extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?_e:i.status==="dirty"?(n.dirty(),va(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"?_e: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 bp({in:t,out:n,typeName:Oe.ZodPipeline})}}class xp extends He{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ri(o)&&(o.value=Object.freeze(o.value)),o);return ml(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}xp.create=(e,t)=>new xp({innerType:e,typeName:Oe.ZodReadonly,...ze(t)});var Oe;(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"})(Oe||(Oe={})),kr.create,Wn.create,vl.create,yl.create,ro.create,ai.create,bl.create,Cr.create,li.create;const dR=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},fR=(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]}}},CS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),ln=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):CS(t),o=structuredClone(e);return fR(o,r,n),o},pR=(e,t)=>e.localeCompare(t),ci={},PS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return AS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=PS(e._def.innerType);return t==="ZodArray"?n??[]:n}},AS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,PS(n)])),IS=(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]=IS(i,o):n[r]=o||i)}return n},hR={sort:pR,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},_S=e=>{const t=new FormData(e),n=new URLSearchParams(t);return $z.parse(n.toString(),hR)},Pr=(e,t)=>CS(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Ar=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),wp=e=>{const t=e.dataset.target;if(!t)return Ar(e);const n=document.querySelector(`[data-origin="${t}"]`);return Ar(n||e)},mR={state:{},loading:!1,useOnChange:!1},OS=e=>e.dataset.target||e.name,gR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ga.LocalStorage.get(t);return dR(n)?n:{}},clear:()=>void ga.LocalStorage.delete(t),set:n=>ga.LocalStorage.set(t,n)}},vR=(e,t,n=mR)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>$e.function(n?.state)?n.state():n?.state??AS(e)??{}),l=S.useCallback(x=>{const T=x.target,w=x.currentTarget;if(T.dataset.optional==="true")return;const k=OS(T),C=wp(T)||(w?Ar(w):""),M=Pr(k,e);if(T.setAttribute("data-initialized","true"),M){const _=M.safeParse(C),F=_.success?void 0:_.error.issues[0]?.message??"";o(L=>ln(L??{},k,F))}},[e]),c=S.useCallback(x=>T=>{const w=T.currentTarget,E=Object.values(i.current).reduce((C,M)=>{const _=M.element,F=M.schema.safeParse(Ar(_));if(_.dataset.ignore==="ignore"||F.success)return C;const L=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const H=_.dataset.name||_.name||"";return ln(C,H,L)},{}),k=$e.empty(E)?null:E;o(k),console.error(k),x?.({form:w,errors:k||{}})},[]),u=(x,T=ci)=>{const w=Pr(x,e),E=k=>{if(!$u(k))return;s(M=>ln(M,x,k.toISOString())),o(M=>ln(M,x,void 0));const C=i.current[x].element;if(C){const M=C.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${M}"]`);_&&_.setCustomValidity("")}T?.onChange?.(k)};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,date:$e.string(a[x])?new Date(a[x]):a[x],required:T.required??!w.isOptional(),error:In(r,x),ref:k=>{k!==null&&(i.current[x]={element:k,schema:w})}}},d=(x,T=ci)=>{const w=Pr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.value;s(M=>ln(M,x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),value:In(a,x,void 0)??"",required:T.required??!w.isOptional(),ref:k=>k!==null?i.current[x]={element:k,schema:w}:void 0}},h=(x,T=ci)=>{const w=Pr(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.checked;s(M=>ln(M??{},x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),ref:k=>k!==null?void(i.current[x]={element:k,schema:w}):void 0}},f=(x,T=ci)=>{const w=Pr(x,e),E=k=>{k.persist?.();const C=k.target.value;T?.onChange?.(k),s(M=>ln(M,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),value:In(a,x,void 0)||T?.value||"",type:$e.instance(w,oi)?"number":T?.type??"text",ref:k=>k===null?void 0:i.current[x]={element:k,schema:w}}},b=(x,T=ci)=>{const w=Pr(x,e);return{...T,name:x,id:x,onChangeOptions:k=>{s(C=>ln(C,x,k))},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),value:In(a,x,void 0)||T?.value||[],ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}},m=(x,T=ci)=>{const w=Pr(x,e),E=w._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const M=E?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(_=>ln(_,x,M))},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),type:E?"number":T?.type??"text",value:In(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}};S.useEffect(()=>{const x=Object.values(i.current).map(w=>{const E=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,k=w.schema.safeParse(Ar(E)),C=L=>{const H=OS(L.target);if(!H)return!1;const I=L.target,O=wp(L.target)||(L.relatedTarget?Ar(L.relatedTarget):""),V=w.schema.safeParse(O);if(I.setAttribute("value",O),V.success)return E.setCustomValidity&&E.setCustomValidity(""),o(D=>{if($e.null(D))return null;const A=ln(D,H,void 0);return $e.empty(D)||$e.nil(D)||$e.empty(A)?null:A}),!1;if(E.required){const D=V.error.issues[0]?.message||"";E.setCustomValidity&&E.setCustomValidity(D),o(A=>{if($e.null(A))return null;const j=ln(A,H,D||void 0);return $e.empty(j)?null:j})}return!1},M=new AbortController,_=E.getAttribute("data-trigger")||"blur";E.addEventListener(_,C,{signal:M.signal});const F=E.dataset.shadow?!1:E.required?!k.success:!1;return{input:w,hasInitialError:F,unsubscribe:()=>M.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const p=x=>T=>{T.preventDefault();const w=T.currentTarget;let E=_S(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(F=>{if(F.tagName==="SELECT"){const L=F;E=ln(E,L.name,L.value)}if(F.tagName==="INPUT"){const L=F,H=wp(L)||(L?Ar(L):"");E=ln(E,L.dataset.target||L.name,H)}});const C=IS(E,a),M=e.safeParse(C),_=()=>{eS(w),n.interceptor?.clear()};if(M.success){const F=JSON.stringify(M.data);return w.setAttribute("data-json",F),n.interceptor?.clear(),x?.(T,{form:w,event:T,reset:_,setErrors:o,errors:[],success:!0,data:M.data,json:M.data})}return console.group("useForm error"),console.info(M),console.info(M.error.issues),console.error(M.error),console.groupEnd(),w.reportValidity(),x?.(T,{form:w,json:E,event:T,reset:_,setErrors:o,data:E,success:!1,errors:M.error.issues.map(F=>({message:F.message,path:F.path.map(L=>String(L))}))})},g=x=>nd(a,x)||"",y=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:g,input:m,state:a,errors:r,select:d,checkbox:h,onSubmit:p,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,multiselect:b,disabled:r!==null}},yR=e=>e?JSON.parse(e.getAttribute("data-json")):{},bR=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},MS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},DS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},NS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},xR={name:"dark",zIndex:NS,rounded:MS,spacing:DS,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(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%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},wR={rounded:MS,spacing:DS,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:NS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(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%)"}}}},SR=xR,TR=wR,ER=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...ss,...e.tweaks},parser:e.parser||os.hsla,map:{...as,...e.map}}),[e]);return v.jsx(Oo.Provider,{value:t,children:e.children})},kR=()=>{const e=S.useContext(Oo);return e?e.parser:os.hsla};re.Alert=ZI,re.Autocomplete=HV,re.Button=ka,re.Calendar=gb,re.Card=ad,re.Checkbox=Ff,re.ColType=ni,re.Collapse=my,re.CommandPalette=ZF,re.ComponentsProvider=ER,re.Context=Oo,re.DatePicker=qV,re.Dict=wn,re.Dropdown=Uo,re.Empty=vb,re.Expand=XF,re.FileUpload=uj,re.Form=dj,re.Input=ha,re.InputFeedback=qw,re.InputField=pa,re.Menu=eL,re.MenuItem=JF,re.Modal=nf,re.MultiSelect=yj,re.Notifications=r2,re.Polymorph=un,re.Progress=o2,re.Radiobox=bj,re.RenderOnView=lE,re.Select=to,re.Slider=wj,re.Stats=i2,re.Switch=Sj,re.Tab=c2,re.Table=Dz,re.Tabs=s2,re.Tag=Ca,re.TaskList=Tj,re.Textarea=Ej,re.Timeline=u2,re.TimelineItem=Ts,re.Toolbar=tL,re.Tooltip=of,re.TransferList=Pj,re.createColumns=Qj,re.createCssProperties=LM,re.createDesignTokens=ob,re.createFormStorage=gR,re.createOptionCols=op,re.createStyles=DM,re.createTheme=FM,re.createTokenStyles=VM,re.css=ke,re.defaultDarkTheme=SR,re.defaultLightTheme=TR,re.defaultTranslations=as,re.defaultTweaks=ss,re.dispatchInput=Kh,re.formReset=eS,re.formToJson=_S,re.getCoords=oE,re.getJsonForm=yR,re.getModalScrollerRef=rz,re.getRemainingSize=gi,re.getSchemaShape=Pr,re.hasVerticalScroll=Yh,re.initializeInputDataset=mi,re.isMobile=ub,re.isReactComponent=rE,re.isReactFC=yc,re.isSsr=cr,re.mergeRefs=Kn,re.negate=$M,re.noop=od,re.parsers=os,re.path=nd,re.reduceTokens=lr,re.safeRegex=rd,re.splitInto=cb,re.useColorParser=kR,re.useForm=vR,re.useLocale=td,re.useNotification=t2,re.usePrevious=bR,re.useReactive=Px,re.useStableRef=nr,re.useSwipe=ab,re.useTablePreferences=tz,re.useTranslations=Et,re.uuid=Mo,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
247
247
  //# sourceMappingURL=index.umd.js.map