@g4rcez/components 0.2.2 → 0.2.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 (32) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +44 -44
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +10725 -10014
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/index.umd.js +44 -44
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/src/components/core/render-on-view.d.ts.map +1 -1
  9. package/dist/src/components/core/render-on-view.js +1 -0
  10. package/dist/src/components/display/card.d.ts +9 -1
  11. package/dist/src/components/display/card.d.ts.map +1 -1
  12. package/dist/src/components/display/card.js +7 -1
  13. package/dist/src/components/floating/tooltip.d.ts +1 -1
  14. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  15. package/dist/src/components/floating/tooltip.js +5 -4
  16. package/dist/src/components/form/date-picker.d.ts.map +1 -1
  17. package/dist/src/components/form/date-picker.js +1 -0
  18. package/dist/src/components/form/slider.d.ts +7 -0
  19. package/dist/src/components/form/slider.d.ts.map +1 -0
  20. package/dist/src/components/form/slider.js +35 -0
  21. package/dist/src/components/form/transfer-list.d.ts.map +1 -1
  22. package/dist/src/components/form/transfer-list.js +1 -0
  23. package/dist/src/components/index.d.ts +1 -0
  24. package/dist/src/components/index.d.ts.map +1 -1
  25. package/dist/src/components/index.js +1 -0
  26. package/dist/src/components/table/index.d.ts.map +1 -1
  27. package/dist/src/components/table/index.js +8 -5
  28. package/dist/src/components/table/thead.d.ts.map +1 -1
  29. package/dist/src/components/table/thead.js +0 -1
  30. package/dist/src/config/context.d.ts.map +1 -1
  31. package/dist/src/config/context.js +1 -0
  32. package/package.json +3 -2
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(ne,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):(ne=typeof globalThis<"u"?globalThis:ne||self,E(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,function(ne,E,x,vi){"use strict";var rR=Object.defineProperty;var oR=(ne,E,x)=>E in ne?rR(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:x}):ne[E]=x;var pe=(ne,E,x)=>oR(ne,typeof E!="symbol"?E+"":E,x);function Ep(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 _=Ep(E),Aa=Ep(vi);function Cp(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=Cp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Cp(e))&&(r&&(r+=" "),r+=t);return r}const Pp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ap=kp,co=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ap(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=Pp(u)||Pp(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(h=>{let[g,m]=h;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...c,d,p]:c},[]);return Ap(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var _p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ip(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L1(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 Pl,Op;function uo(){return Op||(Op=1,Pl=TypeError),Pl}const V1=L1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Al,Mp;function _a(){if(Mp)return Al;Mp=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,h=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,T=String.prototype.toLowerCase,w=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,j=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function F(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||w.call(/e/,q))return q;var $e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var et=H<0?-A(-H):A(H);if(et!==H){var lt=String(et),De=v.call(q,lt.length+1);return b.call(lt,$e,"$&_")+"."+b.call(b.call(De,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(q,$e,"$&_")}var z=V1,M=z.custom,$=Ee(M)?M:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Al=function H(q,$e,et,lt){var De=$e||{};if(se(De,"quoteStyle")&&!se(J,De.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(De,"maxStringLength")&&(typeof De.maxStringLength=="number"?De.maxStringLength<0&&De.maxStringLength!==1/0:De.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Er=se(De,"customInspect")?De.customInspect:!0;if(typeof Er!="boolean"&&Er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(De,"indent")&&De.indent!==null&&De.indent!==" "&&!(parseInt(De.indent,10)===De.indent&&De.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(De,"numericSeparator")&&typeof De.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var lo=De.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return We(q,De);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var rn=String(q);return lo?F(q,rn):rn}if(typeof q=="bigint"){var Cr=String(q)+"n";return lo?F(q,Cr):Cr}var gp=typeof De.depth>"u"?5:De.depth;if(typeof et>"u"&&(et=0),et>=gp&&gp>0&&typeof q=="object")return G(q)?"[Array]":"[Object]";var mi=wr(De,et);if(typeof lt>"u")lt=[];else if(ce(lt,q)>=0)return"[Circular]";function Sn(gi,kl,nR){if(kl&&(lt=I.call(lt),lt.push(kl)),nR){var F1={depth:De.depth};return se(De,"quoteStyle")&&(F1.quoteStyle=De.quoteStyle),H(gi,F1,et+1,lt)}return H(gi,De,et+1,lt)}if(typeof q=="function"&&!W(q)){var A1=K(q),_1=Sr(q,Sn);return"[Function"+(A1?": "+A1:" (anonymous)")+"]"+(_1.length>0?" { "+k.call(_1,", ")+" }":"")}if(Ee(q)){var I1=P?b.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(q);return typeof q=="object"&&!P?mt(I1):I1}if(_e(q)){for(var Pa="<"+T.call(String(q.nodeName)),vp=q.attributes||[],Cl=0;Cl<vp.length;Cl++)Pa+=" "+vp[Cl].name+"="+ee(Z(vp[Cl].value),"double",De);return Pa+=">",q.childNodes&&q.childNodes.length&&(Pa+="..."),Pa+="</"+T.call(String(q.nodeName))+">",Pa}if(G(q)){if(q.length===0)return"[]";var yp=Sr(q,Sn);return mi&&!zn(yp)?"["+Tr(yp,mi)+"]":"[ "+k.call(yp,", ")+" ]"}if(Y(q)){var bp=Sr(q,Sn);return!("cause"in Error.prototype)&&"cause"in q&&!D.call(q,"cause")?"{ ["+String(q)+"] "+k.call(C.call("[cause]: "+Sn(q.cause),bp),", ")+" }":bp.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+k.call(bp,", ")+" }"}if(typeof q=="object"&&Er){if($&&typeof q[$]=="function"&&z)return z(q,{depth:gp-et});if(Er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var O1=[];return r&&r.call(q,function(gi,kl){O1.push(Sn(kl,q,!0)+" => "+Sn(gi,q))}),Tn("Map",n.call(q),O1,mi)}if(X(q)){var M1=[];return s&&s.call(q,function(gi){M1.push(Sn(gi,q))}),Tn("Set",a.call(q),M1,mi)}if(ie(q))return Lt("WeakMap");if(ue(q))return Lt("WeakSet");if(we(q))return Lt("WeakRef");if(B(q))return mt(Sn(Number(q)));if(Oe(q))return mt(Sn(N.call(q)));if(xe(q))return mt(h.call(q));if(ae(q))return mt(Sn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof _p<"u"&&q===_p)return"{ [object globalThis] }";if(!V(q)&&!W(q)){var xp=Sr(q,Sn),D1=j?j(q)===Object.prototype:q instanceof Object||q.constructor===Object,wp=q instanceof Object?"":"null prototype",N1=!D1&&O&&Object(q)===q&&O in q?v.call(ye(q),8,-1):wp?"Object":"",tR=D1||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Tp=tR+(N1||wp?"["+k.call(C.call([],N1||[],wp||[]),": ")+"] ":"");return xp.length===0?Tp+"{}":mi?Tp+"{"+Tr(xp,mi)+"}":Tp+"{ "+k.call(xp,", ")+" }"}return String(q)};function ee(H,q,$e){var et=$e.quoteStyle||q,lt=J[et];return lt+H+lt}function Z(H){return b.call(String(H),/"/g,"&quot;")}function U(H){return!O||!(typeof H=="object"&&(O in H||typeof H[O]<"u"))}function G(H){return ye(H)==="[object Array]"&&U(H)}function V(H){return ye(H)==="[object Date]"&&U(H)}function W(H){return ye(H)==="[object RegExp]"&&U(H)}function Y(H){return ye(H)==="[object Error]"&&U(H)}function ae(H){return ye(H)==="[object String]"&&U(H)}function B(H){return ye(H)==="[object Number]"&&U(H)}function xe(H){return ye(H)==="[object Boolean]"&&U(H)}function Ee(H){if(P)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!R)return!1;try{return R.call(H),!0}catch{}return!1}function Oe(H){if(!H||typeof H!="object"||!N)return!1;try{return N.call(H),!0}catch{}return!1}var Re=Object.prototype.hasOwnProperty||function(H){return H in this};function se(H,q){return Re.call(H,q)}function ye(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=y.call(m.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function ce(H,q){if(H.indexOf)return H.indexOf(q);for(var $e=0,et=H.length;$e<et;$e++)if(H[$e]===q)return $e;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function ie(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function we(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ue(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function _e(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function We(H,q){if(H.length>q.maxStringLength){var $e=H.length-q.maxStringLength,et="... "+$e+" more character"+($e>1?"s":"");return We(v.call(H,0,q.maxStringLength),q)+et}var lt=te[q.quoteStyle||"single"];lt.lastIndex=0;var De=b.call(b.call(H,lt,"\\$1"),/[\x00-\x1f]/g,Ct);return ee(De,"single",q)}function Ct(H){var q=H.charCodeAt(0),$e={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return $e?"\\"+$e:"\\x"+(q<16?"0":"")+S.call(q.toString(16))}function mt(H){return"Object("+H+")"}function Lt(H){return H+" { ? }"}function Tn(H,q,$e,et){var lt=et?Tr($e,et):k.call($e,", ");return H+" ("+q+") {"+lt+"}"}function zn(H){for(var q=0;q<H.length;q++)if(ce(H[q],`
2
- `)>=0)return!1;return!0}function wr(H,q){var $e;if(H.indent===" ")$e=" ";else if(typeof H.indent=="number"&&H.indent>0)$e=k.call(Array(H.indent+1)," ");else return null;return{base:$e,prev:k.call(Array(q+1),$e)}}function Tr(H,q){if(H.length===0)return"";var $e=`
3
- `+q.prev+q.base;return $e+k.call(H,","+$e)+`
4
- `+q.prev}function Sr(H,q){var $e=G(H),et=[];if($e){et.length=H.length;for(var lt=0;lt<H.length;lt++)et[lt]=se(H,lt)?q(H[lt],H):""}var De=typeof L=="function"?L(H):[],Er;if(P){Er={};for(var lo=0;lo<De.length;lo++)Er["$"+De[lo]]=De[lo]}for(var rn in H)se(H,rn)&&($e&&String(Number(rn))===rn&&rn<H.length||P&&Er["$"+rn]instanceof Symbol||(w.call(/[^\w$]/,rn)?et.push(q(rn,H)+": "+q(H[rn],H)):et.push(rn+": "+q(H[rn],H))));if(typeof L=="function")for(var Cr=0;Cr<De.length;Cr++)D.call(H,De[Cr])&&et.push("["+q(De[Cr])+"]: "+q(H[De[Cr]],H));return et}return Al}var _l,Dp;function j1(){if(Dp)return _l;Dp=1;var e=_a(),t=uo(),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 _l=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},_l}var Il,Np;function Fp(){return Np||(Np=1,Il=Object),Il}var Ol,Lp;function R1(){return Lp||(Lp=1,Ol=Error),Ol}var Ml,Vp;function $1(){return Vp||(Vp=1,Ml=EvalError),Ml}var Dl,jp;function z1(){return jp||(jp=1,Dl=RangeError),Dl}var Nl,Rp;function B1(){return Rp||(Rp=1,Nl=ReferenceError),Nl}var Fl,$p;function H1(){return $p||($p=1,Fl=SyntaxError),Fl}var Ll,zp;function W1(){return zp||(zp=1,Ll=URIError),Ll}var Vl,Bp;function q1(){return Bp||(Bp=1,Vl=Math.abs),Vl}var jl,Hp;function U1(){return Hp||(Hp=1,jl=Math.floor),jl}var Rl,Wp;function G1(){return Wp||(Wp=1,Rl=Math.max),Rl}var $l,qp;function Y1(){return qp||(qp=1,$l=Math.min),$l}var zl,Up;function K1(){return Up||(Up=1,zl=Math.pow),zl}var Bl,Gp;function Z1(){return Gp||(Gp=1,Bl=Math.round),Bl}var Hl,Yp;function X1(){return Yp||(Yp=1,Hl=Number.isNaN||function(t){return t!==t}),Hl}var Wl,Kp;function Q1(){if(Kp)return Wl;Kp=1;var e=X1();return Wl=function(n){return e(n)||n===0?n:n<0?-1:1},Wl}var ql,Zp;function J1(){return Zp||(Zp=1,ql=Object.getOwnPropertyDescriptor),ql}var Ul,Xp;function Qp(){if(Xp)return Ul;Xp=1;var e=J1();if(e)try{e([],"length")}catch{e=null}return Ul=e,Ul}var Gl,Jp;function eT(){if(Jp)return Gl;Jp=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Gl=e,Gl}var Yl,eh;function tT(){return eh||(eh=1,Yl=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}),Yl}var Kl,th;function nT(){if(th)return Kl;th=1;var e=typeof Symbol<"u"&&Symbol,t=tT();return Kl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Kl}var Zl,nh;function rh(){return nh||(nh=1,Zl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Zl}var Xl,oh;function ih(){if(oh)return Xl;oh=1;var e=Fp();return Xl=e.getPrototypeOf||null,Xl}var Ql,ah;function rT(){if(ah)return Ql;ah=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Ql=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var 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),h=[],g=0;g<f;g++)h[g]="$"+g;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Ql}var Jl,sh;function Ia(){if(sh)return Jl;sh=1;var e=rT();return Jl=Function.prototype.bind||e,Jl}var ec,lh;function tc(){return lh||(lh=1,ec=Function.prototype.call),ec}var nc,ch;function uh(){return ch||(ch=1,nc=Function.prototype.apply),nc}var rc,dh;function oT(){return dh||(dh=1,rc=typeof Reflect<"u"&&Reflect&&Reflect.apply),rc}var oc,fh;function iT(){if(fh)return oc;fh=1;var e=Ia(),t=uh(),n=tc(),r=oT();return oc=r||e.call(n,t),oc}var ic,ph;function hh(){if(ph)return ic;ph=1;var e=Ia(),t=uo(),n=tc(),r=iT();return ic=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},ic}var ac,mh;function aT(){if(mh)return ac;mh=1;var e=hh(),t=Qp(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return ac=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,ac}var sc,gh;function sT(){if(gh)return sc;gh=1;var e=rh(),t=ih(),n=aT();return sc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,sc}var lc,vh;function lT(){if(vh)return lc;vh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ia();return lc=n.call(e,t),lc}var cc,yh;function uc(){if(yh)return cc;yh=1;var e,t=Fp(),n=R1(),r=$1(),o=z1(),i=B1(),a=H1(),s=uo(),l=W1(),c=q1(),u=U1(),d=G1(),p=Y1(),f=K1(),h=Z1(),g=Q1(),m=Function,y=function(W){try{return m('"use strict"; return ('+W+").constructor;")()}catch{}},v=Qp(),b=eT(),S=function(){throw new s},T=v?function(){try{return arguments.callee,S}catch{try{return v(arguments,"callee").get}catch{return S}}}():S,w=nT()(),C=sT(),k=ih(),I=rh(),A=uh(),N=tc(),L={},R=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":w&&C?C([][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%":m,"%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%":w&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%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"||!w||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&C?C(""[Symbol.iterator]()):e,"%Symbol%":w?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":R,"%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%":N,"%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%":h,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var O=C(C(W));P["%Error.prototype%"]=O}var D=function W(Y){var ae;if(Y==="%AsyncFunction%")ae=y("async function () {}");else if(Y==="%GeneratorFunction%")ae=y("function* () {}");else if(Y==="%AsyncGeneratorFunction%")ae=y("async function* () {}");else if(Y==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ae=B.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var xe=W("%AsyncGenerator%");xe&&C&&(ae=C(xe.prototype))}return P[Y]=ae,ae},j={__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=Ia(),z=lT(),M=F.call(N,Array.prototype.concat),$=F.call(A,Array.prototype.splice),J=F.call(N,String.prototype.replace),te=F.call(N,String.prototype.slice),ee=F.call(N,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,G=function(Y){var ae=te(Y,0,1),B=te(Y,-1);if(ae==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var xe=[];return J(Y,Z,function(Ee,Oe,Re,se){xe[xe.length]=Re?J(se,U,"$1"):Oe||Ee}),xe},V=function(Y,ae){var B=Y,xe;if(z(j,B)&&(xe=j[B],B="%"+xe[0]+"%"),z(P,B)){var Ee=P[B];if(Ee===L&&(Ee=D(B)),typeof Ee>"u"&&!ae)throw new s("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:xe,name:B,value:Ee}}throw new a("intrinsic "+Y+" does not exist!")};return cc=function(Y,ae){if(typeof Y!="string"||Y.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,Y)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=G(Y),xe=B.length>0?B[0]:"",Ee=V("%"+xe+"%",ae),Oe=Ee.name,Re=Ee.value,se=!1,ye=Ee.alias;ye&&(xe=ye[0],$(B,M([0,1],ye)));for(var K=1,ce=!0;K<B.length;K+=1){var Q=B[K],ie=te(Q,0,1),we=te(Q,-1);if((ie==='"'||ie==="'"||ie==="`"||we==='"'||we==="'"||we==="`")&&ie!==we)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!ce)&&(se=!0),xe+="."+Q,Oe="%"+xe+"%",z(P,Oe))Re=P[Oe];else if(Re!=null){if(!(Q in Re)){if(!ae)throw new s("base intrinsic for "+Y+" exists, but the property is not available.");return}if(v&&K+1>=B.length){var X=v(Re,Q);ce=!!X,ce&&"get"in X&&!("originalValue"in X.get)?Re=X.get:Re=Re[Q]}else ce=z(Re,Q),Re=Re[Q];ce&&!se&&(P[Oe]=Re)}}return Re},cc}var dc,bh;function xh(){if(bh)return dc;bh=1;var e=uc(),t=hh(),n=t([e("%String.prototype.indexOf%")]);return dc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},dc}var fc,wh;function Th(){if(wh)return fc;wh=1;var e=uc(),t=xh(),n=_a(),r=uo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return fc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var h=l(d,f);return c(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},fc}var pc,Sh;function cT(){if(Sh)return pc;Sh=1;var e=uc(),t=xh(),n=_a(),r=Th(),o=uo(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return pc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!p&&p.has(h)},set:function(h,g){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,g)):r&&(p||(p=r()),p.set(h,g))}};return f}:r,pc}var hc,Eh;function uT(){if(Eh)return hc;Eh=1;var e=uo(),t=_a(),n=j1(),r=Th(),o=cT(),i=o||r||n;return hc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},hc}var Ch=e=>Array.isArray(e),mc=e=>e===void 0,gc=e=>e===null,dT=Function.bind.call(Function.call,Object.prototype.toString),fT=e=>!!e&&dT(e)==="[object Error]"||e instanceof Error,kh=(e,t)=>e instanceof t,pT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},hT=e=>Object.prototype.toString.call(e)==="[object Date]"&&kh(e,Date),ct={array:Ch,date:hT,empty:e=>gc(e)||mc(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:kh,isError:fT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>gc(e)||mc(e),null:gc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Ch(e)&&typeof e=="object",primitive:pT,string:e=>typeof e=="string",undefined:mc},mT=e=>Object.keys(e),kr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o};const vc="-",gT=e=>{const t=yT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(vc);return s[0]===""&&s.length!==1&&s.shift(),Ph(s,t)||vT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Ph=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ph(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(vc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Ah=/^\[(.+)\]$/,vT=e=>{if(Ah.test(e)){const t=Ah.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)yc(n[o],r,o,t);return r},yc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:_h(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(bT(o)){yc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{yc(a,_h(t,i),n,r)})})},_h=(e,t)=>{let n=e;return t.split(vc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bT=e=>e.isThemeGetter,xT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},bc="!",xc=":",wT=xc.length,TT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let h=0;h<o.length;h++){let g=o[h];if(a===0&&s===0){if(g===xc){i.push(o.slice(l,h)),l=h+wT;continue}if(g==="/"){c=h;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=ST(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+xc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ST=e=>e.endsWith(bc)?e.substring(0,e.length-1):e.startsWith(bc)?e.substring(1):e,ET=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}},CT=e=>({cache:xT(e.cacheSize),parseClassName:TT(e),sortModifiers:ET(e),...gT(e)}),kT=/\s+/,PT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(kT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?h.substring(0,g):h);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const v=i(p).join(":"),b=f?v+bc:v,S=b+y;if(a.includes(S))continue;a.push(S);const T=o(y,m);for(let w=0;w<T.length;++w){const C=T[w];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function AT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ih(t))&&(r&&(r+=" "),r+=n);return r}const Ih=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ih(e[r]))&&(n&&(n+=" "),n+=t);return n};function _T(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=CT(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=PT(l,n);return o(l,u),u}return function(){return i(AT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Oh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IT=/^\d+\/\d+$/,OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MT=/\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$/,DT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,NT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>IT.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),Dh=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Qn=e=>OT.test(e),LT=()=>!0,VT=e=>MT.test(e)&&!DT.test(e),wc=()=>!1,jT=e=>NT.test(e),RT=e=>FT.test(e),$T=e=>!me(e)&&!ge(e),zT=e=>po(e,Lh,wc),me=e=>Oh.test(e),Ar=e=>po(e,Vh,VT),Tc=e=>po(e,QT,Ve),BT=e=>po(e,Nh,wc),HT=e=>po(e,Fh,RT),WT=e=>po(e,wc,jT),ge=e=>Mh.test(e),Oa=e=>ho(e,Vh),qT=e=>ho(e,JT),UT=e=>ho(e,Nh),GT=e=>ho(e,Lh),YT=e=>ho(e,Fh),KT=e=>ho(e,eS,!0),po=(e,t,n)=>{const r=Oh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ho=(e,t,n=!1)=>{const r=Mh.exec(e);return r?r[1]?t(r[1]):n:!1},Nh=e=>e==="position",ZT=new Set(["image","url"]),Fh=e=>ZT.has(e),XT=new Set(["length","size","percentage"]),Lh=e=>XT.has(e),Vh=e=>e==="length",QT=e=>e==="number",JT=e=>e==="family-name",eS=e=>e==="shadow",tS=_T(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),h=It("perspective"),g=It("aspect"),m=It("ease"),y=It("animate"),v=()=>["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"],T=()=>["auto","contain","none"],w=()=>[ge,me,l],C=()=>[fo,"full","auto",...w()],k=()=>[Pr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",Pr,ge,me]},ge,me],A=()=>[Pr,"auto",ge,me],N=()=>["auto","min","max","fr",ge,me],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],R=()=>["start","end","center","stretch"],P=()=>["auto",...w()],O=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],D=()=>[e,ge,me],j=()=>[Dh,Ar],F=()=>["","none","full",c,ge,me],z=()=>["",Ve,Oa,Ar],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,ge,me],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],ee=()=>["none",Ve,ge,me],Z=()=>["none",Ve,ge,me],U=()=>[Ve,ge,me],G=()=>[fo,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qn],breakpoint:[Qn],color:[LT],container:[Qn],"drop-shadow":[Qn],ease:["in","out","in-out"],font:[$T],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qn],shadow:[Qn],spacing:["px",Ve],text:[Qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,me,ge,g]}],container:["container"],columns:[{columns:[Ve,me,ge,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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:[Pr,"auto",ge,me]}],basis:[{basis:[fo,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,fo,"auto","initial","none",me]}],grow:[{grow:["",Ve,ge,me]}],shrink:[{shrink:["",Ve,ge,me]}],order:[{order:[Pr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...R(),"baseline"]}],"align-self":[{self:["auto",...R(),"baseline"]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,Oa,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Tc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Dh,me]}],"font-family":[{font:[qT,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Ve,"none",ge,Tc]}],leading:[{leading:[i,...w()]}],"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:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",ge,Ar]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Ve,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"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(),UT,BT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",GT,zT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,ge,me],radial:["",ge,me],conic:[Pr,ge,me]},YT,HT]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"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:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,ge,me]}],"outline-w":[{outline:["",Ve,Oa,Ar]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,KT,WT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Ve,Ar]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[Ve,ge,me]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:J()}],brightness:[{brightness:[Ve,ge,me]}],contrast:[{contrast:[Ve,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",Ve,ge,me]}],"hue-rotate":[{"hue-rotate":[Ve,ge,me]}],invert:[{invert:["",Ve,ge,me]}],saturate:[{saturate:[Ve,ge,me]}],sepia:[{sepia:["",Ve,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Ve,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",ge,me]}],ease:[{ease:["linear","initial",m,ge,me]}],delay:[{delay:[Ve,ge,me]}],animate:[{animate:["none",y,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,me]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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:[Ve,Oa,Ar,Tc]}],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","*","**"]}}),Sc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},nS=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),rS=e=>ct.function(e),je=(...e)=>tS(kp(e)),jh=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)},Rh=e=>e.scrollHeight>e.clientHeight,oS="span",on=E.forwardRef(function(t,n){const r=t.as||oS;return x.jsx(r,{ref:n,...t,as:void 0})}),iS=co("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),mo=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return x.jsxs(on,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:je(iS({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),go=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function aS(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 sS=({children:e,...t})=>{const n=go(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:aS(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},lS=co("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),cS=co("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),Ec=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(on,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:je(cS({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:lS({theme:n})}):null,r,s.children]})}),bi=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Cc=typeof window<"u",Ma=Cc?E.useLayoutEffect:E.useEffect,Da=E.createContext(null),vo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class uS extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function dS({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(vo);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(ne,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):(ne=typeof globalThis<"u"?globalThis:ne||self,E(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,function(ne,E,b,wi){"use strict";var hR=Object.defineProperty;var mR=(ne,E,b)=>E in ne?hR(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b;var pe=(ne,E,b)=>mR(ne,typeof E!="symbol"?E+"":E,b);function Lp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=Lp(E),Oa=Lp(wi);function Vp(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=Vp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vp(e))&&(r&&(r+=" "),r+=t);return r}const $p=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rp=jp,uo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rp(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=$p(u)||$p(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 Rp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var zp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uS(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 Dl,Hp;function fo(){return Hp||(Hp=1,Dl=TypeError),Dl}const dS=uS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Nl,Wp;function Ma(){if(Wp)return Nl;Wp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,P=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function F(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||S.call(/e/,q))return q;var Re=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var et=H<0?-_(-H):_(H);if(et!==H){var ct=String(et),De=y.call(q,ct.length+1);return x.call(ct,Re,"$&_")+"."+x.call(x.call(De,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(q,Re,"$&_")}var z=dS,D=z.custom,R=Ee(D)?D:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Nl=function H(q,Re,et,ct){var De=Re||{};if(se(De,"quoteStyle")&&!se(J,De.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(De,"maxStringLength")&&(typeof De.maxStringLength=="number"?De.maxStringLength<0&&De.maxStringLength!==1/0:De.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Er=se(De,"customInspect")?De.customInspect:!0;if(typeof Er!="boolean"&&Er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(De,"indent")&&De.indent!==null&&De.indent!==" "&&!(parseInt(De.indent,10)===De.indent&&De.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(De,"numericSeparator")&&typeof De.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=De.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return We(q,De);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var rn=String(q);return co?F(q,rn):rn}if(typeof q=="bigint"){var Cr=String(q)+"n";return co?F(q,Cr):Cr}var Ap=typeof De.depth>"u"?5:De.depth;if(typeof et>"u"&&(et=0),et>=Ap&&Ap>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var bi=wr(De,et);if(typeof ct>"u")ct=[];else if(ce(ct,q)>=0)return"[Circular]";function Tn(xi,Ml,pR){if(Ml&&(ct=I.call(ct),ct.push(Ml)),pR){var cS={depth:De.depth};return se(De,"quoteStyle")&&(cS.quoteStyle=De.quoteStyle),H(xi,cS,et+1,ct)}return H(xi,De,et+1,ct)}if(typeof q=="function"&&!W(q)){var nS=K(q),rS=Tr(q,Tn);return"[Function"+(nS?": "+nS:" (anonymous)")+"]"+(rS.length>0?" { "+P.call(rS,", ")+" }":"")}if(Ee(q)){var oS=A?x.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(q);return typeof q=="object"&&!A?mt(oS):oS}if(_e(q)){for(var Ia="<"+w.call(String(q.nodeName)),_p=q.attributes||[],Ol=0;Ol<_p.length;Ol++)Ia+=" "+_p[Ol].name+"="+ee(Z(_p[Ol].value),"double",De);return Ia+=">",q.childNodes&&q.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(q.nodeName))+">",Ia}if(Y(q)){if(q.length===0)return"[]";var Ip=Tr(q,Tn);return bi&&!zn(Ip)?"["+Sr(Ip,bi)+"]":"[ "+P.call(Ip,", ")+" ]"}if(G(q)){var Op=Tr(q,Tn);return!("cause"in Error.prototype)&&"cause"in q&&!N.call(q,"cause")?"{ ["+String(q)+"] "+P.call(C.call("[cause]: "+Tn(q.cause),Op),", ")+" }":Op.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+P.call(Op,", ")+" }"}if(typeof q=="object"&&Er){if(R&&typeof q[R]=="function"&&z)return z(q,{depth:Ap-et});if(Er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var iS=[];return r&&r.call(q,function(xi,Ml){iS.push(Tn(Ml,q,!0)+" => "+Tn(xi,q))}),Sn("Map",n.call(q),iS,bi)}if(X(q)){var aS=[];return s&&s.call(q,function(xi){aS.push(Tn(xi,q))}),Sn("Set",a.call(q),aS,bi)}if(ie(q))return Lt("WeakMap");if(ue(q))return Lt("WeakSet");if(we(q))return Lt("WeakRef");if(B(q))return mt(Tn(Number(q)));if(Oe(q))return mt(Tn(M.call(q)));if(xe(q))return mt(m.call(q));if(ae(q))return mt(Tn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof zp<"u"&&q===zp)return"{ [object globalThis] }";if(!j(q)&&!W(q)){var Mp=Tr(q,Tn),sS=V?V(q)===Object.prototype:q instanceof Object||q.constructor===Object,Dp=q instanceof Object?"":"null prototype",lS=!sS&&O&&Object(q)===q&&O in q?y.call(ye(q),8,-1):Dp?"Object":"",fR=sS||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Np=fR+(lS||Dp?"["+P.call(C.call([],lS||[],Dp||[]),": ")+"] ":"");return Mp.length===0?Np+"{}":bi?Np+"{"+Sr(Mp,bi)+"}":Np+"{ "+P.call(Mp,", ")+" }"}return String(q)};function ee(H,q,Re){var et=Re.quoteStyle||q,ct=J[et];return ct+H+ct}function Z(H){return x.call(String(H),/"/g,"&quot;")}function U(H){return!O||!(typeof H=="object"&&(O in H||typeof H[O]<"u"))}function Y(H){return ye(H)==="[object Array]"&&U(H)}function j(H){return ye(H)==="[object Date]"&&U(H)}function W(H){return ye(H)==="[object RegExp]"&&U(H)}function G(H){return ye(H)==="[object Error]"&&U(H)}function ae(H){return ye(H)==="[object String]"&&U(H)}function B(H){return ye(H)==="[object Number]"&&U(H)}function xe(H){return ye(H)==="[object Boolean]"&&U(H)}function Ee(H){if(A)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!$)return!1;try{return $.call(H),!0}catch{}return!1}function Oe(H){if(!H||typeof H!="object"||!M)return!1;try{return M.call(H),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(H){return H in this};function se(H,q){return $e.call(H,q)}function ye(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=v.call(h.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function ce(H,q){if(H.indexOf)return H.indexOf(q);for(var Re=0,et=H.length;Re<et;Re++)if(H[Re]===q)return Re;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function ie(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function we(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ue(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function _e(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function We(H,q){if(H.length>q.maxStringLength){var Re=H.length-q.maxStringLength,et="... "+Re+" more character"+(Re>1?"s":"");return We(y.call(H,0,q.maxStringLength),q)+et}var ct=te[q.quoteStyle||"single"];ct.lastIndex=0;var De=x.call(x.call(H,ct,"\\$1"),/[\x00-\x1f]/g,Ct);return ee(De,"single",q)}function Ct(H){var q=H.charCodeAt(0),Re={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Re?"\\"+Re:"\\x"+(q<16?"0":"")+T.call(q.toString(16))}function mt(H){return"Object("+H+")"}function Lt(H){return H+" { ? }"}function Sn(H,q,Re,et){var ct=et?Sr(Re,et):P.call(Re,", ");return H+" ("+q+") {"+ct+"}"}function zn(H){for(var q=0;q<H.length;q++)if(ce(H[q],`
2
+ `)>=0)return!1;return!0}function wr(H,q){var Re;if(H.indent===" ")Re=" ";else if(typeof H.indent=="number"&&H.indent>0)Re=P.call(Array(H.indent+1)," ");else return null;return{base:Re,prev:P.call(Array(q+1),Re)}}function Sr(H,q){if(H.length===0)return"";var Re=`
3
+ `+q.prev+q.base;return Re+P.call(H,","+Re)+`
4
+ `+q.prev}function Tr(H,q){var Re=Y(H),et=[];if(Re){et.length=H.length;for(var ct=0;ct<H.length;ct++)et[ct]=se(H,ct)?q(H[ct],H):""}var De=typeof L=="function"?L(H):[],Er;if(A){Er={};for(var co=0;co<De.length;co++)Er["$"+De[co]]=De[co]}for(var rn in H)se(H,rn)&&(Re&&String(Number(rn))===rn&&rn<H.length||A&&Er["$"+rn]instanceof Symbol||(S.call(/[^\w$]/,rn)?et.push(q(rn,H)+": "+q(H[rn],H)):et.push(rn+": "+q(H[rn],H))));if(typeof L=="function")for(var Cr=0;Cr<De.length;Cr++)N.call(H,De[Cr])&&et.push("["+q(De[Cr])+"]: "+q(H[De[Cr]],H));return et}return Nl}var Fl,qp;function fS(){if(qp)return Fl;qp=1;var e=Ma(),t=fo(),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 Fl=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},Fl}var Ll,Up;function Yp(){return Up||(Up=1,Ll=Object),Ll}var Vl,Gp;function pS(){return Gp||(Gp=1,Vl=Error),Vl}var jl,Kp;function hS(){return Kp||(Kp=1,jl=EvalError),jl}var $l,Zp;function mS(){return Zp||(Zp=1,$l=RangeError),$l}var Rl,Xp;function gS(){return Xp||(Xp=1,Rl=ReferenceError),Rl}var zl,Qp;function vS(){return Qp||(Qp=1,zl=SyntaxError),zl}var Bl,Jp;function yS(){return Jp||(Jp=1,Bl=URIError),Bl}var Hl,eh;function bS(){return eh||(eh=1,Hl=Math.abs),Hl}var Wl,th;function xS(){return th||(th=1,Wl=Math.floor),Wl}var ql,nh;function wS(){return nh||(nh=1,ql=Math.max),ql}var Ul,rh;function SS(){return rh||(rh=1,Ul=Math.min),Ul}var Yl,oh;function TS(){return oh||(oh=1,Yl=Math.pow),Yl}var Gl,ih;function ES(){return ih||(ih=1,Gl=Math.round),Gl}var Kl,ah;function CS(){return ah||(ah=1,Kl=Number.isNaN||function(t){return t!==t}),Kl}var Zl,sh;function kS(){if(sh)return Zl;sh=1;var e=CS();return Zl=function(n){return e(n)||n===0?n:n<0?-1:1},Zl}var Xl,lh;function PS(){return lh||(lh=1,Xl=Object.getOwnPropertyDescriptor),Xl}var Ql,ch;function uh(){if(ch)return Ql;ch=1;var e=PS();if(e)try{e([],"length")}catch{e=null}return Ql=e,Ql}var Jl,dh;function AS(){if(dh)return Jl;dh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jl=e,Jl}var ec,fh;function _S(){return fh||(fh=1,ec=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}),ec}var tc,ph;function IS(){if(ph)return tc;ph=1;var e=typeof Symbol<"u"&&Symbol,t=_S();return tc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},tc}var nc,hh;function mh(){return hh||(hh=1,nc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),nc}var rc,gh;function vh(){if(gh)return rc;gh=1;var e=Yp();return rc=e.getPrototypeOf||null,rc}var oc,yh;function OS(){if(yh)return oc;yh=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 oc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},oc}var ic,bh;function Da(){if(bh)return ic;bh=1;var e=OS();return ic=Function.prototype.bind||e,ic}var ac,xh;function sc(){return xh||(xh=1,ac=Function.prototype.call),ac}var lc,wh;function Sh(){return wh||(wh=1,lc=Function.prototype.apply),lc}var cc,Th;function MS(){return Th||(Th=1,cc=typeof Reflect<"u"&&Reflect&&Reflect.apply),cc}var uc,Eh;function DS(){if(Eh)return uc;Eh=1;var e=Da(),t=Sh(),n=sc(),r=MS();return uc=r||e.call(n,t),uc}var dc,Ch;function kh(){if(Ch)return dc;Ch=1;var e=Da(),t=fo(),n=sc(),r=DS();return dc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},dc}var fc,Ph;function NS(){if(Ph)return fc;Ph=1;var e=kh(),t=uh(),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 fc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,fc}var pc,Ah;function FS(){if(Ah)return pc;Ah=1;var e=mh(),t=vh(),n=NS();return pc=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,pc}var hc,_h;function LS(){if(_h)return hc;_h=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Da();return hc=n.call(e,t),hc}var mc,Ih;function gc(){if(Ih)return mc;Ih=1;var e,t=Yp(),n=pS(),r=hS(),o=mS(),i=gS(),a=vS(),s=fo(),l=yS(),c=bS(),u=xS(),d=wS(),p=SS(),f=TS(),m=ES(),g=kS(),h=Function,v=function(W){try{return h('"use strict"; return ('+W+").constructor;")()}catch{}},y=uh(),x=AS(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,S=IS()(),C=FS(),P=vh(),I=mh(),_=Sh(),M=sc(),L={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":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%":h,"%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%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%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%":M,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var O=C(C(W));A["%Error.prototype%"]=O}var N=function W(G){var ae;if(G==="%AsyncFunction%")ae=v("async function () {}");else if(G==="%GeneratorFunction%")ae=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")ae=v("async function* () {}");else if(G==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ae=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var xe=W("%AsyncGenerator%");xe&&C&&(ae=C(xe.prototype))}return A[G]=ae,ae},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=Da(),z=LS(),D=F.call(M,Array.prototype.concat),R=F.call(_,Array.prototype.splice),J=F.call(M,String.prototype.replace),te=F.call(M,String.prototype.slice),ee=F.call(M,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(G){var ae=te(G,0,1),B=te(G,-1);if(ae==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var xe=[];return J(G,Z,function(Ee,Oe,$e,se){xe[xe.length]=$e?J(se,U,"$1"):Oe||Ee}),xe},j=function(G,ae){var B=G,xe;if(z(V,B)&&(xe=V[B],B="%"+xe[0]+"%"),z(A,B)){var Ee=A[B];if(Ee===L&&(Ee=N(B)),typeof Ee>"u"&&!ae)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:xe,name:B,value:Ee}}throw new a("intrinsic "+G+" does not exist!")};return mc=function(G,ae){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Y(G),xe=B.length>0?B[0]:"",Ee=j("%"+xe+"%",ae),Oe=Ee.name,$e=Ee.value,se=!1,ye=Ee.alias;ye&&(xe=ye[0],R(B,D([0,1],ye)));for(var K=1,ce=!0;K<B.length;K+=1){var Q=B[K],ie=te(Q,0,1),we=te(Q,-1);if((ie==='"'||ie==="'"||ie==="`"||we==='"'||we==="'"||we==="`")&&ie!==we)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!ce)&&(se=!0),xe+="."+Q,Oe="%"+xe+"%",z(A,Oe))$e=A[Oe];else if($e!=null){if(!(Q in $e)){if(!ae)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&K+1>=B.length){var X=y($e,Q);ce=!!X,ce&&"get"in X&&!("originalValue"in X.get)?$e=X.get:$e=$e[Q]}else ce=z($e,Q),$e=$e[Q];ce&&!se&&(A[Oe]=$e)}}return $e},mc}var vc,Oh;function Mh(){if(Oh)return vc;Oh=1;var e=gc(),t=kh(),n=t([e("%String.prototype.indexOf%")]);return vc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},vc}var yc,Dh;function Nh(){if(Dh)return yc;Dh=1;var e=gc(),t=Mh(),n=Ma(),r=fo(),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 yc=!!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},yc}var bc,Fh;function VS(){if(Fh)return bc;Fh=1;var e=gc(),t=Mh(),n=Ma(),r=Nh(),o=fo(),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 bc=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,bc}var xc,Lh;function jS(){if(Lh)return xc;Lh=1;var e=fo(),t=Ma(),n=fS(),r=Nh(),o=VS(),i=o||r||n;return xc=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},xc}var Vh=e=>Array.isArray(e),wc=e=>e===void 0,Sc=e=>e===null,$S=Function.bind.call(Function.call,Object.prototype.toString),RS=e=>!!e&&$S(e)==="[object Error]"||e instanceof Error,jh=(e,t)=>e instanceof t,zS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},BS=e=>Object.prototype.toString.call(e)==="[object Date]"&&jh(e,Date),rt={array:Vh,date:BS,empty:e=>Sc(e)||wc(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:jh,isError:RS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Sc(e)||wc(e),null:Sc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Vh(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:wc},HS=e=>Object.keys(e),kr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o};const Tc="-",WS=e=>{const t=US(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Tc);return s[0]===""&&s.length!==1&&s.shift(),$h(s,t)||qS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},$h=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$h(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Tc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Rh=/^\[(.+)\]$/,qS=e=>{if(Rh.test(e)){const t=Rh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},US=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ec(n[o],r,o,t);return r},Ec=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:zh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(YS(o)){Ec(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Ec(a,zh(t,i),n,r)})})},zh=(e,t)=>{let n=e;return t.split(Tc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},YS=e=>e.isThemeGetter,GS=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)}}},Cc="!",kc=":",KS=kc.length,ZS=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===kc){i.push(o.slice(l,m)),l=m+KS;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=XS(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+kc,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},XS=e=>e.endsWith(Cc)?e.substring(0,e.length-1):e.startsWith(Cc)?e.substring(1):e,QS=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}},JS=e=>({cache:GS(e.cacheSize),parseClassName:ZS(e),sortModifiers:QS(e),...WS(e)}),eT=/\s+/,tT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(eT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),x=f?y+Cc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function nT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bh(t))&&(r&&(r+=" "),r+=n);return r}const Bh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bh(e[r]))&&(n&&(n+=" "),n+=t);return n};function rT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=JS(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=tT(l,n);return o(l,u),u}return function(){return i(nT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Hh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oT=/^\d+\/\d+$/,iT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aT=/\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$/,sT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>oT.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),qh=e=>e.endsWith("%")&&je(e.slice(0,-1)),Qn=e=>iT.test(e),uT=()=>!0,dT=e=>aT.test(e)&&!sT.test(e),Pc=()=>!1,fT=e=>lT.test(e),pT=e=>cT.test(e),hT=e=>!me(e)&&!ge(e),mT=e=>ho(e,Gh,Pc),me=e=>Hh.test(e),Ar=e=>ho(e,Kh,dT),Ac=e=>ho(e,kT,je),gT=e=>ho(e,Uh,Pc),vT=e=>ho(e,Yh,pT),yT=e=>ho(e,Pc,fT),ge=e=>Wh.test(e),Na=e=>mo(e,Kh),bT=e=>mo(e,PT),xT=e=>mo(e,Uh),wT=e=>mo(e,Gh),ST=e=>mo(e,Yh),TT=e=>mo(e,AT,!0),ho=(e,t,n)=>{const r=Hh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},mo=(e,t,n=!1)=>{const r=Wh.exec(e);return r?r[1]?t(r[1]):n:!1},Uh=e=>e==="position",ET=new Set(["image","url"]),Yh=e=>ET.has(e),CT=new Set(["length","size","percentage"]),Gh=e=>CT.has(e),Kh=e=>e==="length",kT=e=>e==="number",PT=e=>e==="family-name",AT=e=>e==="shadow",_T=rT(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),m=It("perspective"),g=It("aspect"),h=It("ease"),v=It("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[ge,me,l],C=()=>[po,"full","auto",...S()],P=()=>[Pr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",Pr,ge,me]},ge,me],_=()=>[Pr,"auto",ge,me],M=()=>["auto","min","max","fr",ge,me],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],A=()=>["auto",...S()],O=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],N=()=>[e,ge,me],V=()=>[qh,Ar],F=()=>["","none","full",c,ge,me],z=()=>["",je,Na,Ar],D=()=>["solid","dashed","dotted","double"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,ge,me],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],ee=()=>["none",je,ge,me],Z=()=>["none",je,ge,me],U=()=>[je,ge,me],Y=()=>[po,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qn],breakpoint:[Qn],color:[uT],container:[Qn],"drop-shadow":[Qn],ease:["in","out","in-out"],font:[hT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qn],shadow:[Qn],spacing:["px",je],text:[Qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,me,ge,g]}],container:["container"],columns:[{columns:[je,me,ge,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),me,ge]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Pr,"auto",ge,me]}],basis:[{basis:[po,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,po,"auto","initial","none",me]}],grow:[{grow:["",je,ge,me]}],shrink:[{shrink:["",je,ge,me]}],order:[{order:[Pr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,Na,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qh,me]}],"font-family":[{font:[bT,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,Ac]}],leading:[{leading:[i,...S()]}],"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:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ge,Ar]}],"text-decoration-color":[{decoration:N()}],"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:S()}],"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:[...x(),xT,gT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",wT,mT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,ge,me],radial:["",ge,me],conic:[Pr,ge,me]},ST,vT]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],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:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ge,me]}],"outline-w":[{outline:["",je,Na,Ar]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,TT,yT]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[je,Ar]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],opacity:[{opacity:[je,ge,me]}],"mix-blend":[{"mix-blend":[...R(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:J()}],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":J()}],"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":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",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",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ge,me]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[je,Na,Ar,Ac]}],stroke:[{stroke:["none",...N()]}],"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","*","**"]}}),Fa=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},IT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),OT=e=>rt.function(e),Le=(...e)=>_T(jp(e)),Zh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Si=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Xh=e=>e.scrollHeight>e.clientHeight,MT="span",on=E.forwardRef(function(t,n){const r=t.as||MT;return b.jsx(r,{ref:n,...t,as:void 0})}),DT=uo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),go=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 b.jsxs(on,{...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:Le(DT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),vo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function NT(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 FT=({children:e,...t})=>{const n=vo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:NT(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()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},LT=uo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),VT=uo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),_c=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return b.jsxs(on,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Le(VT({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:LT({theme:n})}):null,r,s.children]})}),Ti=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ic=typeof window<"u",La=Ic?E.useLayoutEffect:E.useEffect,Va=E.createContext(null),yo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class jT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $T({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(yo);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
5
5
  [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
@@ -9,132 +9,132 @@
9
9
  ${p}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(f)}},[t]),x.jsx(uS,{isPresent:t,childRef:o,sizeRef:i,children:_.cloneElement(e,{ref:o})})}const fS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=pn(pS),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),_.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(dS,{isPresent:n,anchorX:s,children:e})),x.jsx(Da.Provider,{value:d,children:e})};function pS(){return new Map}function $h(e=!0){const t=E.useContext(Da);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 Na=e=>e.key||"";function zh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const Jn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=$h(a),u=E.useMemo(()=>zh(e),[e]),d=a&&!l?[]:u.map(Na),p=E.useRef(!0),f=E.useRef(u),h=pn(()=>new Map),[g,m]=E.useState(u),[y,v]=E.useState(u);Ma(()=>{p.current=!1,f.current=u;for(let T=0;T<y.length;T++){const w=Na(y[T]);d.includes(w)?h.delete(w):h.get(w)!==!0&&h.set(w,!1)}},[y,d.length,d.join("-")]);const b=[];if(u!==g){let T=[...u];for(let w=0;w<y.length;w++){const C=y[w],k=Na(C);d.includes(k)||(T.splice(w,0,C),b.push(C))}return i==="wait"&&b.length&&(T=b),v(zh(T)),m(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(bi);return x.jsx(x.Fragment,{children:y.map(T=>{const w=Na(T),C=a&&!l?!1:u===y||d.includes(w),k=()=>{if(h.has(w))h.set(w,!0);else return;let I=!0;h.forEach(A=>{A||(I=!1)}),I&&(S==null||S(),v(f.current),a&&(c==null||c()),r&&r())};return x.jsx(fS,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:T},w)})})},hS=E.createContext(null),Ut=e=>e;let yo=Ut,an=Ut;process.env.NODE_ENV!=="production"&&(yo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});const mS={useManualTiming:!1},Fa=["read","resolveKeyframes","update","preRender","render","postRender"];function gS(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 h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.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 vS=40;function Bh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Fa.reduce((y,v)=>(y[v]=gS(i),y),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,vS),1),o.timestamp=y,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Fa.reduce((y,v)=>{const b=a[v];return y[v]=(S,T=!1,w=!1)=>(n||h(),b.schedule(S,T,w)),y},{}),cancel:y=>{for(let v=0;v<Fa.length;v++)a[Fa[v]].cancel(y)},state:o,steps:a}}const{schedule:Qe,cancel:Bn,state:Dt,steps:kc}=Bh(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function yS(){const e=E.useRef(!1);return Ma(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function bS(){const e=yS(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Qe.postRender(r),[r]),t]}const xS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Hh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(xS);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 Wh=e=>e===!0,wS=e=>Wh(e===!0)||e==="id",TS=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(bi),o=E.useContext(hS),[i,a]=bS(),s=E.useRef(null),l=r.id||o;s.current===null&&(wS(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Wh(n)&&r.group||Hh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(bi.Provider,{value:c,children:e})},qh=E.createContext({strict:!1}),Uh={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 Uh)bo[e]={isEnabled:t=>Uh[e].some(n=>!!t[n])};function SS(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const ES=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 La(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ES.has(e)}let Gh=e=>!La(e);function Yh(e){e&&(Gh=t=>t.startsWith("on")?!La(t):e(t))}try{Yh(require("@emotion/is-prop-valid").default)}catch{}function CS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Gh(o)||n===!0&&La(o)||!t&&!La(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function kS({children:e,isValidProp:t,...n}){t&&Yh(t),n={...E.useContext(vo),...n},n.isStatic=pn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(vo.Provider,{value:r,children:e})}const Kh=new Set;function Va(e,t,n){e||Kh.has(t)||(console.warn(t),Kh.add(t))}function PS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Va(!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 Ra(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function xi(e){return typeof e=="string"||Array.isArray(e)}const Pc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ac=["initial",...Pc];function $a(e){return Ra(e.animate)||Ac.some(t=>xi(e[t]))}function Zh(e){return!!($a(e)||e.variants)}function AS(e,t){if($a(e)){const{initial:n,animate:r}=e;return{initial:n===!1||xi(n)?n:void 0,animate:xi(r)?r:void 0}}return e.inherit!==!1?t:{}}function _S(e){const{initial:t,animate:n}=AS(e,E.useContext(ja));return E.useMemo(()=>({initial:t,animate:n}),[Xh(t),Xh(n)])}function Xh(e){return Array.isArray(e)?e.join(" "):e}const IS=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function OS(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):xo(n)&&(n.current=r))},[t])}const{schedule:_c}=Bh(queueMicrotask,!1),Ic=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qh="data-"+Ic("framerAppearId"),Jh=E.createContext({});function MS(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ja),l=E.useContext(qh),c=E.useContext(Da),u=E.useContext(vo).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(Jh);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&DS(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const g=n[Qh],m=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return Ma(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),_c.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),m.current=!1))}),p}function DS(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:em(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&xo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function em(e){if(e)return e.options.allowProjection!==!1?e.projection:em(e.parent)}function NS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&SS(e);function s(c,u){let d;const p={...E.useContext(vo),...c,layoutId:FS(c)},{isStatic:f}=p,h=_S(c),g=r(c,f);if(!f&&Cc){LS(p,e);const m=VS(p);d=m.MeasureLayout,h.visualElement=MS(o,g,p,t,m.ProjectionNode)}return x.jsxs(ja.Provider,{value:h,children:[d&&h.visualElement?x.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,OS(g,h.visualElement,u),g,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[IS]=o,l}function FS({layoutId:e}){const t=E.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function LS(e,t){const n=E.useContext(qh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?yo(!1,r):an(!1,r)}}function VS(e){const{drag:t,layout:n}=bo;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 tm=e=>t=>typeof t=="string"&&t.startsWith(e),Oc=tm("--"),jS=tm("var(--"),Mc=e=>jS(e)?RS.test(e.split("/*")[0].trim()):!1,RS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wi={};function $S(e){for(const t in e)wi[t]=e[t],Oc(t)&&(wi[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_r=new Set(wo);function nm(e,{layout:t,layoutId:n}){return _r.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wi[e]||e==="opacity")}const kt=e=>!!(e&&e.getVelocity),rm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hn=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ti={...To,transform:e=>Hn(0,1,e)},za={...To,default:1},Si=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),er=Si("deg"),En=Si("%"),Te=Si("px"),zS=Si("vh"),BS=Si("vw"),om={...En,parse:e=>En.parse(e)/100,transform:e=>En.transform(e*100)},HS={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},WS={rotate:er,rotateX:er,rotateY:er,rotateZ:er,scale:za,scaleX:za,scaleY:za,scaleZ:za,skew:er,skewX:er,skewY:er,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Ti,originX:om,originY:om,originZ:Te},im={...To,transform:Math.round},Dc={...HS,...WS,zIndex:im,size:Te,fillOpacity:Ti,strokeOpacity:Ti,numOctaves:im},qS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},US=wo.length;function GS(e,t,n){let r="",o=!0;for(let i=0;i<US;i++){const a=wo[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=rm(s,Dc[a]);if(!l){o=!1;const u=qS[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Nc(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(_r.has(l)){a=!0;continue}else if(Oc(l)){o[l]=c;continue}else{const u=rm(c,Dc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=GS(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 Fc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function am(e,t,n){for(const r in t)!kt(t[r])&&!nm(r,n)&&(e[r]=t[r])}function YS({transformTemplate:e},t){return E.useMemo(()=>{const n=Fc();return Nc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function KS(e,t){const n=e.style||{},r={};return am(r,n,e),Object.assign(r,YS(e,t)),r}function ZS(e,t){const n={},r=KS(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 XS=["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 Lc(e){return typeof e!="string"||e.includes("-")?!1:!!(XS.indexOf(e)>-1||/[A-Z]/u.test(e))}const QS={offset:"stroke-dashoffset",array:"stroke-dasharray"},JS={offset:"strokeDashoffset",array:"strokeDasharray"};function eE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?QS:JS;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function sm(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function tE(e,t,n){const r=sm(t,e.x,e.width),o=sm(n,e.y,e.height);return`${r} ${o}`}function Vc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Nc(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=tE(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&eE(p,a,s,l,!1)}const lm=()=>({...Fc(),attrs:{}}),jc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function nE(e,t,n,r){const o=E.useMemo(()=>{const i=lm();return Vc(i,t,jc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};am(i,e.style,e),o.style={...i,...o.style}}return o}function rE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Lc(n)?nE:ZS)(r,i,a,n),c=CS(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>kt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function cm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Rc(e,t,n,r){if(typeof t=="function"){const[o,i]=cm(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]=cm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const $c=e=>Array.isArray(e),oE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),iE=e=>$c(e)?e[e.length-1]||0:e;function Ba(e){const t=kt(e)?e.get():e;return oE(t)?t.toValue():t}function aE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:sE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const um=e=>(t,n)=>{const r=E.useContext(ja),o=E.useContext(Da),i=()=>aE(e,t,r,o);return n?i():pn(i)};function sE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ba(i[p]);let{initial:a,animate:s}=e;const l=$a(e),c=Zh(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"&&!Ra(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=Rc(e,p[f]);if(h){const{transitionEnd:g,transition:m,...y}=h;for(const v in y){let b=y[v];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[v]=b)}for(const v in g)o[v]=g[v]}}}return o}function zc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(kt(o[a])||t.style&&kt(t.style[a])||nm(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const lE={useVisualState:um({scrapeMotionValuesFromProps:zc,createRenderState:Fc})};function dm(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function fm(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const pm=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 hm(e,t,n,r){fm(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(pm.has(o)?o:Ic(o),t.attrs[o])}function mm(e,t,n){const r=zc(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const i=wo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const gm=["x","y","width","height","cx","cy","r"],cE={useVisualState:um({scrapeMotionValuesFromProps:mm,createRenderState:lm,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(_r.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<gm.length;s++){const l=gm[s];e[l]!==t[l]&&(a=!0)}a&&Qe.read(()=>{dm(n,r),Qe.render(()=>{Vc(r,o,jc(n.tagName),e.transformTemplate),hm(n,r)})})}})};function uE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Lc(r)?cE:lE,preloadedFeatures:e,useRender:rE(o),createVisualElement:t,Component:r};return NS(a)}}function Ei(e,t,n){const r=e.getProps();return Rc(r,t,n!==void 0?n:r.custom,e)}function Bc(e,t){return e?e[t]||e.default||e:void 0}const vm=new Set(["width","height","top","left","right","bottom",...wo]);function Hc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ha(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function dE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}class Wc{constructor(){this.subscriptions=[]}add(t){return Hc(this.subscriptions,t),()=>Ha(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function ym(e,t){return t?e*(1e3/t):0}let Wa;function fE(){Wa=void 0}const Cn={now:()=>(Wa===void 0&&Cn.set(Dt.isProcessing||mS.useManualTiming?Dt.timestamp:performance.now()),Wa),set:e=>{Wa=e,queueMicrotask(fE)}},bm=30,pE=e=>!isNaN(parseFloat(e)),Ci={current:void 0};class hE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Cn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Cn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=pE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Va(!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 Wc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ci.current&&Ci.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Cn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bm);return ym(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function So(e,t){return new hE(e,t)}function mE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,So(n))}function gE(e,t){const n=Ei(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=iE(i[a]);mE(e,a,s)}}function vE(e){return!!(kt(e)&&e.add)}function qc(e,t){const n=e.getValue("willChange");if(vE(n))return n.add(t)}function xm(e){return e.props[Qh]}function Uc(e){let t;return()=>(t===void 0&&(t=e()),t)}const yE=Uc(()=>window.ScrollTimeline!==void 0);class bE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(yE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class wm extends bE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const hn=e=>e*1e3,kn=e=>e/1e3;function qa(e){return typeof e=="function"}function Tm(e,t){e.timeline=t,e.onfinish=null}const Gc=e=>Array.isArray(e)&&typeof e[0]=="number",xE={linearEasing:void 0};function wE(e,t){const n=Uc(e);return()=>{var r;return(r=xE[t])!==null&&r!==void 0?r:n()}}const Ua=wE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ir=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Sm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Ir(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Em(e){return!!(typeof e=="function"&&Ua()||!e||typeof e=="string"&&(e in Yc||Ua())||Gc(e)||Array.isArray(e)&&e.every(Em))}const ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Yc={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 Cm(e,t){if(e)return typeof e=="function"&&Ua()?Sm(e,t):Gc(e)?ki(e):Array.isArray(e)?e.map(n=>Cm(n,t)||Yc.easeOut):Yc[e]}const km=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,TE=1e-7,SE=12;function EE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=km(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>TE&&++s<SE);return a}function Pi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>EE(i,0,1,e,n);return i=>i===0||i===1?i:km(o(i),t,r)}const Pm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Am=e=>t=>1-e(1-t),_m=Pi(.33,1.53,.69,.99),Kc=Am(_m),Im=Pm(Kc),Om=e=>(e*=2)<1?.5*Kc(e):.5*(2-Math.pow(2,-10*(e-1))),Zc=e=>1-Math.sin(Math.acos(e)),Mm=Am(Zc),Dm=Pm(Zc),Nm=e=>/^0[^.\s]+$/u.test(e);function CE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Nm(e):!0}const Ai=e=>Math.round(e*1e5)/1e5,Xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function kE(e){return e==null}const PE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qc=(e,t)=>n=>!!(typeof n=="string"&&PE.test(n)&&n.startsWith(e)||t&&!kE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Fm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Xc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},AE=e=>Hn(0,255,e),Jc={...To,transform:e=>Math.round(AE(e))},Or={test:Qc("rgb","red"),parse:Fm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jc.transform(e)+", "+Jc.transform(t)+", "+Jc.transform(n)+", "+Ai(Ti.transform(r))+")"};function _E(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 eu={test:Qc("#"),parse:_E,transform:Or.transform},Eo={test:Qc("hsl","hue"),parse:Fm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+En.transform(Ai(t))+", "+En.transform(Ai(n))+", "+Ai(Ti.transform(r))+")"},Vt={test:e=>Or.test(e)||eu.test(e)||Eo.test(e),parse:e=>Or.test(e)?Or.parse(e):Eo.test(e)?Eo.parse(e):eu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Or.transform(e):Eo.transform(e)},IE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function OE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(IE))===null||n===void 0?void 0:n.length)||0)>0}const Lm="number",Vm="color",ME="var",DE="var(",jm="${}",NE=/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 _i(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(NE,l=>(Vt.test(l)?(r.color.push(i),o.push(Vm),n.push(Vt.parse(l))):l.startsWith(DE)?(r.var.push(i),o.push(ME),n.push(l)):(r.number.push(i),o.push(Lm),n.push(parseFloat(l))),++i,jm)).split(jm);return{values:n,split:s,indexes:r,types:o}}function Rm(e){return _i(e).values}function $m(e){const{split:t,types:n}=_i(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===Lm?i+=Ai(o[a]):s===Vm?i+=Vt.transform(o[a]):i+=o[a]}return i}}const FE=e=>typeof e=="number"?0:e;function LE(e){const t=Rm(e);return $m(e)(t.map(FE))}const tr={test:OE,parse:Rm,createTransformer:$m,getAnimatableNone:LE},VE=new Set(["brightness","contrast","saturate","opacity"]);function jE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xc)||[];if(!r)return e;const o=n.replace(r,"");let i=VE.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const RE=/\b([a-z-]*)\(.*?\)/gu,tu={...tr,getAnimatableNone:e=>{const t=e.match(RE);return t?t.map(jE).join(" "):e}},$E={...Dc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:tu,WebkitFilter:tu},zm=e=>$E[e];function Bm(e,t){let n=zm(e);return n!==tu&&(n=tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zE=new Set(["auto","none","0"]);function BE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!zE.has(i)&&_i(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Bm(n,o)}const Mr=e=>e*180/Math.PI,nu=e=>{const t=Mr(Math.atan2(e[1],e[0]));return ru(t)},HE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:nu,rotateZ:nu,skewX:e=>Mr(Math.atan(e[1])),skewY:e=>Mr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ru=e=>(e=e%360,e<0&&(e+=360),e),Hm=nu,Wm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),WE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wm,scaleY:qm,scale:e=>(Wm(e)+qm(e))/2,rotateX:e=>ru(Mr(Math.atan2(e[6],e[5]))),rotateY:e=>ru(Mr(Math.atan2(-e[2],e[0]))),rotateZ:Hm,rotate:Hm,skewX:e=>Mr(Math.atan(e[4])),skewY:e=>Mr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Um(e){return e.includes("scale")?1:0}function ou(e,t){if(!e||e==="none")return Um(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=WE,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=HE,o=s}if(!o)return Um(t);const i=r[t],a=o[1].split(",").map(UE);return typeof i=="function"?i(a):a[i]}const qE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ou(n,t)};function UE(e){return parseFloat(e.trim())}const Gm=e=>e===To||e===Te,GE=new Set(["x","y","z"]),YE=wo.filter(e=>!GE.has(e));function KE(e){const t=[];return YE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Co={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})=>ou(t,"x"),y:(e,{transform:t})=>ou(t,"y")};Co.translateX=Co.x,Co.translateY=Co.y;const Dr=new Set;let iu=!1,au=!1;function Ym(){if(au){const e=Array.from(Dr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=KE(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}au=!1,iu=!1,Dr.forEach(e=>e.complete()),Dr.clear()}function Km(){Dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(au=!0)})}function ZE(){Km(),Ym()}class su{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Dr.add(this),iu||(iu=!0,Qe.read(Km),Qe.resolveKeyframes(Ym))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Zm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),XE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QE(e){const t=XE.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const JE=4;function Xm(e,t,n=1){an(n<=JE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=QE(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Zm(a)?parseFloat(a):a}return Mc(o)?Xm(o,t,n+1):o}const Qm=e=>t=>t.test(e),Jm=[To,Te,En,er,BS,zS,{test:e=>e==="auto",parse:e=>e}],eg=e=>Jm.find(Qm(e));class tg extends su{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(),Mc(c))){const u=Xm(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=eg(o),s=eg(i);if(a!==s)if(Gm(a)&&Gm(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)CE(t[o])&&r.push(o);r.length&&BE(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=Co[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Co[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const ng=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tr.test(e)||e==="0")&&!e.startsWith("url("));function eC(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 tC(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=ng(o,t),s=ng(i,t);return yo(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:eC(e)||(n==="spring"||qa(n))&&r}const nC=e=>e!==null;function Ga(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(nC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const rC=40;class rg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Cn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>rC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ZE(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Cn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!tC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(Ga(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ya=2e4;function lu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ya;)t+=n,r=e.next(t);return t>=Ya?1/0:t}const ot=(e,t,n)=>e+(t-e)*n;function cu(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 oC({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=cu(l,s,e+1/3),i=cu(l,s,e),a=cu(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ka(e,t){return n=>n>0?t:e}const uu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},iC=[eu,Or,Eo],aC=e=>iC.find(t=>t.test(e));function og(e){const t=aC(e);if(yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Eo&&(n=oC(n)),n}const ig=(e,t)=>{const n=og(e),r=og(t);if(!n||!r)return Ka(e,t);const o={...n};return i=>(o.red=uu(n.red,r.red,i),o.green=uu(n.green,r.green,i),o.blue=uu(n.blue,r.blue,i),o.alpha=ot(n.alpha,r.alpha,i),Or.transform(o))},sC=(e,t)=>n=>t(e(n)),Ii=(...e)=>e.reduce(sC),du=new Set(["none","hidden"]);function lC(e,t){return du.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cC(e,t){return n=>ot(e,t,n)}function fu(e){return typeof e=="number"?cC:typeof e=="string"?Mc(e)?Ka:Vt.test(e)?ig:fC:Array.isArray(e)?ag:typeof e=="object"?Vt.test(e)?ig:uC:Ka}function ag(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>fu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function uC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=fu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function dC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const fC=(e,t)=>{const n=tr.createTransformer(t),r=_i(e),o=_i(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?du.has(e)&&!o.values.length||du.has(t)&&!r.values.length?lC(e,t):Ii(ag(dC(r,o),o.values),n):(yo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ka(e,t))};function sg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ot(e,t,n):fu(e)(e,t)}const pC=5;function lg(e,t,n){const r=Math.max(t-pC,0);return ym(n-e(r),t-r)}const dt={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},cg=.001;function hC({duration:e=dt.duration,bounce:t=dt.bounce,velocity:n=dt.velocity,mass:r=dt.mass}){let o,i;yo(e<=hn(dt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Hn(dt.minDamping,dt.maxDamping,a),e=Hn(dt.minDuration,dt.maxDuration,kn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=pu(c,a),h=Math.exp(-d);return cg-p/f*h},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-d),g=pu(Math.pow(c,2),a);return(-o(c)+cg>0?-1:1)*((p-f)*h)/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=gC(o,i,s);if(e=hn(e),isNaN(l))return{stiffness:dt.stiffness,damping:dt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const mC=12;function gC(e,t,n){let r=n;for(let o=1;o<mC;o++)r=r-e(r)/t(r);return r}function pu(e,t){return e*Math.sqrt(1-t*t)}const vC=["duration","bounce"],yC=["stiffness","damping","mass"];function ug(e,t){return t.some(n=>e[n]!==void 0)}function bC(e){let t={velocity:dt.velocity,stiffness:dt.stiffness,damping:dt.damping,mass:dt.mass,isResolvedFromDuration:!1,...e};if(!ug(e,yC)&&ug(e,vC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Hn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:dt.mass,stiffness:o,damping:i}}else{const n=hC(e);t={...t,...n,mass:dt.mass},t.isResolvedFromDuration=!0}return t}function hu(e=dt.visualDuration,t=dt.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}=bC({...n,velocity:-kn(n.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(l*u)),m=a-i,y=kn(Math.sqrt(l/u)),v=Math.abs(m)<5;r||(r=v?dt.restSpeed.granular:dt.restSpeed.default),o||(o=v?dt.restDelta.granular:dt.restDelta.default);let b;if(g<1){const T=pu(y,g);b=w=>{const C=Math.exp(-g*y*w);return a-C*((h+g*y*m)/T*Math.sin(T*w)+m*Math.cos(T*w))}}else if(g===1)b=T=>a-Math.exp(-y*T)*(m+(h+y*m)*T);else{const T=y*Math.sqrt(g*g-1);b=w=>{const C=Math.exp(-g*y*w),k=Math.min(T*w,300);return a-C*((h+g*y*m)*Math.sinh(k)+T*m*Math.cosh(k))/T}}const S={calculatedDuration:f&&d||null,next:T=>{const w=b(T);if(f)s.done=T>=d;else{let C=0;g<1&&(C=T===0?hn(h):lg(b,T,w));const k=Math.abs(C)<=r,I=Math.abs(a-w)<=o;s.done=k&&I}return s.value=s.done?a:w,s},toString:()=>{const T=Math.min(lu(S),Ya),w=Sm(C=>S.next(T*C).value,T,30);return T+"ms "+w}};return S}function dg({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,h=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const m=d+g,y=a===void 0?m:a(m);y!==m&&(g=y-d);const v=k=>-g*Math.exp(-k/r),b=k=>y+v(k),S=k=>{const I=v(k),A=b(k);p.done=Math.abs(I)<=c,p.value=p.done?y:A};let T,w;const C=k=>{f(p.value)&&(T=k,w=hu({keyframes:[p.value,h(p.value)],velocity:lg(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!w&&T===void 0&&(I=!0,S(k),C(k)),T!==void 0&&k>=T?w.next(k-T):(!I&&S(k),p)}}}const xC=Pi(.42,0,1,1),wC=Pi(0,0,.58,1),fg=Pi(.42,0,.58,1),pg=e=>Array.isArray(e)&&typeof e[0]!="number",hg={linear:Ut,easeIn:xC,easeInOut:fg,easeOut:wC,circIn:Zc,circInOut:Dm,circOut:Mm,backIn:Kc,backInOut:Im,backOut:_m,anticipate:Om},mu=e=>{if(Gc(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Pi(t,n,r,o)}else if(typeof e=="string")return an(hg[e]!==void 0,`Invalid easing type '${e}'`),hg[e];return e};function TC(e,t,n){const r=[],o=n||sg,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]||Ut:t;s=Ii(l,s)}r.push(s)}return r}function mg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(an(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=TC(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=Ir(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Hn(e[0],e[i-1],u)):c}function gg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ir(0,t,r);e.push(ot(n,1,o))}}function vg(e){const t=[0];return gg(t,e.length-1),t}function SC(e,t){return e.map(n=>n*t)}function EC(e,t){return e.map(()=>t||fg).splice(0,e.length-1)}function Oi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=pg(r)?r.map(mu):mu(r),i={done:!1,value:t[0]},a=SC(n&&n.length===t.length?n:vg(t),e),s=mg(a,t,{ease:Array.isArray(o)?o:EC(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const CC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>Bn(t),now:()=>Dt.isProcessing?Dt.timestamp:Cn.now()}},kC={decay:dg,inertia:dg,tween:Oi,keyframes:Oi,spring:hu},PC=e=>e/100;class gu extends rg{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||su,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=qa(n)?n:kC[n]||Oi;let l,c;process.env.NODE_ENV!=="production"&&s!==Oi&&an(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Oi&&typeof t[0]!="number"&&(l=Ii(PC,sg(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=lu(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,S=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(A=1-A,g&&(A-=g/d)):h==="mirror"&&(S=a)),b=Hn(0,1,A)*d}const T=v?{done:!1,value:l[0]}:S.next(b);s&&(T.value=s(T.value));let{done:w}=T;!v&&c!==null&&(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return C&&o!==void 0&&(T.value=Ga(l,this.options,o)),m&&m(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?kn(t.calculatedDuration):0}get time(){return kn(this.currentTime)}set time(t){t=hn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=kn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=CC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const AC=new Set(["opacity","clipPath","filter","transform"]);function _C(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Cm(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const IC=Uc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Za=10,OC=2e4;function MC(e){return qa(e.type)||e.type==="spring"||!Em(e.ease)}function DC(e,t){const n=new gu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<OC;)r=n.sample(i),o.push(r.value),i+=Za;return{times:void 0,keyframes:o,duration:i-Za,ease:"linear"}}const yg={anticipate:Om,backInOut:Im,circInOut:Dm};function NC(e){return e in yg}class bg extends rg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new tg(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&Ua()&&NC(i)&&(i=yg[i]),MC(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...g}=this.options,m=DC(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=_C(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Tm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Ga(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return kn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return kn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=hn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ut;const{animation:r}=n;Tm(r,t)}return Ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new gu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=hn(this.time);c.setWithVelocity(h.sample(g-Za).value,h.sample(g).value,Za)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return IC()&&r&&AC.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const FC={type:"spring",stiffness:500,damping:25,restSpeed:10},LC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),VC={type:"keyframes",duration:.8},jC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RC=(e,{keyframes:t})=>t.length>2?VC:_r.has(e)?e.startsWith("scale")?LC(t[1]):FC:jC;function $C({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 vu=(e,t,n,r={},o,i)=>a=>{const s=Bc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};$C(s)||(u={...u,...RC(e,u)}),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=Ga(u.keyframes,s);if(p!==void 0)return Qe.update(()=>{u.onUpdate(p),u.onComplete()}),new wm([])}return!i&&bg.supports(u)?new bg(u):new gu(u)};function zC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function yu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&zC(u,d))continue;const h={delay:n,...Bc(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=xm(e);if(y){const v=window.MotionHandoffAnimation(y,d,Qe);v!==null&&(h.startTime=v,g=!0)}}qc(e,d),p.start(vu(d,p,f,e.shouldReduceMotion&&vm.has(d)?{type:!1}:h,e,g));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{Qe.update(()=>{s&&gE(e,s)})}),c}function bu(e,t,n={}){var r;const o=Ei(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(yu(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return BC(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function BC(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(HC).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(bu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function HC(e,t){return e.sortNodePosition(t)}function WC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>bu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=bu(e,t,n);else{const o=typeof t=="function"?Ei(e,t,n.custom):t;r=Promise.all(yu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function xg(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 qC=Ac.length;function wg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?wg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<qC;n++){const r=Ac[n],o=e.props[r];(xi(o)||o===!1)&&(t[r]=o)}return t}const UC=[...Pc].reverse(),GC=Pc.length;function YC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>WC(e,n,r)))}function KC(e){let t=YC(e),n=Tg(),r=!0;const o=l=>(c,u)=>{var d;const p=Ei(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...g}=p;c={...c,...g,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=wg(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<GC;m++){const y=UC[m],v=n[y],b=c[y]!==void 0?c[y]:u[y],S=xi(b),T=y===l?v.isActive:null;T===!1&&(h=m);let w=b===u[y]&&b!==c[y]&&S;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...f},!v.isActive&&T===null||!b&&!v.prevProp||Ra(b)||typeof b=="boolean")continue;const C=ZC(v.prevProp,b);let k=C||y===l&&v.isActive&&!w&&S||m>h&&S,I=!1;const A=Array.isArray(b)?b:[b];let N=A.reduce(o(y),{});T===!1&&(N={});const{prevResolvedValues:L={}}=v,R={...L,...N},P=j=>{k=!0,p.has(j)&&(I=!0,p.delete(j)),v.needsAnimating[j]=!0;const F=e.getValue(j);F&&(F.liveStyle=!1)};for(const j in R){const F=N[j],z=L[j];if(f.hasOwnProperty(j))continue;let M=!1;$c(F)&&$c(z)?M=!xg(F,z):M=F!==z,M?F!=null?P(j):p.add(j):F!==void 0&&p.has(j)?P(j):v.protectedKeys[j]=!0}v.prevProp=b,v.prevResolvedValues=N,v.isActive&&(f={...f,...N}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(w&&C)||I)&&d.push(...A.map(j=>({animation:j,options:{type:y}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const y=Ei(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),m[y]=v??null}),d.push({animation:m})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Tg(),r=!0}}}function ZC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xg(t,e):!1}function Nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tg(){return{animate:Nr(!0),whileInView:Nr(),whileHover:Nr(),whileTap:Nr(),whileDrag:Nr(),whileFocus:Nr(),exit:Nr()}}class nr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class XC extends nr{constructor(t){super(t),t.animationState||(t.animationState=KC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ra(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let QC=0;class JC extends nr{constructor(){super(...arguments),this.id=QC++}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 ek={animation:{Feature:XC},exit:{Feature:JC}},mn={x:!1,y:!1};function Sg(){return mn.x||mn.y}function tk(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const xu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Di(e){return{point:{x:e.pageX,y:e.pageY}}}const nk=e=>t=>xu(t)&&e(t,Di(t));function Ni(e,t,n,r){return Mi(e,t,nk(n),r)}function Eg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ok(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 Cg=1e-4,ik=1-Cg,ak=1+Cg,kg=.01,sk=0-kg,lk=0+kg;function Bt(e){return e.max-e.min}function ck(e,t,n){return Math.abs(e-t)<=n}function Pg(e,t,n,r=.5){e.origin=r,e.originPoint=ot(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=ot(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ik&&e.scale<=ak||isNaN(e.scale))&&(e.scale=1),(e.translate>=sk&&e.translate<=lk||isNaN(e.translate))&&(e.translate=0)}function Fi(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 Ag(e,t,n){e.min=n.min+t.min,e.max=e.min+Bt(t)}function uk(e,t,n){Ag(e.x,t.x,n.x),Ag(e.y,t.y,n.y)}function _g(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Li(e,t,n){_g(e.x,t.x,n.x),_g(e.y,t.y,n.y)}const Ig=()=>({translate:0,scale:1,origin:0,originPoint:0}),ko=()=>({x:Ig(),y:Ig()}),Og=()=>({min:0,max:0}),gt=()=>({x:Og(),y:Og()});function sn(e){return[e("x"),e("y")]}function wu(e){return e===void 0||e===1}function Tu({scale:e,scaleX:t,scaleY:n}){return!wu(e)||!wu(t)||!wu(n)}function Fr(e){return Tu(e)||Mg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mg(e){return Dg(e.x)||Dg(e.y)}function Dg(e){return e&&e!=="0%"}function Xa(e,t,n){const r=e-n,o=t*r;return n+o}function Ng(e,t,n,r,o){return o!==void 0&&(e=Xa(e,o,r)),Xa(e,n,r)+t}function Su(e,t=0,n=1,r,o){e.min=Ng(e.min,t,n,r,o),e.max=Ng(e.max,t,n,r,o)}function Fg(e,{x:t,y:n}){Su(e.x,t.translate,t.scale,t.originPoint),Su(e.y,n.translate,n.scale,n.originPoint)}const Lg=.999999999999,Vg=1.0000000000001;function dk(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&&Ao(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Fg(e,a)),r&&Fr(i.latestValues)&&Ao(e,i.latestValues))}t.x<Vg&&t.x>Lg&&(t.x=1),t.y<Vg&&t.y>Lg&&(t.y=1)}function Po(e,t){e.min=e.min+t,e.max=e.max+t}function jg(e,t,n,r,o=.5){const i=ot(e.min,e.max,o);Su(e,t,n,i,r)}function Ao(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 Rg(e,t){return Eg(ok(e.getBoundingClientRect(),t))}function fk(e,t,n){const r=Rg(e,n),{scroll:o}=t;return o&&(Po(r.x,o.offset.x),Po(r.y,o.offset.y)),r}const $g=({current:e})=>e?e.ownerDocument.defaultView:null,zg=(e,t)=>Math.abs(e-t);function pk(e,t){const n=zg(e.x,t.x),r=zg(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bg{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=Cu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=pk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:g}=Dt;this.history.push({...h,timestamp:g});const{onStart:m,onMove:y}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Eu(p,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Cu(d.type==="pointercancel"?this.lastMoveEventInfo:Eu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!xu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Di(t),s=Eu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Cu(s,this.history)),this.removeListeners=Ii(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function Eu(e,t){return t?{point:t(e.point)}:e}function Hg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cu({point:e},t){return{point:e,delta:Hg(e,Wg(t)),offset:Hg(e,hk(t)),velocity:mk(t,.1)}}function hk(e){return e[0]}function Wg(e){return e[e.length-1]}function mk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Wg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};const i=kn(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 gk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ot(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ot(n,e,r.max):Math.min(e,n)),e}function qg(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 vk(e,{top:t,left:n,bottom:r,right:o}){return{x:qg(e.x,n,o),y:qg(e.y,t,r)}}function Ug(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 yk(e,t){return{x:Ug(e.x,t.x),y:Ug(e.y,t.y)}}function bk(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=Ir(t.min,t.max-r,e.min):r>o&&(n=Ir(e.min,e.max-o,t.min)),Hn(0,1,n)}function xk(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 ku=.35;function wk(e=ku){return e===!1?e=0:e===!0&&(e=ku),{x:Gg(e,"left","right"),y:Gg(e,"top","bottom")}}function Gg(e,t,n){return{min:Yg(e,t),max:Yg(e,n)}}function Yg(e,t){return typeof e=="number"?e:e[t]||0}const Tk=new WeakMap;class Sk{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=gt(),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(Di(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=tk(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),sn(m=>{let y=this.getAxisMotionValue(m).get()||0;if(En.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[m];b&&(y=Bt(b)*(parseFloat(y)/100))}}this.originPoint[m]=y}),h&&Qe.postRender(()=>h(u,d)),qc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=Ek(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>sn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Bg(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:$g(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&&Qe.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||!Qa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=gk(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&xo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=vk(o.layoutBox,n):this.constraints=!1,this.elastic=wk(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=xk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(t))return!1;const r=t.current;an(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=fk(r,o.root,this.visualElement.getTransformPagePoint());let a=yk(o.layout.layoutBox,i);if(n){const s=n(rk(a));this.hasMutatedConstraints=!!s,s&&(a=Eg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=sn(u=>{if(!Qa(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,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return qc(this.visualElement,t),r.start(vu(t,r,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){sn(n=>{const{drag:r}=this.getProps();if(!Qa(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]-ot(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};sn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=bk({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(),sn(a=>{if(!Qa(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ot(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;Tk.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();xo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Qe.read(r);const a=Mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(sn(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=ku,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ek(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ck extends nr{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new Sk(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const Kg=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class kk extends nr{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new Bg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$g(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Kg(t),onStart:Kg(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Qe.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ja={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=Zg(e,t.target.x),r=Zg(e,t.target.y);return`${n}% ${r}%`}},Pk={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=tr.parse(e);if(o.length>5)return r;const i=tr.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=ot(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 Ak extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;$S(_k),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()})),Ja.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Qe.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_c.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 Xg(e){const[t,n]=$h(),r=E.useContext(bi);return x.jsx(Ak,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(Jh),isPresent:t,safeToRemove:n})}const _k={borderRadius:{...Vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vi,borderTopRightRadius:Vi,borderBottomLeftRadius:Vi,borderBottomRightRadius:Vi,boxShadow:Pk};function Qg(e,t,n){const r=kt(e)?e:So(e);return r.start(vu("",r,t,n)),r.animation}function Jg(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Ik=(e,t)=>e.depth-t.depth;class Ok{constructor(){this.children=[],this.isDirty=!1}add(t){Hc(this.children,t),this.isDirty=!0}remove(t){Ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ik),this.isDirty=!1,this.children.forEach(t)}}function Mk(e,t){const n=Cn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Bn(r),e(i-t))};return Qe.read(r,!0),()=>Bn(r)}const ev=["TopLeft","TopRight","BottomLeft","BottomRight"],Dk=ev.length,tv=e=>typeof e=="string"?parseFloat(e):e,nv=e=>typeof e=="number"||Te.test(e);function Nk(e,t,n,r,o,i){o?(e.opacity=ot(0,n.opacity!==void 0?n.opacity:1,Fk(r)),e.opacityExit=ot(t.opacity!==void 0?t.opacity:1,0,Lk(r))):i&&(e.opacity=ot(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<Dk;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(ot(tv(l),tv(c),r),0),(En.test(c)||En.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ot(t.rotate||0,n.rotate||0,r))}function rv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Fk=ov(0,.5,Mm),Lk=ov(.5,.95,Ut);function ov(e,t,n){return r=>r<e?0:r>t?1:n(Ir(e,t,r))}function iv(e,t){e.min=t.min,e.max=t.max}function ln(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=Xa(e,1/n,r),o!==void 0&&(e=Xa(e,1/o,r)),e}function Vk(e,t=0,n=1,r=.5,o,i=e,a=e){if(En.test(t)&&(t=parseFloat(t),t=ot(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ot(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){Vk(e,t[n],t[r],t[o],t.scale,i,a)}const jk=["x","scaleX","originX"],Rk=["y","scaleY","originY"];function cv(e,t,n,r){lv(e.x,t,jk,n?n.x:void 0,r?r.x:void 0),lv(e.y,t,Rk,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 $k(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 Bt(e.x)/Bt(e.y)}function gv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class zk{constructor(){this.members=[]}add(t){Hc(this.members,t),t.scheduleRender()}remove(t){if(Ha(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 Bk(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:h}=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) `),h&&(r+=`skewY(${h}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"],Hk={visibility:"hidden"},vv=1e3;let Wk=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 yv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&yv(r)}function bv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Wk++,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(Gk),this.nodes.forEach(Qk),this.nodes.forEach(Jk),this.nodes.forEach(Yk)},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 Ok)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Wc),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Jg(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Mk(p,250),Ja.hasAnimatedSinceResize&&(Ja.hasAnimatedSinceResize=!1,this.nodes.forEach(wv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||oP,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!hv(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const S={...Bc(g,"layout"),onPlay:m,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||wv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Bn(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(eP),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&&yv(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(xv);return}this.isUpdating||this.nodes.forEach(Zk),this.isUpdating=!1,this.nodes.forEach(Xk),this.nodes.forEach(qk),this.nodes.forEach(Uk),this.clearAllSnapshots();const s=Cn.now();Dt.delta=Hn(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,kc.update.process(Dt),kc.preRender.process(Dt),kc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_c.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kk),this.sharedNodes.forEach(tP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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=gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!dv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Fr(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)),iP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return gt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(aP))){const{scroll:u}=this.root;u&&(Po(l.x,u.offset.x),Po(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=gt();if(ln(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&ln(l,a),Po(l.x,d.offset.x),Po(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=gt();ln(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&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Fr(u.latestValues)&&Ao(l,u.latestValues)}return Fr(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(a){const s=gt();ln(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Fr(c.latestValues))continue;Tu(c.latestValues)&&c.updateSnapshot();const u=gt(),d=c.measurePageBox();ln(u,d),cv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Fr(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!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gt(),this.relativeTargetOrigin=gt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=gt(),this.targetWithTransforms=gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Fg(this.target,this.targetDelta)):ln(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=gt(),this.relativeTargetOrigin=gt(),Li(this.relativeTargetOrigin,this.target,f.target),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Tu(this.parent.latestValues)||Mg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;ln(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;dk(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=gt());const{target:h}=s;if(!h){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)),Fi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!gv(this.projectionDelta.x,this.prevProjectionDelta.x)||!gv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ko(),this.projectionDelta=ko(),this.projectionDeltaWithTransform=ko()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ko();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=gt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=f!==h,m=this.getStack(),y=!m||m.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(rP));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const T=S/1e3;Tv(d.x,a.x,T),Tv(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nP(this.relativeTarget,this.relativeTargetOrigin,p,T),b&&$k(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=gt()),ln(b,this.relativeTarget)),g&&(this.animationValues=u,Nk(u,c,this.latestValues,T,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{Ja.hasAnimatedSinceResize=!0,this.currentAnimation=Qg(0,vv,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vv),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&&Pv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||gt();const d=Bt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Bt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}ln(s,l),Ao(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new zk),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&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){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Hk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ba(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Ba(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Bk(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:h}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in wi){if(p[g]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=wi[g],b=c.transform==="none"?p[g]:m(p[g],d);if(y){const S=y.length;for(let T=0;T<S;T++)c[y[T]]=b}else v?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?Ba(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xv),this.root.sharedNodes.clear()}}}function qk(e){e.updateLayout()}function Uk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(p);p.min=r[d].min,p.max=p.min+f}):Pv(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(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=ko();Fi(s,r,n.layoutBox);const l=ko();a?Fi(l,e.applyTransform(o,!0),n.measuredBox):Fi(l,r,n.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 h=gt();Li(h,n.layoutBox,p.layoutBox);const g=gt();Li(g,r,f.layoutBox),hv(h,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Gk(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 Yk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kk(e){e.clearSnapshot()}function xv(e){e.clearMeasurements()}function Zk(e){e.isLayoutDirty=!1}function Xk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Qk(e){e.resolveTargetDelta()}function Jk(e){e.calcProjection()}function eP(e){e.resetSkewAndRotation()}function tP(e){e.removeLeadSnapshot()}function Tv(e,t,n){e.translate=ot(t.translate,0,n),e.scale=ot(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sv(e,t,n,r){e.min=ot(t.min,n.min,r),e.max=ot(t.max,n.max,r)}function nP(e,t,n,r){Sv(e.x,t.x,n.x,r),Sv(e.y,t.y,n.y,r)}function rP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oP={duration:.45,ease:[.4,0,.1,1]},Ev=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cv=Ev("applewebkit/")&&!Ev("chrome/")?Math.round:Ut;function kv(e){e.min=Cv(e.min),e.max=Cv(e.max)}function iP(e){kv(e.x),kv(e.y)}function Pv(e,t,n){return e==="position"||e==="preserve-aspect"&&!ck(mv(t),mv(n),.2)}function aP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const sP=bv({attachResizeListener:(e,t)=>Mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_u={current:void 0},Av=bv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_u.current){const e=new sP({});e.mount(window),e.setOptions({layoutScroll:!0}),_u.current=e}return _u.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lP={pan:{Feature:kk},drag:{Feature:Ck,ProjectionNode:Av,MeasureLayout:Xg}};function _v(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Iv(e,t){const n=_v(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Ov(e){return!(e.pointerType==="touch"||Sg())}function cP(e,t,n={}){const[r,o,i]=Iv(e,n),a=s=>{if(!Ov(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Ov(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Mv(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&&Qe.postRender(()=>i(t,Di(t)))}class uP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=cP(t,(n,r)=>(Mv(this.node,r,"Start"),o=>Mv(this.node,o,"End"))))}unmount(){}}class dP extends nr{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=Ii(Mi(this.node.current,"focus",()=>this.onFocus()),Mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Dv=(e,t)=>t?e===t?!0:Dv(e,t.parentElement):!1,fP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pP(e){return fP.has(e.tagName)||e.tabIndex!==-1}const ji=new WeakSet;function Nv(e){return t=>{t.key==="Enter"&&e(t)}}function Iu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Nv(()=>{if(ji.has(n))return;Iu(n,"down");const o=Nv(()=>{Iu(n,"up")}),i=()=>Iu(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 Fv(e){return xu(e)&&!Sg()}function mP(e,t,n={}){const[r,o,i]=Iv(e,n),a=s=>{const l=s.currentTarget;if(!Fv(s)||ji.has(l))return;ji.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Fv(f)||!ji.has(l))&&(ji.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Dv(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>hP(c,o)),!pP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Lv(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&&Qe.postRender(()=>i(t,Di(t)))}class gP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=mP(t,(n,r)=>(Lv(this.node,r,"Start"),(o,{success:i})=>Lv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ou=new WeakMap,Mu=new WeakMap,vP=e=>{const t=Ou.get(e.target);t&&t(e)},yP=e=>{e.forEach(vP)};function bP({root:e,...t}){const n=e||document;Mu.has(n)||Mu.set(n,{});const r=Mu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(yP,{root:e,...t})),r[o]}function xP(e,t,n){const r=bP(t);return Ou.set(e,n),r.observe(e),()=>{Ou.delete(e),r.unobserve(e)}}const wP={some:0,all:1};class TP extends nr{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:wP[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 xP(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(SP(t,n))&&this.startObserver()}unmount(){}}function SP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const EP={inView:{Feature:TP},tap:{Feature:gP},focus:{Feature:dP},hover:{Feature:uP}},CP={layout:{ProjectionNode:Av,MeasureLayout:Xg}},Du={current:null},Vv={current:!1};function kP(){if(Vv.current=!0,!!Cc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Du.current=e.matches;e.addListener(t),t()}else Du.current=!1}const PP=[...Jm,Vt,tr],AP=e=>PP.find(Qm(e)),Ri=new WeakMap;function _P(e,t,n){for(const r in t){const o=t[r],i=n[r];if(kt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Va(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(kt(i))e.addValue(r,So(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,So(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const jv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Rv{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=su,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Cn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=$a(n),this.isVariantNode=Zh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];l[f]!==void 0&&kt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Ri.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)),Vv.current||kP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Du.current,process.env.NODE_ENV!=="production"&&Va(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(),Bn(this.notifyUpdate),Bn(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=_r.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Qe.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):gt()}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<jv.length;r++){const o=jv[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=_P(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=So(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Zm(o)||Nm(o))?o=parseFloat(o):!AP(o)&&tr.test(n)&&(o=Bm(t,n)),this.setBaseTarget(t,kt(o)?o.get():o)),kt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=Rc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!kt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class $v extends Rv{constructor(){super(...arguments),this.KeyframeResolver=tg}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;kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function IP(e){return window.getComputedStyle(e)}class zv extends $v{constructor(){super(...arguments),this.type="html",this.renderInstance=fm}readValueFromInstance(t,n){if(_r.has(n))return qE(t,n);{const r=IP(t),o=(Oc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rg(t,n)}build(t,n,r){Nc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zc(t,n,r)}}class Bv extends $v{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&dm(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_r.has(n)){const r=zm(n);return r&&r.default||0}return n=pm.has(n)?n:Ic(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return mm(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Qe.postRender(this.updateDimensions)}build(t,n,r){Vc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){hm(t,n,r,o)}mount(t){this.isSVGTag=jc(t.tagName),super.mount(t)}}const OP=(e,t)=>Lc(e)?new Bv(t):new zv(t,{allowProjection:e!==E.Fragment}),MP=uE({...ek,...EP,...lP,...CP},OP),ft=PS(MP);function DP(e){return E.useEffect(()=>()=>e(),[])}function _o(e){const t=pn(()=>So(e)),{isStatic:n}=E.useContext(vo);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Hv(e,t){const n=_o(t()),r=()=>n.set(t());return r(),Ma(()=>{const o=()=>Qe.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Bn(r)}}),n}const NP=e=>e&&typeof e=="object"&&e.mix,FP=e=>NP(e)?e.mix:void 0;function LP(...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=mg(o,i,{mixer:FP(i[0]),...a});return t?s(r):s}function VP(e){Ci.current=[],e();const t=Hv(Ci.current,e);return Ci.current=void 0,t}function jP(e,t,n,r){if(typeof e=="function")return VP(e);const o=typeof t=="function"?t:LP(t,n,r);return Array.isArray(e)?Wv(e,o):Wv([e],([i])=>o(i))}function Wv(e,t){const n=pn(()=>[]);return Hv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function RP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(lu(r),Ya);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:kn(o)}}const $P=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function qv(e,t){return pg(e)?e[$P(0,e.length,t)]:e}function Nu(e){return typeof e=="object"&&!Array.isArray(e)}function Uv(e,t,n,r){return typeof e=="string"&&Nu(t)?_v(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function zP(e,t,n){return e*(t+1)}function Gv(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function BP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ha(e,o),r--)}}function HP(e,t,n,r,o,i){BP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ot(o,i,r[a]),easing:qv(n,a)})}function WP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function qP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const UP="easeInOut",GP=20;function YP(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 h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,Gv(d,h.at,u,c));continue}let[g,m,y={}]=h;y.at!==void 0&&(d=Gv(d,y.at,u,c));let v=0;const b=(S,T,w,C=0,k=0)=>{const I=KP(S),{delay:A=0,times:N=vg(I),type:L="keyframes",repeat:R,repeatType:P,repeatDelay:O=0,...D}=T;let{ease:j=t.ease||"easeOut",duration:F}=T;const z=typeof A=="function"?A(C,k):A,M=I.length,$=qa(L)?L:o==null?void 0:o[L];if(M<=2&&$){let Z=100;if(M===2&&QP(I)){const V=I[1]-I[0];Z=Math.abs(V)}const U={...D};F!==void 0&&(U.duration=hn(F));const G=RP(U,Z,$);j=G.ease,F=G.duration}F??(F=i);const J=d+z;N.length===1&&N[0]===0&&(N[1]=1);const te=N.length-I.length;if(te>0&&gg(N,te),I.length===1&&I.unshift(null),R){an(R<GP,"Repeat count too high, must be less than 20"),F=zP(F,R);const Z=[...I],U=[...N];j=Array.isArray(j)?[...j]:[j];const G=[...j];for(let V=0;V<R;V++){I.push(...Z);for(let W=0;W<Z.length;W++)N.push(U[W]+(V+1)),j.push(W===0?"linear":qv(G,W-1))}WP(N,R)}const ee=J+F;HP(w,I,j,N,J,ee),v=Math.max(z+F,v),p=Math.max(ee,p)};if(kt(g)){const S=Yv(g,s);b(m,y,Kv("default",S))}else{const S=Uv(g,m,r,l),T=S.length;for(let w=0;w<T;w++){m=m,y=y;const C=S[w],k=Yv(C,s);for(const I in m)b(m[I],ZP(y,I),Kv(I,k),w,T)}}u=d,d+=v}return s.forEach((f,h)=>{for(const g in f){const m=f[g];m.sort(qP);const y=[],v=[],b=[];for(let T=0;T<m.length;T++){const{at:w,value:C,easing:k}=m[T];y.push(C),v.push(Ir(0,p,w)),b.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),b.unshift(UP)),v[v.length-1]!==1&&(v.push(1),y.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[g]=y,S.transition[g]={...t,duration:p,ease:b,times:v,...n}}}),a}function Yv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Kv(e,t){return t[e]||(t[e]=[]),t[e]}function KP(e){return Array.isArray(e)?e:[e]}function ZP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const XP=e=>typeof e=="number",QP=e=>e.every(XP);function JP(e,t){return e in t}class eA extends Rv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(JP(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return gt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function tA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Jg(e)?new Bv(t):new zv(t);n.mount(e),Ri.set(e,n)}function nA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new eA(t);n.mount(e),Ri.set(e,n)}function rA(e,t){return kt(e)||typeof e=="number"||typeof e=="string"&&!Nu(t)}function Zv(e,t,n,r){const o=[];if(rA(e,t))o.push(Qg(e,Nu(t)&&t.default||t,n&&(n.default||n)));else{const i=Uv(e,t,r),a=i.length;an(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?tA:nA;Ri.has(l)||c(l);const u=Ri.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...yu(u,{...t,transition:d},{}))}}return o}function oA(e,t,n){const r=[];return YP(e,t,n,{spring:hu}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Zv(s,i,a))}),r}function iA(e){return Array.isArray(e)&&e.some(Array.isArray)}function aA(e){function t(n,r,o){let i=[];iA(n)?i=oA(n,r,e):i=Zv(n,r,o,e);const a=new wm(i);return e&&e.animations.push(a),a}return t}function sA(){const e=pn(()=>({current:null,animations:[]})),t=pn(()=>aA(e));return DP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class lA{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 cA=()=>new lA;function uA(){return pn(cA)}function dA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function fA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:dA(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=mu(r)(l/c)*c}return t+l}}const Xv=E.createContext(null);function pA(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=ot(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?dE(e,o,o+i):e}function hA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=pn(()=>ft[t]),l=[],c=E.useRef(!1);an(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(h=>d===h.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(gA)},updateOrder:(d,p,f)=>{if(c.current)return;const h=pA(l,d,p,f);l!==h&&(c.current=!0,r(h.map(mA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Xv.Provider,{value:u,children:e})})}const Qv=E.forwardRef(hA);function mA(e){return e.value}function gA(e,t){return e.layout.min-t.layout.min}function Jv(e,t=0){return kt(e)?e:_o(t)}function vA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=pn(()=>ft[r]),c=E.useContext(Xv),u={x:Jv(t.x),y:Jv(t.y)},d=jP([u.x,u.y],([g,m])=>g||m?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return x.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:y}=m;y[p]&&h(n,u[p].get(),y[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const ey=E.forwardRef(vA);/**
12
+ `),()=>{document.head.removeChild(f)}},[t]),b.jsx(jT,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const RT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=pn(zT),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=b.jsx($T,{isPresent:n,anchorX:s,children:e})),b.jsx(Va.Provider,{value:d,children:e})};function zT(){return new Map}function Qh(e=!0){const t=E.useContext(Va);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 ja=e=>e.key||"";function Jh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const Jn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Qh(a),u=E.useMemo(()=>Jh(e),[e]),d=a&&!l?[]:u.map(ja),p=E.useRef(!0),f=E.useRef(u),m=pn(()=>new Map),[g,h]=E.useState(u),[v,y]=E.useState(u);La(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const S=ja(v[w]);d.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let S=0;S<v.length;S++){const C=v[S],P=ja(C);d.includes(P)||(w.splice(S,0,C),x.push(C))}return i==="wait"&&x.length&&(w=x),y(Jh(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=E.useContext(Ti);return b.jsx(b.Fragment,{children:v.map(w=>{const S=ja(w),C=a&&!l?!1:u===v||d.includes(S),P=()=>{if(m.has(S))m.set(S,!0);else return;let I=!0;m.forEach(_=>{_||(I=!1)}),I&&(T==null||T(),y(f.current),a&&(c==null||c()),r&&r())};return b.jsx(RT,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:P,anchorX:s,children:w},S)})})},BT=E.createContext(null),Ut=e=>e;let bo=Ut,an=Ut;process.env.NODE_ENV!=="production"&&(bo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});const HT={useManualTiming:!1},$a=["read","resolveKeyframes","update","preRender","render","postRender"];function WT(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 qT=40;function em(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=$a.reduce((v,y)=>(v[y]=WT(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,qT),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:$a.reduce((v,y)=>{const x=a[y];return v[y]=(T,w=!1,S=!1)=>(n||m(),x.schedule(T,w,S)),v},{}),cancel:v=>{for(let y=0;y<$a.length;y++)a[$a[y]].cancel(v)},state:o,steps:a}}const{schedule:Qe,cancel:Bn,state:Dt,steps:Oc}=em(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function UT(){const e=E.useRef(!1);return La(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function YT(){const e=UT(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Qe.postRender(r),[r]),t]}const GT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function tm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(GT);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 nm=e=>e===!0,KT=e=>nm(e===!0)||e==="id",ZT=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ti),o=E.useContext(BT),[i,a]=YT(),s=E.useRef(null),l=r.id||o;s.current===null&&(KT(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:nm(n)&&r.group||tm()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return b.jsx(Ti.Provider,{value:c,children:e})},rm=E.createContext({strict:!1}),om={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 om)xo[e]={isEnabled:t=>om[e].some(n=>!!t[n])};function XT(e){for(const t in e)xo[t]={...xo[t],...e[t]}}const QT=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 Ra(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||QT.has(e)}let im=e=>!Ra(e);function am(e){e&&(im=t=>t.startsWith("on")?!Ra(t):e(t))}try{am(require("@emotion/is-prop-valid").default)}catch{}function JT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(im(o)||n===!0&&Ra(o)||!t&&!Ra(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function eE({children:e,isValidProp:t,...n}){t&&am(t),n={...E.useContext(yo),...n},n.isStatic=pn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return b.jsx(yo.Provider,{value:r,children:e})}const sm=new Set;function za(e,t,n){e||sm.has(t)||(console.warn(t),sm.add(t))}function tE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&za(!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 Ba=E.createContext({});function Ha(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ei(e){return typeof e=="string"||Array.isArray(e)}const Mc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dc=["initial",...Mc];function Wa(e){return Ha(e.animate)||Dc.some(t=>Ei(e[t]))}function lm(e){return!!(Wa(e)||e.variants)}function nE(e,t){if(Wa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ei(n)?n:void 0,animate:Ei(r)?r:void 0}}return e.inherit!==!1?t:{}}function rE(e){const{initial:t,animate:n}=nE(e,E.useContext(Ba));return E.useMemo(()=>({initial:t,animate:n}),[cm(t),cm(n)])}function cm(e){return Array.isArray(e)?e.join(" "):e}const oE=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function iE(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{schedule:Nc}=em(queueMicrotask,!1),Fc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),um="data-"+Fc("framerAppearId"),dm=E.createContext({});function aE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Ba),l=E.useContext(rm),c=E.useContext(Va),u=E.useContext(yo).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(dm);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&sE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[um],h=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return La(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Nc.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),h.current=!1))}),p}function sE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fm(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&wo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function fm(e){if(e)return e.options.allowProjection!==!1?e.projection:fm(e.parent)}function lE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&XT(e);function s(c,u){let d;const p={...E.useContext(yo),...c,layoutId:cE(c)},{isStatic:f}=p,m=rE(c),g=r(c,f);if(!f&&Ic){uE(p,e);const h=dE(p);d=h.MeasureLayout,m.visualElement=aE(o,g,p,t,h.ProjectionNode)}return b.jsxs(Ba.Provider,{value:m,children:[d&&m.visualElement?b.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,iE(g,m.visualElement,u),g,f,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[oE]=o,l}function cE({layoutId:e}){const t=E.useContext(Ti).id;return t&&e!==void 0?t+"-"+e:e}function uE(e,t){const n=E.useContext(rm).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?bo(!1,r):an(!1,r)}}function dE(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 pm=e=>t=>typeof t=="string"&&t.startsWith(e),Lc=pm("--"),fE=pm("var(--"),Vc=e=>fE(e)?pE.test(e.split("/*")[0].trim()):!1,pE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ci={};function hE(e){for(const t in e)Ci[t]=e[t],Lc(t)&&(Ci[t].isCSSVariable=!0)}const So=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_r=new Set(So);function hm(e,{layout:t,layoutId:n}){return _r.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ci[e]||e==="opacity")}const kt=e=>!!(e&&e.getVelocity),mm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hn=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ki={...To,transform:e=>Hn(0,1,e)},qa={...To,default:1},Pi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),er=Pi("deg"),En=Pi("%"),Se=Pi("px"),mE=Pi("vh"),gE=Pi("vw"),gm={...En,parse:e=>En.parse(e)/100,transform:e=>En.transform(e*100)},vE={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},yE={rotate:er,rotateX:er,rotateY:er,rotateZ:er,scale:qa,scaleX:qa,scaleY:qa,scaleZ:qa,skew:er,skewX:er,skewY:er,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:ki,originX:gm,originY:gm,originZ:Se},vm={...To,transform:Math.round},jc={...vE,...yE,zIndex:vm,size:Se,fillOpacity:ki,strokeOpacity:ki,numOctaves:vm},bE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xE=So.length;function wE(e,t,n){let r="",o=!0;for(let i=0;i<xE;i++){const a=So[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=mm(s,jc[a]);if(!l){o=!1;const u=bE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function $c(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(_r.has(l)){a=!0;continue}else if(Lc(l)){o[l]=c;continue}else{const u=mm(c,jc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=wE(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 Rc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ym(e,t,n){for(const r in t)!kt(t[r])&&!hm(r,n)&&(e[r]=t[r])}function SE({transformTemplate:e},t){return E.useMemo(()=>{const n=Rc();return $c(n,t,e),Object.assign({},n.vars,n.style)},[t])}function TE(e,t){const n=e.style||{},r={};return ym(r,n,e),Object.assign(r,SE(e,t)),r}function EE(e,t){const n={},r=TE(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 CE=["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 zc(e){return typeof e!="string"||e.includes("-")?!1:!!(CE.indexOf(e)>-1||/[A-Z]/u.test(e))}const kE={offset:"stroke-dashoffset",array:"stroke-dasharray"},PE={offset:"strokeDashoffset",array:"strokeDasharray"};function AE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?kE:PE;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function bm(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function _E(e,t,n){const r=bm(t,e.x,e.width),o=bm(n,e.y,e.height);return`${r} ${o}`}function Bc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if($c(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=_E(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&AE(p,a,s,l,!1)}const xm=()=>({...Rc(),attrs:{}}),Hc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function IE(e,t,n,r){const o=E.useMemo(()=>{const i=xm();return Bc(i,t,Hc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};ym(i,e.style,e),o.style={...i,...o.style}}return o}function OE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(zc(n)?IE:EE)(r,i,a,n),c=JT(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>kt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function wm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Wc(e,t,n,r){if(typeof t=="function"){const[o,i]=wm(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]=wm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const qc=e=>Array.isArray(e),ME=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),DE=e=>qc(e)?e[e.length-1]||0:e;function Ua(e){const t=kt(e)?e.get():e;return ME(t)?t.toValue():t}function NE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:FE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const Sm=e=>(t,n)=>{const r=E.useContext(Ba),o=E.useContext(Va),i=()=>NE(e,t,r,o);return n?i():pn(i)};function FE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ua(i[p]);let{initial:a,animate:s}=e;const l=Wa(e),c=lm(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"&&!Ha(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=Wc(e,p[f]);if(m){const{transitionEnd:g,transition:h,...v}=m;for(const y in v){let x=v[y];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}}}return o}function Uc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(kt(o[a])||t.style&&kt(t.style[a])||hm(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const LE={useVisualState:Sm({scrapeMotionValuesFromProps:Uc,createRenderState:Rc})};function Tm(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Em(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Cm=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 km(e,t,n,r){Em(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Cm.has(o)?o:Fc(o),t.attrs[o])}function Pm(e,t,n){const r=Uc(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const i=So.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Am=["x","y","width","height","cx","cy","r"],VE={useVisualState:Sm({scrapeMotionValuesFromProps:Pm,createRenderState:xm,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(_r.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Am.length;s++){const l=Am[s];e[l]!==t[l]&&(a=!0)}a&&Qe.read(()=>{Tm(n,r),Qe.render(()=>{Bc(r,o,Hc(n.tagName),e.transformTemplate),km(n,r)})})}})};function jE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...zc(r)?VE:LE,preloadedFeatures:e,useRender:OE(o),createVisualElement:t,Component:r};return lE(a)}}function Ai(e,t,n){const r=e.getProps();return Wc(r,t,n!==void 0?n:r.custom,e)}function Yc(e,t){return e?e[t]||e.default||e:void 0}const _m=new Set(["width","height","top","left","right","bottom",...So]);function Gc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ya(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function $E([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}class Kc{constructor(){this.subscriptions=[]}add(t){return Gc(this.subscriptions,t),()=>Ya(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Im(e,t){return t?e*(1e3/t):0}let Ga;function RE(){Ga=void 0}const Cn={now:()=>(Ga===void 0&&Cn.set(Dt.isProcessing||HT.useManualTiming?Dt.timestamp:performance.now()),Ga),set:e=>{Ga=e,queueMicrotask(RE)}},Om=30,zE=e=>!isNaN(parseFloat(e)),_i={current:void 0};class BE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Cn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Cn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=zE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&za(!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 Kc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return _i.current&&_i.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Cn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Om)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Om);return Im(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Eo(e,t){return new BE(e,t)}function HE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Eo(n))}function WE(e,t){const n=Ai(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=DE(i[a]);HE(e,a,s)}}function qE(e){return!!(kt(e)&&e.add)}function Zc(e,t){const n=e.getValue("willChange");if(qE(n))return n.add(t)}function Mm(e){return e.props[um]}function Xc(e){let t;return()=>(t===void 0&&(t=e()),t)}const UE=Xc(()=>window.ScrollTimeline!==void 0);class YE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(UE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Dm extends YE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const hn=e=>e*1e3,kn=e=>e/1e3;function Ka(e){return typeof e=="function"}function Nm(e,t){e.timeline=t,e.onfinish=null}const Qc=e=>Array.isArray(e)&&typeof e[0]=="number",GE={linearEasing:void 0};function KE(e,t){const n=Xc(e);return()=>{var r;return(r=GE[t])!==null&&r!==void 0?r:n()}}const Za=KE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ir=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Fm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Ir(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Lm(e){return!!(typeof e=="function"&&Za()||!e||typeof e=="string"&&(e in Jc||Za())||Qc(e)||Array.isArray(e)&&e.every(Lm))}const Ii=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Jc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ii([0,.65,.55,1]),circOut:Ii([.55,0,1,.45]),backIn:Ii([.31,.01,.66,-.59]),backOut:Ii([.33,1.53,.69,.99])};function Vm(e,t){if(e)return typeof e=="function"&&Za()?Fm(e,t):Qc(e)?Ii(e):Array.isArray(e)?e.map(n=>Vm(n,t)||Jc.easeOut):Jc[e]}const jm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ZE=1e-7,XE=12;function QE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=jm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>ZE&&++s<XE);return a}function Oi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>QE(i,0,1,e,n);return i=>i===0||i===1?i:jm(o(i),t,r)}const $m=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rm=e=>t=>1-e(1-t),zm=Oi(.33,1.53,.69,.99),eu=Rm(zm),Bm=$m(eu),Hm=e=>(e*=2)<1?.5*eu(e):.5*(2-Math.pow(2,-10*(e-1))),tu=e=>1-Math.sin(Math.acos(e)),Wm=Rm(tu),qm=$m(tu),Um=e=>/^0[^.\s]+$/u.test(e);function JE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Um(e):!0}const Mi=e=>Math.round(e*1e5)/1e5,nu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eC(e){return e==null}const tC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ru=(e,t)=>n=>!!(typeof n=="string"&&tC.test(n)&&n.startsWith(e)||t&&!eC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ym=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(nu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},nC=e=>Hn(0,255,e),ou={...To,transform:e=>Math.round(nC(e))},Or={test:ru("rgb","red"),parse:Ym("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ou.transform(e)+", "+ou.transform(t)+", "+ou.transform(n)+", "+Mi(ki.transform(r))+")"};function rC(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 iu={test:ru("#"),parse:rC,transform:Or.transform},Co={test:ru("hsl","hue"),parse:Ym("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+En.transform(Mi(t))+", "+En.transform(Mi(n))+", "+Mi(ki.transform(r))+")"},Vt={test:e=>Or.test(e)||iu.test(e)||Co.test(e),parse:e=>Or.test(e)?Or.parse(e):Co.test(e)?Co.parse(e):iu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Or.transform(e):Co.transform(e)},oC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(oC))===null||n===void 0?void 0:n.length)||0)>0}const Gm="number",Km="color",aC="var",sC="var(",Zm="${}",lC=/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 Di(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(lC,l=>(Vt.test(l)?(r.color.push(i),o.push(Km),n.push(Vt.parse(l))):l.startsWith(sC)?(r.var.push(i),o.push(aC),n.push(l)):(r.number.push(i),o.push(Gm),n.push(parseFloat(l))),++i,Zm)).split(Zm);return{values:n,split:s,indexes:r,types:o}}function Xm(e){return Di(e).values}function Qm(e){const{split:t,types:n}=Di(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===Gm?i+=Mi(o[a]):s===Km?i+=Vt.transform(o[a]):i+=o[a]}return i}}const cC=e=>typeof e=="number"?0:e;function uC(e){const t=Xm(e);return Qm(e)(t.map(cC))}const tr={test:iC,parse:Xm,createTransformer:Qm,getAnimatableNone:uC},dC=new Set(["brightness","contrast","saturate","opacity"]);function fC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nu)||[];if(!r)return e;const o=n.replace(r,"");let i=dC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const pC=/\b([a-z-]*)\(.*?\)/gu,au={...tr,getAnimatableNone:e=>{const t=e.match(pC);return t?t.map(fC).join(" "):e}},hC={...jc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:au,WebkitFilter:au},Jm=e=>hC[e];function eg(e,t){let n=Jm(e);return n!==au&&(n=tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mC=new Set(["auto","none","0"]);function gC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!mC.has(i)&&Di(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=eg(n,o)}const Mr=e=>e*180/Math.PI,su=e=>{const t=Mr(Math.atan2(e[1],e[0]));return lu(t)},vC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:su,rotateZ:su,skewX:e=>Mr(Math.atan(e[1])),skewY:e=>Mr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},lu=e=>(e=e%360,e<0&&(e+=360),e),tg=su,ng=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ng,scaleY:rg,scale:e=>(ng(e)+rg(e))/2,rotateX:e=>lu(Mr(Math.atan2(e[6],e[5]))),rotateY:e=>lu(Mr(Math.atan2(-e[2],e[0]))),rotateZ:tg,rotate:tg,skewX:e=>Mr(Math.atan(e[4])),skewY:e=>Mr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function og(e){return e.includes("scale")?1:0}function cu(e,t){if(!e||e==="none")return og(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=yC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=vC,o=s}if(!o)return og(t);const i=r[t],a=o[1].split(",").map(xC);return typeof i=="function"?i(a):a[i]}const bC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cu(n,t)};function xC(e){return parseFloat(e.trim())}const ig=e=>e===To||e===Se,wC=new Set(["x","y","z"]),SC=So.filter(e=>!wC.has(e));function TC(e){const t=[];return SC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ko={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})=>cu(t,"x"),y:(e,{transform:t})=>cu(t,"y")};ko.translateX=ko.x,ko.translateY=ko.y;const Dr=new Set;let uu=!1,du=!1;function ag(){if(du){const e=Array.from(Dr).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===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}du=!1,uu=!1,Dr.forEach(e=>e.complete()),Dr.clear()}function sg(){Dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(du=!0)})}function EC(){sg(),ag()}class fu{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Dr.add(this),uu||(uu=!0,Qe.read(sg),Qe.resolveKeyframes(ag))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const lg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),CC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kC(e){const t=CC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const PC=4;function cg(e,t,n=1){an(n<=PC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=kC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return lg(a)?parseFloat(a):a}return Vc(o)?cg(o,t,n+1):o}const ug=e=>t=>t.test(e),dg=[To,Se,En,er,gE,mE,{test:e=>e==="auto",parse:e=>e}],fg=e=>dg.find(ug(e));class pg extends fu{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(),Vc(c))){const u=cg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!_m.has(r)||t.length!==2)return;const[o,i]=t,a=fg(o),s=fg(i);if(a!==s)if(ig(a)&&ig(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)JE(t[o])&&r.push(o);r.length&&gC(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=ko[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=ko[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const hg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tr.test(e)||e==="0")&&!e.startsWith("url("));function AC(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 _C(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=hg(o,t),s=hg(i,t);return bo(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:AC(e)||(n==="spring"||Ka(n))&&r}const IC=e=>e!==null;function Xa(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(IC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const OC=40;class mg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Cn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>OC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&EC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Cn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!_C(t,r,o,i))if(a)this.options.duration=0;else{l&&l(Xa(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Qa=2e4;function pu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Qa;)t+=n,r=e.next(t);return t>=Qa?1/0:t}const it=(e,t,n)=>e+(t-e)*n;function hu(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 MC({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=hu(l,s,e+1/3),i=hu(l,s,e),a=hu(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ja(e,t){return n=>n>0?t:e}const mu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},DC=[iu,Or,Co],NC=e=>DC.find(t=>t.test(e));function gg(e){const t=NC(e);if(bo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Co&&(n=MC(n)),n}const vg=(e,t)=>{const n=gg(e),r=gg(t);if(!n||!r)return Ja(e,t);const o={...n};return i=>(o.red=mu(n.red,r.red,i),o.green=mu(n.green,r.green,i),o.blue=mu(n.blue,r.blue,i),o.alpha=it(n.alpha,r.alpha,i),Or.transform(o))},FC=(e,t)=>n=>t(e(n)),Ni=(...e)=>e.reduce(FC),gu=new Set(["none","hidden"]);function LC(e,t){return gu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function VC(e,t){return n=>it(e,t,n)}function vu(e){return typeof e=="number"?VC:typeof e=="string"?Vc(e)?Ja:Vt.test(e)?vg:RC:Array.isArray(e)?yg:typeof e=="object"?Vt.test(e)?vg:jC:Ja}function yg(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>vu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function jC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=vu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function $C(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const RC=(e,t)=>{const n=tr.createTransformer(t),r=Di(e),o=Di(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?gu.has(e)&&!o.values.length||gu.has(t)&&!r.values.length?LC(e,t):Ni(yg($C(r,o),o.values),n):(bo(!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.`),Ja(e,t))};function bg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):vu(e)(e,t)}const zC=5;function xg(e,t,n){const r=Math.max(t-zC,0);return Im(n-e(r),t-r)}const dt={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},wg=.001;function BC({duration:e=dt.duration,bounce:t=dt.bounce,velocity:n=dt.velocity,mass:r=dt.mass}){let o,i;bo(e<=hn(dt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Hn(dt.minDamping,dt.maxDamping,a),e=Hn(dt.minDuration,dt.maxDuration,kn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=yu(c,a),m=Math.exp(-d);return wg-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=yu(Math.pow(c,2),a);return(-o(c)+wg>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=WC(o,i,s);if(e=hn(e),isNaN(l))return{stiffness:dt.stiffness,damping:dt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const HC=12;function WC(e,t,n){let r=n;for(let o=1;o<HC;o++)r=r-e(r)/t(r);return r}function yu(e,t){return e*Math.sqrt(1-t*t)}const qC=["duration","bounce"],UC=["stiffness","damping","mass"];function Sg(e,t){return t.some(n=>e[n]!==void 0)}function YC(e){let t={velocity:dt.velocity,stiffness:dt.stiffness,damping:dt.damping,mass:dt.mass,isResolvedFromDuration:!1,...e};if(!Sg(e,UC)&&Sg(e,qC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Hn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:dt.mass,stiffness:o,damping:i}}else{const n=BC(e);t={...t,...n,mass:dt.mass},t.isResolvedFromDuration=!0}return t}function bu(e=dt.visualDuration,t=dt.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}=YC({...n,velocity:-kn(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=kn(Math.sqrt(l/u)),y=Math.abs(h)<5;r||(r=y?dt.restSpeed.granular:dt.restSpeed.default),o||(o=y?dt.restDelta.granular:dt.restDelta.default);let x;if(g<1){const w=yu(v,g);x=S=>{const C=Math.exp(-g*v*S);return a-C*((m+g*v*h)/w*Math.sin(w*S)+h*Math.cos(w*S))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(h+(m+v*h)*w);else{const w=v*Math.sqrt(g*g-1);x=S=>{const C=Math.exp(-g*v*S),P=Math.min(w*S,300);return a-C*((m+g*v*h)*Math.sinh(P)+w*h*Math.cosh(P))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const S=x(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?hn(m):xg(x,w,S));const P=Math.abs(C)<=r,I=Math.abs(a-S)<=o;s.done=P&&I}return s.value=s.done?a:S,s},toString:()=>{const w=Math.min(pu(T),Qa),S=Fm(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function Tg({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=P=>s!==void 0&&P<s||l!==void 0&&P>l,m=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const y=P=>-g*Math.exp(-P/r),x=P=>v+y(P),T=P=>{const I=y(P),_=x(P);p.done=Math.abs(I)<=c,p.value=p.done?v:_};let w,S;const C=P=>{f(p.value)&&(w=P,S=bu({keyframes:[p.value,m(p.value)],velocity:xg(x,P,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:P=>{let I=!1;return!S&&w===void 0&&(I=!0,T(P),C(P)),w!==void 0&&P>=w?S.next(P-w):(!I&&T(P),p)}}}const GC=Oi(.42,0,1,1),KC=Oi(0,0,.58,1),Eg=Oi(.42,0,.58,1),Cg=e=>Array.isArray(e)&&typeof e[0]!="number",kg={linear:Ut,easeIn:GC,easeInOut:Eg,easeOut:KC,circIn:tu,circInOut:qm,circOut:Wm,backIn:eu,backInOut:Bm,backOut:zm,anticipate:Hm},xu=e=>{if(Qc(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Oi(t,n,r,o)}else if(typeof e=="string")return an(kg[e]!==void 0,`Invalid easing type '${e}'`),kg[e];return e};function ZC(e,t,n){const r=[],o=n||bg,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]||Ut:t;s=Ni(l,s)}r.push(s)}return r}function Pg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(an(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=ZC(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=Ir(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Hn(e[0],e[i-1],u)):c}function Ag(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ir(0,t,r);e.push(it(n,1,o))}}function _g(e){const t=[0];return Ag(t,e.length-1),t}function XC(e,t){return e.map(n=>n*t)}function QC(e,t){return e.map(()=>t||Eg).splice(0,e.length-1)}function Fi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Cg(r)?r.map(xu):xu(r),i={done:!1,value:t[0]},a=XC(n&&n.length===t.length?n:_g(t),e),s=Pg(a,t,{ease:Array.isArray(o)?o:QC(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const JC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>Bn(t),now:()=>Dt.isProcessing?Dt.timestamp:Cn.now()}},ek={decay:Tg,inertia:Tg,tween:Fi,keyframes:Fi,spring:bu},tk=e=>e/100;class wu extends mg{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||fu,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=Ka(n)?n:ek[n]||Fi;let l,c;process.env.NODE_ENV!=="production"&&s!==Fi&&an(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Fi&&typeof t[0]!="number"&&(l=Ni(tk,bg(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=pu(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,T=i;if(f){const P=Math.min(this.currentTime,u)/d;let I=Math.floor(P),_=P%1;!_&&P>=1&&(_=1),_===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(_=1-_,g&&(_-=g/d)):m==="mirror"&&(T=a)),x=Hn(0,1,_)*d}const w=y?{done:!1,value:l[0]}:T.next(x);s&&(w.value=s(w.value));let{done:S}=w;!y&&c!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&o!==void 0&&(w.value=Xa(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?kn(t.calculatedDuration):0}get time(){return kn(this.currentTime)}set time(t){t=hn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=kn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=JC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const nk=new Set(["opacity","clipPath","filter","transform"]);function rk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Vm(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const ok=Xc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),es=10,ik=2e4;function ak(e){return Ka(e.type)||e.type==="spring"||!Lm(e.ease)}function sk(e,t){const n=new wu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<ik;)r=n.sample(i),o.push(r.value),i+=es;return{times:void 0,keyframes:o,duration:i-es,ease:"linear"}}const Ig={anticipate:Hm,backInOut:Bm,circInOut:qm};function lk(e){return e in Ig}class Og extends mg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new pg(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&Za()&&lk(i)&&(i=Ig[i]),ak(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=sk(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=rk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Nm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Xa(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return kn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return kn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=hn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ut;const{animation:r}=n;Nm(r,t)}return Ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new wu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=hn(this.time);c.setWithVelocity(m.sample(g-es).value,m.sample(g).value,es)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return ok()&&r&&nk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const ck={type:"spring",stiffness:500,damping:25,restSpeed:10},uk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),dk={type:"keyframes",duration:.8},fk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pk=(e,{keyframes:t})=>t.length>2?dk:_r.has(e)?e.startsWith("scale")?uk(t[1]):ck:fk;function hk({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 Su=(e,t,n,r={},o,i)=>a=>{const s=Yc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};hk(s)||(u={...u,...pk(e,u)}),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=Xa(u.keyframes,s);if(p!==void 0)return Qe.update(()=>{u.onUpdate(p),u.onComplete()}),new Dm([])}return!i&&Og.supports(u)?new Og(u):new wu(u)};function mk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Tu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&mk(u,d))continue;const m={delay:n,...Yc(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=Mm(e);if(v){const y=window.MotionHandoffAnimation(v,d,Qe);y!==null&&(m.startTime=y,g=!0)}}Zc(e,d),p.start(Su(d,p,f,e.shouldReduceMotion&&_m.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{Qe.update(()=>{s&&WE(e,s)})}),c}function Eu(e,t,n={}){var r;const o=Ai(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Tu(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return gk(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function gk(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(vk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Eu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function vk(e,t){return e.sortNodePosition(t)}function yk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Eu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Eu(e,t,n);else{const o=typeof t=="function"?Ai(e,t,n.custom):t;r=Promise.all(Tu(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 bk=Dc.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<bk;n++){const r=Dc[n],o=e.props[r];(Ei(o)||o===!1)&&(t[r]=o)}return t}const xk=[...Mc].reverse(),wk=Mc.length;function Sk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>yk(e,n,r)))}function Tk(e){let t=Sk(e),n=Ng(),r=!0;const o=l=>(c,u)=>{var d;const p=Ai(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Dg(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<wk;h++){const v=xk[h],y=n[v],x=c[v]!==void 0?c[v]:u[v],T=Ei(x),w=v===l?y.isActive:null;w===!1&&(m=h);let S=x===u[v]&&x!==c[v]&&T;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||Ha(x)||typeof x=="boolean")continue;const C=Ek(y.prevProp,x);let P=C||v===l&&y.isActive&&!S&&T||h>m&&T,I=!1;const _=Array.isArray(x)?x:[x];let M=_.reduce(o(v),{});w===!1&&(M={});const{prevResolvedValues:L={}}=y,$={...L,...M},A=V=>{P=!0,p.has(V)&&(I=!0,p.delete(V)),y.needsAnimating[V]=!0;const F=e.getValue(V);F&&(F.liveStyle=!1)};for(const V in $){const F=M[V],z=L[V];if(f.hasOwnProperty(V))continue;let D=!1;qc(F)&&qc(z)?D=!Mg(F,z):D=F!==z,D?F!=null?A(V):p.add(V):F!==void 0&&p.has(V)?A(V):y.protectedKeys[V]=!0}y.prevProp=x,y.prevResolvedValues=M,y.isActive&&(f={...f,...M}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(S&&C)||I)&&d.push(..._.map(V=>({animation:V,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Ai(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),h[v]=y??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Ng(),r=!0}}}function Ek(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Mg(t,e):!1}function Nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ng(){return{animate:Nr(!0),whileInView:Nr(),whileHover:Nr(),whileTap:Nr(),whileDrag:Nr(),whileFocus:Nr(),exit:Nr()}}class nr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Ck extends nr{constructor(t){super(t),t.animationState||(t.animationState=Tk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ha(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let kk=0;class Pk extends nr{constructor(){super(...arguments),this.id=kk++}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 Ak={animation:{Feature:Ck},exit:{Feature:Pk}},mn={x:!1,y:!1};function Fg(){return mn.x||mn.y}function _k(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Li(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Cu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Vi(e){return{point:{x:e.pageX,y:e.pageY}}}const Ik=e=>t=>Cu(t)&&e(t,Vi(t));function ji(e,t,n,r){return Li(e,t,Ik(n),r)}function Lg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ok({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Mk(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 Vg=1e-4,Dk=1-Vg,Nk=1+Vg,jg=.01,Fk=0-jg,Lk=0+jg;function Bt(e){return e.max-e.min}function Vk(e,t,n){return Math.abs(e-t)<=n}function $g(e,t,n,r=.5){e.origin=r,e.originPoint=it(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Dk&&e.scale<=Nk||isNaN(e.scale))&&(e.scale=1),(e.translate>=Fk&&e.translate<=Lk||isNaN(e.translate))&&(e.translate=0)}function $i(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 Rg(e,t,n){e.min=n.min+t.min,e.max=e.min+Bt(t)}function jk(e,t,n){Rg(e.x,t.x,n.x),Rg(e.y,t.y,n.y)}function zg(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Ri(e,t,n){zg(e.x,t.x,n.x),zg(e.y,t.y,n.y)}const Bg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:Bg(),y:Bg()}),Hg=()=>({min:0,max:0}),gt=()=>({x:Hg(),y:Hg()});function sn(e){return[e("x"),e("y")]}function ku(e){return e===void 0||e===1}function Pu({scale:e,scaleX:t,scaleY:n}){return!ku(e)||!ku(t)||!ku(n)}function Fr(e){return Pu(e)||Wg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wg(e){return qg(e.x)||qg(e.y)}function qg(e){return e&&e!=="0%"}function ts(e,t,n){const r=e-n,o=t*r;return n+o}function Ug(e,t,n,r,o){return o!==void 0&&(e=ts(e,o,r)),ts(e,n,r)+t}function Au(e,t=0,n=1,r,o){e.min=Ug(e.min,t,n,r,o),e.max=Ug(e.max,t,n,r,o)}function Yg(e,{x:t,y:n}){Au(e.x,t.translate,t.scale,t.originPoint),Au(e.y,n.translate,n.scale,n.originPoint)}const Gg=.999999999999,Kg=1.0000000000001;function $k(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&&_o(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Yg(e,a)),r&&Fr(i.latestValues)&&_o(e,i.latestValues))}t.x<Kg&&t.x>Gg&&(t.x=1),t.y<Kg&&t.y>Gg&&(t.y=1)}function Ao(e,t){e.min=e.min+t,e.max=e.max+t}function Zg(e,t,n,r,o=.5){const i=it(e.min,e.max,o);Au(e,t,n,i,r)}function _o(e,t){Zg(e.x,t.x,t.scaleX,t.scale,t.originX),Zg(e.y,t.y,t.scaleY,t.scale,t.originY)}function Xg(e,t){return Lg(Mk(e.getBoundingClientRect(),t))}function Rk(e,t,n){const r=Xg(e,n),{scroll:o}=t;return o&&(Ao(r.x,o.offset.x),Ao(r.y,o.offset.y)),r}const Qg=({current:e})=>e?e.ownerDocument.defaultView:null,Jg=(e,t)=>Math.abs(e-t);function zk(e,t){const n=Jg(e.x,t.x),r=Jg(e.y,t.y);return Math.sqrt(n**2+r**2)}class ev{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=Iu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=zk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Dt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=_u(p,this.transformPagePoint),Qe.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=Iu(d.type==="pointercancel"?this.lastMoveEventInfo:_u(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Cu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Vi(t),s=_u(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Iu(s,this.history)),this.removeListeners=Ni(ji(this.contextWindow,"pointermove",this.handlePointerMove),ji(this.contextWindow,"pointerup",this.handlePointerUp),ji(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function _u(e,t){return t?{point:t(e.point)}:e}function tv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Iu({point:e},t){return{point:e,delta:tv(e,nv(t)),offset:tv(e,Bk(t)),velocity:Hk(t,.1)}}function Bk(e){return e[0]}function nv(e){return e[e.length-1]}function Hk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};const i=kn(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 Wk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?it(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?it(n,e,r.max):Math.min(e,n)),e}function rv(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 qk(e,{top:t,left:n,bottom:r,right:o}){return{x:rv(e.x,n,o),y:rv(e.y,t,r)}}function ov(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 Uk(e,t){return{x:ov(e.x,t.x),y:ov(e.y,t.y)}}function Yk(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=Ir(t.min,t.max-r,e.min):r>o&&(n=Ir(e.min,e.max-o,t.min)),Hn(0,1,n)}function Gk(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 Ou=.35;function Kk(e=Ou){return e===!1?e=0:e===!0&&(e=Ou),{x:iv(e,"left","right"),y:iv(e,"top","bottom")}}function iv(e,t,n){return{min:av(e,t),max:av(e,n)}}function av(e,t){return typeof e=="number"?e:e[t]||0}const Zk=new WeakMap;class Xk{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=gt(),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(Vi(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_k(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),sn(h=>{let v=this.getAxisMotionValue(h).get()||0;if(En.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[h];x&&(v=Bt(x)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Qe.postRender(()=>m(u,d)),Zc(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=Qk(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=()=>sn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ev(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Qg(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&&Qe.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||!ns(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Wk(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&wo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=qk(o.layoutBox,n):this.constraints=!1,this.elastic=Kk(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Gk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;an(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=Rk(r,o.root,this.visualElement.getTransformPagePoint());let a=Uk(o.layout.layoutBox,i);if(n){const s=n(Ok(a));this.hasMutatedConstraints=!!s,s&&(a=Lg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=sn(u=>{if(!ns(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 Zc(this.visualElement,t),r.start(Su(t,r,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){sn(n=>{const{drag:r}=this.getProps();if(!ns(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-it(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=Yk({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(),sn(a=>{if(!ns(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(it(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;Zk.set(this.visualElement,this);const t=this.visualElement.current,n=ji(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()),Qe.read(r);const a=Li(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(sn(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=Ou,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ns(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Qk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Jk extends nr{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new Xk(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const sv=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class eP extends nr{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new ev(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:sv(t),onStart:sv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Qe.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=ji(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 rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=lv(e,t.target.x),r=lv(e,t.target.y);return`${n}% ${r}%`}},tP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=tr.parse(e);if(o.length>5)return r;const i=tr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=it(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class nP extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;hE(rP),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()})),rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Qe.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Nc.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 cv(e){const[t,n]=Qh(),r=E.useContext(Ti);return b.jsx(nP,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(dm),isPresent:t,safeToRemove:n})}const rP={borderRadius:{...zi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zi,borderTopRightRadius:zi,borderBottomLeftRadius:zi,borderBottomRightRadius:zi,boxShadow:tP};function uv(e,t,n){const r=kt(e)?e:Eo(e);return r.start(Su("",r,t,n)),r.animation}function dv(e){return e instanceof SVGElement&&e.tagName!=="svg"}const oP=(e,t)=>e.depth-t.depth;class iP{constructor(){this.children=[],this.isDirty=!1}add(t){Gc(this.children,t),this.isDirty=!0}remove(t){Ya(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oP),this.isDirty=!1,this.children.forEach(t)}}function aP(e,t){const n=Cn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Bn(r),e(i-t))};return Qe.read(r,!0),()=>Bn(r)}const fv=["TopLeft","TopRight","BottomLeft","BottomRight"],sP=fv.length,pv=e=>typeof e=="string"?parseFloat(e):e,hv=e=>typeof e=="number"||Se.test(e);function lP(e,t,n,r,o,i){o?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,cP(r)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,uP(r))):i&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<sP;a++){const s=`border${fv[a]}Radius`;let l=mv(t,s),c=mv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||hv(l)===hv(c)?(e[s]=Math.max(it(pv(l),pv(c),r),0),(En.test(c)||En.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,r))}function mv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const cP=gv(0,.5,Wm),uP=gv(.5,.95,Ut);function gv(e,t,n){return r=>r<e?0:r>t?1:n(Ir(e,t,r))}function vv(e,t){e.min=t.min,e.max=t.max}function ln(e,t){vv(e.x,t.x),vv(e.y,t.y)}function yv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bv(e,t,n,r,o){return e-=t,e=ts(e,1/n,r),o!==void 0&&(e=ts(e,1/o,r)),e}function dP(e,t=0,n=1,r=.5,o,i=e,a=e){if(En.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=it(i.min,i.max,r);e===i&&(s-=t),e.min=bv(e.min,t,n,s,o),e.max=bv(e.max,t,n,s,o)}function xv(e,t,[n,r,o],i,a){dP(e,t[n],t[r],t[o],t.scale,i,a)}const fP=["x","scaleX","originX"],pP=["y","scaleY","originY"];function wv(e,t,n,r){xv(e.x,t,fP,n?n.x:void 0,r?r.x:void 0),xv(e.y,t,pP,n?n.y:void 0,r?r.y:void 0)}function Sv(e){return e.translate===0&&e.scale===1}function Tv(e){return Sv(e.x)&&Sv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function hP(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function Cv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kv(e,t){return Cv(e.x,t.x)&&Cv(e.y,t.y)}function Pv(e){return Bt(e.x)/Bt(e.y)}function Av(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class mP{constructor(){this.members=[]}add(t){Gc(this.members,t),t.scheduleRender()}remove(t){if(Ya(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 gP(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 Mu=["","X","Y","Z"],vP={visibility:"hidden"},_v=1e3;let yP=0;function Du(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Iv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Iv(r)}function Ov({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=yP++,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(wP),this.nodes.forEach(kP),this.nodes.forEach(PP),this.nodes.forEach(SP)},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 iP)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Kc),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=dv(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=aP(p,250),rs.hasAnimatedSinceResize&&(rs.hasAnimatedSinceResize=!1,this.nodes.forEach(Dv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||MP,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!kv(this.targetLayout,m),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={...Yc(g,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else p||Dv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Bn(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&&Iv(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(Mv);return}this.isUpdating||this.nodes.forEach(EP),this.isUpdating=!1,this.nodes.forEach(CP),this.nodes.forEach(bP),this.nodes.forEach(xP),this.clearAllSnapshots();const s=Cn.now();Dt.delta=Hn(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Oc.update.process(Dt),Oc.preRender.process(Dt),Oc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TP),this.sharedNodes.forEach(_P)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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=gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!Tv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Fr(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 a;const{visualElement:s}=this.options;if(!s)return gt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(NP))){const{scroll:u}=this.root;u&&(Ao(l.x,u.offset.x),Ao(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=gt();if(ln(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&ln(l,a),Ao(l.x,d.offset.x),Ao(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=gt();ln(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&&_o(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Fr(u.latestValues)&&_o(l,u.latestValues)}return Fr(this.latestValues)&&_o(l,this.latestValues),l}removeTransform(a){const s=gt();ln(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Fr(c.latestValues))continue;Pu(c.latestValues)&&c.updateSnapshot();const u=gt(),d=c.measurePageBox();ln(u,d),wv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Fr(this.latestValues)&&wv(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!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gt(),this.relativeTargetOrigin=gt(),Ri(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=gt(),this.targetWithTransforms=gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),jk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Yg(this.target,this.targetDelta)):ln(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=gt(),this.relativeTargetOrigin=gt(),Ri(this.relativeTargetOrigin,this.target,f.target),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Pu(this.parent.latestValues)||Wg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;ln(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;$k(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=gt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yv(this.prevProjectionDelta.x,this.projectionDelta.x),yv(this.prevProjectionDelta.y,this.projectionDelta.y)),$i(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Av(this.projectionDelta.x,this.prevProjectionDelta.x)||!Av(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=gt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),v=!h||h.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(OP));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Nv(d.x,a.x,w),Nv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ri(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IP(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&hP(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=gt()),ln(x,this.relativeTarget)),g&&(this.animationValues=u,lP(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{rs.hasAnimatedSinceResize=!0,this.currentAnimation=uv(0,_v,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_v),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&&$v(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||gt();const d=Bt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Bt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}ln(s,l),_o(s,u),$i(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new mP),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Du("z",a,c,this.animationValues);for(let u=0;u<Mu.length;u++)Du(`rotate${Mu[u]}`,a,c,this.animationValues),Du(`skew${Mu[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ua(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Ua(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=gP(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Ci){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:y}=Ci[g],x=c.transform==="none"?p[g]:h(p[g],d);if(v){const T=v.length;for(let w=0;w<T;w++)c[v[w]]=x}else y?this.options.visualElement.renderState.vars[g]=x:c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?Ua(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Mv),this.root.sharedNodes.clear()}}}function bP(e){e.updateLayout()}function xP(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(p);p.min=r[d].min,p.max=p.min+f}):$v(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(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=Po();$i(s,r,n.layoutBox);const l=Po();a?$i(l,e.applyTransform(o,!0),n.measuredBox):$i(l,r,n.layoutBox);const c=!Tv(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=gt();Ri(m,n.layoutBox,p.layoutBox);const g=gt();Ri(g,r,f.layoutBox),kv(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function wP(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 SP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TP(e){e.clearSnapshot()}function Mv(e){e.clearMeasurements()}function EP(e){e.isLayoutDirty=!1}function CP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kP(e){e.resolveTargetDelta()}function PP(e){e.calcProjection()}function AP(e){e.resetSkewAndRotation()}function _P(e){e.removeLeadSnapshot()}function Nv(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fv(e,t,n,r){e.min=it(t.min,n.min,r),e.max=it(t.max,n.max,r)}function IP(e,t,n,r){Fv(e.x,t.x,n.x,r),Fv(e.y,t.y,n.y,r)}function OP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const MP={duration:.45,ease:[.4,0,.1,1]},Lv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vv=Lv("applewebkit/")&&!Lv("chrome/")?Math.round:Ut;function jv(e){e.min=Vv(e.min),e.max=Vv(e.max)}function DP(e){jv(e.x),jv(e.y)}function $v(e,t,n){return e==="position"||e==="preserve-aspect"&&!Vk(Pv(t),Pv(n),.2)}function NP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const FP=Ov({attachResizeListener:(e,t)=>Li(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nu={current:void 0},Rv=Ov({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nu.current){const e=new FP({});e.mount(window),e.setOptions({layoutScroll:!0}),Nu.current=e}return Nu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LP={pan:{Feature:eP},drag:{Feature:Jk,ProjectionNode:Rv,MeasureLayout:cv}};function zv(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Bv(e,t){const n=zv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Hv(e){return!(e.pointerType==="touch"||Fg())}function VP(e,t,n={}){const[r,o,i]=Bv(e,n),a=s=>{if(!Hv(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Hv(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Wv(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&&Qe.postRender(()=>i(t,Vi(t)))}class jP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=VP(t,(n,r)=>(Wv(this.node,r,"Start"),o=>Wv(this.node,o,"End"))))}unmount(){}}class $P extends nr{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=Ni(Li(this.node.current,"focus",()=>this.onFocus()),Li(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qv=(e,t)=>t?e===t?!0:qv(e,t.parentElement):!1,RP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zP(e){return RP.has(e.tagName)||e.tabIndex!==-1}const Bi=new WeakSet;function Uv(e){return t=>{t.key==="Enter"&&e(t)}}function Fu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Uv(()=>{if(Bi.has(n))return;Fu(n,"down");const o=Uv(()=>{Fu(n,"up")}),i=()=>Fu(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 Yv(e){return Cu(e)&&!Fg()}function HP(e,t,n={}){const[r,o,i]=Bv(e,n),a=s=>{const l=s.currentTarget;if(!Yv(s)||Bi.has(l))return;Bi.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Yv(f)||!Bi.has(l))&&(Bi.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||qv(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>BP(c,o)),!zP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Gv(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&&Qe.postRender(()=>i(t,Vi(t)))}class WP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=HP(t,(n,r)=>(Gv(this.node,r,"Start"),(o,{success:i})=>Gv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lu=new WeakMap,Vu=new WeakMap,qP=e=>{const t=Lu.get(e.target);t&&t(e)},UP=e=>{e.forEach(qP)};function YP({root:e,...t}){const n=e||document;Vu.has(n)||Vu.set(n,{});const r=Vu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(UP,{root:e,...t})),r[o]}function GP(e,t,n){const r=YP(t);return Lu.set(e,n),r.observe(e),()=>{Lu.delete(e),r.unobserve(e)}}const KP={some:0,all:1};class ZP extends nr{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:KP[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 GP(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(XP(t,n))&&this.startObserver()}unmount(){}}function XP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const QP={inView:{Feature:ZP},tap:{Feature:WP},focus:{Feature:$P},hover:{Feature:jP}},JP={layout:{ProjectionNode:Rv,MeasureLayout:cv}},ju={current:null},Kv={current:!1};function eA(){if(Kv.current=!0,!!Ic)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ju.current=e.matches;e.addListener(t),t()}else ju.current=!1}const tA=[...dg,Vt,tr],nA=e=>tA.find(ug(e)),Hi=new WeakMap;function rA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(kt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&za(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(kt(i))e.addValue(r,Eo(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,Eo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Zv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xv{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Cn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Wa(n),this.isVariantNode=lm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];l[f]!==void 0&&kt(m)&&m.set(l[f],!1)}}mount(t){this.current=t,Hi.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)),Kv.current||eA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ju.current,process.env.NODE_ENV!=="production"&&za(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(),Bn(this.notifyUpdate),Bn(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=_r.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Qe.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):gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Zv.length;r++){const o=Zv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=rA(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Eo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(lg(o)||Um(o))?o=parseFloat(o):!nA(o)&&tr.test(n)&&(o=eg(t,n)),this.setBaseTarget(t,kt(o)?o.get():o)),kt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=Wc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!kt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qv extends Xv{constructor(){super(...arguments),this.KeyframeResolver=pg}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;kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function oA(e){return window.getComputedStyle(e)}class Jv extends Qv{constructor(){super(...arguments),this.type="html",this.renderInstance=Em}readValueFromInstance(t,n){if(_r.has(n))return bC(t,n);{const r=oA(t),o=(Lc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Xg(t,n)}build(t,n,r){$c(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Uc(t,n,r)}}class ey extends Qv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Tm(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_r.has(n)){const r=Jm(n);return r&&r.default||0}return n=Cm.has(n)?n:Fc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Qe.postRender(this.updateDimensions)}build(t,n,r){Bc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){km(t,n,r,o)}mount(t){this.isSVGTag=Hc(t.tagName),super.mount(t)}}const iA=(e,t)=>zc(e)?new ey(t):new Jv(t,{allowProjection:e!==E.Fragment}),aA=jE({...Ak,...QP,...LP,...JP},iA),ft=tE(aA);function sA(e){return E.useEffect(()=>()=>e(),[])}function Io(e){const t=pn(()=>Eo(e)),{isStatic:n}=E.useContext(yo);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function ty(e,t){const n=Io(t()),r=()=>n.set(t());return r(),La(()=>{const o=()=>Qe.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Bn(r)}}),n}const lA=e=>e&&typeof e=="object"&&e.mix,cA=e=>lA(e)?e.mix:void 0;function uA(...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=Pg(o,i,{mixer:cA(i[0]),...a});return t?s(r):s}function dA(e){_i.current=[],e();const t=ty(_i.current,e);return _i.current=void 0,t}function fA(e,t,n,r){if(typeof e=="function")return dA(e);const o=typeof t=="function"?t:uA(t,n,r);return Array.isArray(e)?ny(e,o):ny([e],([i])=>o(i))}function ny(e,t){const n=pn(()=>[]);return ty(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function pA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(pu(r),Qa);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:kn(o)}}const hA=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function ry(e,t){return Cg(e)?e[hA(0,e.length,t)]:e}function $u(e){return typeof e=="object"&&!Array.isArray(e)}function oy(e,t,n,r){return typeof e=="string"&&$u(t)?zv(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function mA(e,t,n){return e*(t+1)}function iy(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function gA(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ya(e,o),r--)}}function vA(e,t,n,r,o,i){gA(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:it(o,i,r[a]),easing:ry(n,a)})}function yA(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function bA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const xA="easeInOut",wA=20;function SA(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,iy(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=iy(d,v.at,u,c));let y=0;const x=(T,w,S,C=0,P=0)=>{const I=TA(T),{delay:_=0,times:M=_g(I),type:L="keyframes",repeat:$,repeatType:A,repeatDelay:O=0,...N}=w;let{ease:V=t.ease||"easeOut",duration:F}=w;const z=typeof _=="function"?_(C,P):_,D=I.length,R=Ka(L)?L:o==null?void 0:o[L];if(D<=2&&R){let Z=100;if(D===2&&kA(I)){const j=I[1]-I[0];Z=Math.abs(j)}const U={...N};F!==void 0&&(U.duration=hn(F));const Y=pA(U,Z,R);V=Y.ease,F=Y.duration}F??(F=i);const J=d+z;M.length===1&&M[0]===0&&(M[1]=1);const te=M.length-I.length;if(te>0&&Ag(M,te),I.length===1&&I.unshift(null),$){an($<wA,"Repeat count too high, must be less than 20"),F=mA(F,$);const Z=[...I],U=[...M];V=Array.isArray(V)?[...V]:[V];const Y=[...V];for(let j=0;j<$;j++){I.push(...Z);for(let W=0;W<Z.length;W++)M.push(U[W]+(j+1)),V.push(W===0?"linear":ry(Y,W-1))}yA(M,$)}const ee=J+F;vA(S,I,V,M,J,ee),y=Math.max(z+F,y),p=Math.max(ee,p)};if(kt(g)){const T=ay(g,s);x(h,v,sy("default",T))}else{const T=oy(g,h,r,l),w=T.length;for(let S=0;S<w;S++){h=h,v=v;const C=T[S],P=ay(C,s);for(const I in h)x(h[I],EA(v,I),sy(I,P),S,w)}}u=d,d+=y}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(bA);const v=[],y=[],x=[];for(let w=0;w<h.length;w++){const{at:S,value:C,easing:P}=h[w];v.push(C),y.push(Ir(0,p,S)),x.push(P||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(xA)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const T=a.get(m);T.keyframes[g]=v,T.transition[g]={...t,duration:p,ease:x,times:y,...n}}}),a}function ay(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function sy(e,t){return t[e]||(t[e]=[]),t[e]}function TA(e){return Array.isArray(e)?e:[e]}function EA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const CA=e=>typeof e=="number",kA=e=>e.every(CA);function PA(e,t){return e in t}class AA extends Xv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(PA(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 gt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function _A(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=dv(e)?new ey(t):new Jv(t);n.mount(e),Hi.set(e,n)}function IA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new AA(t);n.mount(e),Hi.set(e,n)}function OA(e,t){return kt(e)||typeof e=="number"||typeof e=="string"&&!$u(t)}function ly(e,t,n,r){const o=[];if(OA(e,t))o.push(uv(e,$u(t)&&t.default||t,n&&(n.default||n)));else{const i=oy(e,t,r),a=i.length;an(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?_A:IA;Hi.has(l)||c(l);const u=Hi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Tu(u,{...t,transition:d},{}))}}return o}function MA(e,t,n){const r=[];return SA(e,t,n,{spring:bu}).forEach(({keyframes:i,transition:a},s)=>{r.push(...ly(s,i,a))}),r}function DA(e){return Array.isArray(e)&&e.some(Array.isArray)}function NA(e){function t(n,r,o){let i=[];DA(n)?i=MA(n,r,e):i=ly(n,r,o,e);const a=new Dm(i);return e&&e.animations.push(a),a}return t}function FA(){const e=pn(()=>({current:null,animations:[]})),t=pn(()=>NA(e));return sA(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class LA{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 VA=()=>new LA;function jA(){return pn(VA)}function $A(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function RA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:$A(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=xu(r)(l/c)*c}return t+l}}const cy=E.createContext(null);function zA(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=it(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?$E(e,o,o+i):e}function BA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=pn(()=>ft[t]),l=[],c=E.useRef(!1);an(!!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(WA)},updateOrder:(d,p,f)=>{if(c.current)return;const m=zA(l,d,p,f);l!==m&&(c.current=!0,r(m.map(HA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),b.jsx(s,{...i,ref:a,ignoreStrict:!0,children:b.jsx(cy.Provider,{value:u,children:e})})}const uy=E.forwardRef(BA);function HA(e){return e.value}function WA(e,t){return e.layout.min-t.layout.min}function dy(e,t=0){return kt(e)?e:Io(t)}function qA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=pn(()=>ft[r]),c=E.useContext(cy),u={x:dy(t.x),y:dy(t.y)},d=fA([u.x,u.y],([g,h])=>g||h?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return b.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&m(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const fy=E.forwardRef(qA);/**
13
13
  * @license lucide-react v0.485.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 yA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ty=e=>{const t=bA(e);return t.charAt(0).toUpperCase()+t.slice(1)},ny=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
17
+ */const UA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),py=e=>{const t=YA(e);return t.charAt(0).toUpperCase()+t.slice(1)},hy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
18
18
  * @license lucide-react v0.485.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 xA={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 GA={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.485.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 wA=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,...xA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ny("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
27
+ */const KA=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,...GA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:hy("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.485.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 xt=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(wA,{ref:i,iconNode:t,className:ny(`lucide-${yA(ty(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ty(e),n};/**
32
+ */const xt=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(KA,{ref:i,iconNode:t,className:hy(`lucide-${UA(py(e))}`,`lucide-${e}`,r),...o}));return n.displayName=py(e),n};/**
33
33
  * @license lucide-react v0.485.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 TA=xt("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 ZA=xt("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.485.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 SA=xt("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 XA=xt("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.485.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 ry=xt("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 my=xt("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.485.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 EA=xt("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"}]]);/**
52
+ */const QA=xt("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"}]]);/**
53
53
  * @license lucide-react v0.485.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 Fu=xt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
57
+ */const Ru=xt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
58
58
  * @license lucide-react v0.485.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 CA=xt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
62
+ */const JA=xt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
63
63
  * @license lucide-react v0.485.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 Lu=xt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
67
+ */const zu=xt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
68
68
  * @license lucide-react v0.485.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 oy=xt("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"}]]);/**
72
+ */const gy=xt("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"}]]);/**
73
73
  * @license lucide-react v0.485.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 kA=xt("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"}]]);/**
77
+ */const e_=xt("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"}]]);/**
78
78
  * @license lucide-react v0.485.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 iy=xt("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"}]]);/**
82
+ */const vy=xt("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"}]]);/**
83
83
  * @license lucide-react v0.485.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 PA=xt("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"}]]);/**
87
+ */const t_=xt("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"}]]);/**
88
88
  * @license lucide-react v0.485.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 ay=xt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
92
+ */const yy=xt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
93
93
  * @license lucide-react v0.485.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 AA=xt("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
97
+ */const n_=xt("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
98
98
  * @license lucide-react v0.485.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 Vu=xt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
102
+ */const Bu=xt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
103
103
  * @license lucide-react v0.485.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 _A=xt("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"}]]);/**
107
+ */const r_=xt("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"}]]);/**
108
108
  * @license lucide-react v0.485.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const IA=xt("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"}]]);/**
112
+ */const o_=xt("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"}]]);/**
113
113
  * @license lucide-react v0.485.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 Io=xt("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"}]]);/**
117
+ */const Oo=xt("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"}]]);/**
118
118
  * @license lucide-react v0.485.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 OA=xt("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"}]]);/**
122
+ */const i_=xt("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"}]]);/**
123
123
  * @license lucide-react v0.485.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 MA=xt("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"}]]);/**
127
+ */const a_=xt("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"}]]);/**
128
128
  * @license lucide-react v0.485.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 DA=xt("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
132
+ */const s_=xt("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
133
133
  * @license lucide-react v0.485.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 es=xt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},NA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},ly=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sy,exit:sy.false,transition:NA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:je("aria-hidden:pointer-events-none",e.className),children:e.children}),FA=co("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"}}),LA=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:je("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(ly,{"data-open":!!i,open:!!i,children:x.jsxs(on,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:je(FA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(oy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(ay,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(OA,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(es,{size:20})}):null]})})})}),cy=6048e5,VA=864e5,jA=6e4,RA=36e5,$A=1e3,uy=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&uy in e?e[uy](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ke(e,t){return rt(t||e,e)}function ts(e,t,n){const r=Ke(e,n==null?void 0:n.in);return isNaN(t)?rt((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dy(e,t,n){const r=Ke(e,n==null?void 0:n.in);if(isNaN(t))return rt(e,NaN);if(!t)return r;const o=r.getDate(),i=rt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Oo(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=Ke(e,n==null?void 0:n.in),d=o||r?dy(u,o+r*12):u,p=a||i?ts(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return rt(e,+p+g)}let zA={};function Lr(){return zA}function Pn(e,t){var s,l,c,u;const n=Lr(),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=Ke(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 Mo(e,t){return Pn(e,{...t,weekStartsOn:1})}function fy(e,t){const n=Ke(e,t==null?void 0:t.in),r=n.getFullYear(),o=rt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Mo(o),a=rt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Mo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ns(e){const t=Ke(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 rs(e,...t){const n=rt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Do(e,t){const n=Ke(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function BA(e,t,n){const[r,o]=rs(n==null?void 0:n.in,e,t),i=Do(r),a=Do(o),s=+i-ns(i),l=+a-ns(a);return Math.round((s-l)/VA)}function HA(e,t){const n=fy(e,t),r=rt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Mo(r)}function WA(e){return rt(e,Date.now())}function qA(e,t,n){const[r,o]=rs(n==null?void 0:n.in,e,t);return+Do(r)==+Do(o)}function UA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function py(e){return!(!UA(e)&&typeof e!="number"||isNaN(+Ke(e)))}function GA(e,t){const[n,r]=rs(e,t.start,t.end);return{start:n,end:r}}function hy(e,t){const{start:n,end:r}=GA(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(rt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function my(e,t){const n=Ke(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function YA(e,t){const n=Ke(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function KA(e,t){var s,l;const n=Lr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ke(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 ZA={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"}},XA=(e,t,n)=>{let r;const o=ZA[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 ju(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const QA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},JA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},e_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},t_={date:ju({formats:QA,defaultWidth:"full"}),time:ju({formats:JA,defaultWidth:"full"}),dateTime:ju({formats:e_,defaultWidth:"full"})},n_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r_=(e,t,n,r)=>n_[e];function $i(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 o_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},i_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},a_={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"]},s_={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"]},l_={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"}},c_={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"}},u_={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:o_,defaultWidth:"wide"}),quarter:$i({values:i_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$i({values:a_,defaultWidth:"wide"}),day:$i({values:s_,defaultWidth:"wide"}),dayPeriod:$i({values:l_,defaultWidth:"wide",formattingValues:c_,defaultFormattingWidth:"wide"})};function zi(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)?f_(s,d=>d.test(a)):d_(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 d_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function f_(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 h_=/^(\d+)(th|st|nd|rd)?/i,m_=/\d+/i,g_={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},v_={any:[/^b/i,/^(a|c)/i]},y_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},b_={any:[/1/i,/2/i,/3/i,/4/i]},x_={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},w_={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},S_={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]},E_={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},C_={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}},k_={ordinalNumber:p_({matchPattern:h_,parsePattern:m_,valueCallback:e=>parseInt(e,10)}),era:zi({matchPatterns:g_,defaultMatchWidth:"wide",parsePatterns:v_,defaultParseWidth:"any"}),quarter:zi({matchPatterns:y_,defaultMatchWidth:"wide",parsePatterns:b_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zi({matchPatterns:x_,defaultMatchWidth:"wide",parsePatterns:w_,defaultParseWidth:"any"}),day:zi({matchPatterns:T_,defaultMatchWidth:"wide",parsePatterns:S_,defaultParseWidth:"any"}),dayPeriod:zi({matchPatterns:E_,defaultMatchWidth:"any",parsePatterns:C_,defaultParseWidth:"any"})},gy={code:"en-US",formatDistance:XA,formatLong:t_,formatRelative:r_,localize:u_,match:k_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function P_(e,t){const n=Ke(e,t==null?void 0:t.in);return BA(n,YA(n))+1}function vy(e,t){const n=Ke(e,t==null?void 0:t.in),r=+Mo(n)-+HA(n);return Math.round(r/cy)+1}function Ru(e,t){var u,d,p,f;const n=Ke(e,t==null?void 0:t.in),r=n.getFullYear(),o=Lr(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=rt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Pn(a,t),l=rt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Pn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function A_(e,t){var s,l,c,u;const n=Lr(),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=Ru(e,t),i=rt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Pn(i,t)}function yy(e,t){const n=Ke(e,t==null?void 0:t.in),r=+Pn(n,t)-+A_(n,t);return Math.round(r/cy)+1}function Ze(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ze(n+1,2)},d(e,t){return Ze(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 Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ze(o,t.length)}},No={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},by={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=Ru(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ze(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ze(i,t.length)},R:function(e,t){const n=fy(e);return Ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ze(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 Ze(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 Ze(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ze(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=yy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,n){const r=vy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ze(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=P_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ze(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 Ze(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 Ze(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 Ze(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=No.noon:r===0?o=No.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wy(r);case"XXXX":case"XX":return Vr(r);case"XXXXX":case"XXX":default:return Vr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wy(r);case"xxxx":case"xx":return Vr(r);case"xxxxx":case"xxx":default:return Vr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xy(r,":");case"OOOO":default:return"GMT"+Vr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xy(r,":");case"zzzz":default:return"GMT"+Vr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,n){return Ze(+e,t.length)}};function xy(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+Ze(i,2)}function wy(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Vr(e,t)}function Vr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ze(Math.trunc(r/60),2),i=Ze(r%60,2);return n+o+t+i}const Ty=(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"})}},Sy=(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"})}},$u={p:Sy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ty(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}}",Ty(r,t)).replace("{{time}}",Sy(o,t))}},__=/^D+$/,I_=/^Y+$/,O_=["D","DD","YY","YYYY"];function Ey(e){return __.test(e)}function Cy(e){return I_.test(e)}function zu(e,t,n){const r=M_(e,t,n);if(console.warn(r),O_.includes(e))throw new RangeError(r)}function M_(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 D_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,F_=/^'([^]*?)'?$/,L_=/''/g,V_=/[a-zA-Z]/;function j_(e,t,n){var u,d,p,f;const r=Lr(),o=r.locale??gy,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=Ke(e,n==null?void 0:n.in);if(!py(s))throw new RangeError("Invalid time value");let l=t.match(N_).map(h=>{const g=h[0];if(g==="p"||g==="P"){const m=$u[g];return m(h,o.formatLong)}return h}).join("").match(D_).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:R_(h)};if(by[g])return{isToken:!0,value:h};if(g.match(V_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(Cy(g)||Ey(g))&&zu(g,t,String(e));const m=by[g[0]];return m(s,g,o.localize,c)}).join("")}function R_(e){const t=e.match(F_);return t?t[1].replace(L_,"'"):e}function $_(){return Object.assign({},Lr())}function z_(e,t){const n=Ke(e,t==null?void 0:t.in).getDay();return n===0?7:n}function B_(e,t){return+Ke(e)>+Ke(t)}function H_(e,t){return+Ke(e)<+Ke(t)}function W_(e,t){const n=q_(t)?new t(0):rt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function q_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const U_=10;class ky{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class G_ extends ky{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 Y_ extends ky{constructor(n,r){super();pe(this,"priority",U_);pe(this,"subPriority",-1);this.context=n||(o=>rt(r,o))}set(n,r){return r.timestampIsSet?n:rt(n,W_(n,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new G_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class K_ extends qe{constructor(){super(...arguments);pe(this,"priority",140);pe(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}/},An={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 Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function pt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function _n(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*RA+i*jA+a*$A),rest:t.slice(n[0].length)}}function Py(e){return pt(wt.anyDigitsSigned,e)}function vt(e,t){switch(e){case 1:return pt(wt.singleDigit,t);case 2:return pt(wt.twoDigits,t);case 3:return pt(wt.threeDigits,t);case 4:return pt(wt.fourDigits,t);default:return pt(new RegExp("^\\d{1,"+e+"}"),t)}}function os(e,t){switch(e){case 1:return pt(wt.singleDigitSigned,t);case 2:return pt(wt.twoDigitsSigned,t);case 3:return pt(wt.threeDigitsSigned,t);case 4:return pt(wt.fourDigitsSigned,t);default:return pt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Bu(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 Ay(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 _y(e){return e%400===0||e%4===0&&e%100!==0}class Z_ extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(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 Tt(vt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(vt(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=Ay(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 X_ extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(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 Tt(vt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(vt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Ru(n,i);if(o.isTwoDigitYear){const l=Ay(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Pn(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),Pn(n,i)}}class Q_ extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return os(r==="R"?4:r.length,n)}set(n,r,o){const i=rt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Mo(i)}}class J_ extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return os(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class eI extends qe{constructor(){super(...arguments);pe(this,"priority",120);pe(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 vt(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 tI extends qe{constructor(){super(...arguments);pe(this,"priority",120);pe(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 vt(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 nI extends qe{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(pt(wt.month,n),i);case"MM":return Tt(vt(2,n),i);case"Mo":return Tt(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 rI extends qe{constructor(){super(...arguments);pe(this,"priority",110);pe(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 Tt(pt(wt.month,n),i);case"LL":return Tt(vt(2,n),i);case"Lo":return Tt(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 oI(e,t,n){const r=Ke(e,n==null?void 0:n.in),o=yy(r,n)-t;return r.setDate(r.getDate()-o*7),Ke(r,n==null?void 0:n.in)}class iI extends qe{constructor(){super(...arguments);pe(this,"priority",100);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return pt(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return vt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return Pn(oI(n,o,i),i)}}function aI(e,t,n){const r=Ke(e,n==null?void 0:n.in),o=vy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class sI extends qe{constructor(){super(...arguments);pe(this,"priority",100);pe(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 pt(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return vt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Mo(aI(n,o))}}const lI=[31,28,31,30,31,30,31,31,30,31,30,31],cI=[31,29,31,30,31,30,31,31,30,31,30,31];class uI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return pt(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return vt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=_y(o),a=n.getMonth();return i?r>=1&&r<=cI[a]:r>=1&&r<=lI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class dI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(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 pt(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return vt(r.length,n)}}validate(n,r){const o=n.getFullYear();return _y(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 Hu(e,t,n){var d,p,f,h;const r=Lr(),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??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=Ke(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 ts(i,u,n)}class fI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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=Hu(n,o,i),n.setHours(0,0,0,0),n}}class pI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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 Tt(vt(r.length,n),a);case"eo":return Tt(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=Hu(n,o,i),n.setHours(0,0,0,0),n}}class hI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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 Tt(vt(r.length,n),a);case"co":return Tt(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=Hu(n,o,i),n.setHours(0,0,0,0),n}}function mI(e,t,n){const r=Ke(e,n==null?void 0:n.in),o=z_(r,n),i=t-o;return ts(r,i,n)}class gI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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 vt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(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 Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(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=mI(n,o),n.setHours(0,0,0,0),n}}class vI extends qe{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Bu(o),0,0,0),n}}class yI extends qe{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Bu(o),0,0,0),n}}class bI extends qe{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Bu(o),0,0,0),n}}class xI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return pt(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return vt(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 wI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return pt(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return vt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class TI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return pt(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return vt(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 SI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return pt(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return vt(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 EI extends qe{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return pt(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return vt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class CI extends qe{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return pt(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return vt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class kI extends qe{constructor(){super(...arguments);pe(this,"priority",30);pe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(vt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class PI extends qe{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return _n(An.basicOptionalMinutes,n);case"XX":return _n(An.basic,n);case"XXXX":return _n(An.basicOptionalSeconds,n);case"XXXXX":return _n(An.extendedOptionalSeconds,n);case"XXX":default:return _n(An.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ns(n)-o)}}class AI extends qe{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return _n(An.basicOptionalMinutes,n);case"xx":return _n(An.basic,n);case"xxxx":return _n(An.basicOptionalSeconds,n);case"xxxxx":return _n(An.extendedOptionalSeconds,n);case"xxx":default:return _n(An.extended,n)}}set(n,r,o){return r.timestampIsSet?n:rt(n,n.getTime()-ns(n)-o)}}class _I extends qe{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Py(n)}set(n,r,o){return[rt(n,o*1e3),{timestampIsSet:!0}]}}class II extends qe{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Py(n)}set(n,r,o){return[rt(n,o),{timestampIsSet:!0}]}}const OI={G:new K_,y:new Z_,Y:new X_,R:new Q_,u:new J_,Q:new eI,q:new tI,M:new nI,L:new rI,w:new iI,I:new sI,d:new uI,D:new dI,E:new fI,e:new pI,c:new hI,i:new gI,a:new vI,b:new yI,B:new bI,h:new xI,H:new wI,K:new TI,k:new SI,m:new EI,s:new CI,S:new kI,X:new PI,x:new AI,t:new _I,T:new II},MI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NI=/^'([^]*?)'?$/,FI=/''/g,LI=/\S/,VI=/[a-zA-Z]/;function jI(e,t,n,r){var m,y,v,b;const o=()=>rt(n,NaN),i=$_(),a=i.locale??gy,s=i.firstWeekContainsDate??((y=(m=i.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(v=i.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Ke(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new Y_(r==null?void 0:r.in,n)],d=t.match(DI).map(S=>{const T=S[0];if(T in $u){const w=$u[T];return w(S,a.formatLong)}return S}).join("").match(MI),p=[];for(let S of d){Cy(S)&&zu(S,t,e),Ey(S)&&zu(S,t,e);const T=S[0],w=OI[T];if(w){const{incompatibleTokens:C}=w;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===T);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(w.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:T,fullToken:S});const k=w.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(T.match(VI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(S==="''"?S="'":T==="'"&&(S=RI(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&LI.test(e))return o();const f=u.map(S=>S.priority).sort((S,T)=>T-S).filter((S,T,w)=>w.indexOf(S)===T).map(S=>u.filter(T=>T.priority===S).sort((T,w)=>w.subPriority-T.subPriority)).map(S=>S[0]);let h=Ke(n,r==null?void 0:r.in);if(isNaN(+h))return o();const g={};for(const S of f){if(!S.validate(h,c))return o();const T=S.set(h,g,c);Array.isArray(T)?(h=T[0],Object.assign(g,T[1])):h=T}return h}function RI(e){return e.match(NI)[1].replace(FI,"'")}function $I(e,t,n){const[r,o]=rs(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function zI(e,t){return qA(rt(e,e),WA(e))}function BI(e,t,n){return ts(e,-t,n)}function HI(e,t,n){const r=Ke(e,n==null?void 0:n.in);return isNaN(+r)?rt(e,NaN):(r.setFullYear(t),r)}function WI(e,t,n){return dy(e,-t,n)}function Bi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=WI(e,o+r*12,n),d=BI(u,a+i*7,n),p=l+s*60,h=(c+p*60)*1e3;return rt(e,+d-h)}var St=function(){return St=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},St.apply(this,arguments)};function Wu(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 qu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Hi=function(e){return e.replace(new RegExp(" ","g")," ")},Iy=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)},qI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Oy=function(e,t,n){var r=e.length-2,o=qI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},My=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},is=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},UI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Uu=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},GI=function(e){return e==="money"||e==="currency"},YI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return St(St({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},as=function(e,t){var n=Iy(My(e),t.fraction.length),r="".concat(t.currency).concat(Oy(n,t.group,t.decimal));return Hi(r)},KI=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=Wu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=YI(r,i,s);return h.currency=Hi("".concat(h.currency.trim()," ")),h.literal=Hi(h.literal.trim()),h},[r,i]),p=function(h){var g=as(h.target.value,d),m=is(g);h.target.value=g,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var g=as(h,d),m=is(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});l==null||l(St(St({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?as(c.defaultValue,d):void 0;return E.createElement("input",St({},c,{value:typeof c.value=="string"?as(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),ZI=1,XI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},QI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return St(St({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ss=function(e,t){var n=Iy(My(e),t.fraction.length),r="".concat(Oy(n,t.group,t.decimal)," ").concat(t.percentSign);return Hi(r)},JI=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=Wu(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=qu(E.useState(function(){var y,v;return(v=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,v=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(ss(v,d))},[a.value]);var d=E.useMemo(function(){var y=QI(r);return y.percentSign=Hi("".concat(y.percentSign)),y},[r]),p=c.length-d.percentSign.length-ZI,f=function(y){var v,b=s.current;b&&(b.setSelectionRange(p,p),y&&((v=a.onFocus)===null||v===void 0||v.call(a,y)))},h=function(y){var v=y.currentTarget;if(v.selectionStart!==null){var b=v.selectionStart,S=v.selectionEnd,T=b!==S,w=p<b;!T&&w&&f()}i==null||i(y)},g=function(y){var v=ss(y.target.value,d),b=is(v);u(v),y.target.value=v,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 v=ss(y,d),b=is(v);u(v),s.current.value=v,s.current.setAttribute("data-number",b.toString());var S=new InputEvent("change",{});o==null||o(St(St({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var m=a.defaultValue?ss(a.defaultValue,d):void 0;return E.createElement("input",St({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Wi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},eO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ls[i];a===void 0?r.push(i.replace(Wi.dots,"\\.").replace(Wi.openParenthesis,"\\(").replace(Wi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Wi.leadingBars,"\\")},qi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Gu(o,n);var i=eO(o);return n?"^".concat(i,"$"):i},tO=function(e){return e.replace(Wi.escape,"\\$&")},Gu=function(e,t){var n=e.map(function(r){return typeof r=="string"?tO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ls={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]/}},nO=/\d/,Dy="(dd) 9dddd-dddd",Ny="(dd) dddd-dddd",Fy="ddd.ddd.ddd-dd",Ly="dd.ddd.ddd/dddd-dd",cs=function(e){return e.replace(/\D/g,"")},rO=["2",/[0-3]/,":",/[0-5]/,/\d/],oO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Gt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Fy,isoDate:"dddd-dd-dd",cnpj:Ly,telephone:Ny,cellphone:Dy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return cs(e).length<=11?Fy:Ly},int:function(e){return e===void 0&&(e=""),nO.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=cs(e);return t.length<11?Ny:Dy},time:function(e){var t=cs(e),n=t[0];return n==="2"?rO:oO}},Yt=function(e,t,n){var r;return n===void 0&&(n={}),St({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:qi(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:Yt(Gt.cellTelephone,"tel"),cellphone:Yt(Gt.cellphone,"tel"),cep:Yt(Gt.cep,"decimal"),cnpj:Yt(Gt.cnpj,"decimal"),color:Yt(Gt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Yt(Gt.cpf,"decimal"),cpfCnpj:Yt(Gt.cpfCnpj,"decimal",{transform:cs}),creditCard:Yt(Gt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Yt(Gt.date,"decimal"),int:Yt(Gt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Yt(Gt.isoDate,"decimal"),telephone:Yt(Gt.telephone,"tel"),time:Yt(Gt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Yt(Gt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Vy(e,t,n,r){var o,i;r===void 0&&(r=ls);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 jy=function(e){return e},iO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(qi(e,n,t));return r.test(n)};function aO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var sO=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=Wu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var g=Uu(s),m=Uu(d),y=Uu(u),v=E.useRef(iO(u,i,f.value||f.defaultValue)),b=p??"input",S=qu(E.useState(""),2),T=S[0],w=S[1],C=aO(T),k=E.useCallback(function(O,D){var j,F,z=(j=O??D)!==null&&j!==void 0?j:"";if(u===void 0)return z;var M=(F=z==null?void 0:z.toString())!==null&&F!==void 0?F:"";return Vy(M,typeof u=="function"?u(M):u,a??jy,c??ls)},[a,u,c]),I=qu(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=I[0],N=I[1],L=k(f.defaultValue,f.defaultValue),R=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?Gu(O,i):qi(u,A,i)}return typeof u=="string"?qi(u,A,i):Gu(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=k(f.value,f.defaultValue);N(O),h.current!==null&&(h.current.value=O)}},[f.value,u,a,f.defaultValue]);var P=function(O){var D,j,F,z,M,$=O.currentTarget,J=O.target.value;if(y.current===void 0)return N(J),(D=m.current)===null||D===void 0||D.call(m,J),(j=g.current)===null||j===void 0||j.call(g,O),d==null?void 0:d(J);var te=new RegExp(qi(y.current,J,i)),ee=(F=$.selectionEnd)!==null&&F!==void 0?F:0,Z=function(Y,ae,B){if(Y.type!=="number")return Y.setSelectionRange(ae,B)};if(r&&v.current&&J.length>=A.length)return $.value=A,Z($,ee-1,ee-1);var U=!1;J.length<C.length&&(v.current=!1,U=!0),te.test(J)&&(v.current=!0);var G=ee,V=J[G-1],W=Vy(J,typeof y.current=="function"?y.current(J):y.current,a??jy,c??ls);for($.value=W,N(W);G<W.length&&W.charAt(G-1)!==V;)G+=1;U?Z($,ee,ee):Z($,G,G),O.target.value=W,w(W),(z=m.current)===null||z===void 0||z.call(m,W),(M=g.current)===null||M===void 0||M.call(g,O)};return E.createElement(b,St({},f,{ref:h,pattern:R,onChange:P,defaultValue:Ry(f.defaultValue)?L:void 0,value:Ry(f.value)?k(f.value,f.value):f.value}))}),Ry=function(e){return typeof e=="string"},$y=E.forwardRef(function(e,t){return GI(e.mask)?E.createElement(KI,St({},e,{mask:void 0,ref:t})):XI(e.mask)?E.createElement(JI,St({},e,{mask:void 0,ref:t})):E.createElement(sO,St({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement($y,St({},e,t))}};Kt(jt.cellTelephone),Kt(jt.cellphone),Kt(jt.cep),Kt(jt.cnpj),Kt(jt.color),Kt(jt.cpf),Kt(jt.cpfCnpj),Kt(jt.creditCard),Kt(jt.date),Kt(jt.int),Kt(jt.isoDate),Kt(jt.telephone),Kt(jt.time),Kt(jt.uuid);var zy=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&UI(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return E.createElement($y,St({},o,{ref:n}))}),us={exports:{}},Yu={},ds={exports:{}},Ku={};/**
137
+ */const os=xt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),by={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},l_={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},xy=e=>b.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:by,exit:by.false,transition:l_,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Le("aria-hidden:pointer-events-none",e.className),children:e.children}),c_=uo("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"}}),u_=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 b.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Le("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:b.jsx(xy,{"data-open":!!i,open:!!i,children:b.jsxs(on,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Le(c_({theme:n}),t),children:[b.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?b.jsx(gy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?b.jsx(yy,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?b.jsx(i_,{"aria-hidden":"true",size:20}):null,r,b.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?b.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:b.jsx(os,{size:20})}):null]})})})}),wy=6048e5,d_=864e5,f_=6e4,p_=36e5,h_=1e3,Sy=Symbol.for("constructDateFrom");function ot(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 Ke(e,t){return ot(t||e,e)}function is(e,t,n){const r=Ke(e,n==null?void 0:n.in);return isNaN(t)?ot((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ty(e,t,n){const r=Ke(e,n==null?void 0:n.in);if(isNaN(t))return ot(e,NaN);if(!t)return r;const o=r.getDate(),i=ot(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Mo(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Ke(e,n==null?void 0:n.in),d=o||r?Ty(u,o+r*12):u,p=a||i?is(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return ot(e,+p+g)}let m_={};function Lr(){return m_}function Pn(e,t){var s,l,c,u;const n=Lr(),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=Ke(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 Do(e,t){return Pn(e,{...t,weekStartsOn:1})}function Ey(e,t){const n=Ke(e,t==null?void 0:t.in),r=n.getFullYear(),o=ot(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Do(o),a=ot(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Do(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function as(e){const t=Ke(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 ss(e,...t){const n=ot.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function No(e,t){const n=Ke(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function g_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t),i=No(r),a=No(o),s=+i-as(i),l=+a-as(a);return Math.round((s-l)/d_)}function v_(e,t){const n=Ey(e,t),r=ot(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Do(r)}function y_(e){return ot(e,Date.now())}function b_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return+No(r)==+No(o)}function x_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Cy(e){return!(!x_(e)&&typeof e!="number"||isNaN(+Ke(e)))}function w_(e,t){const[n,r]=ss(e,t.start,t.end);return{start:n,end:r}}function ky(e,t){const{start:n,end:r}=w_(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(ot(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Py(e,t){const n=Ke(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function S_(e,t){const n=Ke(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function T_(e,t){var s,l;const n=Lr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ke(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 E_={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"}},C_=(e,t,n)=>{let r;const o=E_[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 Hu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const k_={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"},A_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},__={date:Hu({formats:k_,defaultWidth:"full"}),time:Hu({formats:P_,defaultWidth:"full"}),dateTime:Hu({formats:A_,defaultWidth:"full"})},I_={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)=>I_[e];function Wi(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 M_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},N_={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"]},F_={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"]},L_={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"}},V_={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"}},j_={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:Wi({values:M_,defaultWidth:"wide"}),quarter:Wi({values:D_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wi({values:N_,defaultWidth:"wide"}),day:Wi({values:F_,defaultWidth:"wide"}),dayPeriod:Wi({values:L_,defaultWidth:"wide",formattingValues:V_,defaultFormattingWidth:"wide"})};function qi(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)?R_(s,d=>d.test(a)):$_(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 $_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function R_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function z_(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 B_=/^(\d+)(th|st|nd|rd)?/i,H_=/\d+/i,W_={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},q_={any:[/^b/i,/^(a|c)/i]},U_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y_={any:[/1/i,/2/i,/3/i,/4/i]},G_={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},K_={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]},Z_={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},X_={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]},Q_={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}},eI={ordinalNumber:z_({matchPattern:B_,parsePattern:H_,valueCallback:e=>parseInt(e,10)}),era:qi({matchPatterns:W_,defaultMatchWidth:"wide",parsePatterns:q_,defaultParseWidth:"any"}),quarter:qi({matchPatterns:U_,defaultMatchWidth:"wide",parsePatterns:Y_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:qi({matchPatterns:G_,defaultMatchWidth:"wide",parsePatterns:K_,defaultParseWidth:"any"}),day:qi({matchPatterns:Z_,defaultMatchWidth:"wide",parsePatterns:X_,defaultParseWidth:"any"}),dayPeriod:qi({matchPatterns:Q_,defaultMatchWidth:"any",parsePatterns:J_,defaultParseWidth:"any"})},Ay={code:"en-US",formatDistance:C_,formatLong:__,formatRelative:O_,localize:j_,match:eI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tI(e,t){const n=Ke(e,t==null?void 0:t.in);return g_(n,S_(n))+1}function _y(e,t){const n=Ke(e,t==null?void 0:t.in),r=+Do(n)-+v_(n);return Math.round(r/wy)+1}function Wu(e,t){var u,d,p,f;const n=Ke(e,t==null?void 0:t.in),r=n.getFullYear(),o=Lr(),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=ot((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Pn(a,t),l=ot((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Pn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function nI(e,t){var s,l,c,u;const n=Lr(),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=Wu(e,t),i=ot((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Pn(i,t)}function Iy(e,t){const n=Ke(e,t==null?void 0:t.in),r=+Pn(n,t)-+nI(n,t);return Math.round(r/wy)+1}function Ze(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ze(n+1,2)},d(e,t){return Ze(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 Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ze(o,t.length)}},Fo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Oy={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=Wu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ze(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ze(i,t.length)},R:function(e,t){const n=Ey(e);return Ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ze(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 Ze(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 Ze(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ze(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=Iy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,n){const r=_y(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ze(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=tI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ze(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 Ze(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 Ze(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 Ze(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=Fo.noon:r===0?o=Fo.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=Fo.evening:r>=12?o=Fo.afternoon:r>=4?o=Fo.morning:o=Fo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Dy(r);case"XXXX":case"XX":return Vr(r);case"XXXXX":case"XXX":default:return Vr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Dy(r);case"xxxx":case"xx":return Vr(r);case"xxxxx":case"xxx":default:return Vr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+My(r,":");case"OOOO":default:return"GMT"+Vr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+My(r,":");case"zzzz":default:return"GMT"+Vr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,n){return Ze(+e,t.length)}};function My(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+Ze(i,2)}function Dy(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Vr(e,t)}function Vr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ze(Math.trunc(r/60),2),i=Ze(r%60,2);return n+o+t+i}const Ny=(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"})}},Fy=(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"})}},qu={p:Fy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ny(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}}",Ny(r,t)).replace("{{time}}",Fy(o,t))}},rI=/^D+$/,oI=/^Y+$/,iI=["D","DD","YY","YYYY"];function Ly(e){return rI.test(e)}function Vy(e){return oI.test(e)}function Uu(e,t,n){const r=aI(e,t,n);if(console.warn(r),iI.includes(e))throw new RangeError(r)}function aI(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 sI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cI=/^'([^]*?)'?$/,uI=/''/g,dI=/[a-zA-Z]/;function fI(e,t,n){var u,d,p,f;const r=Lr(),o=r.locale??Ay,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=Ke(e,n==null?void 0:n.in);if(!Cy(s))throw new RangeError("Invalid time value");let l=t.match(lI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=qu[g];return h(m,o.formatLong)}return m}).join("").match(sI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:pI(m)};if(Oy[g])return{isToken:!0,value:m};if(g.match(dI))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;(Vy(g)||Ly(g))&&Uu(g,t,String(e));const h=Oy[g[0]];return h(s,g,o.localize,c)}).join("")}function pI(e){const t=e.match(cI);return t?t[1].replace(uI,"'"):e}function hI(){return Object.assign({},Lr())}function mI(e,t){const n=Ke(e,t==null?void 0:t.in).getDay();return n===0?7:n}function gI(e,t){return+Ke(e)>+Ke(t)}function vI(e,t){return+Ke(e)<+Ke(t)}function yI(e,t){const n=bI(t)?new t(0):ot(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function bI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const xI=10;class jy{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class wI extends jy{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 SI extends jy{constructor(n,r){super();pe(this,"priority",xI);pe(this,"subPriority",-1);this.context=n||(o=>ot(r,o))}set(n,r){return r.timestampIsSet?n:ot(n,yI(n,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new wI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class TI extends qe{constructor(){super(...arguments);pe(this,"priority",140);pe(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}/},An={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 pt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function _n(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*p_+i*f_+a*h_),rest:t.slice(n[0].length)}}function $y(e){return pt(wt.anyDigitsSigned,e)}function vt(e,t){switch(e){case 1:return pt(wt.singleDigit,t);case 2:return pt(wt.twoDigits,t);case 3:return pt(wt.threeDigits,t);case 4:return pt(wt.fourDigits,t);default:return pt(new RegExp("^\\d{1,"+e+"}"),t)}}function ls(e,t){switch(e){case 1:return pt(wt.singleDigitSigned,t);case 2:return pt(wt.twoDigitsSigned,t);case 3:return pt(wt.threeDigitsSigned,t);case 4:return pt(wt.fourDigitsSigned,t);default:return pt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Yu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ry(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function zy(e){return e%400===0||e%4===0&&e%100!==0}class EI extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(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(vt(4,n),i);case"yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(vt(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=Ry(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 CI extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(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(vt(4,n),i);case"Yo":return St(o.ordinalNumber(n,{unit:"year"}),i);default:return St(vt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Wu(n,i);if(o.isTwoDigitYear){const l=Ry(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Pn(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),Pn(n,i)}}class kI extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ls(r==="R"?4:r.length,n)}set(n,r,o){const i=ot(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Do(i)}}class PI extends qe{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ls(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class AI extends qe{constructor(){super(...arguments);pe(this,"priority",120);pe(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 vt(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 _I extends qe{constructor(){super(...arguments);pe(this,"priority",120);pe(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 vt(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 II extends qe{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return St(pt(wt.month,n),i);case"MM":return St(vt(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 OI extends qe{constructor(){super(...arguments);pe(this,"priority",110);pe(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(pt(wt.month,n),i);case"LL":return St(vt(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 MI(e,t,n){const r=Ke(e,n==null?void 0:n.in),o=Iy(r,n)-t;return r.setDate(r.getDate()-o*7),Ke(r,n==null?void 0:n.in)}class DI extends qe{constructor(){super(...arguments);pe(this,"priority",100);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return pt(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return vt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return Pn(MI(n,o,i),i)}}function NI(e,t,n){const r=Ke(e,n==null?void 0:n.in),o=_y(r,n)-t;return r.setDate(r.getDate()-o*7),r}class FI extends qe{constructor(){super(...arguments);pe(this,"priority",100);pe(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 pt(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return vt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Do(NI(n,o))}}const LI=[31,28,31,30,31,30,31,31,30,31,30,31],VI=[31,29,31,30,31,30,31,31,30,31,30,31];class jI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return pt(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return vt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=zy(o),a=n.getMonth();return i?r>=1&&r<=VI[a]:r>=1&&r<=LI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class $I extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(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 pt(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return vt(r.length,n)}}validate(n,r){const o=n.getFullYear();return zy(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 Gu(e,t,n){var d,p,f,m;const r=Lr(),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=Ke(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 is(i,u,n)}class RI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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=Gu(n,o,i),n.setHours(0,0,0,0),n}}class zI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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(vt(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=Gu(n,o,i),n.setHours(0,0,0,0),n}}class BI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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(vt(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=Gu(n,o,i),n.setHours(0,0,0,0),n}}function HI(e,t,n){const r=Ke(e,n==null?void 0:n.in),o=mI(r,n),i=t-o;return is(r,i,n)}class WI extends qe{constructor(){super(...arguments);pe(this,"priority",90);pe(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 vt(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=HI(n,o),n.setHours(0,0,0,0),n}}class qI extends qe{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Yu(o),0,0,0),n}}class UI extends qe{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Yu(o),0,0,0),n}}class YI extends qe{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Yu(o),0,0,0),n}}class GI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return pt(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return vt(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 KI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return pt(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return vt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class ZI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return pt(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return vt(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 XI extends qe{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return pt(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return vt(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 QI extends qe{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return pt(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return vt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class JI extends qe{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return pt(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return vt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class eO extends qe{constructor(){super(...arguments);pe(this,"priority",30);pe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return St(vt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class tO extends qe{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return _n(An.basicOptionalMinutes,n);case"XX":return _n(An.basic,n);case"XXXX":return _n(An.basicOptionalSeconds,n);case"XXXXX":return _n(An.extendedOptionalSeconds,n);case"XXX":default:return _n(An.extended,n)}}set(n,r,o){return r.timestampIsSet?n:ot(n,n.getTime()-as(n)-o)}}class nO extends qe{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return _n(An.basicOptionalMinutes,n);case"xx":return _n(An.basic,n);case"xxxx":return _n(An.basicOptionalSeconds,n);case"xxxxx":return _n(An.extendedOptionalSeconds,n);case"xxx":default:return _n(An.extended,n)}}set(n,r,o){return r.timestampIsSet?n:ot(n,n.getTime()-as(n)-o)}}class rO extends qe{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return $y(n)}set(n,r,o){return[ot(n,o*1e3),{timestampIsSet:!0}]}}class oO extends qe{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return $y(n)}set(n,r,o){return[ot(n,o),{timestampIsSet:!0}]}}const iO={G:new TI,y:new EI,Y:new CI,R:new kI,u:new PI,Q:new AI,q:new _I,M:new II,L:new OI,w:new DI,I:new FI,d:new jI,D:new $I,E:new RI,e:new zI,c:new BI,i:new WI,a:new qI,b:new UI,B:new YI,h:new GI,H:new KI,K:new ZI,k:new XI,m:new QI,s:new JI,S:new eO,X:new tO,x:new nO,t:new rO,T:new oO},aO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lO=/^'([^]*?)'?$/,cO=/''/g,uO=/\S/,dO=/[a-zA-Z]/;function fO(e,t,n,r){var h,v,y,x;const o=()=>ot(n,NaN),i=hI(),a=i.locale??Ay,s=i.firstWeekContainsDate??((v=(h=i.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(y=i.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Ke(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new SI(r==null?void 0:r.in,n)],d=t.match(sO).map(T=>{const w=T[0];if(w in qu){const S=qu[w];return S(T,a.formatLong)}return T}).join("").match(aO),p=[];for(let T of d){Vy(T)&&Uu(T,t,e),Ly(T)&&Uu(T,t,e);const w=T[0],S=iO[w];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const I=p.find(_=>C.includes(_.token)||_.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);p.push({token:w,fullToken:T});const P=S.run(e,T,a.match,c);if(!P)return o();u.push(P.setter),e=P.rest}else{if(w.match(dO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=pO(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&uO.test(e))return o();const f=u.map(T=>T.priority).sort((T,w)=>w-T).filter((T,w,S)=>S.indexOf(T)===w).map(T=>u.filter(w=>w.priority===T).sort((w,S)=>S.subPriority-w.subPriority)).map(T=>T[0]);let m=Ke(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const T of f){if(!T.validate(m,c))return o();const w=T.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function pO(e){return e.match(lO)[1].replace(cO,"'")}function hO(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function mO(e,t){return b_(ot(e,e),y_(e))}function gO(e,t,n){return is(e,-t,n)}function vO(e,t,n){const r=Ke(e,n==null?void 0:n.in);return isNaN(+r)?ot(e,NaN):(r.setFullYear(t),r)}function yO(e,t,n){return Ty(e,-t,n)}function Ui(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=yO(e,o+r*12,n),d=gO(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return ot(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 Ku(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 Zu(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 Yi=function(e){return e.replace(new RegExp(" ","g")," ")},By=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)},bO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Hy=function(e,t,n){var r=e.length-2,o=bO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Wy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},cs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},xO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Xu=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},wO=function(e){return e==="money"||e==="currency"},SO=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:""})},us=function(e,t){var n=By(Wy(e),t.fraction.length),r="".concat(t.currency).concat(Hy(n,t.group,t.decimal));return Yi(r)},TO=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=Ku(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=SO(r,i,s);return m.currency=Yi("".concat(m.currency.trim()," ")),m.literal=Yi(m.literal.trim()),m},[r,i]),p=function(m){var g=us(m.target.value,d),h=cs(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=us(m,d),h=cs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l==null||l(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?us(c.defaultValue,d):void 0;return E.createElement("input",Tt({},c,{value:typeof c.value=="string"?us(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),EO=1,CO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},kO=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:""})},ds=function(e,t){var n=By(Wy(e),t.fraction.length),r="".concat(Hy(n,t.group,t.decimal)," ").concat(t.percentSign);return Yi(r)},PO=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=Ku(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Zu(E.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(ds(y,d))},[a.value]);var d=E.useMemo(function(){var v=kO(r);return v.percentSign=Yi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-EO,f=function(v){var y,x=s.current;x&&(x.setSelectionRange(p,p),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},m=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,T=y.selectionEnd,w=x!==T,S=p<x;!w&&S&&f()}i==null||i(v)},g=function(v){var y=ds(v.target.value,d),x=cs(y);u(y),v.target.value=y,v.target.setAttribute("data-number",x.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=ds(v,d),x=cs(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o==null||o(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var h=a.defaultValue?ds(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"}))}),Gi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},AO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=fs[i];a===void 0?r.push(i.replace(Gi.dots,"\\.").replace(Gi.openParenthesis,"\\(").replace(Gi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Gi.leadingBars,"\\")},Ki=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Qu(o,n);var i=AO(o);return n?"^".concat(i,"$"):i},_O=function(e){return e.replace(Gi.escape,"\\$&")},Qu=function(e,t){var n=e.map(function(r){return typeof r=="string"?_O(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fs={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]/}},IO=/\d/,qy="(dd) 9dddd-dddd",Uy="(dd) dddd-dddd",Yy="ddd.ddd.ddd-dd",Gy="dd.ddd.ddd/dddd-dd",ps=function(e){return e.replace(/\D/g,"")},OO=["2",/[0-3]/,":",/[0-5]/,/\d/],MO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Yt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Yy,isoDate:"dddd-dd-dd",cnpj:Gy,telephone:Uy,cellphone:qy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ps(e).length<=11?Yy:Gy},int:function(e){return e===void 0&&(e=""),IO.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=ps(e);return t.length<11?Uy:qy},time:function(e){var t=ps(e),n=t[0];return n==="2"?OO:MO}},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:Ki(e,"",!0),infinity:n.infinity},n)},jt={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:ps}),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 Ky(e,t,n,r){var o,i;r===void 0&&(r=fs);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 Zy=function(e){return e},DO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ki(e,n,t));return r.test(n)};function NO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var FO=E.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Ku(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=Xu(s),h=Xu(d),v=Xu(u),y=E.useRef(DO(u,i,f.value||f.defaultValue)),x=p??"input",T=Zu(E.useState(""),2),w=T[0],S=T[1],C=NO(w),P=E.useCallback(function(O,N){var V,F,z=(V=O??N)!==null&&V!==void 0?V:"";if(u===void 0)return z;var D=(F=z==null?void 0:z.toString())!==null&&F!==void 0?F:"";return Ky(D,typeof u=="function"?u(D):u,a??Zy,c??fs)},[a,u,c]),I=Zu(E.useState(function(){return P(f.value,f.defaultValue)}),2),_=I[0],M=I[1],L=P(f.defaultValue,f.defaultValue),$=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(_);return Array.isArray(O)?Qu(O,i):Ki(u,_,i)}return typeof u=="string"?Ki(u,_,i):Qu(u,i)},[l,_,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=P(f.value,f.defaultValue);M(O),m.current!==null&&(m.current.value=O)}},[f.value,u,a,f.defaultValue]);var A=function(O){var N,V,F,z,D,R=O.currentTarget,J=O.target.value;if(v.current===void 0)return M(J),(N=h.current)===null||N===void 0||N.call(h,J),(V=g.current)===null||V===void 0||V.call(g,O),d==null?void 0:d(J);var te=new RegExp(Ki(v.current,J,i)),ee=(F=R.selectionEnd)!==null&&F!==void 0?F:0,Z=function(G,ae,B){if(G.type!=="number")return G.setSelectionRange(ae,B)};if(r&&y.current&&J.length>=_.length)return R.value=_,Z(R,ee-1,ee-1);var U=!1;J.length<C.length&&(y.current=!1,U=!0),te.test(J)&&(y.current=!0);var Y=ee,j=J[Y-1],W=Ky(J,typeof v.current=="function"?v.current(J):v.current,a??Zy,c??fs);for(R.value=W,M(W);Y<W.length&&W.charAt(Y-1)!==j;)Y+=1;U?Z(R,ee,ee):Z(R,Y,Y),O.target.value=W,S(W),(z=h.current)===null||z===void 0||z.call(h,W),(D=g.current)===null||D===void 0||D.call(g,O)};return E.createElement(x,Tt({},f,{ref:m,pattern:$,onChange:A,defaultValue:Xy(f.defaultValue)?L:void 0,value:Xy(f.value)?P(f.value,f.value):f.value}))}),Xy=function(e){return typeof e=="string"},Qy=E.forwardRef(function(e,t){return wO(e.mask)?E.createElement(TO,Tt({},e,{mask:void 0,ref:t})):CO(e.mask)?E.createElement(PO,Tt({},e,{mask:void 0,ref:t})):E.createElement(FO,Tt({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(Qy,Tt({},e,t))}};Kt(jt.cellTelephone),Kt(jt.cellphone),Kt(jt.cep),Kt(jt.cnpj),Kt(jt.color),Kt(jt.cpf),Kt(jt.cpfCnpj),Kt(jt.creditCard),Kt(jt.date),Kt(jt.int),Kt(jt.isoDate),Kt(jt.telephone),Kt(jt.time),Kt(jt.uuid);var Jy=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&xO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return E.createElement(Qy,Tt({},o,{ref:n}))}),hs={exports:{}},Ju={},ms={exports:{}},ed={};/**
138
138
  * @license React
139
139
  * use-sync-external-store-shim.production.js
140
140
  *
@@ -142,7 +142,7 @@
142
142
  *
143
143
  * This source code is licensed under the MIT license found in the
144
144
  * LICENSE file in the root directory of this source tree.
145
- */var By;function lO(){if(By)return Ku;By=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(),h=r({inst:{value:f,getSnapshot:p}}),g=h[0].inst,m=h[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&m({inst:g})},[d,f,p]),o(function(){return l(g)&&m({inst:g}),d(function(){l(g)&&m({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 Ku.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ku}var Zu={};/**
145
+ */var eb;function LO(){if(eb)return ed;eb=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 ed.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ed}var td={};/**
146
146
  * @license React
147
147
  * use-sync-external-store-shim.development.js
148
148
  *
@@ -150,7 +150,7 @@
150
150
  *
151
151
  * This source code is licensed under the MIT license found in the
152
152
  * LICENSE file in the root directory of this source tree.
153
- */var Hy;function cO(){return Hy||(Hy=1,process.env.NODE_ENV!=="production"&&function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){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=h();if(!d){var m=h();i(g,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:g,getSnapshot:h}});var y=m[0].inst,v=m[1];return l(function(){y.value=g,y.getSnapshot=h,n(y)&&v({inst:y})},[f,g,h]),s(function(){return n(y)&&v({inst:y}),f(function(){n(y)&&v({inst:y})})},[f]),c(g),g}function n(f){var h=f.getSnapshot;f=f.value;try{var g=h();return!i(f,g)}catch{return!0}}function r(f,h){return h()}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;Zu.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())}()),Zu}var Wy;function qy(){return Wy||(Wy=1,process.env.NODE_ENV==="production"?ds.exports=lO():ds.exports=cO()),ds.exports}/**
153
+ */var tb;function VO(){return tb||(tb=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 v=h[0].inst,y=h[1];return l(function(){v.value=g,v.getSnapshot=m,n(v)&&y({inst:v})},[f,g,m]),s(function(){return n(v)&&y({inst:v}),f(function(){n(v)&&y({inst:v})})},[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;td.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())}()),td}var nb;function rb(){return nb||(nb=1,process.env.NODE_ENV==="production"?ms.exports=LO():ms.exports=VO()),ms.exports}/**
154
154
  * @license React
155
155
  * use-sync-external-store-shim/with-selector.production.js
156
156
  *
@@ -158,7 +158,7 @@
158
158
  *
159
159
  * This source code is licensed under the MIT license found in the
160
160
  * LICENSE file in the root directory of this source tree.
161
- */var Uy;function uO(){if(Uy)return Yu;Uy=1;var e=E,t=qy();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 Yu.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(w){if(!v){if(v=!0,b=w,w=p(w),f!==void 0&&g.hasValue){var C=g.value;if(f(C,w))return S=C}return S=w}if(C=S,r(b,w))return C;var k=p(w);return f!==void 0&&f(C,k)?(b=w,C):(b=w,S=k)}var v=!1,b,S,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},Yu}var Xu={};/**
161
+ */var ob;function jO(){if(ob)return Ju;ob=1;var e=E,t=rb();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 Ju.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,x=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(x,S))return C;var P=p(S);return f!==void 0&&f(C,P)?(x=S,C):(x=S,T=P)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Ju}var nd={};/**
162
162
  * @license React
163
163
  * use-sync-external-store-shim/with-selector.development.js
164
164
  *
@@ -166,32 +166,32 @@
166
166
  *
167
167
  * This source code is licensed under the MIT license found in the
168
168
  * LICENSE file in the root directory of this source tree.
169
- */var Gy;function dO(){return Gy||(Gy=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=qy(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Xu.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(w){if(!v){if(v=!0,b=w,w=p(w),f!==void 0&&g.hasValue){var C=g.value;if(f(C,w))return S=C}return S=w}if(C=S,r(b,w))return C;var k=p(w);return f!==void 0&&f(C,k)?(b=w,C):(b=w,S=k)}var v=!1,b,S,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Xu}var Yy;function fO(){return Yy||(Yy=1,process.env.NODE_ENV==="production"?us.exports=uO():us.exports=dO()),us.exports}fO();var Fo=function(){return Fo=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},Fo.apply(this,arguments)};function Ui(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Ky(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 Lo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},pO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},hO=function(e){return Object.entries(e)},Zy=function(e){return e instanceof Promise},Xy=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)},Fo(Fo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},mO=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,Ky([],Ui(a),!1)),u=function(d,p){return n(function(f){return Xy(d,f,i,p)})};return Zy(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))}},gO=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,Ky([],Ui(a),!1)),c=function(u){return n(function(d){return Xy(u,d,i,o.current)})};return Zy(l)?l.then(function(u){return c(u)}):c(l)}},Qu=function(e,t,n){var r,o,i,a=Ui(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Lo(s),u=Lo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Lo(t),p=Lo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Lo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),g=pO(s),m=Lo(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(T){T(s,g,S)})}},[s,p,g]);var v=Ui(E.useState(function(){var S=function(){return u.current},T=d.current({props:S,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return hO(T).reduce(function(w,C){var k,I=Ui(C,2),A=I[0],N=I[1];return Fo(Fo({},w),(k={},k[A]=n!=null&&n.debug?mO(A,N,l,S,y,f.current):gO(A,N,l,S,y,f.current),k))},{})}),1),b=v[0];return[s,b,u.current]};const vO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function yO(e,t){return E.useRef(vO(e,t)).current}const fs={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(jr(a,t,n,s))},[]),Qy=(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]:Qy(a,t,n,s)}},{}),Jy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ps=(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)},bO={default:e=>ps(e,{result:Jy.default}),dark:e=>ps(e,{result:Jy.dark})},Gi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},xO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Ju=(e,t)=>{const n=jr(e.colors,Gi(t==null?void 0:t.colors)),r=jr(e.spacing,Gi(t==null?void 0:t.spacing)),o=jr(e.rounded,Gi(t==null?void 0:t.rounded)),i=jr(e.zIndex,Gi((t==null?void 0:t.zIndex)??xO)),a=e.custom?jr(e.custom,Gi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},wO=(e,t)=>ps(Ju(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),TO=(e,t)=>Ju(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),SO=(e,t)=>ps(Ju(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hs={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},ms={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},Vo=E.createContext({tweaks:ms,parser:fs.hsla,map:hs,locale:void 0}),ed=e=>{const t=E.useContext(Vo);if(e)return e;if(t)return t.locale||e};function EO(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 Ot=()=>{const e=E.useContext(Vo);return e?e.map:hs},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),Yi=()=>{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,`${cn(t,4)+cn(n,3)}-${cn(r[0])+cn(r[1])}-${cn(r[2])+cn(r[3])}-${cn(r[4])+cn(r[5])}-${cn(r[6])+cn(r[7])+cn(r[8])+cn(r[9])}`},eb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),tb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},td=(e,t)=>{const n=eb(t,tb.basic,e)||eb(t,tb.extend,e);return n===void 0||n===e?void 0:n},Rr=()=>typeof window>"u",nd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),nb=(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},CO=e=>!e,rd=()=>{},rb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},kO={type:"spring",bounce:.3,duration:.6},ob=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),ib={enter:ob(1),exit:ob(-1),middle:{x:"0%",opacity:1}},ab={exit:{visibility:"hidden"}},PO=e=>{const t=Pn(my(e));return hy({start:t,end:Oo(t,{days:41})})},sb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),AO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=my(new Date(1970,o,1).setMonth(o)),a=sb(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),od={ArrowLeft:(e,t)=>t==="days"?Bi(e,{days:1}):Bi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Oo(e,{days:1}):Oo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Bi(e,{weeks:1}):Bi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Oo(e,{weeks:1}):Oo(e,{years:1})},lb=(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)},$r=e=>e.getFullYear().toString().padStart(4,"0"),_O=(e,t,n)=>e===void 0||n===void 0?!1:B_(t,e)&&H_(t,n),IO=e=>{var n;const t=Ot();return x.jsx(ft.tbody,{layout:!0,variants:ib,custom:e.direction,onKeyDown:e.onKeyDown,className:je((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=ct.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return x.jsx("tr",{className:i,children:r.map(c=>{var y,v,b,S,T,w,C,k,I,A,N,L,R,P,O,D,j,F;const u=c.toISOString(),d=e.rangeMode?u===((v=(y=e.range)==null?void 0:y.to)==null?void 0:v.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((T=e.date)==null?void 0:T.toISOString()),p=zI(c)&&e.markToday,f=((w=e.disabledDate)==null?void 0:w.call(e,c))||!1,h=$I(c,e.stateDate),g=!h||f,m=e.rangeMode?_O((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return x.jsxs("td",{align:"center",className:je("relative",ct.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(N=e.styles)==null?void 0:N.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:je(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",ct.function((L=e.styles)==null?void 0:L.day)?(R=e.styles)==null?void 0:R.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((j=e.stateRange.to)==null?void 0:j.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},OO=()=>Do(new Date),cb=({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(Yi()),h=Ot(),g=ed(o),m=E.useRef(null),{date:y,range:v}=p,b=y||new Date,S=E.useRef(null),[T,w]=Qu({date:b,isAnimating:!1,year:$r(b),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:AO(f.current,b,g),selectMode:l?"from":void 0,week:hy({start:Pn(b),end:KA(b)})},P=>({onChangeYear:O=>({year:O}),onExitComplete:()=>(lb(S.current||null,m,P.state().date,200),S.current=null,{isAnimating:!1}),date:O=>{const D=O(P.state().date);return{date:D,year:$r(D)}},nextMonth:O=>{O&&(S.current=O.currentTarget);const D=P.state();if(D.isAnimating)return D;const j=Oo(D.date,{months:1});return{date:j,isAnimating:!0,direction:1,year:$r(j)}},previousMonth:O=>{O&&(S.current=O.currentTarget);const D=P.state();if(D.isAnimating)return D;const j=Bi(D.date,{months:1});return{date:j,isAnimating:!0,direction:-1,year:$r(j)}},onSelectDate:O=>{const D=P.state(),j=O.currentTarget.dataset.range==="true",F=O.currentTarget.dataset.date||"",z=new Date(F);return{date:z,year:$r(z),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:j?{from:D.selectMode==="from"?z:D.range.from,to:D.selectMode==="to"?z:D.range.to}:D.range}},onChangeMonth:O=>{const D=O.target.value,F=Array.from(O.target.options).find(M=>M.value===D),z=P.state();if(F){const M=F.dataset.index||"",$=new Date(P.state().date);return $.setMonth(+M),{...z,date:$,year:$r($)}}return z},onKeyDown:O=>{const D=O.key,j=P.state();if(D in od){(D==="ArrowUp"||D==="ArrowDown")&&O.preventDefault();const F=P.state().date,z=ct.keyof(od,D)?od[D](F,O.shiftKey?"month":"days"):null;if(z!==null)return lb(O.target,m,z),{...j,date:z,year:$r(z)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,O,D)=>{var F,z;return(D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&((z=(F=D.props).onChangeMonth)==null||z.call(F,P.date)),P},(P,O,D)=>{var F,z;return D.method==="onChangeYear"&&((z=(F=D.props).onChangeYear)==null||z.call(F,P.date)),P},(P,O,D)=>{const j=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&j&&t?(c==null||c(P.range),P):(j&&t&&(c==null||c(P.date)),P)}]}),C=PO(T.date),k=nb(C,7),I=T.date.toISOString(),A=sb(T.date,g);E.useEffect(()=>{t||c==null||c(T.date)},[I,t]);const N=yO(P=>w.date(O=>HI(new Date(O),+P)),1200),L=P=>{const O=P.currentTarget.value;w.onChangeYear(O),s==null||s(new Date(O)),N(O)},R=EO((P,O)=>(P.preventDefault(),O==="right"?w.previousMonth():w.nextMonth()),10);return x.jsx(kS,{transition:kO,children:x.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:R.onTouchEnd,onTouchStart:R.onTouchStart,className:je("relative overflow-hidden",ct.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Jn,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:w.onExitComplete,children:x.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:ab,onClick:w.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(CA,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:ib,custom:T.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:w.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),x.jsx(zy,{mask:"int",maxLength:4,placeholder:"YYYY",value:T.year,onChange:L,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:ab,onClick:w.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(Lu,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:T.week.map(P=>x.jsx("th",{role:"columnheader",className:je("py-2 text-sm font-medium capitalize",ct.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),x.jsx(IO,{zip:k,range:v,styles:u,date:y||null,dispatch:w,markRange:d,markToday:i,rangeMode:l,stateDate:T.date,labelRange:n,stateRange:T.range,RenderOnDay:e,direction:T.direction,disabledDate:r,onKeyDown:w.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>w.date(OO),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},ub=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(on,{...s,as:r,"data-componen":"card",className:je("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:je("mb-2 w-full border-b border-card-border lg:px-8 px-4 pb-4 text-xl font-medium",n),children:t}):i,x.jsx("div",{className:je("min-w-full lg:px-8 px-4",a),children:e})]}),db=e=>{const t=e.Icon??iy,n=Ot();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function fb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=fb(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():fb(e[o],null)}}}}function zr(...e){return _.useCallback(pb(...e),e)}function hb(e,t=[]){let n=[];function r(i,a){const s=_.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...h}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,m=_.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:m,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,h=_.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>_.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,MO(o,...t)]}function MO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var jo=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(NO);if(i){const a=i.props.children,s=o.map(l=>l===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:l);return x.jsx(id,{...r,ref:t,children:_.isValidElement(a)?_.cloneElement(a,void 0,s):null})}return x.jsx(id,{...r,ref:t,children:n})});jo.displayName="Slot";var id=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const o=LO(n),i=FO(r,n.props);return n.type!==_.Fragment&&(i.ref=t?pb(t,o):o),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});id.displayName="SlotClone";var DO=({children:e})=>x.jsx(x.Fragment,{children:e});function NO(e){return _.isValidElement(e)&&e.type===DO}function FO(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function LO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function VO(e){const t=e+"CollectionProvider",[n,r]=hb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:g}=f,m=E.useRef(null),y=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:y,collectionRef:m,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:g,children:m}=f,y=i(s,g),v=zr(h,y.collectionRef);return x.jsx(jo,{ref:v,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:g,children:m,...y}=f,v=E.useRef(null),b=zr(h,v),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(v,{ref:v,...y}),()=>void S.itemMap.delete(v))),x.jsx(jo,{[u]:"",ref:b,children:m})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,T)=>y.indexOf(S.ref.current)-y.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var jO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=jO.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?jo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mb(e,t){e&&Aa.flushSync(()=>e.dispatchEvent(t))}function Wn(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function RO(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e);_.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var $O="DismissableLayer",ad="dismissableLayer.update",zO="dismissableLayer.pointerDownOutside",BO="dismissableLayer.focusOutside",gb,vb=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yb=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=_.useContext(vb),[u,d]=_.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=_.useState({}),h=zr(t,C=>d(C)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(m),v=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,T=WO(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),w=qO(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 RO(C=>{v===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),_.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(gb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),xb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=gb)}},[u,p,n,c]),_.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),xb())},[u,c]),_.useEffect(()=>{const C=()=>f({});return document.addEventListener(ad,C),()=>document.removeEventListener(ad,C)},[]),x.jsx(In.div,{...l,ref:h,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,T.onPointerDownCapture)})});yb.displayName=$O;var HO="DismissableLayerBranch",bb=_.forwardRef((e,t)=>{const n=_.useContext(vb),r=_.useRef(null),o=zr(t,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(In.div,{...e,ref:o})});bb.displayName=HO;function WO(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){wb(zO,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 qO(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!r.current&&wb(BO,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 xb(){const e=new CustomEvent(ad);document.dispatchEvent(e)}function wb(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?mb(o,i):o.dispatchEvent(i)}var UO=yb,GO=bb,gs=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},YO="Portal",Tb=_.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=_.useState(!1);gs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?vi.createPortal(x.jsx(In.div,{...r,ref:t}),a):null});Tb.displayName=YO;function KO(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var Sb=e=>{const{present:t,children:n}=e,r=ZO(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=zr(r.ref,XO(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};Sb.displayName="Presence";function ZO(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),a=e?"mounted":"unmounted",[s,l]=KO(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=vs(r.current);i.current=s==="mounted"?c:"none"},[s]),gs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=vs(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]),gs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=vs(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=vs(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:_.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function vs(e){return(e==null?void 0:e.animationName)||"none"}function XO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function QO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=JO({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Wn(n),l=_.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function JO({defaultProp:e,onChange:t}){const n=_.useState(e),[r]=n,o=_.useRef(r),i=Wn(t);return _.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var eM="VisuallyHidden",sd=_.forwardRef((e,t)=>x.jsx(In.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));sd.displayName=eM;var ld="ToastProvider",[cd,tM,nM]=VO("Toast"),[Eb,DR]=hb("Toast",[nM]),[rM,ys]=Eb(ld),Cb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=_.useState(null),[c,u]=_.useState(0),d=_.useRef(!1),p=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ld}\`. Expected non-empty \`string\`.`),x.jsx(cd.Provider,{scope:t,children:x.jsx(rM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:_.useCallback(()=>u(f=>f+1),[]),onToastRemove:_.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Cb.displayName=ld;var kb="ToastViewport",oM=["F8"],ud="toast.viewportPause",dd="toast.viewportResume",Pb=_.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=oM,label:o="Notifications ({hotkey})",...i}=e,a=ys(kb,n),s=tM(n),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=zr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;_.useEffect(()=>{const m=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),_.useEffect(()=>{const m=l.current,y=d.current;if(h&&m&&y){const v=()=>{if(!a.isClosePausedRef.current){const w=new CustomEvent(ud);y.dispatchEvent(w),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const w=new CustomEvent(dd);y.dispatchEvent(w),a.isClosePausedRef.current=!1}},S=w=>{!m.contains(w.relatedTarget)&&b()},T=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",v),m.addEventListener("focusout",S),m.addEventListener("pointermove",v),m.addEventListener("pointerleave",T),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",v),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",v),m.removeEventListener("pointerleave",T),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const g=_.useCallback(({tabbingDirection:m})=>{const v=s().map(b=>{const S=b.ref.current,T=[S,...yM(S)];return m==="forwards"?T:T.reverse()});return(m==="forwards"?v.reverse():v).flat()},[s]);return _.useEffect(()=>{const m=d.current;if(m){const y=v=>{var T,w,C;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const k=document.activeElement,I=v.shiftKey;if(v.target===m&&I){(T=c.current)==null||T.focus();return}const L=g({tabbingDirection:I?"backwards":"forwards"}),R=L.findIndex(P=>P===k);hd(L.slice(R+1))?v.preventDefault():I?(w=c.current)==null||w.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[s,g]),x.jsxs(GO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&x.jsx(fd,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});hd(m)}}),x.jsx(cd.Slot,{scope:n,children:x.jsx(In.ol,{tabIndex:-1,...i,ref:p})}),h&&x.jsx(fd,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});hd(m)}})]})});Pb.displayName=kb;var Ab="ToastFocusProxy",fd=_.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=ys(Ab,n);return x.jsx(sd,{"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()}})});fd.displayName=Ab;var bs="Toast",iM="toast.swipeStart",aM="toast.swipeMove",sM="toast.swipeCancel",lM="toast.swipeEnd",_b=_.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=QO({prop:r,defaultProp:o,onChange:i});return x.jsx(Sb,{present:n||s,children:x.jsx(dM,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wn(e.onPause),onResume:Wn(e.onResume),onSwipeStart:Xt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(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:Xt(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:Xt(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)})})})});_b.displayName=bs;var[cM,uM]=Eb(bs,{onClose(){}}),dM=_.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,...h}=e,g=ys(bs,n),[m,y]=_.useState(null),v=zr(t,P=>y(P)),b=_.useRef(null),S=_.useRef(null),T=o||g.duration,w=_.useRef(0),C=_.useRef(T),k=_.useRef(0),{onToastAdd:I,onToastRemove:A}=g,N=Wn(()=>{var O;(m==null?void 0:m.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),L=_.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),w.current=new Date().getTime(),k.current=window.setTimeout(N,P))},[N]);_.useEffect(()=>{const P=g.viewport;if(P){const O=()=>{L(C.current),c==null||c()},D=()=>{const j=new Date().getTime()-w.current;C.current=C.current-j,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(ud,D),P.addEventListener(dd,O),()=>{P.removeEventListener(ud,D),P.removeEventListener(dd,O)}}},[g.viewport,T,l,c,L]),_.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(T)},[i,T,g.isClosePausedRef,L]),_.useEffect(()=>(I(),()=>A()),[I,A]);const R=_.useMemo(()=>m?Fb(m):null,[m]);return g.viewport?x.jsxs(x.Fragment,{children:[R&&x.jsx(fM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:R}),x.jsx(cM,{scope:n,onClose:N,children:Aa.createPortal(x.jsx(cd.ItemSlot,{scope:n,children:x.jsx(UO,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||N(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(In.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:Xt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Xt(e.onPointerMove,P=>{if(!b.current)return;const O=P.clientX-b.current.x,D=P.clientY-b.current.y,j=!!S.current,F=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=F?z(0,O):0,$=F?0:z(0,D),J=P.pointerType==="touch"?10:2,te={x:M,y:$},ee={originalEvent:P,delta:te};j?(S.current=te,xs(aM,d,ee,{discrete:!1})):Lb(te,g.swipeDirection,J)?(S.current=te,xs(iM,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>J||Math.abs(D)>J)&&(b.current=null)}),onPointerUp:Xt(e.onPointerUp,P=>{const O=S.current,D=P.target;if(D.hasPointerCapture(P.pointerId)&&D.releasePointerCapture(P.pointerId),S.current=null,b.current=null,O){const j=P.currentTarget,F={originalEvent:P,delta:O};Lb(O,g.swipeDirection,g.swipeThreshold)?xs(lM,f,F,{discrete:!0}):xs(sM,p,F,{discrete:!0}),j.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),fM=e=>{const{__scopeToast:t,children:n,...r}=e,o=ys(bs,t),[i,a]=_.useState(!1),[s,l]=_.useState(!1);return gM(()=>a(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(Tb,{asChild:!0,children:x.jsx(sd,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},pM="ToastTitle",Ib=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(In.div,{...r,ref:t})});Ib.displayName=pM;var hM="ToastDescription",Ob=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(In.div,{...r,ref:t})});Ob.displayName=hM;var Mb="ToastAction",mM=_.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Nb,{altText:n,asChild:!0,children:x.jsx(pd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Mb}\`. Expected non-empty \`string\`.`),null)});mM.displayName=Mb;var Db="ToastClose",pd=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=uM(Db,n);return x.jsx(Nb,{asChild:!0,children:x.jsx(In.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});pd.displayName=Db;var Nb=_.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(In.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Fb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),vM(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(...Fb(r))}}),t}function xs(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?mb(o,i):o.dispatchEvent(i)}var Lb=(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 gM(e=()=>{}){const t=Wn(e);gs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function vM(e){return e.nodeType===e.ELEMENT_NODE}function yM(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 hd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var bM=Cb,xM=Pb,wM=_b,TM=Ib,SM=Ob,EM=pd;const CM=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},kM=co("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),Vb=E.createContext(()=>{throw new Error("Not implemented")}),PM=()=>E.useContext(Vb),jb={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]}},AM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=kM({theme:t.theme||"default"});return x.jsx(wM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.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:jb[t.reversedIndex]||jb.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(TM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(SM,{className:"select-text truncate",children:t.text})]}),r?x.jsx(EM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(es,{className:"h-5 w-5"})}):null]})})})});function _M({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=CM(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 h=[...f,{...u,id:d,text:c}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return x.jsxs(bM,{duration:n,swipeThreshold:150,children:[x.jsx(Vb.Provider,{value:l,children:e}),x.jsx(Jn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(AM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(xM,{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 IM=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:je("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Rb=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},$b=E.createContext(""),OM=e=>{const[t,n]=Rb(e.active),r=_o(0),o=_o(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=h=>{if(!h)return;const g=h.getBoundingClientRect();o.set(g.width),r.set(h.offsetLeft)},d=()=>{const h=c.querySelector("li[data-active=true]");return void u(h)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const h=p.getAttribute("data-id")||"";n(h)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=go(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx($b.Provider,{value:t,children:x.jsx(ub,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:x.jsx(on,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},MM=()=>E.useContext($b),DM=e=>{const t=MM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},ws=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});ws.Icon=function(t){return x.jsx("header",{...t,className:je("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},ws.Body=function(t){return x.jsx(on,{...t,className:je("min-w-0 flex-1",t.className),children:t.children})},ws.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(on,{...t,type:"button"})})};const NM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function Ts(){return typeof window<"u"}function or(e){return zb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qn(e){var t;return(t=(zb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zb(e){return Ts()?e instanceof Node||e instanceof Ht(e).Node:!1}function Je(e){return Ts()?e instanceof Element||e instanceof Ht(e).Element:!1}function Et(e){return Ts()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function md(e){return!Ts()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function FM(e){return["table","td","th"].includes(or(e))}function Ss(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gd(e){const t=vd(),n=Je(e)?Qt(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 LM(e){let t=Un(e);for(;Et(t)&&!ir(t);){if(gd(t))return t;if(Ss(t))return null;t=Un(t)}return null}function vd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(or(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function Es(e){return Je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||md(e)&&e.host||qn(e);return md(t)?t.host:t}function Bb(e){const t=Un(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Ki(t)?t:Bb(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=yd(a);return t.concat(a,a.visualViewport||[],Ki(o)?o:[],s&&n?ar(s):[])}return t.concat(o,ar(o,[],n))}function yd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yt(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 Hb(){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 Wb(e){return e.mozInputSource===0&&e.isTrusted?!0:Td()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xd(e){return VM()?!1:!Td()&&e.width===0&&e.height===0||Td()&&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 Td(){const e=/android/i;return e.test(bd())||e.test(Hb())}function qb(){return bd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function VM(){return Hb().includes("jsdom/")}function Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function jM(e){return"nativeEvent"in e}function RM(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function Sd(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 On(e){return"composedPath"in e?e.composedPath()[0]:e.target}const $M="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ed(e){return Et(e)&&e.matches($M)}function Nt(e){e.preventDefault(),e.stopPropagation()}function Ub(e){return e?e.getAttribute("role")==="combobox"&&Ed(e):!1}const Mn=Math.min,Jt=Math.max,Cs=Math.round,$o=Math.floor,sr=e=>({x:e,y:e}),zM={left:"right",right:"left",bottom:"top",top:"bottom"},BM={start:"end",end:"start"};function Cd(e,t,n){return Jt(e,Mn(t,n))}function zo(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function Gb(e){return e==="x"?"y":"x"}function kd(e){return e==="y"?"height":"width"}function Br(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Pd(e){return Gb(Br(e))}function HM(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Pd(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=ks(a)),[a,ks(a)]}function WM(e){const t=ks(e);return[Ad(e),t,Ad(t)]}function Ad(e){return e.replace(/start|end/g,t=>BM[t])}function qM(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 UM(e,t,n,r){const o=Bo(e);let i=qM(lr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ad)))),i}function ks(e){return e.replace(/left|right|bottom|top/g,t=>zM[t])}function GM(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yb(e){return typeof e!="number"?GM(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}}/*!
169
+ */var ib;function $O(){return ib||(ib=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=rb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;nd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,x=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(x,S))return C;var P=p(S);return f!==void 0&&f(C,P)?(x=S,C):(x=S,T=P)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,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())}()),nd}var ab;function RO(){return ab||(ab=1,process.env.NODE_ENV==="production"?hs.exports=jO():hs.exports=$O()),hs.exports}RO();var Lo=function(){return Lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lo.apply(this,arguments)};function Zi(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 sb(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 Vo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},zO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},BO=function(e){return Object.entries(e)},lb=function(e){return e instanceof Promise},cb=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Lo(Lo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},HO=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,sb([],Zi(a),!1)),u=function(d,p){return n(function(f){return cb(d,f,i,p)})};return lb(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},WO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,sb([],Zi(a),!1)),c=function(u){return n(function(d){return cb(u,d,i,o.current)})};return lb(l)?l.then(function(u){return c(u)}):c(l)}},rd=function(e,t,n){var r,o,i,a=Zi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Vo(s),u=Vo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Vo(t),p=Vo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Vo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=zO(s),h=Vo(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=Zi(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return BO(w).reduce(function(S,C){var P,I=Zi(C,2),_=I[0],M=I[1];return Lo(Lo({},S),(P={},P[_]=n!=null&&n.debug?HO(_,M,l,T,v,f.current):WO(_,M,l,T,v,f.current),P))},{})}),1),x=y[0];return[s,x,u.current]};const qO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function UO(e,t){return E.useRef(qO(e,t)).current}const gs={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(jr(a,t,n,s))},[]),ub=(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]:ub(a,t,n,s)}},{}),db={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},vs=(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)},YO={default:e=>vs(e,{result:db.default}),dark:e=>vs(e,{result:db.dark})},Xi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},GO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),od=(e,t)=>{const n=jr(e.colors,Xi(t==null?void 0:t.colors)),r=jr(e.spacing,Xi(t==null?void 0:t.spacing)),o=jr(e.rounded,Xi(t==null?void 0:t.rounded)),i=jr(e.zIndex,Xi((t==null?void 0:t.zIndex)??GO)),a=e.custom?jr(e.custom,Xi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},KO=(e,t)=>vs(od(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),ZO=(e,t)=>od(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),XO=(e,t)=>vs(od(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ys={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>b.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},bs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},jo=E.createContext({tweaks:bs,parser:gs.hsla,map:ys,locale:void 0}),id=e=>{const t=E.useContext(jo);if(e)return e;if(t)return t.locale||e};function QO(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 Ot=()=>{const e=E.useContext(jo);return e?e.map:ys},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),$o=()=>{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,`${cn(t,4)+cn(n,3)}-${cn(r[0])+cn(r[1])}-${cn(r[2])+cn(r[3])}-${cn(r[4])+cn(r[5])}-${cn(r[6])+cn(r[7])+cn(r[8])+cn(r[9])}`},fb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),pb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ad=(e,t)=>{const n=fb(t,pb.basic,e)||fb(t,pb.extend,e);return n===void 0||n===e?void 0:n},$r=()=>typeof window>"u",sd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),hb=(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},JO=e=>!e,ld=()=>{},mb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},eM={type:"spring",bounce:.3,duration:.6},gb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),vb={enter:gb(1),exit:gb(-1),middle:{x:"0%",opacity:1}},yb={exit:{visibility:"hidden"}},tM=e=>{const t=Pn(Py(e));return ky({start:t,end:Mo(t,{days:41})})},bb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),nM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Py(new Date(1970,o,1).setMonth(o)),a=bb(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),cd={ArrowLeft:(e,t)=>t==="days"?Ui(e,{days:1}):Ui(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Mo(e,{days:1}):Mo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ui(e,{weeks:1}):Ui(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Mo(e,{weeks:1}):Mo(e,{years:1})},xb=(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)},Rr=e=>e.getFullYear().toString().padStart(4,"0"),rM=(e,t,n)=>e===void 0||n===void 0?!1:gI(t,e)&&vI(t,n),oM=e=>{var n;const t=Ot();return b.jsx(ft.tbody,{layout:!0,variants:vb,custom:e.direction,onKeyDown:e.onKeyDown,className:Le((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=rt.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 b.jsx("tr",{className:i,children:r.map(c=>{var v,y,x,T,w,S,C,P,I,_,M,L,$,A,O,N,V,F;const u=c.toISOString(),d=e.rangeMode?u===((y=(v=e.range)==null?void 0:v.to)==null?void 0:y.toISOString())||u===((T=(x=e.range)==null?void 0:x.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=mO(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=hO(c,e.stateDate),g=!m||f,h=e.rangeMode?rM((C=e.range)==null?void 0:C.from,c,(P=e.range)==null?void 0:P.to):!1;return b.jsxs("td",{align:"center",className:Le("relative",rt.function((I=e.styles)==null?void 0:I.dayFrame)?(_=e.styles)==null?void 0:_.dayFrame(c):(M=e.styles)==null?void 0:M.dayFrame),children:[b.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:Le(`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":"",rt.function((L=e.styles)==null?void 0:L.day)?($=e.styles)==null?void 0:$.day(c):(A=e.styles)==null?void 0:A.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((N=e.labelRange)==null?void 0:N.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},iM=()=>No(new Date),wb=({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($o()),m=Ot(),g=id(o),h=E.useRef(null),{date:v,range:y}=p,x=v||new Date,T=E.useRef(null),[w,S]=rd({date:x,isAnimating:!1,year:Rr(x),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:nM(f.current,x,g),selectMode:l?"from":void 0,week:ky({start:Pn(x),end:T_(x)})},A=>({onChangeYear:O=>({year:O}),onExitComplete:()=>(xb(T.current||null,h,A.state().date,200),T.current=null,{isAnimating:!1}),date:O=>{const N=O(A.state().date);return{date:N,year:Rr(N)}},nextMonth:O=>{O&&(T.current=O.currentTarget);const N=A.state();if(N.isAnimating)return N;const V=Mo(N.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:Rr(V)}},previousMonth:O=>{O&&(T.current=O.currentTarget);const N=A.state();if(N.isAnimating)return N;const V=Ui(N.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:Rr(V)}},onSelectDate:O=>{const N=A.state(),V=O.currentTarget.dataset.range==="true",F=O.currentTarget.dataset.date||"",z=new Date(F);return{date:z,year:Rr(z),selectMode:N.selectMode===void 0?void 0:N.selectMode==="from"?"to":"from",range:V?{from:N.selectMode==="from"?z:N.range.from,to:N.selectMode==="to"?z:N.range.to}:N.range}},onChangeMonth:O=>{const N=O.target.value,F=Array.from(O.target.options).find(D=>D.value===N),z=A.state();if(F){const D=F.dataset.index||"",R=new Date(A.state().date);return R.setMonth(+D),{...z,date:R,year:Rr(R)}}return z},onKeyDown:O=>{const N=O.key,V=A.state();if(N in cd){(N==="ArrowUp"||N==="ArrowDown")&&O.preventDefault();const F=A.state().date,z=rt.keyof(cd,N)?cd[N](F,O.shiftKey?"month":"days"):null;if(z!==null)return xb(O.target,h,z),{...V,date:z,year:Rr(z)}}return A.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(A,O,N)=>{var F,z;return(N.method==="onChangeMonth"||N.method==="previousMonth"||N.method==="nextMonth")&&((z=(F=N.props).onChangeMonth)==null||z.call(F,A.date)),A},(A,O,N)=>{var F,z;return N.method==="onChangeYear"&&((z=(F=N.props).onChangeYear)==null||z.call(F,A.date)),A},(A,O,N)=>{const V=N.method==="onSelectDate"||N.method==="setToday"||N.method==="onKeyDown";return l&&V&&t?(c==null||c(A.range),A):(V&&t&&(c==null||c(A.date)),A)}]}),C=tM(w.date),P=hb(C,7),I=w.date.toISOString(),_=bb(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const M=UO(A=>S.date(O=>vO(new Date(O),+A)),1200),L=A=>{const O=A.currentTarget.value;S.onChangeYear(O),s==null||s(new Date(O)),M(O)},$=QO((A,O)=>(A.preventDefault(),O==="right"?S.previousMonth():S.nextMonth()),10);return b.jsx(eE,{transition:eM,children:b.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Le("relative overflow-hidden",rt.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(Jn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:b.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:yb,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(JA,{className:"h-4 w-4"})}),b.jsx(ft.span,{layout:!0,variants:vb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{value:_,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),b.jsx(Jy,{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"})]})}),b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:yb,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(zu,{className:"h-4 w-4"})}),b.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%)"}})]}),b.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:w.week.map(A=>b.jsx("th",{role:"columnheader",className:Le("py-2 text-sm font-medium capitalize",rt.function(u==null?void 0:u.weekDay)?u.weekDay(A):u==null?void 0:u.weekDay),children:A.toLocaleDateString(g,{weekday:"short"})},A.toString()))})}),b.jsx(oM,{zip:P,range:y,styles:u,date:v||null,dispatch:S,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},_)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>S.date(iM),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},ud=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(on,{...s,as:r,"data-componen":"card",className:Le("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{className:Le("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,b.jsx("div",{className:Le("min-w-full px-4 lg:px-8",a),children:e})]});ud.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return b.jsxs(i,{...o,className:Le("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[b.jsx(a,{className:"font-semibold",children:o.title}),r?b.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??vy,n=Ot();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Tb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Eb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Tb(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():Tb(e[o],null)}}}}function zr(...e){return k.useCallback(Eb(...e),e)}function Cb(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,aM(o,...t)]}function aM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ro=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(lM);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return b.jsx(dd,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return b.jsx(dd,{...r,ref:t,children:n})});Ro.displayName="Slot";var dd=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=uM(n),i=cM(r,n.props);return n.type!==k.Fragment&&(i.ref=t?Eb(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});dd.displayName="SlotClone";var sM=({children:e})=>b.jsx(b.Fragment,{children:e});function lM(e){return k.isValidElement(e)&&e.type===sM}function cM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function 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)}function dM(e){const t=e+"CollectionProvider",[n,r]=Cb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return b.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),y=zr(m,v.collectionRef);return b.jsx(Ro,{ref:y,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,y=E.useRef(null),x=zr(m,y),T=i(c,g);return E.useEffect(()=>(T.itemMap.set(y,{ref:y,...v}),()=>void T.itemMap.delete(y))),b.jsx(Ro,{[u]:"",ref:x,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>v.indexOf(T.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var fM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=fM.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ro:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kb(e,t){e&&Oa.flushSync(()=>e.dispatchEvent(t))}function Wn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function pM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hM="DismissableLayer",fd="dismissableLayer.update",mM="dismissableLayer.pointerDownOutside",gM="dismissableLayer.focusOutside",Pb,Ab=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_b=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(Ab),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=zr(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=yM(C=>{const P=C.target,I=[...c.branches].some(_=>_.contains(P));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=bM(C=>{const P=C.target;[...c.branches].some(_=>_.contains(P))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return pM(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Pb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ob(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Pb)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ob())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(fd,C),()=>document.removeEventListener(fd,C)},[]),b.jsx(In.div,{...l,ref:m,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});_b.displayName=hM;var vM="DismissableLayerBranch",Ib=k.forwardRef((e,t)=>{const n=k.useContext(Ab),r=k.useRef(null),o=zr(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(In.div,{...e,ref:o})});Ib.displayName=vM;function yM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Mb(mM,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 bM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mb(gM,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 Ob(){const e=new CustomEvent(fd);document.dispatchEvent(e)}function Mb(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?kb(o,i):o.dispatchEvent(i)}var xM=_b,wM=Ib,xs=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},SM="Portal",Db=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(b.jsx(In.div,{...r,ref:t}),a):null});Db.displayName=SM;function TM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Nb=e=>{const{present:t,children:n}=e,r=EM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=zr(r.ref,CM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Nb.displayName="Presence";function EM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=TM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=ws(r.current);i.current=s==="mounted"?c:"none"},[s]),xs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ws(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]),xs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ws(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=ws(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function CM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=PM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Wn(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function PM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Wn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var AM="VisuallyHidden",pd=k.forwardRef((e,t)=>b.jsx(In.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));pd.displayName=AM;var hd="ToastProvider",[md,_M,IM]=dM("Toast"),[Fb,WR]=Cb("Toast",[IM]),[OM,Ss]=Fb(hd),Lb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hd}\`. Expected non-empty \`string\`.`),b.jsx(md.Provider,{scope:t,children:b.jsx(OM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Lb.displayName=hd;var Vb="ToastViewport",MM=["F8"],gd="toast.viewportPause",vd="toast.viewportResume",jb=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=MM,label:o="Notifications ({hotkey})",...i}=e,a=Ss(Vb,n),s=_M(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=zr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var x;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(gd);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(vd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...UM(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=y=>{var w,S,C;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const P=document.activeElement,I=y.shiftKey;if(y.target===h&&I){(w=c.current)==null||w.focus();return}const L=g({tabbingDirection:I?"backwards":"forwards"}),$=L.findIndex(A=>A===P);xd(L.slice($+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),b.jsxs(wM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&b.jsx(yd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});xd(h)}}),b.jsx(md.Slot,{scope:n,children:b.jsx(In.ol,{tabIndex:-1,...i,ref:p})}),m&&b.jsx(yd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});xd(h)}})]})});jb.displayName=Vb;var $b="ToastFocusProxy",yd=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss($b,n);return b.jsx(pd,{"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()}})});yd.displayName=$b;var Ts="Toast",DM="toast.swipeStart",NM="toast.swipeMove",FM="toast.swipeCancel",LM="toast.swipeEnd",Rb=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=kM({prop:r,defaultProp:o,onChange:i});return b.jsx(Nb,{present:n||s,children:b.jsx($M,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wn(e.onPause),onResume:Wn(e.onResume),onSwipeStart:Xt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(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:Xt(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:Xt(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)})})})});Rb.displayName=Ts;var[VM,jM]=Fb(Ts,{onClose(){}}),$M=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Ts,n),[h,v]=k.useState(null),y=zr(t,A=>v(A)),x=k.useRef(null),T=k.useRef(null),w=o||g.duration,S=k.useRef(0),C=k.useRef(w),P=k.useRef(0),{onToastAdd:I,onToastRemove:_}=g,M=Wn(()=>{var O;(h==null?void 0:h.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),L=k.useCallback(A=>{!A||A===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(M,A))},[M]);k.useEffect(()=>{const A=g.viewport;if(A){const O=()=>{L(C.current),c==null||c()},N=()=>{const V=new Date().getTime()-S.current;C.current=C.current-V,window.clearTimeout(P.current),l==null||l()};return A.addEventListener(gd,N),A.addEventListener(vd,O),()=>{A.removeEventListener(gd,N),A.removeEventListener(vd,O)}}},[g.viewport,w,l,c,L]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(w)},[i,w,g.isClosePausedRef,L]),k.useEffect(()=>(I(),()=>_()),[I,_]);const $=k.useMemo(()=>h?Ub(h):null,[h]);return g.viewport?b.jsxs(b.Fragment,{children:[$&&b.jsx(RM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),b.jsx(VM,{scope:n,onClose:M,children:Oa.createPortal(b.jsx(md.ItemSlot,{scope:n,children:b.jsx(xM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(In.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:Xt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Xt(e.onPointerMove,A=>{if(!x.current)return;const O=A.clientX-x.current.x,N=A.clientY-x.current.y,V=!!T.current,F=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=F?z(0,O):0,R=F?0:z(0,N),J=A.pointerType==="touch"?10:2,te={x:D,y:R},ee={originalEvent:A,delta:te};V?(T.current=te,Es(NM,d,ee,{discrete:!1})):Yb(te,g.swipeDirection,J)?(T.current=te,Es(DM,u,ee,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(O)>J||Math.abs(N)>J)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,A=>{const O=T.current,N=A.target;if(N.hasPointerCapture(A.pointerId)&&N.releasePointerCapture(A.pointerId),T.current=null,x.current=null,O){const V=A.currentTarget,F={originalEvent:A,delta:O};Yb(O,g.swipeDirection,g.swipeThreshold)?Es(LM,f,F,{discrete:!0}):Es(FM,p,F,{discrete:!0}),V.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),RM=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ts,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return WM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Db,{asChild:!0,children:b.jsx(pd,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},zM="ToastTitle",zb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});zb.displayName=zM;var BM="ToastDescription",Bb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});Bb.displayName=BM;var Hb="ToastAction",HM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(qb,{altText:n,asChild:!0,children:b.jsx(bd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Hb}\`. Expected non-empty \`string\`.`),null)});HM.displayName=Hb;var Wb="ToastClose",bd=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=jM(Wb,n);return b.jsx(qb,{asChild:!0,children:b.jsx(In.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});bd.displayName=Wb;var qb=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(In.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Ub(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qM(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(...Ub(r))}}),t}function Es(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?kb(o,i):o.dispatchEvent(i)}var Yb=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function WM(e=()=>{}){const t=Wn(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qM(e){return e.nodeType===e.ELEMENT_NODE}function UM(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 xd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var YM=Lb,GM=jb,KM=Rb,ZM=zb,XM=Bb,QM=bd;const JM=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},eD=uo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),Gb=E.createContext(()=>{throw new Error("Not implemented")}),tD=()=>E.useContext(Gb),Kb={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]}},nD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=eD({theme:t.theme||"default"});return b.jsx(KM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(ft.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:Kb[t.reversedIndex]||Kb.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(ZM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(XM,{className:"select-text truncate",children:t.text})]}),r?b.jsx(QM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(os,{className:"h-5 w-5"})}):null]})})})});function rD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=JM(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 b.jsxs(YM,{duration:n,swipeThreshold:150,children:[b.jsx(Gb.Provider,{value:l,children:e}),b.jsx(Jn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(nD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(GM,{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 oD=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:Le("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Zb=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Xb=E.createContext(""),iD=e=>{const[t,n]=Zb(e.active),r=Io(0),o=Io(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},d=()=>{const m=c.querySelector("li[data-active=true]");return void u(m)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const m=p.getAttribute("data-id")||"";n(m)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=vo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return b.jsx(Xb.Provider,{value:t,children:b.jsx(ud,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:b.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:b.jsx("nav",{className:"min-w-0",children:b.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return b.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:b.jsx(on,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},aD=()=>E.useContext(Xb),sD=e=>{const t=aD();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},Cs=e=>b.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[b.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),b.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Cs.Icon=function(t){return b.jsx("header",{...t,className:Le("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Cs.Body=function(t){return b.jsx(on,{...t,className:Le("min-w-0 flex-1",t.className),children:t.children})},Cs.Right=function(t){return b.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:b.jsx(on,{...t,type:"button"})})};const lD=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ks(){return typeof window<"u"}function or(e){return Qb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qn(e){var t;return(t=(Qb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qb(e){return ks()?e instanceof Node||e instanceof Ht(e).Node:!1}function Je(e){return ks()?e instanceof Element||e instanceof Ht(e).Element:!1}function Et(e){return ks()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function wd(e){return!ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cD(e){return["table","td","th"].includes(or(e))}function Ps(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sd(e){const t=Td(),n=Je(e)?Qt(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 uD(e){let t=Un(e);for(;Et(t)&&!ir(t);){if(Sd(t))return t;if(Ps(t))return null;t=Un(t)}return null}function Td(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(or(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function As(e){return Je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wd(e)&&e.host||qn(e);return wd(t)?t.host:t}function Jb(e){const t=Un(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Qi(t)?t:Jb(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Ed(a);return t.concat(a,a.visualViewport||[],Qi(o)?o:[],s&&n?ar(s):[])}return t.concat(o,ar(o,[],n))}function Ed(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Cd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ex(){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 tx(e){return e.mozInputSource===0&&e.isTrusted?!0:Ad()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kd(e){return dD()?!1:!Ad()&&e.width===0&&e.height===0||Ad()&&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 Pd(){return/apple/i.test(navigator.vendor)}function Ad(){const e=/android/i;return e.test(Cd())||e.test(ex())}function nx(){return Cd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function dD(){return ex().includes("jsdom/")}function zo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fD(e){return"nativeEvent"in e}function pD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}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 On(e){return"composedPath"in e?e.composedPath()[0]:e.target}const hD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Id(e){return Et(e)&&e.matches(hD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function rx(e){return e?e.getAttribute("role")==="combobox"&&Id(e):!1}const Mn=Math.min,Jt=Math.max,_s=Math.round,Bo=Math.floor,sr=e=>({x:e,y:e}),mD={left:"right",right:"left",bottom:"top",top:"bottom"},gD={start:"end",end:"start"};function Od(e,t,n){return Jt(e,Mn(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function ox(e){return e==="x"?"y":"x"}function Md(e){return e==="y"?"height":"width"}function Br(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Dd(e){return ox(Br(e))}function vD(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=Dd(e),i=Md(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Is(a)),[a,Is(a)]}function yD(e){const t=Is(e);return[Nd(e),t,Nd(t)]}function Nd(e){return e.replace(/start|end/g,t=>gD[t])}function bD(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 xD(e,t,n,r){const o=Wo(e);let i=bD(lr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Nd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>mD[t])}function wD(e){return{top:0,right:0,bottom:0,left:0,...e}}function ix(e){return typeof e!="number"?wD(e):{top:e,right:e,bottom:e,left:e}}function Os(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
170
170
  * tabbable 6.2.0
171
171
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
172
- */var YM=["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])"],As=YM.join(","),Kb=typeof Element>"u",Ho=Kb?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_s=!Kb&&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},Is=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},KM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ZM=function(t,n,r){if(Is(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(As));return n&&Ho.call(t,As)&&o.unshift(t),o=o.filter(r),o},XM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Is(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=Ho.call(a,As);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Is(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},Zb=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||KM(t))&&!Zb(t)?0:t.tabIndex},QM=function(t,n){var r=Xb(t);return r<0&&n&&!Zb(t)?0:r},JM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Qb=function(t){return t.tagName==="INPUT"},eD=function(t){return Qb(t)&&t.type==="hidden"},tD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},nD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},rD=function(t){if(!t.name)return!0;var n=t.form||_s(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=nD(o,t.form);return!i||i===t},oD=function(t){return Qb(t)&&t.type==="radio"},iD=function(t){return oD(t)&&!rD(t)},aD=function(t){var n,r=t&&_s(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=_s(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},Jb=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},sD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ho.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ho.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=_s(t);if(l&&!l.shadowRoot&&o(l)===!0)return Jb(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(aD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Jb(t);return!1},lD=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 Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},cD=function(t,n){return!(n.disabled||Is(n)||eD(n)||sD(n,t)||tD(n)||lD(n))},_d=function(t,n){return!(iD(n)||Xb(n)<0||!cD(t,n))},uD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},dD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=QM(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(JM).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=XM([t],n.includeContainer,{filter:_d.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:uD}):r=ZM(t,n.includeContainer,_d.bind(null,n)),dD(r)},fD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,As)===!1?!1:_d(n,t)};function ex(e,t,n){let{reference:r,floating:o}=e;const i=Br(t),a=Pd(t),s=kd(a),l=lr(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(Bo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(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}=ex(c,r,l),p=r,f={},h=0;for(let g=0;g<s.length;g++){const{name:m,fn:y}=s[g],{x:v,y:b,data:S,reset:T}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=v??u,d=b??d,f={...f,[m]:{...f[m],...S}},T&&h<=50&&(h++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(c=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=ex(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Id(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}=zo(t,e),h=Yb(f),m=s[p?d==="floating"?"reference":"floating":d],y=Ps(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=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},T=Ps(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-T.top+h.top)/S.y,bottom:(T.bottom-y.bottom+h.bottom)/S.y,left:(y.left-T.left+h.left)/S.x,right:(T.right-y.right+h.right)/S.x}}const hD=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}=zo(e,t)||{};if(c==null)return{};const d=Yb(u),p={x:n,y:r},f=Pd(o),h=kd(f),g=await a.getDimensions(c),m=f==="y",y=m?"top":"left",v=m?"bottom":"right",b=m?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[f]-p[f]-i.floating[h],T=p[f]-i.reference[f],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=w?w[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(w)))&&(C=s.floating[b]||i.floating[h]);const k=S/2-T/2,I=C/2-g[h]/2-1,A=Mn(d[y],I),N=Mn(d[v],I),L=A,R=C-g[h]-N,P=C/2-g[h]/2+k,O=Cd(L,P,R),D=!l.arrow&&Bo(o)!=null&&P!==O&&i.reference[h]/2-(P<L?A:N)-g[h]/2<0,j=D?P<L?P-L:P-R:0;return{[f]:p[f]+j,data:{[f]:O,centerOffset:P-O-j,...D&&{alignmentOffset:j}},reset:D}}}),mD=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:h="none",flipAlignment:g=!0,...m}=zo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=lr(o),v=Br(s),b=lr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(b||!g?[ks(s)]:WM(s)),w=h!=="none";!p&&w&&T.push(...UM(s,g,h,S));const C=[s,...T],k=await Id(t,m),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const P=HM(o,a,S);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var N,L;const P=(((N=i.flip)==null?void 0:N.index)||0)+1,O=C[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let D=(L=A.filter(j=>j.overflows[0]<=0).sort((j,F)=>j.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!D)switch(f){case"bestFit":{var R;const j=(R=A.filter(F=>{if(w){const z=Br(F.placement);return z===v||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:R[0];j&&(D=j);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function gD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=lr(n),s=Bo(n),l=Br(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=zo(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const vD=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 gD(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}}}}},yD=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:m=>{let{x:y,y:v}=m;return{x:y,y:v}}},...l}=zo(e,t),c={x:n,y:r},u=await Id(t,l),d=Br(lr(o)),p=Gb(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+u[m],b=f-u[y];f=Cd(v,f,b)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+u[m],b=h-u[y];h=Cd(v,h,b)}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},bD=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}=zo(e,t),l=await Id(t,s),c=lr(n),u=Bo(n),d=Br(n)==="y",{width:p,height:f}=r.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,y=p-l.left-l.right,v=Mn(f-l[h],m),b=Mn(p-l[g],y),S=!t.middlewareData.shift;let T=v,w=b;if(d?w=u||S?Mn(b,y):y:T=u||S?Mn(v,m):m,S&&!u){const k=Jt(l.left,0),I=Jt(l.right,0),A=Jt(l.top,0),N=Jt(l.bottom,0);d?w=p-2*(k!==0||I!==0?k+I:Jt(l.left,l.right)):T=f-2*(A!==0||N!==0?A+N:Jt(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:T});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function tx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Cs(n)!==i||Cs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Od(e){return Je(e)?e:e.contextElement}function Wo(e){const t=Od(e);if(!Et(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=tx(t);let a=(i?Cs(n.width):n.width)/r,s=(i?Cs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const xD=sr(0);function nx(e){const t=Ht(e);return!vd()||!t.visualViewport?xD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Od(e);let a=sr(1);t&&(r?Je(r)&&(a=Wo(r)):a=Wo(e));const s=wD(i,n,r)?nx(i):sr(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=Ht(i),f=r&&Je(r)?Ht(r):r;let h=p,g=yd(h);for(;g&&r&&f!==h;){const m=Wo(g),y=g.getBoundingClientRect(),v=Qt(g),b=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,S=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=S,h=Ht(g),g=yd(h)}}return Ps({width:u,height:d,x:l,y:c})}function TD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qn(r),s=t?Ss(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=Et(r);if((d||!d&&!i)&&((or(r)!=="body"||Ki(a))&&(l=Es(r)),Et(r))){const p=Hr(r);c=Wo(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 SD(e){return Array.from(e.getClientRects())}function rx(e){return Hr(qn(e)).left+Es(e).scrollLeft}function ED(e){const t=qn(e),n=Es(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+rx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function CD(e,t){const n=Ht(e),r=qn(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 kD(e,t){const n=Hr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?Wo(e):sr(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 ox(e,t,n){let r;if(t==="viewport")r=CD(e,n);else if(t==="document")r=ED(qn(e));else if(Je(t))r=kD(t,n);else{const o=nx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ps(r)}function ix(e,t){const n=Un(e);return n===t||!Je(n)||ir(n)?!1:Qt(n).position==="fixed"||ix(n,t)}function PD(e,t){const n=t.get(e);if(n)return n;let r=ar(e,[],!1).filter(s=>Je(s)&&or(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Un(e):e;for(;Je(a)&&!ir(a);){const s=Qt(a),l=gd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ki(a)&&!l&&ix(e,a))?r=r.filter(u=>u!==a):o=s,a=Un(a)}return t.set(e,r),r}function AD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ss(t)?[]:PD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=ox(t,u,o);return c.top=Jt(d.top,c.top),c.right=Mn(d.right,c.right),c.bottom=Mn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},ox(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _D(e){const{width:t,height:n}=tx(e);return{width:t,height:n}}function ID(e,t,n){const r=Et(t),o=qn(t),i=n==="fixed",a=Hr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((or(t)!=="body"||Ki(o))&&(s=Es(t)),r){const d=Hr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=rx(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 Qt(e).position==="static"}function ax(e,t){return!Et(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function sx(e,t){const n=Ht(e);if(Ss(e))return n;if(!Et(e)){let o=Un(e);for(;o&&!ir(o);){if(Je(o)&&!Md(o))return o;o=Un(o)}return n}let r=ax(e,t);for(;r&&FM(r)&&Md(r);)r=ax(r,t);return r&&ir(r)&&Md(r)&&!gd(r)?n:r||LM(e)||n}const OD=async function(e){const t=this.getOffsetParent||sx,n=this.getDimensions,r=await n(e.floating);return{reference:ID(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MD(e){return Qt(e).direction==="rtl"}const DD={convertOffsetParentRelativeRectToViewportRelativeRect:TD,getDocumentElement:qn,getClippingRect:AD,getOffsetParent:sx,getElementRects:OD,getClientRects:SD,getDimensions:_D,getScale:Wo,isElement:Je,isRTL:MD};function ND(e,t){let n=null,r;const o=qn(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=$o(u),h=$o(o.clientWidth-(c+d)),g=$o(o.clientHeight-(u+p)),m=$o(c),v={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Jt(0,Mn(1,l))||1};let b=!0;function S(T){const w=T[0].intersectionRatio;if(w!==l){if(!b)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return a(!0),i}function Xi(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?ar(c):[],...ar(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?ND(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.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 h,g=l?Hr(e):null;l&&m();function m(){const y=Hr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const FD=vD,LD=yD,VD=mD,jD=bD,lx=hD,RD=(e,t,n)=>{const r=new Map,o={platform:DD,...n},i={...o.platform,_c:r};return pD(e,t,{...o,platform:i})};var Os=typeof document<"u"?E.useLayoutEffect:E.useEffect;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 cx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ux(e,t){const n=cx(e);return Math.round(t*n)/n}function Dd(e){const t=_.useRef(e);return Os(()=>{t.current=e}),t}function $D(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=_.useState(r);Ms(p,r)||f(r);const[h,g]=_.useState(null),[m,y]=_.useState(null),v=_.useCallback(F=>{F!==w.current&&(w.current=F,g(F))},[]),b=_.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),S=i||h,T=a||m,w=_.useRef(null),C=_.useRef(null),k=_.useRef(u),I=l!=null,A=Dd(l),N=Dd(o),L=Dd(c),R=_.useCallback(()=>{if(!w.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};N.current&&(F.platform=N.current),RD(w.current,C.current,F).then(z=>{const M={...z,isPositioned:L.current!==!1};P.current&&!Ms(k.current,M)&&(k.current=M,Aa.flushSync(()=>{d(M)}))})},[p,t,n,N,L]);Os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const P=_.useRef(!1);Os(()=>(P.current=!0,()=>{P.current=!1}),[]),Os(()=>{if(S&&(w.current=S),T&&(C.current=T),S&&T){if(A.current)return A.current(S,T,R);R()}},[S,T,R,A,I]);const O=_.useMemo(()=>({reference:w,floating:C,setReference:v,setFloating:b}),[v,b]),D=_.useMemo(()=>({reference:S,floating:T}),[S,T]),j=_.useMemo(()=>{const F={position:n,left:0,top:0};if(!D.floating)return F;const z=ux(D.floating,u.x),M=ux(D.floating,u.y);return s?{...F,transform:"translate("+z+"px, "+M+"px)",...cx(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,s,D.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:R,refs:O,elements:D,floatingStyles:j}),[u,R,O,D,j])}const zD=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?lx({element:r.current,padding:o}).fn(n):{}:r?lx({element:r,padding:o}).fn(n):{}}}},Qi=(e,t)=>({...FD(e),options:[e,t]}),Nd=(e,t)=>({...LD(e),options:[e,t]}),Fd=(e,t)=>({...VD(e),options:[e,t]}),dx=(e,t)=>({...jD(e),options:[e,t]}),fx=(e,t)=>({...zD(e),options:[e,t]});function Ld(e){return _.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const px={..._},BD=px.useInsertionEffect||(e=>e());function Pt(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return BD(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Vd="ArrowUp",Ji="ArrowDown",qo="ArrowLeft",Uo="ArrowRight";function Ds(e,t,n){return Math.floor(e/t)!==n}function ea(e,t){return t<0||t>=e.current.length}function jd(e,t){return Rt(e,{disabledIndices:t})}function hx(e,t){return Rt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Rt(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&&Ns(a,s,o));return s}function HD(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===Vd){if(u&&Nt(n),c===-1)d=l;else if(d=Rt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,h=l-(f-p);f===p?d=l:d=f>p?h:h-i}ea(e,d)&&(d=c)}if(n.key===Ji&&(u&&Nt(n),c===-1?d=s:(d=Rt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Rt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ea(e,d)&&(d=c)),r==="both"){const p=$o(c/i);n.key===Uo&&(u&&Nt(n),c%i!==i-1?(d=Rt(e,{startingIndex:c,disabledIndices:a}),o&&Ds(d,i,p)&&(d=Rt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Rt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ds(d,i,p)&&(d=c)),n.key===qo&&(u&&Nt(n),c%i!==0?(d=Rt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ds(d,i,p)&&(d=Rt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Rt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ds(d,i,p)&&(d=c));const f=$o(l/i)===p;ea(e,d)&&(o&&f?d=n.key===qo?l:Rt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function WD(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 qD(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 UD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ns(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 mx=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(mx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():mx=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function GD(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 YD(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 gx=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function KD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=_.useState(()=>new Map),a=_.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=_.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(GD).forEach((u,d)=>{l.set(u,d)}),YD(o,l)||i(l)},[o]),_.createElement(gx.Provider,{value:_.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function vx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=_.useContext(gx),[s,l]=_.useState(null),c=_.useRef(null),u=_.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),_.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Go(){return Go=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},Go.apply(this,arguments)}let yx=!1,ZD=0;const bx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ZD++;function XD(){const[e,t]=_.useState(()=>yx?bx():void 0);return Be(()=>{e==null&&t(bx())},[]),_.useEffect(()=>{yx=!0},[]),e}const Yo=px.useId||XD;let ta;process.env.NODE_ENV!=="production"&&(ta=new Set);function Fs(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.warn(o)}}function QD(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.error(o)}}const xx=_.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,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||Fs("The `ref` prop is required for `FloatingArrow`."));const m=Yo(),[y,v]=_.useState(!1);if(Be(()=>{if(!o)return;Qt(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const b=c*2,S=b/2,T=a/2*(l/-8+1),w=s/2*l/4,[C,k]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",N=u&&k==="end"?"bottom":"top";let L=u&&k==="end"?"right":"left";u&&y&&(L=k==="end"?"left":"right");const R=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-T)+","+(s-w))+(" Q"+a/2+","+s+" "+T+","+(s-w))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return _.createElement("svg",Go({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[L]:R,[N]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...h}}),b>0&&_.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:O}),_.createElement("path",{stroke:b&&!p?g.fill:"none",d:O}),_.createElement("clipPath",{id:m},_.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+b,height:a})))});function wx(){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 Tx=_.createContext(null),Sx=_.createContext(null),ur=()=>{var e;return((e=_.useContext(Tx))==null?void 0:e.id)||null},dr=()=>_.useContext(Sx);function JD(e){const t=Yo(),n=dr(),o=ur();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function eN(e){const{children:t,id:n}=e,r=ur();return _.createElement(Tx.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function tN(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(a=>{n.current=[...n.current,a]},[]),o=_.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=_.useState(()=>wx())[0];return _.createElement(Sx.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function fr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Ex=fr("safe-polygon");function Rd(e,t,n){return n&&!Ro(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Cx(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=dr(),h=ur(),g=Ft(c),m=Ft(l),y=Ft(n),v=_.useRef(),b=_.useRef(-1),S=_.useRef(),T=_.useRef(-1),w=_.useRef(!0),C=_.useRef(!1),k=_.useRef(()=>{}),I=_.useCallback(()=>{var O;const D=(O=o.current.openEvent)==null?void 0:O.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);_.useEffect(()=>{if(!s)return;function O(D){let{open:j}=D;j||(clearTimeout(b.current),clearTimeout(T.current),w.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),_.useEffect(()=>{if(!s||!g.current||!n)return;function O(j){I()&&r(!1,j,"hover")}const D=Mt(a.floating).documentElement;return D.addEventListener("mouseleave",O),()=>{D.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const A=_.useCallback(function(O,D,j){D===void 0&&(D=!0),j===void 0&&(j="hover");const F=Rd(m.current,"close",v.current);F&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,O,j),F)):D&&(clearTimeout(b.current),r(!1,O,j))},[m,r]),N=Pt(()=>{k.current(),S.current=void 0}),L=Pt(()=>{if(C.current){const O=Mt(a.floating).body;O.style.pointerEvents="",O.removeAttribute(Ex),C.current=!1}});_.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(M){if(clearTimeout(b.current),w.current=!1,u&&!Ro(v.current)||d>0&&!Rd(m.current,"open"))return;const $=Rd(m.current,"open",v.current);$?b.current=window.setTimeout(()=>{y.current||r(!0,M,"hover")},$):r(!0,M,"hover")}function j(M){if(O())return;k.current();const $=Mt(a.floating);if(clearTimeout(T.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){L(),N(),A(M,!0,"safe-polygon")}});const te=S.current;$.addEventListener("mousemove",te),k.current=()=>{$.removeEventListener("mousemove",te)};return}(v.current==="touch"?!yt(a.floating,M.relatedTarget):!0)&&A(M)}function F(M){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){L(),N(),A(M)}})(M))}if(Je(a.domReference)){var z;const M=a.domReference;return n&&M.addEventListener("mouseleave",F),(z=a.floating)==null||z.addEventListener("mouseleave",F),p&&M.addEventListener("mousemove",D,{once:!0}),M.addEventListener("mouseenter",D),M.addEventListener("mouseleave",j),()=>{var $;n&&M.removeEventListener("mouseleave",F),($=a.floating)==null||$.removeEventListener("mouseleave",F),p&&M.removeEventListener("mousemove",D),M.removeEventListener("mouseenter",D),M.removeEventListener("mouseleave",j)}}},[a,s,e,u,d,p,A,N,L,r,n,y,f,m,g,o]),Be(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const j=Mt(a.floating).body;j.setAttribute(Ex,""),j.style.pointerEvents="none",C.current=!0;const F=a.floating;if(Je(a.domReference)&&F){var D;const z=a.domReference,M=f==null||(D=f.nodesRef.current.find($=>$.id===h))==null||(D=D.context)==null?void 0:D.elements.floating;return M&&(M.style.pointerEvents=""),z.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{z.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,h,a,f,g,I]),Be(()=>{n||(v.current=void 0,N(),L())},[n,N,L]),_.useEffect(()=>()=>{N(),clearTimeout(b.current),clearTimeout(T.current),L()},[s,a.domReference,N,L]);const R=_.useMemo(()=>{function O(D){v.current=D.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(D){const{nativeEvent:j}=D;function F(){!w.current&&!y.current&&r(!0,j,"hover")}u&&!Ro(v.current)||n||d===0||(clearTimeout(T.current),v.current==="touch"?F():T.current=window.setTimeout(F,d))}}},[u,r,n,y,d]),P=_.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return _.useMemo(()=>s?{reference:R,floating:P}:{},[s,R,P])}function nN(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 Wr(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 rN(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Ko=new WeakMap,Ls=new WeakSet,Vs={},$d=0;const oN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,kx=e=>e&&(e.host||kx(e.parentNode)),iN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=kx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function aN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=iN(t,e),s=new Set,l=new Set(a),c=[];Vs[o]||(Vs[o]=new WeakMap);const u=Vs[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,h=>{if(or(h)!=="script")if(s.has(h))p(h);else{const g=i?h.getAttribute(i):null,m=g!==null&&g!=="false",y=(Ko.get(h)||0)+1,v=(u.get(h)||0)+1;Ko.set(h,y),u.set(h,v),c.push(h),y===1&&m&&Ls.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return $d++,()=>{c.forEach(f=>{const h=(Ko.get(f)||0)-1,g=(u.get(f)||0)-1;Ko.set(f,h),u.set(f,g),h||(!Ls.has(f)&&i&&f.removeAttribute(i),Ls.delete(f)),g||f.removeAttribute(o)}),$d--,$d||(Ko=new WeakMap,Ko=new WeakMap,Ls=new WeakSet,Vs={})}}function Px(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return aN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Zo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ax(e,t){const n=Zi(e,Zo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function _x(){return Ax(document.body,"next")}function Ix(){return Ax(document.body,"prev")}function na(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function sN(e){Zi(e,Zo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function lN(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 cN(e,t,n){const r=e.indexOf(t);function o(a){const s=fr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(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 uN;function Ox(e){e.key==="Tab"&&(e.target,clearTimeout(uN))}const js=_.forwardRef(function(t,n){const[r,o]=_.useState();Be(()=>(wd()&&o("button"),document.addEventListener("keydown",Ox),()=>{document.removeEventListener("keydown",Ox)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:zd};return _.createElement("span",Go({},t,i))}),Mx=_.createContext(null),Dx=fr("portal");function dN(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Yo(),o=Nx(),[i,a]=_.useState(null),s=_.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Dx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Je(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(Dx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function qr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=dN({id:n,root:r}),[a,s]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return _.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&na(h)&&(h.type==="focusin"?lN:sN)(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]),_.createElement(Mx.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&_.createElement(js,{"data-type":"outside",ref:l,onFocus:f=>{if(na(f,i)){var h;(h=u.current)==null||h.focus()}else{const g=Ix()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&_.createElement("span",{"aria-owns":i.id,style:zd}),i&&Aa.createPortal(t,i),p&&i&&_.createElement(js,{"data-type":"outside",ref:c,onFocus:f=>{if(na(f,i)){var h;(h=d.current)==null||h.focus()}else{const g=_x()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Nx=()=>_.useContext(Mx),fN=20;let Ur=[];function Bd(e){Ur=Ur.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!fD(t,Zo())){const n=Zi(t,Zo())[0];n&&(t=n)}Ur.push(t),Ur.length>fN&&(Ur=Ur.slice(-20))}}function Fx(){return Ur.slice().reverse().find(e=>e.isConnected)}const pN=_.forwardRef(function(t,n){return _.createElement("button",Go({},t,{type:"button",ref:n,tabIndex:-1,style:zd}))});function Xo(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:h,onOpenChange:g,events:m,dataRef:y,floatingId:v,elements:{domReference:b,floating:S}}=t,T=typeof a=="number"&&a<0,w=Ub(b)&&T,C=oN()?i:!0,k=Ft(o),I=Ft(a),A=Ft(s),N=dr(),L=Nx(),R=_.useRef(null),P=_.useRef(null),O=_.useRef(!1),D=_.useRef(!1),j=_.useRef(-1),F=L!=null,z=S==null?void 0:S.firstElementChild,M=(z==null?void 0:z.id)===v?z:S,$=Pt(function(Z){return Z===void 0&&(Z=M),Z?Zi(Z,Zo()):[]}),J=Pt(Z=>{const U=$(Z);return k.current.map(G=>b&&G==="reference"?b:M&&G==="floating"?M:U).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function Z(G){if(G.key==="Tab"){yt(M,gn(Mt(M)))&&$().length===0&&!w&&Nt(G);const V=J(),W=On(G);k.current[0]==="reference"&&W===b&&(Nt(G),G.shiftKey?cr(V[V.length-1]):cr(V[1])),k.current[1]==="floating"&&W===M&&G.shiftKey&&(Nt(G),cr(V[0]))}}const U=Mt(M);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,b,M,c,k,w,$,J]),_.useEffect(()=>{if(r||!S)return;function Z(U){const G=On(U),W=$().indexOf(G);W!==-1&&(j.current=W)}return S.addEventListener("focusin",Z),()=>{S.removeEventListener("focusin",Z)}},[r,S,$]),_.useEffect(()=>{if(r||!d)return;function Z(){D.current=!0,setTimeout(()=>{D.current=!1})}function U(G){const V=G.relatedTarget;queueMicrotask(()=>{const W=!(yt(b,V)||yt(S,V)||yt(V,S)||yt(L==null?void 0:L.portalNode,V)||V!=null&&V.hasAttribute(fr("focus-guard"))||N&&(Wr(N.nodesRef.current,h).find(Y=>{var ae,B;return yt((ae=Y.context)==null?void 0:ae.elements.floating,V)||yt((B=Y.context)==null?void 0:B.elements.domReference,V)})||nN(N.nodesRef.current,h).find(Y=>{var ae,B;return((ae=Y.context)==null?void 0:ae.elements.floating)===V||((B=Y.context)==null?void 0:B.elements.domReference)===V})));if(l&&W&&gn(Mt(M))===Mt(M).body){Et(M)&&(M==null||M.focus());const Y=j.current,ae=$(),B=ae[Y]||ae[ae.length-1]||M;Et(B)&&B.focus()}(w||!c)&&V&&W&&!D.current&&V!==Fx()&&(O.current=!0,g(!1,G))})}if(S&&Et(b))return b.addEventListener("focusout",U),b.addEventListener("pointerdown",Z),S.addEventListener("focusout",U),()=>{b.removeEventListener("focusout",U),b.removeEventListener("pointerdown",Z),S.removeEventListener("focusout",U)}},[r,b,S,M,c,h,N,L,g,d,l,$,w]),_.useEffect(()=>{var Z;if(r)return;const U=Array.from((L==null||(Z=L.portalNode)==null?void 0:Z.querySelectorAll("["+fr("portal")+"]"))||[]);if(S){const G=[S,...U,R.current,P.current,k.current.includes("reference")||w?b:null].filter(W=>W!=null),V=c||w?Px(G,C,!C):Px(G);return()=>{V()}}},[r,b,S,c,k,L,w,C]),Be(()=>{if(r||!Et(M))return;const Z=Mt(M),U=gn(Z);queueMicrotask(()=>{const G=J(M),V=I.current,W=(typeof V=="number"?G[V]:V.current)||M,Y=yt(M,U);!T&&!Y&&p&&cr(W,{preventScroll:W===M})})},[r,p,M,T,J,I]),Be(()=>{if(r||!M)return;let Z=!1;const U=Mt(M),G=gn(U);let W=y.current.openEvent;const Y=f.domReference.current;Bd(G);function ae(B){let{open:xe,reason:Ee,event:Oe,nested:Re}=B;xe&&(W=Oe),Ee==="escape-key"&&f.domReference.current&&Bd(f.domReference.current),Ee==="hover"&&Oe.type==="mouseleave"&&(O.current=!0),Ee==="outside-press"&&(Re?(O.current=!1,Z=!0):O.current=!(Wb(Oe)||xd(Oe)))}return m.on("openchange",ae),()=>{m.off("openchange",ae);const B=gn(U),xe=yt(S,B)||N&&Wr(N.nodesRef.current,h).some(se=>{var ye;return yt((ye=se.context)==null?void 0:ye.elements.floating,B)});(xe||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&Bd(f.domReference.current);const Oe=Y||G,Re=Zi(Mt(Oe).body,Zo());queueMicrotask(()=>{let se=Fx();!se&&Et(Oe)&&S&&(se=cN(Re,Oe,S)),A.current&&!O.current&&Et(se)&&(!(se!==B&&B!==U.body)||xe)&&se.focus({preventScroll:Z})})}},[r,S,M,A,y,f,m,N,h]),Be(()=>{if(!r&&L)return L.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,c,p,g,f,d]),Be(()=>{if(r||!M||typeof MutationObserver!="function"||T)return;const Z=()=>{const G=M.getAttribute("tabindex"),V=$(),W=gn(Mt(S)),Y=V.indexOf(W);Y!==-1&&(j.current=Y),k.current.includes("floating")||W!==f.domReference.current&&V.length===0?G!=="0"&&M.setAttribute("tabindex","0"):G!=="-1"&&M.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,S,M,f,k,$,T]);function te(Z){return r||!u||!c?null:_.createElement(pN,{ref:Z==="start"?R:P,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!w:!0)&&(F||c);return _.createElement(_.Fragment,null,ee&&_.createElement(js,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:Z=>{if(c){const G=J();cr(o[0]==="reference"?G[0]:G[G.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(O.current=!1,na(Z,L.portalNode)){const G=_x()||b;G==null||G.focus()}else{var U;(U=L.beforeOutsideRef.current)==null||U.focus()}}}),!w&&te("start"),n,te("end"),ee&&_.createElement(js,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:Z=>{if(c)cr(J()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(O.current=!0),na(Z,L.portalNode)){const G=Ix()||b;G==null||G.focus()}else{var U;(U=L.afterOutsideRef.current)==null||U.focus()}}}))}const Hd=new Set,hN=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Yo();return Be(()=>{if(!r)return;Hd.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,h;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{Hd.delete(i),Hd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),_.createElement("div",Go({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Lx(e){return Et(e.target)&&e.target.tagName==="BUTTON"}function Vx(e){return Ed(e)}function ra(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=_.useRef(),p=_.useRef(!1),f=_.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const g=d.current;h.button===0&&s!=="click"&&(Ro(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Ro(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||Lx(h))&&(h.key===" "&&!Vx(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Lx(h)||Vx(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return _.useMemo(()=>a?{reference:f}:{},[a,f])}function mN(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 jx(e){return e!=null&&e.clientX!=null}function gN(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=_.useRef(!1),p=_.useRef(null),[f,h]=_.useState(),[g,m]=_.useState([]),y=Pt((w,C)=>{d.current||r.current.openEvent&&!jx(r.current.openEvent)||a.setPositionReference(mN(i,{x:w,y:C,axis:l,dataRef:r,pointerType:f}))}),v=Pt(w=>{c!=null||u!=null||(n?p.current||m([]):y(w.clientX,w.clientY))}),b=Ro(f)?o:n,S=_.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const w=Ht(o);function C(k){const I=On(k);yt(o,I)?(w.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||jx(r.current.openEvent)){w.addEventListener("mousemove",C);const k=()=>{w.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);_.useEffect(()=>S(),[S,g]),_.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),_.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const T=_.useMemo(()=>{function w(C){let{pointerType:k}=C;h(k)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:v,onMouseEnter:v}},[v]);return _.useMemo(()=>s?{reference:T}:{},[s,T])}const vN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},yN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Rx=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 Gr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,g=dr(),m=Pt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?m:l,v=_.useRef(!1),b=_.useRef(!1),{escapeKey:S,outsidePress:T}=Rx(f),{escapeKey:w,outsidePress:C}=Rx(h),k=Pt(P=>{var O;if(!n||!a||!s||P.key!=="Escape")return;const D=(O=i.current.floatingContext)==null?void 0:O.nodeId,j=g?Wr(g.nodesRef.current,D):[];if(!S&&(P.stopPropagation(),j.length>0)){let F=!0;if(j.forEach(z=>{var M;if((M=z.context)!=null&&M.open&&!z.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,jM(P)?P.nativeEvent:P,"escape-key")}),I=Pt(P=>{var O;const D=()=>{var j;k(P),(j=On(P))==null||j.removeEventListener("keydown",D)};(O=On(P))==null||O.addEventListener("keydown",D)}),A=Pt(P=>{var O;const D=v.current;v.current=!1;const j=b.current;if(b.current=!1,c==="click"&&j||D||typeof y=="function"&&!y(P))return;const F=On(P),z="["+fr("inert")+"]",M=Mt(o.floating).querySelectorAll(z);let $=Je(F)?F:null;for(;$&&!ir($);){const Z=Un($);if(ir(Z)||!Je(Z))break;$=Z}if(M.length&&Je(F)&&!RM(F)&&!yt(F,o.floating)&&Array.from(M).every(Z=>!yt($,Z)))return;if(Et(F)&&R){const Z=F.clientWidth>0&&F.scrollWidth>F.clientWidth,U=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let G=U&&P.offsetX>F.clientWidth;if(U&&Qt(F).direction==="rtl"&&(G=P.offsetX<=F.offsetWidth-F.clientWidth),G||Z&&P.offsetY>F.clientHeight)return}const J=(O=i.current.floatingContext)==null?void 0:O.nodeId,te=g&&Wr(g.nodesRef.current,J).some(Z=>{var U;return Sd(P,(U=Z.context)==null?void 0:U.elements.floating)});if(Sd(P,o.floating)||Sd(P,o.domReference)||te)return;const ee=g?Wr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var G;if((G=U.context)!=null&&G.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),N=Pt(P=>{var O;const D=()=>{var j;A(P),(j=On(P))==null||j.removeEventListener(c,D)};(O=On(P))==null||O.addEventListener(c,D)});_.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function P(j){r(!1,j,"ancestor-scroll")}const O=Mt(o.floating);s&&O.addEventListener("keydown",w?I:k,w),y&&O.addEventListener(c,C?N:A,C);let D=[];return p&&(Je(o.domReference)&&(D=ar(o.domReference)),Je(o.floating)&&(D=D.concat(ar(o.floating))),!Je(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(ar(o.reference.contextElement)))),D=D.filter(j=>{var F;return j!==((F=O.defaultView)==null?void 0:F.visualViewport)}),D.forEach(j=>{j.addEventListener("scroll",P,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",w?I:k,w),y&&O.removeEventListener(c,C?N:A,C),D.forEach(j=>{j.removeEventListener("scroll",P)})}},[i,o,s,y,c,n,r,p,a,S,T,k,w,I,A,C,N]),_.useEffect(()=>{v.current=!1},[y,c]);const L=_.useMemo(()=>({onKeyDown:k,[vN[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),R=_.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[yN[c]]:()=>{v.current=!0}}),[k,c]);return _.useMemo(()=>a?{reference:L,floating:R}:{},[a,L,R])}function bN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yo(),i=_.useRef({}),[a]=_.useState(()=>wx()),s=ur()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Je(f)&&QD("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=_.useState(r.reference),u=Pt((f,h,g)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:g,nested:s}),n==null||n(f,h,g)}),d=_.useMemo(()=>({setPositionReference:c}),[]),p=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function Yr(e){e===void 0&&(e={});const{nodeId:t}=e,n=bN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=_.useState(null),[s,l]=_.useState(null),u=(o==null?void 0:o.reference)||i,d=_.useRef(null),p=dr();Be(()=>{u&&(d.current=u)},[u]);const f=$D({...e,elements:{...o,...s&&{reference:s}}}),h=_.useCallback(b=>{const S=Je(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=_.useCallback(b=>{(Je(b)||b===null)&&(d.current=b,a(b)),(Je(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!Je(b))&&f.refs.setReference(b)},[f.refs]),m=_.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:d}),[f.refs,g,h]),y=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),v=_.useMemo(()=>({...f,...r,refs:m,elements:y,nodeId:t}),[f,m,y,t,r]);return Be(()=>{r.dataRef.current.floatingContext=v;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=v)}),_.useMemo(()=>({...f,context:v,refs:m,elements:y}),[f,m,y,v])}function xN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=_.useRef(!1),u=_.useRef(),d=_.useRef(!0);_.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function h(){!n&&Et(a.domReference)&&a.domReference===gn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),_.useEffect(()=>{if(!s)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),_.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=_.useMemo(()=>({onPointerDown(f){xd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=On(f.nativeEvent);if(l&&Je(h))try{if(wd()&&qb())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Ed(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,g=f.nativeEvent,m=Je(h)&&h.hasAttribute(fr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const v=gn(a.domReference?a.domReference.ownerDocument:document);!h&&v===a.domReference||yt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||yt(a.domReference,v)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return _.useMemo(()=>s?{reference:p}:{},[s,p])}const $x="active",zx="selected";function Wd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[$x]:a,[zx]: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&&[$x,zx].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,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Kr(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=_.useCallback(s=>Wd(s,e,"reference"),t),i=_.useCallback(s=>Wd(s,e,"floating"),n),a=_.useCallback(s=>Wd(s,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Bx=!1;function Rs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Hx(e,t){return Rs(t,e===Vd||e===Ji,e===qo||e===Uo)}function qd(e,t,n){return Rs(t,e===Ji,n?e===qo:e===Uo)||e==="Enter"||e===" "||e===""}function wN(e,t,n){return Rs(t,n?e===qo:e===Uo,e===Ji)}function Wx(e,t,n){return Rs(t,n?e===Uo:e===qo,e===Vd)}function Ud(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:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:y=!0,disabledIndices:v=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:w,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||Fs("`useListNavigation` looping must be enabled to allow escaping."),h||Fs("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&Fs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=ur(),A=dr(),N=Pt(s),L=_.useRef(g),R=_.useRef(c??-1),P=_.useRef(null),O=_.useRef(!0),D=_.useRef(N),j=_.useRef(!!o.floating),F=_.useRef(n),z=_.useRef(!1),M=_.useRef(!1),$=Ft(v),J=Ft(n),te=Ft(T),ee=Ft(o.floating),Z=Ft(c),[U,G]=_.useState(),[V,W]=_.useState(),Y=Pt(function(se,ye,K){K===void 0&&(K=!1);function ce(ie){h?(G(ie.id),A==null||A.events.emit("virtualfocus",ie),w&&(w.current=ie)):cr(ie,{preventScroll:!0,sync:qb()&&wd()?Bx||z.current:!1})}const Q=se.current[ye.current];Q&&ce(Q),requestAnimationFrame(()=>{const ie=se.current[ye.current]||Q;if(!ie)return;Q||ce(ie);const we=te.current;we&&B&&(K||!O.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return Bx=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?L.current&&c!=null&&(M.current=!0,R.current=c,N(c)):j.current&&(R.current=-1,D.current(null)))},[l,n,o.floating,c,N]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(j.current&&(R.current=-1,Y(i,R)),(!F.current||!j.current)&&L.current&&(P.current!=null||L.current===!0&&P.current==null)){let se=0;const ye=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(ye),se++):(R.current=P.current==null||qd(P.current,b,f)||p?jd(i,$.current):hx(i,$.current),P.current=null,N(R.current))};ye()}}else ea(i,a)||(R.current=a,Y(i,R,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,N,Y,$]),Be(()=>{var se;if(!l||o.floating||!A||h||!j.current)return;const ye=A.nodesRef.current,K=(se=ye.find(ie=>ie.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,ce=gn(Mt(o.floating)),Q=ye.some(ie=>ie.context&&yt(ie.context.elements.floating,ce));K&&!Q&&O.current&&K.focus({preventScroll:!0})},[l,o.floating,A,I,h]),Be(()=>{if(!l||!A||!h||I)return;function se(ye){W(ye.id),w&&(w.current=ye)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,h,I,w]),Be(()=>{D.current=N,j.current=!!o.floating}),Be(()=>{n||(P.current=null)},[n]),Be(()=>{F.current=n},[n]);const ae=a!=null,B=_.useMemo(()=>{function se(K){if(!n)return;const ce=i.current.indexOf(K);ce!==-1&&N(ce)}return{onFocus(K){let{currentTarget:ce}=K;se(ce)},onClick:K=>{let{currentTarget:ce}=K;return ce.focus({preventScroll:!0})},...m&&{onMouseMove(K){let{currentTarget:ce}=K;se(ce)},onPointerLeave(K){let{pointerType:ce}=K;!O.current||ce==="touch"||(R.current=-1,Y(i,R),N(null),h||cr(ee.current,{preventScroll:!0}))}}}},[n,ee,Y,m,i,N,h]),xe=Pt(se=>{if(O.current=!1,z.current=!0,!J.current&&se.currentTarget===ee.current)return;if(p&&Wx(se.key,b,f)){Nt(se),r(!1,se.nativeEvent,"list-navigation"),Et(o.domReference)&&!h&&o.domReference.focus();return}const ye=R.current,K=jd(i,v),ce=hx(i,v);if(se.key==="Home"&&(Nt(se),R.current=K,N(R.current)),se.key==="End"&&(Nt(se),R.current=ce,N(R.current)),S>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ie=WD(Q,S,k),we=ie.findIndex(ue=>ue!=null&&!Ns(i.current,ue,v)),X=ie.reduce((ue,_e,We)=>_e!=null&&!Ns(i.current,_e,v)?We:ue,-1);if(R.current=ie[HD({current:ie.map(ue=>ue!=null?i.current[ue]:null)},{event:se,orientation:b,loop:d,cols:S,disabledIndices:UD([...v||i.current.map((ue,_e)=>Ns(i.current,_e)?_e:void 0),void 0],ie),minIndex:we,maxIndex:X,prevIndex:qD(R.current>ce?K:R.current,Q,ie,S,se.key===Ji?"bl":se.key===Uo?"tr":"tl"),stopEvent:!0})],N(R.current),b==="both")return}if(Hx(se.key,b)){if(Nt(se),n&&!h&&gn(se.currentTarget.ownerDocument)===se.currentTarget){R.current=qd(se.key,b,f)?K:ce,N(R.current);return}qd(se.key,b,f)?d?R.current=ye>=ce?u&&ye!==i.current.length?-1:K:Rt(i,{startingIndex:ye,disabledIndices:v}):R.current=Math.min(ce,Rt(i,{startingIndex:ye,disabledIndices:v})):d?R.current=ye<=K?u&&ye!==-1?i.current.length:ce:Rt(i,{startingIndex:ye,decrement:!0,disabledIndices:v}):R.current=Math.max(K,Rt(i,{startingIndex:ye,decrement:!0,disabledIndices:v})),ea(i,R.current)?N(null):N(R.current)}}),Ee=_.useMemo(()=>h&&n&&ae&&{"aria-activedescendant":V||U},[h,n,ae,V,U]),Oe=_.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!Ub(o.domReference)&&Ee,onKeyDown:xe,onPointerMove(){O.current=!0}}),[Ee,xe,o.domReference,b]),Re=_.useMemo(()=>{function se(K){g==="auto"&&Wb(K.nativeEvent)&&(L.current=!0)}function ye(K){L.current=g,g==="auto"&&xd(K.nativeEvent)&&(L.current=!0)}return{...Ee,onKeyDown(K){O.current=!1;const ce=K.key.indexOf("Arrow")===0,Q=wN(K.key,b,f),ie=Wx(K.key,b,f),we=Hx(K.key,b),X=(p?Q:we)||K.key==="Enter"||K.key.trim()==="";if(h&&n){const Ct=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),mt=A&&Ct?rN(A.nodesRef.current,Ct.id):null;if(ce&&mt&&w){const Lt=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||ie){var ue,_e;const Tn=((ue=mt.context)==null?void 0:ue.elements.domReference)===K.currentTarget,zn=ie&&!Tn?(_e=mt.context)==null?void 0:_e.elements.domReference:Q?i.current.find(wr=>(wr==null?void 0:wr.id)===U):null;zn&&(Nt(K),zn.dispatchEvent(Lt),W(void 0))}if(we&&mt.context&&mt.context.open&&mt.parentId&&K.currentTarget!==mt.context.elements.domReference){var We;Nt(K),(We=mt.context.elements.domReference)==null||We.dispatchEvent(Lt);return}}return xe(K)}if(!(!n&&!y&&ce)){if(X&&(P.current=p&&we?null:K.key),p){Q&&(Nt(K),n?(R.current=jd(i,$.current),N(R.current)):r(!0,K.nativeEvent,"list-navigation"));return}we&&(c!=null&&(R.current=c),Nt(K),!n&&y?r(!0,K.nativeEvent,"list-navigation"):xe(K),n&&N(R.current))}},onFocus(){n&&!h&&N(null)},onPointerDown:ye,onMouseDown:se,onClick:se}},[U,Ee,xe,$,g,i,p,N,r,n,y,b,f,c,A,h,w]);return _.useMemo(()=>l?{reference:Re,floating:Oe,item:B}:{},[l,Re,Oe,B])}const TN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Zr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=TN.get(a))!=null?n:a,l=Yo(),u=ur()!=null,d=_.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=_.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=_.useCallback(h=>{let{active:g,selected:m}=h;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&m};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return _.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const qx=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 SN(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function EN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=_.useState("unmounted"),c=SN(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Ux(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=_.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=_.useState(()=>({...Qo(i,c),...Qo(n,c)})),{isMounted:g,status:m}=EN(e,{duration:a}),y=Ft(n),v=Ft(r),b=Ft(o),S=Ft(i);return Be(()=>{const T=Qo(y.current,c),w=Qo(b.current,c),C=Qo(S.current,c),k=Qo(v.current,c)||Object.keys(T).reduce((I,A)=>(I[A]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...T})),m==="open"&&h({transitionProperty:Object.keys(k).map(qx).join(","),transitionDuration:d+"ms",...C,...k}),m==="close"){const I=w||T;h({transitionProperty:Object.keys(I).map(qx).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,y,v,S,d,m,c]),{isMounted:g,styles:f}}function CN(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,h=_.useRef(),g=_.useRef(""),m=_.useRef((n=f??a)!=null?n:-1),y=_.useRef(null),v=Pt(s),b=Pt(l),S=Ft(u),T=Ft(p);Be(()=>{r&&(clearTimeout(h.current),y.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var A;m.current=(A=f??a)!=null?A:-1}},[r,f,a]);const w=Pt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=Pt(A=>{function N(D,j,F){const z=S.current?S.current(j,F):j.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return z?D.indexOf(z):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(N(L,L,g.current)===-1?w(!1):A.key===" "&&Nt(A)),L==null||T.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Nt(A),w(!0)),L.every(D=>{var j,F;return D?((j=D[0])==null?void 0:j.toLocaleLowerCase())!==((F=D[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",m.current=y.current),g.current+=A.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",m.current=y.current,w(!1)},d);const P=m.current,O=N(L,[...L.slice((P||0)+1),...L.slice(0,(P||0)+1)],g.current);O!==-1?(v(O),y.current=O):A.key!==" "&&(g.current="",w(!1))}),k=_.useMemo(()=>({onKeyDown:C}),[C]),I=_.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&w(!1)}}),[C,w]);return _.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function Gx(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 kN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Yx(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(),h=f-l;if(a===null||s===null||h===0)return a=d,s=p,l=f,null;const g=d-a,m=p-s,v=Math.sqrt(g*g+m*m)/h;return a=d,s=p,l=f,v}const u=d=>{let{x:p,y:f,placement:h,elements:g,onClose:m,nodeId:y,tree:v}=d;return function(S){function T(){clearTimeout(o),m()}if(clearTimeout(o),!g.domReference||!g.floating||h==null||p==null||f==null)return;const{clientX:w,clientY:C}=S,k=[w,C],I=On(S),A=S.type==="mouseleave",N=yt(g.floating,I),L=yt(g.domReference,I),R=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),O=h.split("-")[0],D=p>P.right-P.width/2,j=f>P.bottom-P.height/2,F=kN(k,R),z=P.width>R.width,M=P.height>R.height,$=(z?R:P).left,J=(z?R:P).right,te=(M?R:P).top,ee=(M?R:P).bottom;if(N&&(i=!0,!A))return;if(L&&(i=!1),L&&!A){i=!0;return}if(A&&Je(S.relatedTarget)&&yt(g.floating,S.relatedTarget)||v&&Wr(v.nodesRef.current,y).some(G=>{let{context:V}=G;return V==null?void 0:V.open}))return;if(O==="top"&&f>=R.bottom-1||O==="bottom"&&f<=R.top+1||O==="left"&&p>=R.right-1||O==="right"&&p<=R.left+1)return T();let Z=[];switch(O){case"top":Z=[[$,R.top+1],[$,P.bottom-1],[J,P.bottom-1],[J,R.top+1]];break;case"bottom":Z=[[$,P.top+1],[$,R.bottom-1],[J,R.bottom-1],[J,P.top+1]];break;case"left":Z=[[P.right-1,ee],[P.right-1,te],[R.left+1,te],[R.left+1,ee]];break;case"right":Z=[[R.right-1,ee],[R.right-1,te],[P.left+1,te],[P.left+1,ee]];break}function U(G){let[V,W]=G;switch(O){case"top":{const Y=[z?V+t/2:D?V+t*4:V-t*4,W+t+1],ae=[z?V-t/2:D?V+t*4:V-t*4,W+t+1],B=[[P.left,D||z?P.bottom-t:P.top],[P.right,D?z?P.bottom-t:P.top:P.bottom-t]];return[Y,ae,...B]}case"bottom":{const Y=[z?V+t/2:D?V+t*4:V-t*4,W-t],ae=[z?V-t/2:D?V+t*4:V-t*4,W-t],B=[[P.left,D||z?P.top+t:P.bottom],[P.right,D?z?P.top+t:P.bottom:P.top+t]];return[Y,ae,...B]}case"left":{const Y=[V+t+1,M?W+t/2:j?W+t*4:W-t*4],ae=[V+t+1,M?W-t/2:j?W+t*4:W-t*4];return[...[[j||M?P.right-t:P.left,P.top],[j?M?P.right-t:P.left:P.right-t,P.bottom]],Y,ae]}case"right":{const Y=[V-t,M?W+t/2:j?W+t*4:W-t*4],ae=[V-t,M?W-t/2:j?W+t*4:W-t*4],B=[[j||M?P.left+t:P.right,P.top],[j?M?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ae,...B]}}}if(!Gx([w,C],Z)){if(i&&!F)return T();if(!A&&r){const G=c(S.clientX,S.clientY);if(G!==null&&G<.1)return T()}Gx([w,C],U([p,f]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Jo=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Qi(10),Fd({fallbackAxisSideDirection:"end"}),Nd(),fx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Yr({open:n,middleware:i,transform:!0,whileElementsMounted:Xi,onOpenChange:(h,g)=>{var y;const m=g==null?void 0:g.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(y=e.onChange)==null||y.call(e,h))}}),c=ra(l),u=Gr(l),d=Zr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Kr([c,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(qr,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Xo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(xx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},PN=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}=Yr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=ra(s,{enabled:e.disabled??!0}),u=Zr(s,{role:"tooltip"}),d=Gr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Kr([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(mo,{...f(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(Jn,{children:i?x.jsx(qr,{root:t,children:x.jsx(Xo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Kx=300,AN=500,Zx=(e="")=>je("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Gd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Xx=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,h]=E.useState(null),g=E.useRef([]),m=E.useRef([]),y=E.useContext(Gd),v=ur(),b=dr(),S=JD(),T=vx(),w=v!==null,{floatingStyles:C,refs:k,context:I}=Yr({nodeId:S,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Xi,placement:w?"right":"bottom-start",middleware:[Qi({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Fd(),Nd()]}),A=Zr(I,{role:"menu"}),N=Gr(I,{bubbles:!0}),L=Cx(I,{move:!1,enabled:n,delay:{open:Kx},handleClose:Yx({blockPointerEvents:!0})}),R=ra(I,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),P=Ud(I,{loop:!0,listRef:g,activeIndex:f,nested:w,onNavigate:h}),O=CN(I,{activeIndex:f,listRef:m,resetMs:AN,onMatch:c?h:void 0}),{getReferenceProps:D,getFloatingProps:j,getItemProps:F}=Kr([L,R,A,N,P,O]);E.useEffect(()=>{if(!b)return;function M(){u(!1)}function $(J){J.nodeId!==S&&J.parentId===v&&u(!1)}return b.events.on("click",M),b.events.on("menuopen",$),()=>{b.events.off("click",M),b.events.off("menuopen",$)}},[b,S,v]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:v,nodeId:S})},[b,c,S,v]);const z=o?s.className:je(Zx(s.className));return x.jsxs(eN,{id:S,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(jo,{...D(y.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),y.setHasFocusInside(!0)}})),children:a,ref:Ld([k.setReference,T.ref,l]),tabIndex:w?y.activeIndex===T.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):x.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Ld([k.setReference,T.ref,l]),tabIndex:w?y.activeIndex===T.index?0:-1:void 0,...D(y.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),y.setHasFocusInside(!0)}})),children:[a,w&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Lu,{size:14})]})]})}),x.jsx(Gd.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:F,setHasFocusInside:p,isOpen:c},children:x.jsx(KD,{elementsRef:g,labelsRef:m,children:c&&x.jsx(qr,{preserveTabOrder:!0,children:x.jsx(Xo,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:x.jsx(t,{...j(),ref:k.setFloating,style:{...s.style,...C},className:je("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),_N=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Gd),s=vx({label:n?null:e}),l=dr(),c=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Ld([s.ref,i]),className:Zx(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),IN=E.forwardRef((e,t)=>ur()!==null?x.jsx(Xx,{...e,isParent:!1,ref:t}):x.jsx(tN,{children:x.jsx(Xx,{...e,isParent:!0,ref:t})})),ON=(e,t)=>Rr()?t:window.matchMedia(e).matches,MN=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(ON(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},Qx=()=>window.matchMedia("@media (pointer: coarse)"),DN=()=>{var r;const e=E.useRef(Rr()?null:Qx()),[t,n]=E.useState(Rr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Qx():e.current).addEventListener("change",i=>n(i.matches))},[]),t},NN=e=>{const t=DN(),n=E.useRef(Rr()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||rb())return;r.style.padding=Rh(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",FN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},LN={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},Yd={drawer:e=>e==="left"?FN:LN,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},VN=co("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),jN={top:0,left:0,right:0,bottom:-1},RN=e=>e*.62,$N=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=RN(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(ft.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:jN,whileDrag:{cursor:"grabbing"},className:je("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},$s={drawer:"right",sheet:"none",dialog:"none"},zN=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??$s.drawer:$s[o]:t?$s[o]:$s.sheet},BN=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:h,overlayClickClose:g=!1,ariaTitle:m,...y})=>{NN(e);const v=E.useId(),b=E.useId(),S=MN("(min-width: 64rem)"),T=f!=="dialog",w=zN(S,d,f,h),C=S||d?Yd[f]:Yd.sheet,k=typeof C=="function"?C(w):C,I=S||d?f:"sheet",{refs:A,context:N}=Yr({open:e,onOpenChange:s}),L=ra(N),R=Zr(N,{role:"dialog"}),P=Gr(N,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:O,getFloatingProps:D}=Kr([L,R,P]),j=o,F=_o(void 0),z=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(jo,{ref:A.setReference,...O({layoutId:a}),children:j}):x.jsx(ft.button,{ref:A.setReference,...O(),layoutId:a,type:"button",children:j})}):null,x.jsx(qr,{children:x.jsx(Jn,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(hN,{lockScroll:!1,className:je(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(Xo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:N,children:x.jsxs(ft.div,{...y,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:a,className:je(VN({position:w,type:I}),l),style:I==="drawer"?{width:F}:{height:F},...t?{"aria-labelledby":v,"aria-describedby":b}:{"aria-label":m},...D(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:v,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(es,{})})}):null,T&&c?x.jsx($N,{onChange:s,parent:A.floating,position:w,sheet:I==="sheet",value:F}):null]})})}):null})})]})},HN=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Jx=({as:e,title:t,children:n,placement:r,open:o,focus:i=!0,hover:a=!0,enabled:s=!0,popover:l=!0,followCursor:c=!1,onChange:u=rd,...d})=>{const[p,f]=E.useState(o??!1),h=E.useRef(null),g=e||"span",m=L=>{f(L),u==null||u(L)},{refs:y,floatingStyles:v,context:b}=Yr({open:p,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:Xi,onOpenChange:o?void 0:m,middleware:[Nd(),Qi(5),Fd({fallbackAxisSideDirection:"start"}),fx({padding:5,element:h})]}),S=Cx(b,{move:!0,delay:{open:Kx},enabled:s?a:!1,handleClose:l?Yx():null}),T=xN(b,{enabled:s?i:!1}),w=ra(b,{enabled:s?l:!1}),C=Gr(b,{enabled:s}),k=Zr(b,{role:"tooltip",enabled:s}),I=gN(b,{enabled:!!s&&!!c}),{getReferenceProps:A,getFloatingProps:N}=Kr([k,C,I,i?T:void 0,a?S:void 0,l?w:void 0]);return E.useEffect(()=>f(o===void 0?!1:o),[o]),x.jsxs(E.Fragment,{children:[x.jsx(g,{ref:y.setReference,...A(d),children:t}),p&&x.jsx(qr,{preserveTabOrder:!0,children:x.jsxs(on,{...N(),ref:y.setFloating,style:v,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(xx,{ref:h,context:b,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class zs{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)zs.getDescendantProperty(s[l],i,r);else i&&zs.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Xr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Xr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=zs.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Xr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Xr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Xr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Bs=0,pr=1,ei=2,e0=4;function t0(e){return()=>e}function WN(e){e()}function oa(e,t){return n=>e(t(n))}function n0(e,t){return()=>e(t)}function r0(e,t){return n=>e(t,n)}function Kd(e){return e!==void 0}function qN(...e){return()=>{e.map(WN)}}function ti(){}function Hs(e,t){return t(e),e}function UN(e,t){return t(e)}function it(...e){return e}function Xe(e,t){return e(pr,t)}function Me(e,t){e(Bs,t)}function Zd(e){e(ei)}function $t(e){return e(e0)}function be(e,t){return Xe(e,r0(t,Bs))}function Dn(e,t){const n=e(pr,r=>{n(),t(r)});return n}function o0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function i0(e,t){return e===t}function at(e=i0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>oa(t,e)}function Nn(e){return t=>()=>{t(e)}}function re(e,...t){const n=GN(...t);return(r,o)=>{switch(r){case ei:Zd(e);return;case pr:return Xe(e,n(o))}}}function Fn(e,t){return n=>r=>{n(t=e(t,r))}}function ni(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...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);Xe(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 GN(...e){return t=>e.reduceRight(UN,t)}function YN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case pr:return i?n===i?void 0:(r(),n=i,t=Xe(e,i),t):(r(),ti);case ei:r(),n=null;return}}}function le(e){let t=e;const n=ze();return(r,o)=>{switch(r){case Bs:t=o;break;case pr:{o(t);break}case e0:return t}return n(r,o)}}function zt(e,t){return Hs(le(t),n=>be(e,n))}function ze(){const e=[];return(t,n)=>{switch(t){case Bs:e.slice().forEach(r=>{r(n)});return;case ei:e.splice(0,e.length);return;case pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Hs(ze(),t=>be(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:KN(),singleton:n}}const KN=()=>Symbol();function ZN(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=ze(),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);Xe(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case ei:{Zd(t);return}case pr:return r===o&&a(n),Xe(t,a)}}}function Pe(e,t=i0){return re(e,at(t))}function a0(...e){return function(t,n){switch(t){case ei:return;case pr:return qN(...e.map(r=>Xe(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const XN={0:"debug",3:"error",1:"log",2:"warn"},QN=()=>typeof globalThis>"u"?window:globalThis,mr=Ue(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=QN().VIRTUOSO_LOG_LEVEL)!=null?o:$t(e);r>=i&&console[XN[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ln(e,t,n){return Xd(e,t,n).callbackRef}function Xd(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 s0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=JN(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 h;f&&(h=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?l0("column-gap",getComputedStyle(u).columnGap,o):l0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return Xd(c,n,l)}function JN(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function l0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Qd(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(),h=c.top-f.top;p=f.height-Math.max(0,h),d=h+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}=Xd(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ue(()=>{const e=ze(),t=ze(),n=le(0),r=ze(),o=le(0),i=ze(),a=ze(),s=le(0),l=le(0),c=le(0),u=le(0),d=ze(),p=ze(),f=le(!1),h=le(!1),g=le(!1);return be(re(e,he(({scrollTop:m})=>m)),t),be(re(e,he(({scrollHeight:m})=>m)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ia={lvl:0};function c0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function tt(e){return e===ia}function aa(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?aa(e.l,t):aa(e.r,t)}function yn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=yn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return yn(e.l,t,n)}function nn(e,t,n){return tt(e)?f0(t,n,1):t===e.k?_t(e,{k:t,v:n}):t<e.k?p0(_t(e,{l:nn(e.l,t,n)})):p0(_t(e,{r:nn(e.r,t,n)}))}function ri(){return ia}function Ws(e,t,n){if(tt(e))return[];const r=yn(e,t)[0];return eF(ef(e,r,n))}function Jd(e,t){if(tt(e))return ia;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=d0(r);return qs(_t(e,{k:i,l:u0(r),v:a}))}}else return t<n?qs(_t(e,{l:Jd(r,t)})):qs(_t(e,{r:Jd(o,t)}))}function Qr(e){return tt(e)?[]:[...Qr(e.l),{k:e.k,v:e.v},...Qr(e.r)]}function ef(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ef(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ef(i,t,n))),s}function qs(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(tf(t))return h0(_t(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return _t(t.r,{l:_t(t,{r:t.r.l}),lvl:n,r:_t(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(tf(e))return nf(_t(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=tf(o)?r.lvl-1:r.lvl;return _t(o,{l:_t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:nf(_t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function _t(e,t){return f0(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 u0(e){return tt(e.r)?e.l:qs(_t(e,{r:u0(e.r)}))}function tf(e){return tt(e)||e.lvl>e.r.lvl}function d0(e){return tt(e.r)?[e.k,e.v]:d0(e.r)}function f0(e,t,n,r=ia,o=ia){return{k:e,l:r,lvl:n,r:o,v:t}}function p0(e){return nf(h0(e))}function h0(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?_t(t,{r:_t(e,{l:t.r})}):e}function nf(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?_t(n,{l:_t(e,{r:n.l}),lvl:t+1}):e}function eF(e){return c0(e,({k:t,v:n})=>({index:t,value:n}))}function m0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function sa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const rf=Ue(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function g0(e,t,n){return e[Us(e,t,n)]}function Us(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function tF(e,t,n,r){const o=Us(e,t,r),i=Us(e,n,r,o);return e.slice(o,i+1)}function bn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Gs(e){return!tt(e.groupOffsetTree)}function of({index:e},t){return t===e?0:t<e?-1:1}function nF(){return{groupIndices:[],groupOffsetTree:ri(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ri()}}function rF(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=nn(e,0,i);continue}const s=Ws(e,a-1,o+1);if(s.some(uF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=Jd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));c&&(e=nn(e,a,i))}return[e,n]}function oF(e){return typeof e.groupIndex<"u"}function iF({offset:e},t){return t===e?0:t<e?-1:1}function la(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=g0(t,e,of),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function v0(e,t){if(!Gs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function y0(e,t,n){if(oF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=v0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function aF(e,t,n,r=0){return r>0&&(t=Math.max(t,g0(e,r,of).offset)),c0(tF(e,t,n,iF),cF)}function sF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,g)=>nn(nn(h,g,p),g+1,f),a)}else[a,s]=rF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=af(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,la(f,d,o)),ri()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function lF(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 b0(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 af(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Us(o,t-1,of),s=o[l].offset;const c=yn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===yn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ws(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function cF(e){return{index:e.index,value:e}}function uF(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 dF={offsetHeight:"height",offsetWidth:"width"},Vn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=ze(),r=ze(),o=zt(r,0),i=ze(),a=ze(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((T,w)=>bn(T,dF[w])),p=le(void 0),f=le(0),h=nF(),g=zt(re(n,Ne(l,e,f),Fn(sF,h),at()),h),m=zt(re(l,at(),Fn((T,w)=>({current:w,prev:T.current}),{current:[],prev:[]}),he(({prev:T})=>T)),[]);be(re(l,Ce(T=>T.length>0),Ne(g,f),he(([T,w,C])=>{const k=T.reduce((I,A,N)=>nn(I,A,la(A,w.offsetTree,C)||N),ri());return{...w,groupIndices:T,groupOffsetTree:k}})),g),be(re(r,Ne(g),Ce(([T,{lastIndex:w}])=>T<w),he(([T,{lastIndex:w,lastSize:C}])=>[{endIndex:w,size:C,startIndex:T}])),n),be(c,u);const y=zt(re(c,he(T=>T===void 0)),!0);be(re(u,Ce(T=>T!==void 0&&tt($t(g).sizeTree)),he(T=>[{endIndex:0,size:T,startIndex:0}])),n);const v=en(re(n,Ne(g),Fn(({sizes:T},[w,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:h}),he(T=>T.changed)));Xe(re(s,Fn((T,w)=>({diff:T.prev-w,prev:w}),{diff:0,prev:0}),he(T=>T.diff)),T=>{const{groupIndices:w}=$t(g);if(T>0)Me(t,!0),Me(i,T+b0(T,w));else if(T<0){const C=$t(m);C.length>0&&(T-=b0(-T,C)),Me(a,T)}}),Xe(re(s,Ne(e)),([T,w])=>{T<0&&w("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const b=en(i);be(re(i,Ne(g),he(([T,w])=>{const C=w.groupIndices.length>0,k=[],I=w.lastSize;if(C){const A=aa(w.sizeTree,0);let N=0,L=0;for(;N<T;){const P=w.groupIndices[L],O=w.groupIndices.length===L+1?1/0:w.groupIndices[L+1]-P-1;k.push({endIndex:P,size:A,startIndex:P}),k.push({endIndex:P+1+O-1,size:I,startIndex:P+1}),L++,N+=O+1}const R=Qr(w.sizeTree);return N!==T&&R.shift(),R.reduce((P,{k:O,v:D})=>{let j=P.ranges;return P.prevSize!==0&&(j=[...P.ranges,{endIndex:O+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+T,prevSize:D,ranges:j}},{prevIndex:T,prevSize:0,ranges:k}).ranges}return Qr(w.sizeTree).reduce((A,{k:N,v:L})=>({prevIndex:N+T,prevSize:L,ranges:[...A.ranges,{endIndex:N+T-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(re(a,Ne(g,f),he(([T,{offsetTree:w},C])=>{const k=-T;return la(k,w,C)})));return be(re(a,Ne(g,f),he(([T,w,C])=>{if(w.groupIndices.length>0){if(tt(w.sizeTree))return w;let k=ri();const I=$t(m);let A=0,N=0,L=0;for(;A<-T;){L=I[N];const R=I[N+1]-L-1;N++,A+=R+1}if(k=Qr(w.sizeTree).reduce((R,{k:P,v:O})=>nn(R,Math.max(0,P+T),O),k),A!==-T){const R=aa(w.sizeTree,L);k=nn(k,0,R);const P=yn(w.sizeTree,-T+1)[1];k=nn(k,1,P)}return{...w,sizeTree:k,...af(w.offsetTree,0,k,C)}}else{const k=Qr(w.sizeTree).reduce((I,{k:A,v:N})=>nn(I,Math.max(0,A+T),N),ri());return{...w,sizeTree:k,...af(w.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:v,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},it(mr,rf),{singleton:!0});function fF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const x0=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ze(),a=ze(),s=en(re(i,he(fF)));return be(re(s,he(l=>l.totalCount)),n),be(re(s,he(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>Gs(c)),he(([l,c,u])=>yn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),at(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},it(Vn,Wt)),gr=Ue(([{log:e}])=>{const t=le(!1),n=en(re(t,Ce(r=>r),at()));return Xe(t,r=>{r&&$t(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},it(mr),{singleton:!0}),pF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function w0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!pF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ca=Ue(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=ze(),h=ze(),g=le(0);let m=null,y=null,v=null;function b(){m&&(m(),m=null),v&&(v(),v=null),y&&(clearTimeout(y),y=null),Me(l,!1)}return be(re(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),he(([[S,T,w,C,k,I,A,N],L,R,P])=>{const O=w0(S),{align:D,behavior:j,offset:F}=O,z=C-1,M=y0(O,T,z);let $=la(M,T.offsetTree,L)+I;D==="end"?($+=R+yn(T.sizeTree,M)[1]-w+P,M===z&&($+=A)):D==="center"?$+=(R+yn(T.sizeTree,M)[1]-w+P)/2:$-=k,F&&($+=F);const J=te=>{b(),te?(N("retrying to scroll to",{location:S},tn.DEBUG),Me(f,S)):(Me(h,!0),N("list did not change, scroll successful",{},tn.DEBUG))};if(b(),j==="smooth"){let te=!1;v=Xe(t,ee=>{te=te||ee}),m=Dn(u,()=>{J(te)})}else m=Dn(re(t,hF(150)),J);return y=setTimeout(()=>{b()},1200),Me(l,!0),N("scrolling from index to",{behavior:j,index:M,top:$},tn.DEBUG),{behavior:j,top:$}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:g}},it(Vn,Wt,mr),{singleton:!0});function hF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function sf(e,t){e==0?t():requestAnimationFrame(()=>{sf(e-1,t)})}function lf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ua=Ue(([{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 be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),s),be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),c),Xe(re(At(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,h])=>u&&(!tt(p)||Kd(f))&&!d&&!h),Ne(l)),([,u])=>{Dn(o,()=>{Me(c,!0)}),sf(4,()=>{Dn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},it(Vn,Wt,ca,gr),{singleton:!0});function T0(e,t){return Math.abs(e-t)<1.01}const da="up",fa="down",mF="none",gF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},vF=0,pa=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=ze(),c=ze(),u=le(4),d=le(vF),p=zt(re(a0(re(Pe(o),ni(1),Nn(!0)),re(Pe(o),ni(1),Nn(!1),o0(100))),at()),!1),f=zt(re(a0(re(n,Nn(!0)),re(n,Nn(!1),o0(200))),at()),!1);be(re(At(Pe(o),Pe(d)),he(([v,b])=>v<=b),at()),s),be(re(s,hr(50)),c);const h=en(re(At(r,Pe(i),Pe(t),Pe(e),Pe(u)),Fn((v,[{scrollHeight:b,scrollTop:S},T,w,C,k])=>{const I=S+T-b>-k,A={scrollHeight:b,scrollTop:S,viewportHeight:T};if(I){let L,R;return S>v.state.scrollTop?(L="SCROLLED_DOWN",R=v.state.scrollTop-S):(L="SIZE_DECREASED",R=v.state.scrollTop-S||v.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:R,state:A}}let N;return A.scrollHeight>v.state.scrollHeight?N="SIZE_INCREASED":T<v.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":S<v.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},gF),at((v,b)=>v&&v.atBottom===b.atBottom))),g=zt(re(r,Fn((v,{scrollHeight:b,scrollTop:S,viewportHeight:T})=>{if(T0(v.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const w=b-(S+T)<1;return v.scrollTop!==S&&w?{changed:!0,jump:v.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(v=>v.changed),he(v=>v.jump)),0);be(re(h,he(v=>v.atBottom)),a),be(re(a,hr(50)),l);const m=le(fa);be(re(r,he(({scrollTop:v})=>v),at(),Fn((v,b)=>$t(f)?{direction:v.direction,prevScrollTop:b}:{direction:b<v.prevScrollTop?da:fa,prevScrollTop:b},{direction:fa,prevScrollTop:0}),he(v=>v.direction)),m),be(re(r,hr(50),Nn(mF)),m);const y=le(0);return be(re(p,Ce(v=>!v),Nn(0)),y),be(re(o,hr(100),Ne(p),Ce(([v,b])=>!!b),Fn(([v,b],[S])=>[b,S],[0,0]),he(([v,b])=>b-v)),y),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:y}},it(Wt)),Ys="top",Ks="bottom",S0="none";function E0(e,t,n){return typeof e=="number"?n===da&&t===Ys||n===fa&&t===Ks?e:0:n===da?t===Ys?e.main:e.reverse:t===Ks?e.main:e.reverse}function C0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const cf=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ze(),a=le(0),s=le(0),l=le(0),c=zt(re(At(Pe(r),Pe(o),Pe(n),Pe(i,sa),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),he(([u,d,p,[f,h],g,m,y,v,b])=>{const S=u-v,T=m+y,w=Math.max(p-S,0);let C=S0;const k=C0(b,Ys),I=C0(b,Ks);return f-=v,f+=p+y,h+=p+y,h-=v,f>u+T-k&&(C=da),h<u-w+d+I&&(C=fa),C!==S0?[Math.max(S-p-E0(g,Ys,C)-k,0),S-w-y+d+E0(g,Ks,C)+I]:null}),Ce(u=>u!=null),at(sa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},it(Wt),{singleton:!0});function yF(e,t,n){if(Gs(t)){const r=v0(e,t);return[{index:yn(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 uf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Zs(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,h=p-u;return{bottom:u,firstItemIndex:i,items:P0(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:P0(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function k0(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=lf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Zs(c,[],s,o,n,r)}function P0(e,t,n){if(e.length===0)return[];if(!Gs(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Ws(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const Jr=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const g=le([]),m=le(0),y=ze();be(i.topItemsIndexes,g);const v=zt(re(At(f,h,Pe(l,sa),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([w,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return w&&!C&&!A}),he(([,,[w,C],k,I,A,N,L,R,P,O])=>{const D=I,{offsetTree:j,sizeTree:F}=D,z=$t(m);if(k===0)return{...uf,totalCount:k};if(w===0&&C===0)return z===0?{...uf,totalCount:k}:k0(z,A,I,R,P,O||[]);if(tt(F))return z>0?null:Zs(yF(lf(A,k),D,O),[],k,P,D,R);const M=[];if(L.length>0){const Z=L[0],U=L[L.length-1];let G=0;for(const V of Ws(F,Z,U)){const W=V.value,Y=Math.max(V.start,Z),ae=Math.min(V.end,U);for(let B=Y;B<=ae;B++)M.push({data:O==null?void 0:O[B],index:B,offset:G,size:W}),G+=W}}if(!N)return Zs([],M,k,P,D,R);const $=L.length>0?L[L.length-1]+1:0,J=aF(j,w,C,$);if(J.length===0)return null;const te=k-1,ee=Hs([],Z=>{for(const U of J){const G=U.value;let V=G.offset,W=U.start;const Y=G.size;if(G.offset<w){W+=Math.floor((w-G.offset+P)/(Y+P));const B=W-U.start;V+=B*Y+B*P}W<$&&(V+=($-W)*Y,W=$);const ae=Math.min(U.end,te);for(let B=W;B<=ae&&!(V>=C);B++)Z.push({data:O==null?void 0:O[B],index:B,offset:V,size:Y}),V+=Y+P}});return Zs(ee,M,k,P,D,R)}),Ce(w=>w!==null),at()),uf);be(re(e,Ce(Kd),he(w=>w==null?void 0:w.length)),o),be(re(v,he(w=>w.topListHeight)),d),be(d,s),be(re(v,he(w=>[w.top,w.bottom])),a),be(re(v,he(w=>w.items)),y);const b=en(re(v,Ce(({items:w})=>w.length>0),Ne(o,e),Ce(([{items:w},C])=>w[w.length-1].originalIndex===C-1),he(([,w,C])=>[w-1,C]),at(sa),he(([w])=>w))),S=en(re(v,hr(200),Ce(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),he(({items:w})=>w[0].index),at())),T=en(re(v,Ce(({items:w})=>w.length>0),he(({items:w})=>{let C=0,k=w.length-1;for(;w[C].type==="group"&&C<k;)C++;for(;w[k].type==="group"&&k>C;)k--;return{endIndex:w[k].index,startIndex:w[C].index}}),at(m0)));return{endReached:b,initialItemCount:m,itemsRendered:y,listState:v,rangeChanged:T,startReached:S,topItemsIndexes:g,...p}},it(Vn,x0,cf,ua,ca,pa,gr,rf),{singleton:!0}),A0=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ze(),a=zt(re(At(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},it(Wt,Jr),{singleton:!0}),bF=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=zt(re(At(n,e,t),Ce(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),hr(0),at()),0);return{alignToBottom:n,paddingTopAddition:r}},it(Wt,A0),{singleton:!0});function _0(e){return e?e==="smooth"?"smooth":"auto":!1}const xF=(e,t)=>typeof e=="function"?_0(e(t)):t&&_0(e),wF=Ue(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=le(!1),d=ze();let p=null;function f(g){Me(o,{align:"end",behavior:g,index:"LAST"})}Xe(re(At(re(Pe(t),ni(1)),a),Ne(Pe(u),r,i,c),he(([[g,m],y,v,b,S])=>{let T=m&&b,w="auto";return T&&(w=xF(y,v||S),T=T&&!!w),{followOutputBehavior:w,shouldFollow:T,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:m})=>{p&&(p(),p=null),p=Dn(e,()=>{$t(l)("following output to ",{totalCount:m},tn.DEBUG),f(g),p=null})});function h(g){const m=Dn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&($t(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(m,100)}return Xe(re(At(Pe(u),t,s),Ce(([g,,m])=>g&&m),Fn(({value:g},[,m])=>({refreshed:g===m,value:m}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{$t(i)&&h(g!==!1)}),Xe(d,()=>{h($t(u)!==!1)}),Xe(At(Pe(u),n),([g,m])=>{g&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},it(Vn,pa,ca,ua,gr,mr,Wt)),TF=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>k0(l,c,u,d,p,f))),a),{}),it(Vn,ua,Jr,gr),{singleton:!0}),SF=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Xe(re(e,Ne(r),Ce(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Dn(re(n,ni(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},it(gr,Wt,Jr),{singleton:!0}),EF=({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,CF=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=ze();return be(re(u,Ne(t,l,n,i,o,r,s),Ne(e),he(([[d,p,f,h,g,m,y,v],b])=>{const{align:S,behavior:T,calculateViewLocation:w=EF,done:C,...k}=d,I=y0(d,p,h-1),A=la(I,p.offsetTree,b)+g+m,N=A+yn(p.sizeTree,I)[1],L=v+m,R=v+f-y,P=w({itemBottom:N,itemTop:A,locationParams:{align:S,behavior:T,...k},viewportBottom:R,viewportTop:L});return P?C&&Dn(re(a,Ce(O=>!O),ni($t(a)?1:2)),C):C&&C(),P}),Ce(d=>d!==null)),c),{scrollIntoView:u}},it(Vn,Wt,ca,Jr,mr),{singleton:!0}),I0=Ue(([{scrollVelocity:e}])=>{const t=le(!1),n=ze(),r=le(!1);return be(re(e,Ne(r,t,n),Ce(([o,i])=>!!i),he(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),at()),t),Xe(re(At(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},it(pa),{singleton:!0}),df=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=ze(),r=ze(),o=ze(),i=le(!1),a=le(void 0);return be(re(At(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,Ne(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},it(Wt)),kF=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=ze(),u=le(void 0),d=le(null),p=le(null);return be(s,d),be(l,p),Xe(re(c,Ne(t,r,a,d,p,n)),([f,h,g,m,y,v,b])=>{const S=lF(h.sizeTree);m&&y!==null&&v!==null&&(g=y.scrollTop-v.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),be(re(u,Ce(Kd),he(PF)),o),be(re(i,Ne(u),Ce(([,f])=>f!==void 0),at(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},it(Vn,Wt,ua,gr,df));function PF(e){return{align:"start",index:0,offset:e.scrollTop}}const AF=Ue(([{topItemsIndexes:e}])=>{const t=le(0);return be(re(t,Ce(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},it(Jr));function O0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const _F=O0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),IF=Ue(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const g=en(re(l,Ne(a),Fn(([,y,v,b],[{bottom:S,items:T,offsetBottom:w,totalCount:C},k])=>{const I=S+w;let A=0;return v===C&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(A=I-b,A!==0&&(A+=k))),[A,T,C,I]},[0,[],0,0]),Ce(([y])=>y!==0),Ne(r,s,n,o,f,h),Ce(([,y,v,b,,,S])=>!S&&!b&&y!==0&&v===da),he(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},tn.DEBUG),y))));function m(y){y>0?(Me(t,{behavior:"auto",top:-y}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-y}))}return Xe(re(g,Ne(e,i)),([y,v,b])=>{b&&_F()?Me(e,v-y):m(-y)}),Xe(re(At(zt(i,!1),e,h),Ce(([y,v,b])=>!y&&!b&&v!==0),he(([y,v])=>v),hr(1)),m),be(re(d,he(y=>({top:-y}))),t),Xe(re(c,Ne(p,u),he(([y,{groupIndices:v,lastSize:b,sizeTree:S},T])=>{function w(C){return C*(b+T)}if(v.length===0)return w(y);{let C=0;const k=aa(S,0);let I=0,A=0;for(;I<y;){I++,C+=k;let N=v.length===A+1?1/0:v[A+1]-v[A]-1;I+N>y&&(C-=k,N=y-I+1),I+=N,C+=w(N),A++}return C}})),y=>{Me(e,y),requestAnimationFrame(()=>{Me(t,{top:y}),requestAnimationFrame(()=>{Me(e,0),Me(h,!1)})})}),{deviation:e}},it(Wt,pa,Jr,Vn,mr,rf)),OF=Ue(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),it(cf,TF,gr,I0,A0,SF,bF,df,CF,mr)),M0=Ue(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},g,m,y,{listState:v,topItemsIndexes:b,...S},{scrollToIndex:T},w,{topItemCount:C},{groupCounts:k},I])=>(be(S.rangeChanged,I.scrollSeekRangeChanged),be(re(I.windowViewportRect,he(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...y,groupIndices:i,itemSize:a,listState:v,scrollToIndex:T,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...m}),it(Vn,ua,Wt,kF,wF,Jr,ca,IF,AF,x0,OF));function MF(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const Xs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ff(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(m,y){m.propsReady&&Me(m.propsReady,!1);for(const v of r){const b=m[t.required[v]];Me(b,y[v])}for(const v of o)if(v in y){const b=m[t.optional[v]];Me(b,y[v])}m.propsReady&&Me(m.propsReady,!0)}function c(m){return i.reduce((y,v)=>(y[v]=b=>{const S=m[t.methods[v]];Me(S,b)},y),{})}function u(m){return a.reduce((y,v)=>(y[v]=YN(m[t.events[v]]),y),{})}const d=E.forwardRef((m,y)=>{const{children:v,...b}=m,[S]=E.useState(()=>Hs(ZN(e),C=>{l(C,b)})),[T]=E.useState(n0(u,S));Xs(()=>{for(const C of a)C in b&&Xe(T[C],b[C]);return()=>{Object.values(T).map(Zd)}},[b,T,S]),Xs(()=>{l(S,b)}),E.useImperativeHandle(y,t0(c(S)));const w=n;return x.jsx(s.Provider,{value:S,children:n?x.jsx(w,{...MF([...r,...o,...a],b),children:v}):v})}),p=m=>E.useCallback(r0(Me,E.useContext(s)[m]),[m]),f=m=>{const y=E.useContext(s)[m],v=E.useCallback(b=>Xe(y,b),[y]);return E.useSyncExternalStore(v,()=>$t(y),()=>$t(y))},h=m=>{const y=E.useContext(s)[m],[v,b]=E.useState(n0($t,y));return Xs(()=>Xe(y,S=>{S!==v&&b(t0(S))}),[y,v]),v},g=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,y)=>{const v=E.useContext(s)[m];Xs(()=>Xe(v,y),[y,v])},useEmitterValue:g,usePublisher:p}}const Qs=E.createContext(void 0),D0=E.createContext(void 0),N0=typeof document<"u"?E.useLayoutEffect:E.useEffect;function pf(e){return"self"in e}function DF(e){return"body"in e}function F0(e,t,n,r=ti,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,g;const m=p.target;if(DF(m)||pf(m)){const v=pf(m)?m:m.defaultView;g=i?v.scrollX:v.scrollY,f=i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,h=i?v.innerWidth:v.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:h})};p.suppressFlushSync?y():vi.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-h)&&(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 h=p.behavior==="smooth";let g,m,y;pf(f)?(m=Math.max(bn(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):(m=f[i?"scrollWidth":"scrollHeight"],g=bn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const v=m-g;if(p.top=Math.ceil(Math.max(Math.min(v,p.top),0)),T0(g,m)||p.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:g}),h&&t(!0);return}h?(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 hf="-webkit-sticky",L0="sticky",V0=O0(()=>{if(typeof document>"u")return L0;const e=document.createElement("div");return e.style.position=hf,e.style.position===hf?hf:L0});function mf(e){return e}const NF=Ue(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(mf),i=le("div"),a=le(ti),s=(l,c=null)=>zt(re(r,he(u=>u[l]),at()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),FF=Ue(([e,t])=>({...e,...t}),it(M0,NF)),LF=({height:e})=>x.jsx("div",{style:{height:e}}),VF={overflowAnchor:"none",position:V0(),zIndex:1},j0={overflowAnchor:"none"},jF={...j0,display:"inline-block",height:"100%"},R0=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=un("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),h=un("gap"),g=Ae("horizontalDirection"),{callbackRef:m}=s0(n,p,d,e?ti:s,f,h,o,g,Ae("skipAnimationFrameInResizeObserver")),[y,v]=E.useState(0);yf("deviation",P=>{y!==P&&v(P)});const b=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||LF,T=Ae("ListComponent"),w=Ae("ItemComponent"),C=Ae("GroupComponent"),k=Ae("computeItemKey"),I=Ae("isSeeking"),A=Ae("groupIndices").length>0,N=Ae("alignToBottom"),L=Ae("initialItemFinalLocationReached"),R=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:N?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:N?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...st(b,c)}):x.jsx(T,{...st(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:R,children:(e?t.topItems:t.items).map(P=>{const O=P.originalIndex,D=k(O+t.firstItemIndex,P.data,c);return I?E.createElement(S,{...st(S,c),height:P.size,index:P.index,key:D,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...st(C,c),"data-index":O,"data-item-index":P.index,"data-known-size":P.size,key:D,style:VF},u(P.index,c)):E.createElement(w,{...st(w,c),...$0(w,P.data),"data-index":O,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:D,style:g?jF:j0},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),RF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},$F={outline:"none",overflowX:"auto",position:"relative"},oi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),zF={position:V0(),top:0,width:"100%",zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function $0(e,t){return{item:typeof e=="string"?void 0:t}}const BF=E.memo(function(){const e=Ae("HeaderComponent"),t=un("headerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),HF=E.memo(function(){const e=Ae("FooterComponent"),t=un("footerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null});function gf({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:h}=F0(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?$F:RF,...o},tabIndex:0,...i,...st(s,u),children:r})})}function vf({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),h=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:y}=F0(a,l,s,h,d);return N0(()=>{var v;return m.current=d||((v=f.current)==null?void 0:v.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",y),e("scrollBy",g),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...st(s,p),children:r})})}const WF=({children:e})=>{const t=E.useContext(Qs),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>oa(n,l=>bn(l,i?"width":"height")),[n,i]),s=Ln(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:oi(o),children:e})},qF=({children:e})=>{const t=E.useContext(Qs),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Ae("customScrollParent"),i=Qd(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:oi(a),children:e})},UF=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...zF,marginTop:`${n}px`},o=Ae("context");return x.jsx(t,{style:r,...st(t,o),children:e})},GF=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?ZF:KF,a=r||t?qF:WF;return x.jsxs(i,{...e,...st(i,o),children:[n&&x.jsx(UF,{children:x.jsx(R0,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(BF,{}),x.jsx(R0,{}),x.jsx(HF,{})]})]})}),{Component:YF,useEmitter:yf,useEmitterValue:Ae,usePublisher:un}=ff(FF,{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:{}},GF),KF=gf({useEmitter:yf,useEmitterValue:Ae,usePublisher:un}),ZF=vf({useEmitter:yf,useEmitterValue:Ae,usePublisher:un}),bf=YF,XF=Ue(()=>{const e=le(l=>x.jsxs("td",{children:["Item $",l]})),t=le(null),n=le(null),r=le(null),o=le({}),i=le(mf),a=le(ti),s=(l,c=null)=>zt(re(o,he(u=>u[l]),at()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),QF=Ue(([e,t])=>({...e,...t}),it(M0,XF)),JF=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),eL=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),tL={overflowAnchor:"none"},z0=E.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Fe("computeItemKey"),r=Fe("firstItemIndex"),o=Fe("isSeeking"),i=Fe("ScrollSeekPlaceholder")||JF,a=Fe("context"),s=Fe("TableRowComponent"),l=Fe("fixedHeaderHeight"),c=Fe("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...st(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...st(s,a),...$0(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:tL},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),nL=E.memo(function(){const e=Fe("listState"),t=Fe("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Fe("trackItemSizes"),c=Fe("itemSize"),u=Fe("log"),{callbackRef:d,ref:p}=s0(n,c,l,s,u,void 0,o,!1,Fe("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);xf("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,h(A))});const g=Fe("EmptyPlaceholder"),m=Fe("FillerRow")||eL,y=Fe("TableBodyComponent"),v=Fe("paddingTopAddition"),b=Fe("statefulTotalCount"),S=Fe("context");if(b===0&&g)return x.jsx(g,{...st(g,S)});const T=(t?e.topItems:[]).reduce((A,N)=>A+N.size,0),w=e.offsetTop+v+f-T,C=e.offsetBottom,k=w>0?x.jsx(m,{context:S,height:w},"padding-top"):null,I=C>0?x.jsx(m,{context:S,height:C},"padding-bottom"):null;return x.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...st(y,S),children:[k,t&&x.jsx(z0,{showTopList:!0}),x.jsx(z0,{}),I]})}),rL=({children:e})=>{const t=E.useContext(Qs),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Ln(E.useMemo(()=>oa(n,i=>bn(i,"height")),[n]),!0,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:oi(!1),children:e})},oL=({children:e})=>{const t=E.useContext(Qs),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=Qd(n,o,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:oi(!1),children:e})},iL=E.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Fe("fixedHeaderContent"),a=Fe("fixedFooterContent"),s=Fe("context"),l=Ln(E.useMemo(()=>oa(r,y=>bn(y,"height")),[r]),!0,Fe("skipAnimationFrameInResizeObserver")),c=Ln(E.useMemo(()=>oa(o,y=>bn(y,"height")),[o]),!0,Fe("skipAnimationFrameInResizeObserver")),u=n||t?lL:sL,d=n||t?oL:rL,p=Fe("TableComponent"),f=Fe("TableHeadComponent"),h=Fe("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...st(f,s),children:i()},"TableHead"):null,m=a?x.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...st(h,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...st(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...st(p,s),children:[g,x.jsx(nL,{},"TableBody"),m]})})})}),{Component:aL,useEmitter:xf,useEmitterValue:Fe,usePublisher:xn}=ff(QF,{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:{}},iL),sL=gf({useEmitter:xf,useEmitterValue:Fe,usePublisher:xn}),lL=vf({useEmitter:xf,useEmitterValue:Fe,usePublisher:xn}),cL=aL,B0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},uL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:H0,floor:Js,max:ha,min:wf,round:W0}=Math;function q0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function dL(e){return{...uL,items:e}}function el(e,t){return e&&e.width===t.width&&e.height===t.height}function fL(e,t){return e&&e.column===t.column&&e.row===t.row}const pL=Ue(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:g},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:v,windowScrollTo:b,windowViewportRect:S},T])=>{const w=le(0),C=le(0),k=le(B0),I=le({height:0,width:0}),A=le({height:0,width:0}),N=ze(),L=ze(),R=le(0),P=le(null),O=le({column:0,row:0}),D=ze(),j=ze(),F=le(!1),z=le(0),M=le(!0),$=le(!1),J=le(!1);Xe(re(h,Ne(z),Ce(([V,W])=>!!W)),()=>{Me(M,!1)}),Xe(re(At(h,M,A,I,z,$),Ce(([V,W,Y,ae,,B])=>V&&!W&&Y.height!==0&&ae.height!==0&&!B)),([,,,,V])=>{Me($,!0),sf(1,()=>{Me(N,V)}),Dn(re(c),()=>{Me(t,[0,0]),Me(M,!0)})}),be(re(j,Ce(V=>V!=null&&V.scrollTop>0),Nn(0)),C),Xe(re(h,Ne(j),Ce(([,V])=>V!=null)),([,V])=>{V&&(Me(I,V.viewport),Me(A,V.item),Me(O,V.gap),V.scrollTop>0&&(Me(F,!0),Dn(re(c,ni(1)),W=>{Me(F,!1)}),Me(l,{top:V.scrollTop})))}),be(re(I,he(({height:V})=>V)),d),be(re(At(Pe(I,el),Pe(A,el),Pe(O,(V,W)=>V&&V.column===W.column&&V.row===W.row),Pe(c)),he(([V,W,Y,ae])=>({gap:Y,item:W,scrollTop:ae,viewport:V}))),D),be(re(At(Pe(w),r,Pe(O,fL),Pe(A,el),Pe(I,el),Pe(P),Pe(C),Pe(F),Pe(M),Pe(z)),Ce(([,,,,,,,V])=>!V),he(([V,[W,Y],ae,B,xe,Ee,Oe,,Re,se])=>{const{column:ye,row:K}=ae,{height:ce,width:Q}=B,{width:ie}=xe;if(Oe===0&&(V===0||ie===0))return B0;if(Q===0){const Tn=lf(se,V),zn=Tn+Math.max(Oe-1,0);return dL(q0(Tn,zn,Ee))}const we=U0(ie,Q,ye);let X,ue;Re?W===0&&Y===0&&Oe>0?(X=0,ue=Oe-1):(X=we*Js((W+K)/(ce+K)),ue=we*H0((Y+K)/(ce+K))-1,ue=wf(V-1,ha(ue,we-1)),X=wf(ue,ha(0,X))):(X=0,ue=-1);const _e=q0(X,ue,Ee),{bottom:We,top:Ct}=G0(xe,ae,B,_e),mt=H0(V/we),Lt=mt*ce+(mt-1)*K-We;return{bottom:We,itemHeight:ce,items:_e,itemWidth:Q,offsetBottom:Lt,offsetTop:Ct,top:Ct}})),k),be(re(P,Ce(V=>V!==null),he(V=>V.length)),w),be(re(At(I,A,k,O),Ce(([V,W,{items:Y}])=>Y.length>0&&W.height!==0&&V.height!==0),he(([V,W,{items:Y},ae])=>{const{bottom:B,top:xe}=G0(V,ae,W,Y);return[xe,B]}),at(sa)),t);const te=le(!1);be(re(c,Ne(te),he(([V,W])=>W||V!==0)),te);const ee=en(re(At(k,w),Ce(([{items:V}])=>V.length>0),Ne(te),Ce(([[V,W],Y])=>{const ae=V.items[V.items.length-1].index===W-1;return(Y||V.bottom>0&&V.itemHeight>0&&V.offsetBottom===0&&V.items.length===W)&&ae}),he(([[,V]])=>V-1),at())),Z=en(re(Pe(k),Ce(({items:V})=>V.length>0&&V[0].index===0),Nn(0),at())),U=en(re(Pe(k),Ne(F),Ce(([{items:V},W])=>V.length>0&&!W),he(([{items:V}])=>({endIndex:V[V.length-1].index,startIndex:V[0].index})),at(m0),hr(0)));be(U,f.scrollSeekRangeChanged),be(re(N,Ne(I,A,w,O),he(([V,W,Y,ae,B])=>{const xe=w0(V),{align:Ee,behavior:Oe,offset:Re}=xe;let se=xe.index;se==="LAST"&&(se=ae-1),se=ha(0,se,wf(ae-1,se));let ye=Tf(W,B,Y,se);return Ee==="end"?ye=W0(ye-W.height+Y.height):Ee==="center"&&(ye=W0(ye-W.height/2+Y.height/2)),Re&&(ye+=Re),{behavior:Oe,top:ye}})),l);const G=zt(re(k,he(V=>V.offsetBottom+V.bottom)),0);return be(re(S,he(V=>({height:V.visibleHeight,width:V.visibleWidth}))),I),{customScrollParent:m,data:P,deviation:R,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:j,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:N,scrollTop:c,smoothScrollTargetReached:u,totalCount:w,useWindowScroll:y,viewportDimensions:I,windowScrollContainerState:v,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:G,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:D,stateRestoreInProgress:F,...T}},it(cf,Wt,pa,I0,gr,df,mr));function U0(e,t,n){return ha(1,Js((e+n)/(Js(t)+n)))}function G0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Tf(e,t,n,r[0].index);return{bottom:Tf(e,t,n,r[r.length-1].index)+o,top:i}}function Tf(e,t,n,r){const o=U0(e.width,n.width,t.column),i=Js(r/o),a=i*n.height+ha(0,i-1)*t.row;return a>0?a+t.row:a}const hL=Ue(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(mf),a=le("div"),s=le(ti),l=(d,p=null)=>zt(re(t,he(f=>f[d]),at()),p),c=le(!1),u=le(!1);return be(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")}}),mL=Ue(([e,t])=>({...e,...t}),it(pL,hL)),gL=E.memo(function(){const e=ut("gridState"),t=ut("listClassName"),n=ut("itemClassName"),r=ut("itemContent"),o=ut("computeItemKey"),i=ut("isSeeking"),a=dn("scrollHeight"),s=ut("ItemComponent"),l=ut("ListComponent"),c=ut("ScrollSeekPlaceholder"),u=ut("context"),d=dn("itemDimensions"),p=dn("gap"),f=ut("log"),h=ut("stateRestoreInProgress"),g=dn("reportReadyState"),m=Ln(E.useMemo(()=>y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const b=y.firstChild;if(b){const{height:S,width:T}=b.getBoundingClientRect();d({height:S,width:T})}p({column:K0("column-gap",getComputedStyle(y).columnGap,f),row:K0("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return N0(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),h?null:x.jsx(l,{className:t,ref:m,...st(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const v=o(y.index,y.data,u);return i?x.jsx(c,{...st(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},v):E.createElement(s,{...st(s,u),className:n,"data-index":y.index,key:v},r(y.index,y.data,u))})})}),vL=E.memo(function(){const e=ut("HeaderComponent"),t=dn("headerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),yL=E.memo(function(){const e=ut("FooterComponent"),t=dn("footerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...st(e,o)})}):null}),bL=({children:e})=>{const t=E.useContext(D0),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Ln(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:oi(!1),children:e})},xL=({children:e})=>{const t=E.useContext(D0),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ut("customScrollParent"),i=Qd(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:oi(!1),children:e})},wL=E.memo(function({...e}){const t=ut("useWindowScroll"),n=ut("customScrollParent"),r=n||t?SL:TL,o=n||t?xL:bL,i=ut("context");return x.jsx(r,{...e,...st(r,i),children:x.jsxs(o,{children:[x.jsx(vL,{}),x.jsx(gL,{}),x.jsx(yL,{})]})})}),{useEmitter:Y0,useEmitterValue:ut,usePublisher:dn}=ff(mL,{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"}},wL),TL=gf({useEmitter:Y0,useEmitterValue:ut,usePublisher:dn}),SL=vf({useEmitter:Y0,useEmitterValue:ut,usePublisher:dn});function K0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Sf=()=>{const e=E.useContext(Vo);return e?e.tweaks:ms},Z0=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("span",{className:je("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(Jx,{as:"button",type:"button","aria-description":r,title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(ay,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[x.jsx(oy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(kA,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ma=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:h,componentName:g,placeholder:m,hideLeft:y=!1,required:v,disabled:b,reportStatus:S},T)=>{const w=Sf(),C=S!==void 0?S:w.input.iconFeedback,k=d??f,I=Ot(),A=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:T,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:je("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[x.jsxs("label",{form:u,htmlFor:k,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(Z0,{info:s,hideLeft:y,reportStatus:C,title:h,placeholder:m,children:A||n?x.jsxs(E.Fragment,{children:[v?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),EL=e=>x.jsx(E.Fragment,{children:e.children}),CL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},kL={caseSensitive:!1,sort:!1},PL=[],AL=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(Jn,{children:t.children})})}),_L=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),IL={List:AL,Item:_L},ii=320,Ef=40,OL=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:h=!1,...g},m)=>{const y=E.useRef(null),v=E.useRef(null),b=g.value??g.defaultValue??"",S=Ot(),[T,w]=E.useState(()=>Math.min(ii,Ef*o.length)),[C,k]=E.useState(!1),[I,A]=E.useState(""),[N,L]=E.useState(b),[R,P]=E.useState(()=>{var K;return((K=o.find(ce=>ce.value===b))==null?void 0:K.label)??b}),[O,D]=E.useState(null),j=E.useRef(PL),F=h&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Xr(F,["value","label"],kL).search(I),M=()=>{k(!1),w(0)},$=z.filter(K=>K.hidden!==!0),J=h?void 0:`^(${o.map(K=>`${nd(K.value)}${K.label?"|"+nd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(ce=>ce.value===g.value);L((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||w(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let ce=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min($.length,10)).forEach(we=>{const X=we.getBoundingClientRect();ce+=X.height});const ie=Math.min(ce,ii);w(ie)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:G}=Yr({open:C,transform:!0,strategy:"absolute",onOpenChange:k,whileElementsMounted:Xi,middleware:[Qi(4),dx({padding:10,elementContext:"reference",apply(K){const ce=y.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),ie=(Q==null?void 0:Q.getBoundingClientRect().height)||0,we=Math.min(ie<Ef?ii:ie,ii);vi.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<Ef?void w(we):void w(Math.min(X,ii))},50)),Object.assign(K.elements.floating.style,{width:`${ce}px`,maxWidth:`${ce}px`,maxHeight:`${ii}`})}})]}),V=Ux(G,CL),{getReferenceProps:W,getFloatingProps:Y,getItemProps:ae}=Kr([Zr(G,{role:"listbox"}),Gr(G),Ud(G,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return yi(K)},[]);const B=(K,ce)=>{L(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const ie=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ie),g.onChange&&g.onChange(ie),P(K.label??""),M(),A(""),D(ce)},xe=K=>{var Q;const ce=K.target.value;return A(ce),!C&&ce===""?k(!0):(K.target.name=g.name||"",ce?k(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Ee=()=>{var K;k(!0),A(""),(K=U.reference.current)==null||K.focus()},Oe=()=>{D(K=>K===null?0:K),k(!0),A("")},Re=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),A(""),L(""),P(""),jh(U.reference.current),M()},se=g.id||g.name,ye=$.length===0;return x.jsxs(ma,{...g,left:e,error:t,ref:y,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Ee,children:[x.jsx(Fu,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),N?x.jsx("button",{type:"button",onClick:Re,className:"p-2 transition-colors link:text-danger md:p-1",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{"data-shadow":"true",...W({...g,onChange:xe,onFocus:Oe,pattern:J,ref:U.setReference,name:`${se}-shadow`,id:`${se}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var ce,Q;if(K.key==="Escape")return K.currentTarget.blur(),M();if(C){if(K.key==="ArrowDown"){let ie=ct.number(O)?O+1:0;return ie>$.length-1&&(ie=0),(ce=v.current)==null||ce.scrollIntoView({index:ie}),D(ie)}if(K.key==="ArrowUp"){let ie=ct.number(O)?O-1:$.length-1;return ie<0&&(ie=$.length-1),(Q=v.current)==null||Q.scrollIntoView({index:ie}),D(ie)}if(K.key==="Enter"){if(O!==null&&$[O])return K.preventDefault(),B($[O],O);if($.length===1)return K.preventDefault(),B($[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":se,"data-target":se,required:f,value:C?I:R||N,"aria-autocomplete":"list",autoComplete:"off",className:je("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",g.className)}),x.jsx("input",{id:se,name:se,type:"hidden","data-origin":se,ref:m,required:f,defaultValue:g.value||N||void 0}),x.jsx(qr,{preserveTabOrder:!0,children:C?x.jsx(Xo,{guards:!0,returnFocus:!1,context:G,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(ft.ul,{...Y({ref:U.setFloating,style:{...V.styles,top:ee??0,position:Z,left:(te??0)+(N?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ye?"auto":T},className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[ye?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||S.autocompleteEmpty})}):null,x.jsx(bf,{ref:v,hidden:ye,data:$,style:{height:T},components:IL,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,ce)=>{const Q=ce.Render??EL,ie=N===ce.value||N===ce.label,we=O===K,X=ce.label??ce.value;return x.jsx("button",{"data-value":ce.value,...ae({ref:ue=>void(j.current[K]=ue),role:"option",type:"button","aria-checked":ie,"aria-current":ie,"aria-selected":ie,"aria-busy":ce.disabled,onClick:()=>B(ce,K),className:`cursor-pointer w-full p-2 text-left ${ie?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(Q,{...g,label:ce.label,value:ce.value,children:X})})}})]})}):null})]})}),Cf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return x.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:je("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:je("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,x.jsx("span",{"data-name":"checkbox-label",className:je("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),X0=(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:h="text",labelClassName:g,feedback:m=null,hideLeft:y=!1,loading:v,...b},S)=>{const T=e,w=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=yi(C.current),A=r==null?void 0:r(k),N=L=>{const R=L;if(R.key==="Enter"&&k.enterKeyHint==="next"){const P=k.getAttribute("data-next");if(P){const O=document.getElementById(P);if(O)return O.focus(),void R.preventDefault()}}};return k.addEventListener("keydown",N),()=>{A==null||A(),I(),k.removeEventListener("keydown",N)}},[]),x.jsx(ma,{...n,info:i,left:a,error:l,right:c,loading:v,form:b.form,name:b.name,feedback:m,hideLeft:y,title:b.title,container:je(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:x.jsx(T,{...n,...b,id:w,name:w,type:h,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Sc(S,C),className:je("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),ga=X0(zy,"input",{type:"text"}),Q0=new Date(1970,11,31),kf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},J0={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},ML={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")},Pf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},DL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=ed(t),l=E.useId(),c=Ot(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),g=Pf(u,Q0).flatMap(C=>ct.keyof(kf,C.type)?kf[C.type](C.value):[]),m=Pf(u,Q0).reduce((C,k)=>C+(ct.keyof(J0,k.type)?J0[k.type](k.value):""),""),[y,v]=E.useState(d?Pf(u,d).reduce((C,k)=>C+(ct.keyof(kf,k.type)?ML[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(v(k),g.length===k.length&&g.every((A,N)=>{const L=k.charAt(N);return typeof A=="string"?L===A:A.test(L)})){const A=Do(jI(k,m,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),v(C?j_(C,m):"")),T=py(d),w=T?d.toISOString():void 0;return x.jsx(ga,{...i,mask:g,value:y,id:void 0,name:void 0,className:"uppercase","data-value":w,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??m,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:w,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(Jo,{open:f,onChange:h,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(EA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(cb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),NL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],FL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],LL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],VL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ew=(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 tw(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?VL:LL:t.binary?FL:NL,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=ew(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=ew(Number(e),t.locale,a),c=n[s];return i+l+r+c}var tl={exports:{}},nl={exports:{}},Ge={};/** @license React v16.13.1
172
+ */var SD=["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])"],Ms=SD.join(","),ax=typeof Element>"u",qo=ax?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ds=!ax&&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},Ns=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},TD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ED=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&qo.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},CD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ns(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=qo.call(a,Ms);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ns(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},sx=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)||TD(t))&&!sx(t)?0:t.tabIndex},kD=function(t,n){var r=lx(t);return r<0&&n&&!sx(t)?0:r},PD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},cx=function(t){return t.tagName==="INPUT"},AD=function(t){return cx(t)&&t.type==="hidden"},_D=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},ID=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OD=function(t){if(!t.name)return!0;var n=t.form||Ds(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=ID(o,t.form);return!i||i===t},MD=function(t){return cx(t)&&t.type==="radio"},DD=function(t){return MD(t)&&!OD(t)},ND=function(t){var n,r=t&&Ds(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=Ds(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},ux=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},FD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ds(t);if(l&&!l.shadowRoot&&o(l)===!0)return ux(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(ND(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ux(t);return!1},LD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},VD=function(t,n){return!(n.disabled||Ns(n)||AD(n)||FD(n,t)||_D(n)||LD(n))},Fd=function(t,n){return!(DD(n)||lx(n)<0||!VD(t,n))},jD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},$D=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=kD(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(PD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ji=function(t,n){n=n||{};var r;return n.getShadowRoot?r=CD([t],n.includeContainer,{filter:Fd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:jD}):r=ED(t,n.includeContainer,Fd.bind(null,n)),$D(r)},RD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Ms)===!1?!1:Fd(n,t)};function dx(e,t,n){let{reference:r,floating:o}=e;const i=Br(t),a=Dd(t),s=Md(a),l=lr(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(Wo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const zD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=dx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[h]:{...f[h],...T}},w&&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}=dx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Ld(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}=Ho(t,e),m=ix(f),h=s[p?d==="floating"?"reference":"floating":d],v=Os(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+m.top)/T.y,bottom:(w.bottom-v.bottom+m.bottom)/T.y,left:(v.left-w.left+m.left)/T.x,right:(w.right-v.right+m.right)/T.x}}const BD=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}=Ho(e,t)||{};if(c==null)return{};const d=ix(u),p={x:n,y:r},f=Dd(o),m=Md(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[x]||i.floating[m]);const P=T/2-w/2,I=C/2-g[m]/2-1,_=Mn(d[v],I),M=Mn(d[y],I),L=_,$=C-g[m]-M,A=C/2-g[m]/2+P,O=Od(L,A,$),N=!l.arrow&&Wo(o)!=null&&A!==O&&i.reference[m]/2-(A<L?_:M)-g[m]/2<0,V=N?A<L?A-L:A-$:0;return{[f]:p[f]+V,data:{[f]:O,centerOffset:A-O-V,...N&&{alignmentOffset:V}},reset:N}}}),HD=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}=Ho(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=lr(o),y=Br(s),x=lr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Is(s)]:yD(s)),S=m!=="none";!p&&S&&w.push(...xD(s,g,m,T));const C=[s,...w],P=await Ld(t,h),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[v]),d){const A=vD(o,a,T);I.push(P[A[0]],P[A[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(A=>A<=0)){var M,L;const A=(((M=i.flip)==null?void 0:M.index)||0)+1,O=C[A];if(O)return{data:{index:A,overflows:_},reset:{placement:O}};let N=(L=_.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!N)switch(f){case"bestFit":{var $;const V=($=_.filter(F=>{if(S){const z=Br(F.placement);return z===y||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,D)=>z+D,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:$[0];V&&(N=V);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function WD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=lr(n),s=Wo(n),l=Br(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ho(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 qD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await WD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},UD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=Ho(e,t),c={x:n,y:r},u=await Ld(t,l),d=Br(lr(o)),p=ox(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],x=f-u[v];f=Od(y,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[h],x=m-u[v];m=Od(y,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},YD=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}=Ho(e,t),l=await Ld(t,s),c=lr(n),u=Wo(n),d=Br(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,y=Mn(f-l[m],h),x=Mn(p-l[g],v),T=!t.middlewareData.shift;let w=y,S=x;if(d?S=u||T?Mn(x,v):v:w=u||T?Mn(y,h):h,T&&!u){const P=Jt(l.left,0),I=Jt(l.right,0),_=Jt(l.top,0),M=Jt(l.bottom,0);d?S=p-2*(P!==0||I!==0?P+I:Jt(l.left,l.right)):w=f-2*(_!==0||M!==0?_+M:Jt(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function fx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_s(n)!==i||_s(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Vd(e){return Je(e)?e:e.contextElement}function Uo(e){const t=Vd(e);if(!Et(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fx(t);let a=(i?_s(n.width):n.width)/r,s=(i?_s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const GD=sr(0);function px(e){const t=Ht(e);return!Td()||!t.visualViewport?GD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Vd(e);let a=sr(1);t&&(r?Je(r)&&(a=Uo(r)):a=Uo(e));const s=KD(i,n,r)?px(i):sr(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=Ht(i),f=r&&Je(r)?Ht(r):r;let m=p,g=Ed(m);for(;g&&r&&f!==m;){const h=Uo(g),v=g.getBoundingClientRect(),y=Qt(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,m=Ht(g),g=Ed(m)}}return Os({width:u,height:d,x:l,y:c})}function ZD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qn(r),s=t?Ps(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=Et(r);if((d||!d&&!i)&&((or(r)!=="body"||Qi(a))&&(l=As(r)),Et(r))){const p=Hr(r);c=Uo(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 XD(e){return Array.from(e.getClientRects())}function hx(e){return Hr(qn(e)).left+As(e).scrollLeft}function QD(e){const t=qn(e),n=As(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+hx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function JD(e,t){const n=Ht(e),r=qn(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=Td();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function eN(e,t){const n=Hr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?Uo(e):sr(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 mx(e,t,n){let r;if(t==="viewport")r=JD(e,n);else if(t==="document")r=QD(qn(e));else if(Je(t))r=eN(t,n);else{const o=px(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Os(r)}function gx(e,t){const n=Un(e);return n===t||!Je(n)||ir(n)?!1:Qt(n).position==="fixed"||gx(n,t)}function tN(e,t){const n=t.get(e);if(n)return n;let r=ar(e,[],!1).filter(s=>Je(s)&&or(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Un(e):e;for(;Je(a)&&!ir(a);){const s=Qt(a),l=Sd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Qi(a)&&!l&&gx(e,a))?r=r.filter(u=>u!==a):o=s,a=Un(a)}return t.set(e,r),r}function nN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ps(t)?[]:tN(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=mx(t,u,o);return c.top=Jt(d.top,c.top),c.right=Mn(d.right,c.right),c.bottom=Mn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},mx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rN(e){const{width:t,height:n}=fx(e);return{width:t,height:n}}function oN(e,t,n){const r=Et(t),o=qn(t),i=n==="fixed",a=Hr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((or(t)!=="body"||Qi(o))&&(s=As(t)),r){const d=Hr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=hx(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 jd(e){return Qt(e).position==="static"}function vx(e,t){return!Et(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function yx(e,t){const n=Ht(e);if(Ps(e))return n;if(!Et(e)){let o=Un(e);for(;o&&!ir(o);){if(Je(o)&&!jd(o))return o;o=Un(o)}return n}let r=vx(e,t);for(;r&&cD(r)&&jd(r);)r=vx(r,t);return r&&ir(r)&&jd(r)&&!Sd(r)?n:r||uD(e)||n}const iN=async function(e){const t=this.getOffsetParent||yx,n=this.getDimensions,r=await n(e.floating);return{reference:oN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aN(e){return Qt(e).direction==="rtl"}const sN={convertOffsetParentRelativeRectToViewportRelativeRect:ZD,getDocumentElement:qn,getClippingRect:nN,getOffsetParent:yx,getElementRects:iN,getClientRects:XD,getDimensions:rN,getScale:Uo,isElement:Je,isRTL:aN};function lN(e,t){let n=null,r;const o=qn(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=Bo(u),m=Bo(o.clientWidth-(c+d)),g=Bo(o.clientHeight-(u+p)),h=Bo(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Mn(1,l))||1};let x=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!x)return a();S?a(!1,S):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 ea(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=Vd(e),u=o||i?[...c?ar(c):[],...ar(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?lN(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Hr(e):null;l&&h();function h(){const v=Hr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const cN=qD,uN=UD,dN=HD,fN=YD,bx=BD,pN=(e,t,n)=>{const r=new Map,o={platform:sN,...n},i={...o.platform,_c:r};return zD(e,t,{...o,platform:i})};var Fs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ls(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(!Ls(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)&&!Ls(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function xx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(e,t){const n=xx(e);return Math.round(t*n)/n}function $d(e){const t=k.useRef(e);return Fs(()=>{t.current=e}),t}function hN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Ls(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(F=>{F!==S.current&&(S.current=F,g(F))},[]),x=k.useCallback(F=>{F!==C.current&&(C.current=F,v(F))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),P=k.useRef(u),I=l!=null,_=$d(l),M=$d(o),L=$d(c),$=k.useCallback(()=>{if(!S.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};M.current&&(F.platform=M.current),pN(S.current,C.current,F).then(z=>{const D={...z,isPositioned:L.current!==!1};A.current&&!Ls(P.current,D)&&(P.current=D,Oa.flushSync(()=>{d(D)}))})},[p,t,n,M,L]);Fs(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const A=k.useRef(!1);Fs(()=>(A.current=!0,()=>{A.current=!1}),[]),Fs(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(_.current)return _.current(T,w,$);$()}},[T,w,$,_,I]);const O=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:x}),[y,x]),N=k.useMemo(()=>({reference:T,floating:w}),[T,w]),V=k.useMemo(()=>{const F={position:n,left:0,top:0};if(!N.floating)return F;const z=wx(N.floating,u.x),D=wx(N.floating,u.y);return s?{...F,transform:"translate("+z+"px, "+D+"px)",...xx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:D}},[n,s,N.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:$,refs:O,elements:N,floatingStyles:V}),[u,$,O,N,V])}const mN=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?bx({element:r.current,padding:o}).fn(n):{}:r?bx({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...cN(e),options:[e,t]}),Rd=(e,t)=>({...uN(e),options:[e,t]}),zd=(e,t)=>({...dN(e),options:[e,t]}),Sx=(e,t)=>({...fN(e),options:[e,t]}),Tx=(e,t)=>({...mN(e),options:[e,t]});function Bd(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Ex={...k},gN=Ex.useInsertionEffect||(e=>e());function Pt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return gN(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Hd="ArrowUp",na="ArrowDown",Yo="ArrowLeft",Go="ArrowRight";function Vs(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Wd(e,t){return $t(e,{disabledIndices:t})}function Cx(e,t){return $t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $t(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&&js(a,s,o));return s}function vN(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===Hd){if(u&&Nt(n),c===-1)d=l;else if(d=$t(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}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Nt(n),c===-1?d=s:(d=$t(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=$t(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=Bo(c/i);n.key===Go&&(u&&Nt(n),c%i!==i-1?(d=$t(e,{startingIndex:c,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a})),Vs(d,i,p)&&(d=c)),n.key===Yo&&(u&&Nt(n),c%i!==0?(d=$t(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Vs(d,i,p)&&(d=c));const f=Bo(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Yo?l:$t(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function yN(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 bN(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 xN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function js(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 kx=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():kx=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function wN(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 SN(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 Px=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function TN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(wN).forEach((u,d)=>{l.set(u,d)}),SN(o,l)||i(l)},[o]),k.createElement(Px.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Ax(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(Px),[s,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Ko(){return Ko=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},Ko.apply(this,arguments)}let _x=!1,EN=0;const Ix=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+EN++;function CN(){const[e,t]=k.useState(()=>_x?Ix():void 0);return Be(()=>{e==null&&t(Ix())},[]),k.useEffect(()=>{_x=!0},[]),e}const Zo=Ex.useId||CN;let oa;process.env.NODE_ENV!=="production"&&(oa=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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function kN(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const Ox=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Zo(),[v,y]=k.useState(!1);if(Be(()=>{if(!o)return;Qt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const x=c*2,T=x/2,w=a/2*(l/-8+1),S=s/2*l/4,[C,P]=r.split("-"),I=!!p,_=C==="top"||C==="bottom",M=u&&P==="end"?"bottom":"top";let L=u&&P==="end"?"right":"left";u&&v&&(L=P==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",N={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Ko({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[L]:$,[M]:A,[C]:_||I?"100%":"calc(100% - "+x/2+"px)",transform:""+N+(f??""),...m}}),x>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:O}),k.createElement("path",{stroke:x&&!p?g.fill:"none",d:O}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+x,height:a})))});function Mx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.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 Dx=k.createContext(null),Nx=k.createContext(null),ur=()=>{var e;return((e=k.useContext(Dx))==null?void 0:e.id)||null},dr=()=>k.useContext(Nx);function PN(e){const t=Zo(),n=dr(),o=ur();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function AN(e){const{children:t,id:n}=e,r=ur();return k.createElement(Dx.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function _N(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>Mx())[0];return k.createElement(Nx.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function fr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Fx=fr("safe-polygon");function qd(e,t,n){return n&&!zo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Lx(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=dr(),m=ur(),g=Ft(c),h=Ft(l),v=Ft(n),y=k.useRef(),x=k.useRef(-1),T=k.useRef(),w=k.useRef(-1),S=k.useRef(!0),C=k.useRef(!1),P=k.useRef(()=>{}),I=k.useCallback(()=>{var O;const N=(O=o.current.openEvent)==null?void 0:O.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function O(N){let{open:V}=N;V||(clearTimeout(x.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function O(V){I()&&r(!1,V,"hover")}const N=Mt(a.floating).documentElement;return N.addEventListener("mouseleave",O),()=>{N.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const _=k.useCallback(function(O,N,V){N===void 0&&(N=!0),V===void 0&&(V="hover");const F=qd(h.current,"close",y.current);F&&!T.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,O,V),F)):N&&(clearTimeout(x.current),r(!1,O,V))},[h,r]),M=Pt(()=>{P.current(),T.current=void 0}),L=Pt(()=>{if(C.current){const O=Mt(a.floating).body;O.style.pointerEvents="",O.removeAttribute(Fx),C.current=!1}});k.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(D){if(clearTimeout(x.current),S.current=!1,u&&!zo(y.current)||d>0&&!qd(h.current,"open"))return;const R=qd(h.current,"open",y.current);R?x.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},R):r(!0,D,"hover")}function V(D){if(O())return;P.current();const R=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),T.current=g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D,!0,"safe-polygon")}});const te=T.current;R.addEventListener("mousemove",te),P.current=()=>{R.removeEventListener("mousemove",te)};return}(y.current==="touch"?!yt(a.floating,D.relatedTarget):!0)&&_(D)}function F(D){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D)}})(D))}if(Je(a.domReference)){var z;const D=a.domReference;return n&&D.addEventListener("mouseleave",F),(z=a.floating)==null||z.addEventListener("mouseleave",F),p&&D.addEventListener("mousemove",N,{once:!0}),D.addEventListener("mouseenter",N),D.addEventListener("mouseleave",V),()=>{var R;n&&D.removeEventListener("mouseleave",F),(R=a.floating)==null||R.removeEventListener("mouseleave",F),p&&D.removeEventListener("mousemove",N),D.removeEventListener("mouseenter",N),D.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,_,M,L,r,n,v,f,h,g,o]),Be(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const V=Mt(a.floating).body;V.setAttribute(Fx,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(Je(a.domReference)&&F){var N;const z=a.domReference,D=f==null||(N=f.nodesRef.current.find(R=>R.id===m))==null||(N=N.context)==null?void 0:N.elements.floating;return D&&(D.style.pointerEvents=""),z.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{z.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),Be(()=>{n||(y.current=void 0,M(),L())},[n,M,L]),k.useEffect(()=>()=>{M(),clearTimeout(x.current),clearTimeout(w.current),L()},[s,a.domReference,M,L]);const $=k.useMemo(()=>{function O(N){y.current=N.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(N){const{nativeEvent:V}=N;function F(){!S.current&&!v.current&&r(!0,V,"hover")}u&&!zo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,v,d]),A=k.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(O){_(O.nativeEvent,!1)}}),[_]);return k.useMemo(()=>s?{reference:$,floating:A}:{},[s,$,A])}function IN(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 Wr(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 ON(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Xo=new WeakMap,Rs=new WeakSet,zs={},Ud=0;const MN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Vx=e=>e&&(e.host||Vx(e.parentNode)),DN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function NN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=DN(t,e),s=new Set,l=new Set(a),c=[];zs[o]||(zs[o]=new WeakMap);const u=zs[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(or(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(Xo.get(m)||0)+1,y=(u.get(m)||0)+1;Xo.set(m,v),u.set(m,y),c.push(m),v===1&&h&&Rs.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Ud++,()=>{c.forEach(f=>{const m=(Xo.get(f)||0)-1,g=(u.get(f)||0)-1;Xo.set(f,m),u.set(f,g),m||(!Rs.has(f)&&i&&f.removeAttribute(i),Rs.delete(f)),g||f.removeAttribute(o)}),Ud--,Ud||(Xo=new WeakMap,Xo=new WeakMap,Rs=new WeakSet,zs={})}}function jx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return NN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $x(e,t){const n=Ji(e,Qo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function Rx(){return $x(document.body,"next")}function zx(){return $x(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function FN(e){Ji(e,Qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function LN(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 VN(e,t,n){const r=e.indexOf(t);function o(a){const s=fr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Yd={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 jN;function Bx(e){e.key==="Tab"&&(e.target,clearTimeout(jN))}const Bs=k.forwardRef(function(t,n){const[r,o]=k.useState();Be(()=>(Pd()&&o("button"),document.addEventListener("keydown",Bx),()=>{document.removeEventListener("keydown",Bx)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:Yd};return k.createElement("span",Ko({},t,i))}),Hx=k.createContext(null),Wx=fr("portal");function $N(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=qx(),[i,a]=k.useState(null),s=k.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Wx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Je(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(Wx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function qr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=$N({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?LN:FN)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(Hx.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=zx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:Yd}),i&&Oa.createPortal(t,i),p&&i&&k.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Rx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const qx=()=>k.useContext(Hx),RN=20;let Ur=[];function Gd(e){Ur=Ur.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!RD(t,Qo())){const n=Ji(t,Qo())[0];n&&(t=n)}Ur.push(t),Ur.length>RN&&(Ur=Ur.slice(-20))}}function Ux(){return Ur.slice().reverse().find(e=>e.isConnected)}const zN=k.forwardRef(function(t,n){return k.createElement("button",Ko({},t,{type:"button",ref:n,tabIndex:-1,style:Yd}))});function Jo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:y,elements:{domReference:x,floating:T}}=t,w=typeof a=="number"&&a<0,S=rx(x)&&w,C=MN()?i:!0,P=Ft(o),I=Ft(a),_=Ft(s),M=dr(),L=qx(),$=k.useRef(null),A=k.useRef(null),O=k.useRef(!1),N=k.useRef(!1),V=k.useRef(-1),F=L!=null,z=T==null?void 0:T.firstElementChild,D=(z==null?void 0:z.id)===y?z:T,R=Pt(function(Z){return Z===void 0&&(Z=D),Z?Ji(Z,Qo()):[]}),J=Pt(Z=>{const U=R(Z);return P.current.map(Y=>x&&Y==="reference"?x:D&&Y==="floating"?D:U).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(Y){if(Y.key==="Tab"){yt(D,gn(Mt(D)))&&R().length===0&&!S&&Nt(Y);const j=J(),W=On(Y);P.current[0]==="reference"&&W===x&&(Nt(Y),Y.shiftKey?cr(j[j.length-1]):cr(j[1])),P.current[1]==="floating"&&W===D&&Y.shiftKey&&(Nt(Y),cr(j[0]))}}const U=Mt(D);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,x,D,c,P,S,R,J]),k.useEffect(()=>{if(r||!T)return;function Z(U){const Y=On(U),W=R().indexOf(Y);W!==-1&&(V.current=W)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,R]),k.useEffect(()=>{if(r||!d)return;function Z(){N.current=!0,setTimeout(()=>{N.current=!1})}function U(Y){const j=Y.relatedTarget;queueMicrotask(()=>{const W=!(yt(x,j)||yt(T,j)||yt(j,T)||yt(L==null?void 0:L.portalNode,j)||j!=null&&j.hasAttribute(fr("focus-guard"))||M&&(Wr(M.nodesRef.current,m).find(G=>{var ae,B;return yt((ae=G.context)==null?void 0:ae.elements.floating,j)||yt((B=G.context)==null?void 0:B.elements.domReference,j)})||IN(M.nodesRef.current,m).find(G=>{var ae,B;return((ae=G.context)==null?void 0:ae.elements.floating)===j||((B=G.context)==null?void 0:B.elements.domReference)===j})));if(l&&W&&gn(Mt(D))===Mt(D).body){Et(D)&&(D==null||D.focus());const G=V.current,ae=R(),B=ae[G]||ae[ae.length-1]||D;Et(B)&&B.focus()}(S||!c)&&j&&W&&!N.current&&j!==Ux()&&(O.current=!0,g(!1,Y))})}if(T&&Et(x))return x.addEventListener("focusout",U),x.addEventListener("pointerdown",Z),T.addEventListener("focusout",U),()=>{x.removeEventListener("focusout",U),x.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",U)}},[r,x,T,D,c,m,M,L,g,d,l,R,S]),k.useEffect(()=>{var Z;if(r)return;const U=Array.from((L==null||(Z=L.portalNode)==null?void 0:Z.querySelectorAll("["+fr("portal")+"]"))||[]);if(T){const Y=[T,...U,$.current,A.current,P.current.includes("reference")||S?x:null].filter(W=>W!=null),j=c||S?jx(Y,C,!C):jx(Y);return()=>{j()}}},[r,x,T,c,P,L,S,C]),Be(()=>{if(r||!Et(D))return;const Z=Mt(D),U=gn(Z);queueMicrotask(()=>{const Y=J(D),j=I.current,W=(typeof j=="number"?Y[j]:j.current)||D,G=yt(D,U);!w&&!G&&p&&cr(W,{preventScroll:W===D})})},[r,p,D,w,J,I]),Be(()=>{if(r||!D)return;let Z=!1;const U=Mt(D),Y=gn(U);let W=v.current.openEvent;const G=f.domReference.current;Gd(Y);function ae(B){let{open:xe,reason:Ee,event:Oe,nested:$e}=B;xe&&(W=Oe),Ee==="escape-key"&&f.domReference.current&&Gd(f.domReference.current),Ee==="hover"&&Oe.type==="mouseleave"&&(O.current=!0),Ee==="outside-press"&&($e?(O.current=!1,Z=!0):O.current=!(tx(Oe)||kd(Oe)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const B=gn(U),xe=yt(T,B)||M&&Wr(M.nodesRef.current,m).some(se=>{var ye;return yt((ye=se.context)==null?void 0:ye.elements.floating,B)});(xe||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&Gd(f.domReference.current);const Oe=G||Y,$e=Ji(Mt(Oe).body,Qo());queueMicrotask(()=>{let se=Ux();!se&&Et(Oe)&&T&&(se=VN($e,Oe,T)),_.current&&!O.current&&Et(se)&&(!(se!==B&&B!==U.body)||xe)&&se.focus({preventScroll:Z})})}},[r,T,D,_,v,f,h,M,m]),Be(()=>{if(!r&&L)return L.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,c,p,g,f,d]),Be(()=>{if(r||!D||typeof MutationObserver!="function"||w)return;const Z=()=>{const Y=D.getAttribute("tabindex"),j=R(),W=gn(Mt(T)),G=j.indexOf(W);G!==-1&&(V.current=G),P.current.includes("floating")||W!==f.domReference.current&&j.length===0?Y!=="0"&&D.setAttribute("tabindex","0"):Y!=="-1"&&D.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,T,D,f,P,R,w]);function te(Z){return r||!u||!c?null:k.createElement(zN,{ref:Z==="start"?$:A,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!S:!0)&&(F||c);return k.createElement(k.Fragment,null,ee&&k.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:Z=>{if(c){const Y=J();cr(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(O.current=!1,ia(Z,L.portalNode)){const Y=Rx()||x;Y==null||Y.focus()}else{var U;(U=L.beforeOutsideRef.current)==null||U.focus()}}}),!S&&te("start"),n,te("end"),ee&&k.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:Z=>{if(c)cr(J()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(O.current=!0),ia(Z,L.portalNode)){const Y=zx()||x;Y==null||Y.focus()}else{var U;(U=L.afterOutsideRef.current)==null||U.focus()}}}))}const Kd=new Set,BN=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Zo();return Be(()=>{if(!r)return;Kd.add(i);const a=/iP(hone|ad|od)|iOS/.test(Cd()),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()=>{Kd.delete(i),Kd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Yx(e){return Et(e.target)&&e.target.tagName==="BUTTON"}function Gx(e){return Id(e)}function aa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(zo(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}zo(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||Yx(m))&&(m.key===" "&&!Gx(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Yx(m)||Gx(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function HN(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 Kx(e){return e!=null&&e.clientX!=null}function WN(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=Pt((S,C)=>{d.current||r.current.openEvent&&!Kx(r.current.openEvent)||a.setPositionReference(HN(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=Pt(S=>{c!=null||u!=null||(n?p.current||h([]):v(S.clientX,S.clientY))}),x=zo(f)?o:n,T=k.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const S=Ht(o);function C(P){const I=On(P);yt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(P.clientX,P.clientY)}if(!r.current.openEvent||Kx(r.current.openEvent)){S.addEventListener("mousemove",C);const P=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=P,P}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);k.useEffect(()=>T(),[T,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function S(C){let{pointerType:P}=C;m(P)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const qN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},UN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zx=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 Yr(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=dr(),h=Pt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),x=k.useRef(!1),{escapeKey:T,outsidePress:w}=Zx(f),{escapeKey:S,outsidePress:C}=Zx(m),P=Pt(A=>{var O;if(!n||!a||!s||A.key!=="Escape")return;const N=(O=i.current.floatingContext)==null?void 0:O.nodeId,V=g?Wr(g.nodesRef.current,N):[];if(!T&&(A.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(z=>{var D;if((D=z.context)!=null&&D.open&&!z.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,fD(A)?A.nativeEvent:A,"escape-key")}),I=Pt(A=>{var O;const N=()=>{var V;P(A),(V=On(A))==null||V.removeEventListener("keydown",N)};(O=On(A))==null||O.addEventListener("keydown",N)}),_=Pt(A=>{var O;const N=y.current;y.current=!1;const V=x.current;if(x.current=!1,c==="click"&&V||N||typeof v=="function"&&!v(A))return;const F=On(A),z="["+fr("inert")+"]",D=Mt(o.floating).querySelectorAll(z);let R=Je(F)?F:null;for(;R&&!ir(R);){const Z=Un(R);if(ir(Z)||!Je(Z))break;R=Z}if(D.length&&Je(F)&&!pD(F)&&!yt(F,o.floating)&&Array.from(D).every(Z=>!yt(R,Z)))return;if(Et(F)&&$){const Z=F.clientWidth>0&&F.scrollWidth>F.clientWidth,U=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let Y=U&&A.offsetX>F.clientWidth;if(U&&Qt(F).direction==="rtl"&&(Y=A.offsetX<=F.offsetWidth-F.clientWidth),Y||Z&&A.offsetY>F.clientHeight)return}const J=(O=i.current.floatingContext)==null?void 0:O.nodeId,te=g&&Wr(g.nodesRef.current,J).some(Z=>{var U;return _d(A,(U=Z.context)==null?void 0:U.elements.floating)});if(_d(A,o.floating)||_d(A,o.domReference)||te)return;const ee=g?Wr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,A,"outside-press")}),M=Pt(A=>{var O;const N=()=>{var V;_(A),(V=On(A))==null||V.removeEventListener(c,N)};(O=On(A))==null||O.addEventListener(c,N)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function A(V){r(!1,V,"ancestor-scroll")}const O=Mt(o.floating);s&&O.addEventListener("keydown",S?I:P,S),v&&O.addEventListener(c,C?M:_,C);let N=[];return p&&(Je(o.domReference)&&(N=ar(o.domReference)),Je(o.floating)&&(N=N.concat(ar(o.floating))),!Je(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(ar(o.reference.contextElement)))),N=N.filter(V=>{var F;return V!==((F=O.defaultView)==null?void 0:F.visualViewport)}),N.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",S?I:P,S),v&&O.removeEventListener(c,C?M:_,C),N.forEach(V=>{V.removeEventListener("scroll",A)})}},[i,o,s,v,c,n,r,p,a,T,w,P,S,I,_,C,M]),k.useEffect(()=>{y.current=!1},[v,c]);const L=k.useMemo(()=>({onKeyDown:P,[qN[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[P,r,u,d]),$=k.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[UN[c]]:()=>{y.current=!0}}),[P,c]);return k.useMemo(()=>a?{reference:L,floating:$}:{},[a,L,$])}function YN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),i=k.useRef({}),[a]=k.useState(()=>Mx()),s=ur()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Je(f)&&kN("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=k.useState(r.reference),u=Pt((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function Gr(e){e===void 0&&(e={});const{nodeId:t}=e,n=YN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=dr();Be(()=>{u&&(d.current=u)},[u]);const f=hN({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(x=>{const T=Je(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(x=>{(Je(x)||x===null)&&(d.current=x,a(x)),(Je(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Je(x))&&f.refs.setReference(x)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=y;const x=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),k.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function GN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&Et(a.domReference)&&a.domReference===gn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){kd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=On(f.nativeEvent);if(l&&Je(m))try{if(Pd()&&nx())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Id(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=Je(m)&&m.hasAttribute(fr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=gn(a.domReference?a.domReference.ownerDocument:document);!m&&y===a.domReference||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||yt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const Xx="active",Qx="selected";function Zd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Xx]:a,[Qx]: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&&[Xx,Qx].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 Kr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>Zd(s,e,"reference"),t),i=k.useCallback(s=>Zd(s,e,"floating"),n),a=k.useCallback(s=>Zd(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Jx=!1;function Hs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function e0(e,t){return Hs(t,e===Hd||e===na,e===Yo||e===Go)}function Xd(e,t,n){return Hs(t,e===na,n?e===Yo:e===Go)||e==="Enter"||e===" "||e===""}function KN(e,t,n){return Hs(t,n?e===Yo:e===Go,e===na)}function t0(e,t,n){return Hs(t,n?e===Go:e===Yo,e===Hd)}function Qd(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:x="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:P=!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.")),x==="vertical"&&T>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=ur(),_=dr(),M=Pt(s),L=k.useRef(g),$=k.useRef(c??-1),A=k.useRef(null),O=k.useRef(!0),N=k.useRef(M),V=k.useRef(!!o.floating),F=k.useRef(n),z=k.useRef(!1),D=k.useRef(!1),R=Ft(y),J=Ft(n),te=Ft(w),ee=Ft(o.floating),Z=Ft(c),[U,Y]=k.useState(),[j,W]=k.useState(),G=Pt(function(se,ye,K){K===void 0&&(K=!1);function ce(ie){m?(Y(ie.id),_==null||_.events.emit("virtualfocus",ie),S&&(S.current=ie)):cr(ie,{preventScroll:!0,sync:nx()&&Pd()?Jx||z.current:!1})}const Q=se.current[ye.current];Q&&ce(Q),requestAnimationFrame(()=>{const ie=se.current[ye.current]||Q;if(!ie)return;Q||ce(ie);const we=te.current;we&&B&&(K||!O.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return Jx=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?L.current&&c!=null&&(D.current=!0,$.current=c,M(c)):V.current&&($.current=-1,N.current(null)))},[l,n,o.floating,c,M]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(V.current&&($.current=-1,G(i,$)),(!F.current||!V.current)&&L.current&&(A.current!=null||L.current===!0&&A.current==null)){let se=0;const ye=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(ye),se++):($.current=A.current==null||Xd(A.current,x,f)||p?Wd(i,R.current):Cx(i,R.current),A.current=null,M($.current))};ye()}}else ra(i,a)||($.current=a,G(i,$,D.current),D.current=!1)},[l,n,o.floating,a,Z,p,i,x,f,M,G,R]),Be(()=>{var se;if(!l||o.floating||!_||m||!V.current)return;const ye=_.nodesRef.current,K=(se=ye.find(ie=>ie.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,ce=gn(Mt(o.floating)),Q=ye.some(ie=>ie.context&&yt(ie.context.elements.floating,ce));K&&!Q&&O.current&&K.focus({preventScroll:!0})},[l,o.floating,_,I,m]),Be(()=>{if(!l||!_||!m||I)return;function se(ye){W(ye.id),S&&(S.current=ye)}return _.events.on("virtualfocus",se),()=>{_.events.off("virtualfocus",se)}},[l,_,m,I,S]),Be(()=>{N.current=M,V.current=!!o.floating}),Be(()=>{n||(A.current=null)},[n]),Be(()=>{F.current=n},[n]);const ae=a!=null,B=k.useMemo(()=>{function se(K){if(!n)return;const ce=i.current.indexOf(K);ce!==-1&&M(ce)}return{onFocus(K){let{currentTarget:ce}=K;se(ce)},onClick:K=>{let{currentTarget:ce}=K;return ce.focus({preventScroll:!0})},...h&&{onMouseMove(K){let{currentTarget:ce}=K;se(ce)},onPointerLeave(K){let{pointerType:ce}=K;!O.current||ce==="touch"||($.current=-1,G(i,$),M(null),m||cr(ee.current,{preventScroll:!0}))}}}},[n,ee,G,h,i,M,m]),xe=Pt(se=>{if(O.current=!1,z.current=!0,!J.current&&se.currentTarget===ee.current)return;if(p&&t0(se.key,x,f)){Nt(se),r(!1,se.nativeEvent,"list-navigation"),Et(o.domReference)&&!m&&o.domReference.focus();return}const ye=$.current,K=Wd(i,y),ce=Cx(i,y);if(se.key==="Home"&&(Nt(se),$.current=K,M($.current)),se.key==="End"&&(Nt(se),$.current=ce,M($.current)),T>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ie=yN(Q,T,P),we=ie.findIndex(ue=>ue!=null&&!js(i.current,ue,y)),X=ie.reduce((ue,_e,We)=>_e!=null&&!js(i.current,_e,y)?We:ue,-1);if($.current=ie[vN({current:ie.map(ue=>ue!=null?i.current[ue]:null)},{event:se,orientation:x,loop:d,cols:T,disabledIndices:xN([...y||i.current.map((ue,_e)=>js(i.current,_e)?_e:void 0),void 0],ie),minIndex:we,maxIndex:X,prevIndex:bN($.current>ce?K:$.current,Q,ie,T,se.key===na?"bl":se.key===Go?"tr":"tl"),stopEvent:!0})],M($.current),x==="both")return}if(e0(se.key,x)){if(Nt(se),n&&!m&&gn(se.currentTarget.ownerDocument)===se.currentTarget){$.current=Xd(se.key,x,f)?K:ce,M($.current);return}Xd(se.key,x,f)?d?$.current=ye>=ce?u&&ye!==i.current.length?-1:K:$t(i,{startingIndex:ye,disabledIndices:y}):$.current=Math.min(ce,$t(i,{startingIndex:ye,disabledIndices:y})):d?$.current=ye<=K?u&&ye!==-1?i.current.length:ce:$t(i,{startingIndex:ye,decrement:!0,disabledIndices:y}):$.current=Math.max(K,$t(i,{startingIndex:ye,decrement:!0,disabledIndices:y})),ra(i,$.current)?M(null):M($.current)}}),Ee=k.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||U},[m,n,ae,j,U]),Oe=k.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!rx(o.domReference)&&Ee,onKeyDown:xe,onPointerMove(){O.current=!0}}),[Ee,xe,o.domReference,x]),$e=k.useMemo(()=>{function se(K){g==="auto"&&tx(K.nativeEvent)&&(L.current=!0)}function ye(K){L.current=g,g==="auto"&&kd(K.nativeEvent)&&(L.current=!0)}return{...Ee,onKeyDown(K){O.current=!1;const ce=K.key.indexOf("Arrow")===0,Q=KN(K.key,x,f),ie=t0(K.key,x,f),we=e0(K.key,x),X=(p?Q:we)||K.key==="Enter"||K.key.trim()==="";if(m&&n){const Ct=_==null?void 0:_.nodesRef.current.find(Lt=>Lt.parentId==null),mt=_&&Ct?ON(_.nodesRef.current,Ct.id):null;if(ce&&mt&&S){const Lt=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||ie){var ue,_e;const Sn=((ue=mt.context)==null?void 0:ue.elements.domReference)===K.currentTarget,zn=ie&&!Sn?(_e=mt.context)==null?void 0:_e.elements.domReference:Q?i.current.find(wr=>(wr==null?void 0:wr.id)===U):null;zn&&(Nt(K),zn.dispatchEvent(Lt),W(void 0))}if(we&&mt.context&&mt.context.open&&mt.parentId&&K.currentTarget!==mt.context.elements.domReference){var We;Nt(K),(We=mt.context.elements.domReference)==null||We.dispatchEvent(Lt);return}}return xe(K)}if(!(!n&&!v&&ce)){if(X&&(A.current=p&&we?null:K.key),p){Q&&(Nt(K),n?($.current=Wd(i,R.current),M($.current)):r(!0,K.nativeEvent,"list-navigation"));return}we&&(c!=null&&($.current=c),Nt(K),!n&&v?r(!0,K.nativeEvent,"list-navigation"):xe(K),n&&M($.current))}},onFocus(){n&&!m&&M(null)},onPointerDown:ye,onMouseDown:se,onClick:se}},[U,Ee,xe,R,g,i,p,M,r,n,v,x,f,c,_,m,S]);return k.useMemo(()=>l?{reference:$e,floating:Oe,item:B}:{},[l,$e,Oe,B])}const ZN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Zr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=ZN.get(a))!=null?n:a,l=Zo(),u=ur()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const n0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ei(e,t){return typeof e=="function"?e(t):e}function XN(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function QN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=k.useState("unmounted"),c=XN(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function r0(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...ei(i,c),...ei(n,c)})),{isMounted:g,status:h}=QN(e,{duration:a}),v=Ft(n),y=Ft(r),x=Ft(o),T=Ft(i);return Be(()=>{const w=ei(v.current,c),S=ei(x.current,c),C=ei(T.current,c),P=ei(y.current,c)||Object.keys(w).reduce((I,_)=>(I[_]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(P).map(n0).join(","),transitionDuration:d+"ms",...C,...P}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(n0).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,y,T,d,h,c]),{isMounted:g,styles:f}}function JN(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),y=Pt(s),x=Pt(l),T=Ft(u),w=Ft(p);Be(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var _;h.current=(_=f??a)!=null?_:-1}},[r,f,a]);const S=Pt(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),C=Pt(_=>{function M(N,V,F){const z=T.current?T.current(V,F):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return z?N.indexOf(z):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(M(L,L,g.current)===-1?S(!1):_.key===" "&&Nt(_)),L==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Nt(_),S(!0)),L.every(N=>{var V,F;return N?((V=N[0])==null?void 0:V.toLocaleLowerCase())!==((F=N[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=v.current),g.current+=_.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,S(!1)},d);const A=h.current,O=M(L,[...L.slice((A||0)+1),...L.slice(0,(A||0)+1)],g.current);O!==-1?(y(O),v.current=O):_.key!==" "&&(g.current="",S(!1))}),P=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(_){_.key===" "&&S(!1)}}),[C,S]);return k.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function o0(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 eF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function i0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,P=[S,C],I=On(T),_=T.type==="mouseleave",M=yt(g.floating,I),L=yt(g.domReference,I),$=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),O=m.split("-")[0],N=p>A.right-A.width/2,V=f>A.bottom-A.height/2,F=eF(P,$),z=A.width>$.width,D=A.height>$.height,R=(z?$:A).left,J=(z?$:A).right,te=(D?$:A).top,ee=(D?$:A).bottom;if(M&&(i=!0,!_))return;if(L&&(i=!1),L&&!_){i=!0;return}if(_&&Je(T.relatedTarget)&&yt(g.floating,T.relatedTarget)||y&&Wr(y.nodesRef.current,v).some(Y=>{let{context:j}=Y;return j==null?void 0:j.open}))return;if(O==="top"&&f>=$.bottom-1||O==="bottom"&&f<=$.top+1||O==="left"&&p>=$.right-1||O==="right"&&p<=$.left+1)return w();let Z=[];switch(O){case"top":Z=[[R,$.top+1],[R,A.bottom-1],[J,A.bottom-1],[J,$.top+1]];break;case"bottom":Z=[[R,A.top+1],[R,$.bottom-1],[J,$.bottom-1],[J,A.top+1]];break;case"left":Z=[[A.right-1,ee],[A.right-1,te],[$.left+1,te],[$.left+1,ee]];break;case"right":Z=[[$.right-1,ee],[$.right-1,te],[A.left+1,te],[A.left+1,ee]];break}function U(Y){let[j,W]=Y;switch(O){case"top":{const G=[z?j+t/2:N?j+t*4:j-t*4,W+t+1],ae=[z?j-t/2:N?j+t*4:j-t*4,W+t+1],B=[[A.left,N||z?A.bottom-t:A.top],[A.right,N?z?A.bottom-t:A.top:A.bottom-t]];return[G,ae,...B]}case"bottom":{const G=[z?j+t/2:N?j+t*4:j-t*4,W-t],ae=[z?j-t/2:N?j+t*4:j-t*4,W-t],B=[[A.left,N||z?A.top+t:A.bottom],[A.right,N?z?A.top+t:A.bottom:A.top+t]];return[G,ae,...B]}case"left":{const G=[j+t+1,D?W+t/2:V?W+t*4:W-t*4],ae=[j+t+1,D?W-t/2:V?W+t*4:W-t*4];return[...[[V||D?A.right-t:A.left,A.top],[V?D?A.right-t:A.left:A.right-t,A.bottom]],G,ae]}case"right":{const G=[j-t,D?W+t/2:V?W+t*4:W-t*4],ae=[j-t,D?W-t/2:V?W+t*4:W-t*4],B=[[V||D?A.left+t:A.right,A.top],[V?D?A.left+t:A.right:A.left+t,A.bottom]];return[G,ae,...B]}}}if(!o0([S,C],Z)){if(i&&!F)return w();if(!_&&r){const Y=c(T.clientX,T.clientY);if(Y!==null&&Y<.1)return w()}o0([S,C],U([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const ti=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),zd({fallbackAxisSideDirection:"end"}),Rd(),Tx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gr({open:n,middleware:i,transform:!0,whileElementsMounted:ea,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=aa(l),u=Yr(l),d=Zr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Kr([c,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(qr,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Jo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:b.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[b.jsx(Ox,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},tF=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}=Gr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=Zr(s,{role:"tooltip"}),d=Yr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Kr([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(go,{...f(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(ft.span,{layoutId:o,children:e.trigger})}),b.jsx(Jn,{children:i?b.jsx(qr,{root:t,children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},a0=300,nF=500,s0=(e="")=>Le("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),Jd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),l0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),v=E.useContext(Jd),y=ur(),x=dr(),T=PN(),w=Ax(),S=y!==null,{floatingStyles:C,refs:P,context:I}=Gr({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:ea,placement:S?"right":"bottom-start",middleware:[ta({mainAxis:S?0:4,alignmentAxis:S?-4:0}),zd(),Rd()]}),_=Zr(I,{role:"menu"}),M=Yr(I,{bubbles:!0}),L=Lx(I,{move:!1,enabled:n,delay:{open:a0},handleClose:i0({blockPointerEvents:!0})}),$=aa(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),A=Qd(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),O=JN(I,{activeIndex:f,listRef:h,resetMs:nF,onMatch:c?m:void 0}),{getReferenceProps:N,getFloatingProps:V,getItemProps:F}=Kr([L,$,_,M,A,O]);E.useEffect(()=>{if(!x)return;function D(){u(!1)}function R(J){J.nodeId!==T&&J.parentId===y&&u(!1)}return x.events.on("click",D),x.events.on("menuopen",R),()=>{x.events.off("click",D),x.events.off("menuopen",R)}},[x,T,y]),E.useEffect(()=>{c&&x&&x.events.emit("menuopen",{parentId:y,nodeId:T})},[x,c,T,y]);const z=o?s.className:Le(s0(s.className));return b.jsxs(AN,{id:T,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx(Ro,{...N(v.getItemProps({...s,onFocus(D){var R;(R=s.onFocus)==null||R.call(s,D),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:Bd([P.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):b.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Bd([P.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,...N(v.getItemProps({...s,onFocus(D){var R;(R=s.onFocus)==null||R.call(s,D),p(!1),v.setHasFocusInside(!0)}})),children:[a,S&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(zu,{size:14})]})]})}),b.jsx(Jd.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:F,setHasFocusInside:p,isOpen:c},children:b.jsx(TN,{elementsRef:g,labelsRef:h,children:c&&b.jsx(qr,{preserveTabOrder:!0,children:b.jsx(Jo,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:b.jsx(t,{...V(),ref:P.setFloating,style:{...s.style,...C},className:Le("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),rF=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Jd),s=Ax({label:n?null:e}),l=dr(),c=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Bd([s.ref,i]),className:s0(`${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?b.jsx(t,{size:16}):null]})}),oF=E.forwardRef((e,t)=>ur()!==null?b.jsx(l0,{...e,isParent:!1,ref:t}):b.jsx(_N,{children:b.jsx(l0,{...e,isParent:!0,ref:t})})),iF=(e,t)=>$r()?t:window.matchMedia(e).matches,aF=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(iF(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},c0=()=>window.matchMedia("@media (pointer: coarse)"),sF=()=>{var r;const e=E.useRef($r()?null:c0()),[t,n]=E.useState($r()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?c0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},lF=e=>{const t=sF(),n=E.useRef($r()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||mb())return;r.style.padding=Xh(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",cF={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},uF={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},ef={drawer:e=>e==="left"?cF:uF,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},dF=uo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),fF={top:0,left:0,right:0,bottom:-1},pF=e=>e*.62,hF=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=pF(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return b.jsx(ft.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:fF,whileDrag:{cursor:"grabbing"},className:Le("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?b.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ws={drawer:"right",sheet:"none",dialog:"none"},mF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ws.drawer:Ws[o]:t?Ws[o]:Ws.sheet},gF=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:m,overlayClickClose:g=!1,ariaTitle:h,...v})=>{lF(e);const y=E.useId(),x=E.useId(),T=aF("(min-width: 64rem)"),w=f!=="dialog",S=mF(T,d,f,m),C=T||d?ef[f]:ef.sheet,P=typeof C=="function"?C(S):C,I=T||d?f:"sheet",{refs:_,context:M}=Gr({open:e,onOpenChange:s}),L=aa(M),$=Zr(M,{role:"dialog"}),A=Yr(M,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:O,getFloatingProps:N}=Kr([L,$,A]),V=o,F=Io(void 0),z=()=>s(!1);return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx(Ro,{ref:_.setReference,...O({layoutId:a}),children:V}):b.jsx(ft.button,{ref:_.setReference,...O(),layoutId:a,type:"button",children:V})}):null,b.jsx(qr,{children:b.jsx(Jn,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(BN,{lockScroll:!1,className:Le(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M,children:b.jsxs(ft.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:P,"data-component":"modal",ref:_.setFloating,"aria-modal":e,layoutId:a,className:Le(dF({position:S,type:I}),l),style:I==="drawer"?{width:F}:{height:F},...t?{"aria-labelledby":y,"aria-describedby":x}:{"aria-label":h},...N(),children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,b.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?b.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?b.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:b.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:b.jsx(os,{})})}):null,w&&c?b.jsx(hF,{onChange:s,parent:_.floating,position:S,sheet:I==="sheet",value:F}):null]})})}):null})})]})},vF=e=>b.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),tf=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=ld,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",y=A=>{g(A),d==null||d(A)},{refs:x,floatingStyles:T,context:w}=Gr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:ea,onOpenChange:i?void 0:y,middleware:[Rd(),ta(5),zd({fallbackAxisSideDirection:"start"}),Tx({padding:5,element:h})]}),S=Lx(w,{move:!0,delay:{open:a0},enabled:l?s:!1,handleClose:c?i0():null}),C=GN(w,{enabled:l?a:!1}),P=aa(w,{enabled:l?c:!1}),I=Yr(w,{enabled:l}),_=Zr(w,{role:"tooltip",enabled:l}),M=WN(w,{enabled:!!l&&!!u}),{getReferenceProps:L,getFloatingProps:$}=Kr([_,I,M,a?C:void 0,s?S:void 0,c?P:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),b.jsxs(E.Fragment,{children:[b.jsx(v,{...L(p),ref:Fa(x.setReference,f),children:n}),m&&b.jsx(qr,{preserveTabOrder:!0,children:b.jsxs(on,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx(Ox,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class qs{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)qs.getDescendantProperty(s[l],i,r);else i&&qs.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Xr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Xr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=qs.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Xr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Xr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Xr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Us=0,pr=1,ni=2,u0=4;function d0(e){return()=>e}function yF(e){e()}function sa(e,t){return n=>e(t(n))}function f0(e,t){return()=>e(t)}function p0(e,t){return n=>e(t,n)}function nf(e){return e!==void 0}function bF(...e){return()=>{e.map(yF)}}function ri(){}function Ys(e,t){return t(e),e}function xF(e,t){return t(e)}function at(...e){return e}function Xe(e,t){return e(pr,t)}function Me(e,t){e(Us,t)}function rf(e){e(ni)}function Rt(e){return e(u0)}function be(e,t){return Xe(e,p0(t,Us))}function Dn(e,t){const n=e(pr,r=>{n(),t(r)});return n}function h0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function m0(e,t){return e===t}function st(e=m0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Nn(e){return t=>()=>{t(e)}}function re(e,...t){const n=wF(...t);return(r,o)=>{switch(r){case ni:rf(e);return;case pr:return Xe(e,n(o))}}}function Fn(e,t){return n=>r=>{n(t=e(t,r))}}function oi(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...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);Xe(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 wF(...e){return t=>e.reduceRight(xF,t)}function SF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case pr:return i?n===i?void 0:(r(),n=i,t=Xe(e,i),t):(r(),ri);case ni:r(),n=null;return}}}function le(e){let t=e;const n=ze();return(r,o)=>{switch(r){case Us:t=o;break;case pr:{o(t);break}case u0:return t}return n(r,o)}}function zt(e,t){return Ys(le(t),n=>be(e,n))}function ze(){const e=[];return(t,n)=>{switch(t){case Us:e.slice().forEach(r=>{r(n)});return;case ni:e.splice(0,e.length);return;case pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Ys(ze(),t=>be(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:TF(),singleton:n}}const TF=()=>Symbol();function EF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=ze(),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);Xe(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case ni:{rf(t);return}case pr:return r===o&&a(n),Xe(t,a)}}}function Pe(e,t=m0){return re(e,st(t))}function g0(...e){return function(t,n){switch(t){case ni:return;case pr:return bF(...e.map(r=>Xe(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const CF={0:"debug",3:"error",1:"log",2:"warn"},kF=()=>typeof globalThis>"u"?window:globalThis,mr=Ue(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=kF().VIRTUOSO_LOG_LEVEL)!=null?o:Rt(e);r>=i&&console[CF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ln(e,t,n){return of(e,t,n).callbackRef}function of(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=PF(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?y0("column-gap",getComputedStyle(u).columnGap,o):y0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return of(c,n,l)}function PF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function y0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function af(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}=of(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ue(()=>{const e=ze(),t=ze(),n=le(0),r=ze(),o=le(0),i=ze(),a=ze(),s=le(0),l=le(0),c=le(0),u=le(0),d=ze(),p=ze(),f=le(!1),m=le(!1),g=le(!1);return be(re(e,he(({scrollTop:h})=>h)),t),be(re(e,he(({scrollHeight:h})=>h)),a),be(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}),la={lvl:0};function b0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function tt(e){return e===la}function ca(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function yn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=yn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return yn(e.l,t,n)}function nn(e,t,n){return tt(e)?S0(t,n,1):t===e.k?_t(e,{k:t,v:n}):t<e.k?T0(_t(e,{l:nn(e.l,t,n)})):T0(_t(e,{r:nn(e.r,t,n)}))}function ii(){return la}function Gs(e,t,n){if(tt(e))return[];const r=yn(e,t)[0];return AF(lf(e,r,n))}function sf(e,t){if(tt(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=w0(r);return Ks(_t(e,{k:i,l:x0(r),v:a}))}}else return t<n?Ks(_t(e,{l:sf(r,t)})):Ks(_t(e,{r:sf(o,t)}))}function Qr(e){return tt(e)?[]:[...Qr(e.l),{k:e.k,v:e.v},...Qr(e.r)]}function lf(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(lf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(lf(i,t,n))),s}function Ks(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cf(t))return E0(_t(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return _t(t.r,{l:_t(t,{r:t.r.l}),lvl:n,r:_t(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(cf(e))return uf(_t(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=cf(o)?r.lvl-1:r.lvl;return _t(o,{l:_t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:uf(_t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function _t(e,t){return S0(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 x0(e){return tt(e.r)?e.l:Ks(_t(e,{r:x0(e.r)}))}function cf(e){return tt(e)||e.lvl>e.r.lvl}function w0(e){return tt(e.r)?[e.k,e.v]:w0(e.r)}function S0(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function T0(e){return uf(E0(e))}function E0(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?_t(t,{r:_t(e,{l:t.r})}):e}function uf(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?_t(n,{l:_t(e,{r:n.l}),lvl:t+1}):e}function AF(e){return b0(e,({k:t,v:n})=>({index:t,value:n}))}function C0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const df=Ue(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function k0(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 _F(e,t,n,r){const o=Zs(e,t,r),i=Zs(e,n,r,o);return e.slice(o,i+1)}function bn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Xs(e){return!tt(e.groupOffsetTree)}function ff({index:e},t){return t===e?0:t<e?-1:1}function IF(){return{groupIndices:[],groupOffsetTree:ii(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ii()}}function OF(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=nn(e,0,i);continue}const s=Gs(e,a-1,o+1);if(s.some(jF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=sf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));c&&(e=nn(e,a,i))}return[e,n]}function MF(e){return typeof e.groupIndex<"u"}function DF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=k0(t,e,ff),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function P0(e,t){if(!Xs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function A0(e,t,n){if(MF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=P0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function NF(e,t,n,r=0){return r>0&&(t=Math.max(t,k0(e,r,ff).offset)),b0(_F(e,t,n,DF),VF)}function FF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=OF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=pf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),ii()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function LF(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 _0(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function pf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Zs(o,t-1,ff),s=o[l].offset;const c=yn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===yn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Gs(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 VF(e){return{index:e.index,value:e}}function jF(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 $F={offsetHeight:"height",offsetWidth:"width"},Vn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=ze(),r=ze(),o=zt(r,0),i=ze(),a=ze(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((w,S)=>bn(w,$F[S])),p=le(void 0),f=le(0),m=IF(),g=zt(re(n,Ne(l,e,f),Fn(FF,m),st()),m),h=zt(re(l,st(),Fn((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);be(re(l,Ce(w=>w.length>0),Ne(g,f),he(([w,S,C])=>{const P=w.reduce((I,_,M)=>nn(I,_,da(_,S.offsetTree,C)||M),ii());return{...S,groupIndices:w,groupOffsetTree:P}})),g),be(re(r,Ne(g),Ce(([w,{lastIndex:S}])=>w<S),he(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),be(c,u);const v=zt(re(c,he(w=>w===void 0)),!0);be(re(u,Ce(w=>w!==void 0&&tt(Rt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(re(n,Ne(g),Fn(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));Xe(re(s,Fn((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:S}=Rt(g);if(w>0)Me(t,!0),Me(i,w+_0(w,S));else if(w<0){const C=Rt(h);C.length>0&&(w-=_0(-w,C)),Me(a,w)}}),Xe(re(s,Ne(e)),([w,S])=>{w<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const x=en(i);be(re(i,Ne(g),he(([w,S])=>{const C=S.groupIndices.length>0,P=[],I=S.lastSize;if(C){const _=ca(S.sizeTree,0);let M=0,L=0;for(;M<w;){const A=S.groupIndices[L],O=S.groupIndices.length===L+1?1/0:S.groupIndices[L+1]-A-1;P.push({endIndex:A,size:_,startIndex:A}),P.push({endIndex:A+1+O-1,size:I,startIndex:A+1}),L++,M+=O+1}const $=Qr(S.sizeTree);return M!==w&&$.shift(),$.reduce((A,{k:O,v:N})=>{let V=A.ranges;return A.prevSize!==0&&(V=[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:O+w,prevSize:N,ranges:V}},{prevIndex:w,prevSize:0,ranges:P}).ranges}return Qr(S.sizeTree).reduce((_,{k:M,v:L})=>({prevIndex:M+w,prevSize:L,ranges:[..._.ranges,{endIndex:M+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(re(a,Ne(g,f),he(([w,{offsetTree:S},C])=>{const P=-w;return da(P,S,C)})));return be(re(a,Ne(g,f),he(([w,S,C])=>{if(S.groupIndices.length>0){if(tt(S.sizeTree))return S;let P=ii();const I=Rt(h);let _=0,M=0,L=0;for(;_<-w;){L=I[M];const $=I[M+1]-L-1;M++,_+=$+1}if(P=Qr(S.sizeTree).reduce(($,{k:A,v:O})=>nn($,Math.max(0,A+w),O),P),_!==-w){const $=ca(S.sizeTree,L);P=nn(P,0,$);const A=yn(S.sizeTree,-w+1)[1];P=nn(P,1,A)}return{...S,sizeTree:P,...pf(S.offsetTree,0,P,C)}}else{const P=Qr(S.sizeTree).reduce((I,{k:_,v:M})=>nn(I,Math.max(0,_+w),M),ii());return{...S,sizeTree:P,...pf(S.offsetTree,0,P,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},at(mr,df),{singleton:!0});function RF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const I0=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ze(),a=ze(),s=en(re(i,he(RF)));return be(re(s,he(l=>l.totalCount)),n),be(re(s,he(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>Xs(c)),he(([l,c,u])=>yn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),st(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},at(Vn,Wt)),gr=Ue(([{log:e}])=>{const t=le(!1),n=en(re(t,Ce(r=>r),st()));return Xe(t,r=>{r&&Rt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},at(mr),{singleton:!0}),zF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function O0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ue(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=ze(),m=ze(),g=le(0);let h=null,v=null,y=null;function x(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Me(l,!1)}return be(re(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),he(([[T,w,S,C,P,I,_,M],L,$,A])=>{const O=O0(T),{align:N,behavior:V,offset:F}=O,z=C-1,D=A0(O,w,z);let R=da(D,w.offsetTree,L)+I;N==="end"?(R+=$+yn(w.sizeTree,D)[1]-S+A,D===z&&(R+=_)):N==="center"?R+=($+yn(w.sizeTree,D)[1]-S+A)/2:R-=P,F&&(R+=F);const J=te=>{x(),te?(M("retrying to scroll to",{location:T},tn.DEBUG),Me(f,T)):(Me(m,!0),M("list did not change, scroll successful",{},tn.DEBUG))};if(x(),V==="smooth"){let te=!1;y=Xe(t,ee=>{te=te||ee}),h=Dn(u,()=>{J(te)})}else h=Dn(re(t,BF(150)),J);return v=setTimeout(()=>{x()},1200),Me(l,!0),M("scrolling from index to",{behavior:V,index:D,top:R},tn.DEBUG),{behavior:V,top:R}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},at(Vn,Wt,mr),{singleton:!0});function BF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function hf(e,t){e==0?t():requestAnimationFrame(()=>{hf(e-1,t)})}function mf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ue(([{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 be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),s),be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),c),Xe(re(At(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,m])=>u&&(!tt(p)||nf(f))&&!d&&!m),Ne(l)),([,u])=>{Dn(o,()=>{Me(c,!0)}),hf(4,()=>{Dn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},at(Vn,Wt,fa,gr),{singleton:!0});function M0(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",HF="none",WF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},qF=0,ga=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=ze(),c=ze(),u=le(4),d=le(qF),p=zt(re(g0(re(Pe(o),oi(1),Nn(!0)),re(Pe(o),oi(1),Nn(!1),h0(100))),st()),!1),f=zt(re(g0(re(n,Nn(!0)),re(n,Nn(!1),h0(200))),st()),!1);be(re(At(Pe(o),Pe(d)),he(([y,x])=>y<=x),st()),s),be(re(s,hr(50)),c);const m=en(re(At(r,Pe(i),Pe(t),Pe(e),Pe(u)),Fn((y,[{scrollHeight:x,scrollTop:T},w,S,C,P])=>{const I=T+w-x>-P,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(I){let L,$;return T>y.state.scrollTop?(L="SCROLLED_DOWN",$=y.state.scrollTop-T):(L="SIZE_DECREASED",$=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:$,state:_}}let M;return _.scrollHeight>y.state.scrollHeight?M="SIZE_INCREASED":w<y.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:_}},WF),st((y,x)=>y&&y.atBottom===x.atBottom))),g=zt(re(r,Fn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(M0(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const S=x-(T+w)<1;return y.scrollTop!==T&&S?{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),he(y=>y.jump)),0);be(re(m,he(y=>y.atBottom)),a),be(re(a,hr(50)),l);const h=le(ma);be(re(r,he(({scrollTop:y})=>y),st(),Fn((y,x)=>Rt(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(y=>y.direction)),h),be(re(r,hr(50),Nn(HF)),h);const v=le(0);return be(re(p,Ce(y=>!y),Nn(0)),v),be(re(o,hr(100),Ne(p),Ce(([y,x])=>!!x),Fn(([y,x],[T])=>[x,T],[0,0]),he(([y,x])=>x-y)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},at(Wt)),Qs="top",Js="bottom",D0="none";function N0(e,t,n){return typeof e=="number"?n===ha&&t===Qs||n===ma&&t===Js?e:0:n===ha?t===Qs?e.main:e.reverse:t===Js?e.main:e.reverse}function F0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const gf=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ze(),a=le(0),s=le(0),l=le(0),c=zt(re(At(Pe(r),Pe(o),Pe(n),Pe(i,ua),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),he(([u,d,p,[f,m],g,h,v,y,x])=>{const T=u-y,w=h+v,S=Math.max(p-T,0);let C=D0;const P=F0(x,Qs),I=F0(x,Js);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-P&&(C=ha),m<u-S+d+I&&(C=ma),C!==D0?[Math.max(T-p-N0(g,Qs,C)-P,0),T-S-v+d+N0(g,Js,C)+I]:null}),Ce(u=>u!=null),st(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},at(Wt),{singleton:!0});function UF(e,t,n){if(Xs(t)){const r=P0(e,t);return[{index:yn(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 vf={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 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:V0(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:V0(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function L0(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=mf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return el(c,[],s,o,n,r)}function V0(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=Gs(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=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=le([]),h=le(0),v=ze();be(i.topItemsIndexes,g);const y=zt(re(At(f,m,Pe(l,ua),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([S,C,,P,,,,,,,I])=>{const _=I&&I.length!==P;return S&&!C&&!_}),he(([,,[S,C],P,I,_,M,L,$,A,O])=>{const N=I,{offsetTree:V,sizeTree:F}=N,z=Rt(h);if(P===0)return{...vf,totalCount:P};if(S===0&&C===0)return z===0?{...vf,totalCount:P}:L0(z,_,I,$,A,O||[]);if(tt(F))return z>0?null:el(UF(mf(_,P),N,O),[],P,A,N,$);const D=[];if(L.length>0){const Z=L[0],U=L[L.length-1];let Y=0;for(const j of Gs(F,Z,U)){const W=j.value,G=Math.max(j.start,Z),ae=Math.min(j.end,U);for(let B=G;B<=ae;B++)D.push({data:O==null?void 0:O[B],index:B,offset:Y,size:W}),Y+=W}}if(!M)return el([],D,P,A,N,$);const R=L.length>0?L[L.length-1]+1:0,J=NF(V,S,C,R);if(J.length===0)return null;const te=P-1,ee=Ys([],Z=>{for(const U of J){const Y=U.value;let j=Y.offset,W=U.start;const G=Y.size;if(Y.offset<S){W+=Math.floor((S-Y.offset+A)/(G+A));const B=W-U.start;j+=B*G+B*A}W<R&&(j+=(R-W)*G,W=R);const ae=Math.min(U.end,te);for(let B=W;B<=ae&&!(j>=C);B++)Z.push({data:O==null?void 0:O[B],index:B,offset:j,size:G}),j+=G+A}});return el(ee,D,P,A,N,$)}),Ce(S=>S!==null),st()),vf);be(re(e,Ce(nf),he(S=>S==null?void 0:S.length)),o),be(re(y,he(S=>S.topListHeight)),d),be(d,s),be(re(y,he(S=>[S.top,S.bottom])),a),be(re(y,he(S=>S.items)),v);const x=en(re(y,Ce(({items:S})=>S.length>0),Ne(o,e),Ce(([{items:S},C])=>S[S.length-1].originalIndex===C-1),he(([,S,C])=>[S-1,C]),st(ua),he(([S])=>S))),T=en(re(y,hr(200),Ce(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),he(({items:S})=>S[0].index),st())),w=en(re(y,Ce(({items:S})=>S.length>0),he(({items:S})=>{let C=0,P=S.length-1;for(;S[C].type==="group"&&C<P;)C++;for(;S[P].type==="group"&&P>C;)P--;return{endIndex:S[P].index,startIndex:S[C].index}}),st(C0)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},at(Vn,I0,gf,pa,fa,ga,gr,df),{singleton:!0}),j0=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ze(),a=zt(re(At(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},at(Wt,Jr),{singleton:!0}),YF=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=zt(re(At(n,e,t),Ce(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),hr(0),st()),0);return{alignToBottom:n,paddingTopAddition:r}},at(Wt,j0),{singleton:!0});function $0(e){return e?e==="smooth"?"smooth":"auto":!1}const GF=(e,t)=>typeof e=="function"?$0(e(t)):t&&$0(e),KF=Ue(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=le(!1),d=ze();let p=null;function f(g){Me(o,{align:"end",behavior:g,index:"LAST"})}Xe(re(At(re(Pe(t),oi(1)),a),Ne(Pe(u),r,i,c),he(([[g,h],v,y,x,T])=>{let w=h&&x,S="auto";return w&&(S=GF(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Dn(e,()=>{Rt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Dn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return Xe(re(At(Pe(u),t,s),Ce(([g,,h])=>g&&h),Fn(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Rt(i)&&m(g!==!1)}),Xe(d,()=>{m(Rt(u)!==!1)}),Xe(At(Pe(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},at(Vn,ga,fa,pa,gr,mr,Wt)),ZF=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>L0(l,c,u,d,p,f))),a),{}),at(Vn,pa,Jr,gr),{singleton:!0}),XF=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Xe(re(e,Ne(r),Ce(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Dn(re(n,oi(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},at(gr,Wt,Jr),{singleton:!0}),QF=({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,JF=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=ze();return be(re(u,Ne(t,l,n,i,o,r,s),Ne(e),he(([[d,p,f,m,g,h,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:S=QF,done:C,...P}=d,I=A0(d,p,m-1),_=da(I,p.offsetTree,x)+g+h,M=_+yn(p.sizeTree,I)[1],L=y+h,$=y+f-v,A=S({itemBottom:M,itemTop:_,locationParams:{align:T,behavior:w,...P},viewportBottom:$,viewportTop:L});return A?C&&Dn(re(a,Ce(O=>!O),oi(Rt(a)?1:2)),C):C&&C(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},at(Vn,Wt,fa,Jr,mr),{singleton:!0}),R0=Ue(([{scrollVelocity:e}])=>{const t=le(!1),n=ze(),r=le(!1);return be(re(e,Ne(r,t,n),Ce(([o,i])=>!!i),he(([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}),st()),t),Xe(re(At(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},at(ga),{singleton:!0}),yf=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=ze(),r=ze(),o=ze(),i=le(!1),a=le(void 0);return be(re(At(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,Ne(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},at(Wt)),eL=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=ze(),u=le(void 0),d=le(null),p=le(null);return be(s,d),be(l,p),Xe(re(c,Ne(t,r,a,d,p,n)),([f,m,g,h,v,y,x])=>{const T=LF(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),be(re(u,Ce(nf),he(tL)),o),be(re(i,Ne(u),Ce(([,f])=>f!==void 0),st(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},at(Vn,Wt,pa,gr,yf));function tL(e){return{align:"start",index:0,offset:e.scrollTop}}const nL=Ue(([{topItemsIndexes:e}])=>{const t=le(0);return be(re(t,Ce(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},at(Jr));function z0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const rL=z0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),oL=Ue(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(re(l,Ne(a),Fn(([,v,y,x],[{bottom:T,items:w,offsetBottom:S,totalCount:C},P])=>{const I=T+S;let _=0;return y===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(_=I-x,_!==0&&(_+=P))),[_,w,C,I]},[0,[],0,0]),Ce(([v])=>v!==0),Ne(r,s,n,o,f,m),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===ha),he(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Me(t,{behavior:"auto",top:-v}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-v}))}return Xe(re(g,Ne(e,i)),([v,y,x])=>{x&&rL()?Me(e,y-v):h(-v)}),Xe(re(At(zt(i,!1),e,m),Ce(([v,y,x])=>!v&&!x&&y!==0),he(([v,y])=>y),hr(1)),h),be(re(d,he(v=>({top:-v}))),t),Xe(re(c,Ne(p,u),he(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function S(C){return C*(x+w)}if(y.length===0)return S(v);{let C=0;const P=ca(T,0);let I=0,_=0;for(;I<v;){I++,C+=P;let M=y.length===_+1?1/0:y[_+1]-y[_]-1;I+M>v&&(C-=P,M=v-I+1),I+=M,C+=S(M),_++}return C}})),v=>{Me(e,v),requestAnimationFrame(()=>{Me(t,{top:v}),requestAnimationFrame(()=>{Me(e,0),Me(m,!1)})})}),{deviation:e}},at(Wt,ga,Jr,Vn,mr,df)),iL=Ue(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),at(gf,ZF,gr,R0,j0,XF,YF,yf,JF,mr)),B0=Ue(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:P},I])=>(be(T.rangeChanged,I.scrollSeekRangeChanged),be(re(I.windowViewportRect,he(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:P,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...I,...g,sizes:l,...h}),at(Vn,pa,Wt,eL,KF,Jr,fa,oL,nL,I0,iL));function aL(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"?E.useLayoutEffect:E.useEffect;function bf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,v){h.propsReady&&Me(h.propsReady,!1);for(const y of r){const x=h[t.required[y]];Me(x,v[y])}for(const y of o)if(y in v){const x=h[t.optional[y]];Me(x,v[y])}h.propsReady&&Me(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=x=>{const T=h[t.methods[y]];Me(T,x)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=SF(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...x}=h,[T]=E.useState(()=>Ys(EF(e),C=>{l(C,x)})),[w]=E.useState(f0(u,T));tl(()=>{for(const C of a)C in x&&Xe(w[C],x[C]);return()=>{Object.values(w).map(rf)}},[x,w,T]),tl(()=>{l(T,x)}),E.useImperativeHandle(v,d0(c(T)));const S=n;return b.jsx(s.Provider,{value:T,children:n?b.jsx(S,{...aL([...r,...o,...a],x),children:y}):y})}),p=h=>E.useCallback(p0(Me,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(x=>Xe(v,x),[v]);return E.useSyncExternalStore(y,()=>Rt(v),()=>Rt(v))},m=h=>{const v=E.useContext(s)[h],[y,x]=E.useState(f0(Rt,v));return tl(()=>Xe(v,T=>{T!==y&&x(d0(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];tl(()=>Xe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const nl=E.createContext(void 0),H0=E.createContext(void 0),W0=typeof document<"u"?E.useLayoutEffect:E.useEffect;function xf(e){return"self"in e}function sL(e){return"body"in e}function q0(e,t,n,r=ri,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(sL(h)||xf(h)){const y=xf(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():wi.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;xf(f)?(h=Math.max(bn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=bn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),M0(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const wf="-webkit-sticky",U0="sticky",Y0=z0(()=>{if(typeof document>"u")return U0;const e=document.createElement("div");return e.style.position=wf,e.style.position===wf?wf:U0});function Sf(e){return e}const lL=Ue(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(Sf),i=le("div"),a=le(ri),s=(l,c=null)=>zt(re(r,he(u=>u[l]),st()),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=Ue(([e,t])=>({...e,...t}),at(B0,lL)),uL=({height:e})=>b.jsx("div",{style:{height:e}}),dL={overflowAnchor:"none",position:Y0(),zIndex:1},G0={overflowAnchor:"none"},fL={...G0,display:"inline-block",height:"100%"},K0=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=un("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),m=un("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=v0(n,p,d,e?ri:s,f,m,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);Cf("deviation",A=>{v!==A&&y(A)});const x=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||uL,w=Ae("ListComponent"),S=Ae("ItemComponent"),C=Ae("GroupComponent"),P=Ae("computeItemKey"),I=Ae("isSeeking"),_=Ae("groupIndices").length>0,M=Ae("alignToBottom"),L=Ae("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:M?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:M?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...lt(x,c)}):b.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(A=>{const O=A.originalIndex,N=P(O+t.firstItemIndex,A.data,c);return I?E.createElement(T,{...lt(T,c),height:A.size,index:A.index,key:N,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?E.createElement(C,{...lt(C,c),"data-index":O,"data-item-index":A.index,"data-known-size":A.size,key:N,style:dL},u(A.index,c)):E.createElement(S,{...lt(S,c),...Z0(S,A.data),"data-index":O,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:N,style:g?fL:G0},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),pL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hL={outline:"none",overflowX:"auto",position:"relative"},ai=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),mL={position:Y0(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function Z0(e,t){return{item:typeof e=="string"?void 0:t}}const gL=E.memo(function(){const e=Ae("HeaderComponent"),t=un("headerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),vL=E.memo(function(){const e=Ae("FooterComponent"),t=un("footerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null});function Tf({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}=q0(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?hL:pL,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function Ef({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=q0(a,l,s,m,d);return W0(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,p),children:r})})}const yL=({children:e})=>{const t=E.useContext(nl),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>bn(l,i?"width":"height")),[n,i]),s=Ln(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ai(o),children:e})},bL=({children:e})=>{const t=E.useContext(nl),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Ae("customScrollParent"),i=af(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(a),children:e})},xL=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...mL,marginTop:`${n}px`},o=Ae("context");return b.jsx(t,{style:r,...lt(t,o),children:e})},wL=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?EL:TL,a=r||t?bL:yL;return b.jsxs(i,{...e,...lt(i,o),children:[n&&b.jsx(xL,{children:b.jsx(K0,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(gL,{}),b.jsx(K0,{}),b.jsx(vL,{})]})]})}),{Component:SL,useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}=bf(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:{}},wL),TL=Tf({useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}),EL=Ef({useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}),kf=SL,CL=Ue(()=>{const e=le(l=>b.jsxs("td",{children:["Item $",l]})),t=le(null),n=le(null),r=le(null),o=le({}),i=le(Sf),a=le(ri),s=(l,c=null)=>zt(re(o,he(u=>u[l]),st()),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")}}),kL=Ue(([e,t])=>({...e,...t}),at(B0,CL)),PL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),AL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),_L={overflowAnchor:"none"},X0=E.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Fe("computeItemKey"),r=Fe("firstItemIndex"),o=Fe("isSeeking"),i=Fe("ScrollSeekPlaceholder")||PL,a=Fe("context"),s=Fe("TableRowComponent"),l=Fe("fixedHeaderHeight"),c=Fe("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,{...lt(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...lt(s,a),...Z0(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}:_L},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),IL=E.memo(function(){const e=Fe("listState"),t=Fe("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Fe("trackItemSizes"),c=Fe("itemSize"),u=Fe("log"),{callbackRef:d,ref:p}=v0(n,c,l,s,u,void 0,o,!1,Fe("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Pf("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,m(_))});const g=Fe("EmptyPlaceholder"),h=Fe("FillerRow")||AL,v=Fe("TableBodyComponent"),y=Fe("paddingTopAddition"),x=Fe("statefulTotalCount"),T=Fe("context");if(x===0&&g)return b.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((_,M)=>_+M.size,0),S=e.offsetTop+y+f-w,C=e.offsetBottom,P=S>0?b.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?b.jsx(h,{context:T,height:C},"padding-bottom"):null;return b.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[P,t&&b.jsx(X0,{showTopList:!0}),b.jsx(X0,{}),I]})}),OL=({children:e})=>{const t=E.useContext(nl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Ln(E.useMemo(()=>sa(n,i=>bn(i,"height")),[n]),!0,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:ai(!1),children:e})},ML=({children:e})=>{const t=E.useContext(nl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=af(n,o,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(!1),children:e})},DL=E.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Fe("fixedHeaderContent"),a=Fe("fixedFooterContent"),s=Fe("context"),l=Ln(E.useMemo(()=>sa(r,v=>bn(v,"height")),[r]),!0,Fe("skipAnimationFrameInResizeObserver")),c=Ln(E.useMemo(()=>sa(o,v=>bn(v,"height")),[o]),!0,Fe("skipAnimationFrameInResizeObserver")),u=n||t?LL:FL,d=n||t?ML:OL,p=Fe("TableComponent"),f=Fe("TableHeadComponent"),m=Fe("TableFooterComponent"),g=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,h=a?b.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(m,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...lt(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(p,s),children:[g,b.jsx(IL,{},"TableBody"),h]})})})}),{Component:NL,useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}=bf(kL,{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:{}},DL),FL=Tf({useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}),LL=Ef({useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}),VL=NL,Q0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},jL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:J0,floor:rl,max:va,min:Af,round:ew}=Math;function tw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function $L(e){return{...jL,items:e}}function ol(e,t){return e&&e.width===t.width&&e.height===t.height}function RL(e,t){return e&&e.column===t.column&&e.row===t.row}const zL=Ue(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const S=le(0),C=le(0),P=le(Q0),I=le({height:0,width:0}),_=le({height:0,width:0}),M=ze(),L=ze(),$=le(0),A=le(null),O=le({column:0,row:0}),N=ze(),V=ze(),F=le(!1),z=le(0),D=le(!0),R=le(!1),J=le(!1);Xe(re(m,Ne(z),Ce(([j,W])=>!!W)),()=>{Me(D,!1)}),Xe(re(At(m,D,_,I,z,R),Ce(([j,W,G,ae,,B])=>j&&!W&&G.height!==0&&ae.height!==0&&!B)),([,,,,j])=>{Me(R,!0),hf(1,()=>{Me(M,j)}),Dn(re(c),()=>{Me(t,[0,0]),Me(D,!0)})}),be(re(V,Ce(j=>j!=null&&j.scrollTop>0),Nn(0)),C),Xe(re(m,Ne(V),Ce(([,j])=>j!=null)),([,j])=>{j&&(Me(I,j.viewport),Me(_,j.item),Me(O,j.gap),j.scrollTop>0&&(Me(F,!0),Dn(re(c,oi(1)),W=>{Me(F,!1)}),Me(l,{top:j.scrollTop})))}),be(re(I,he(({height:j})=>j)),d),be(re(At(Pe(I,ol),Pe(_,ol),Pe(O,(j,W)=>j&&j.column===W.column&&j.row===W.row),Pe(c)),he(([j,W,G,ae])=>({gap:G,item:W,scrollTop:ae,viewport:j}))),N),be(re(At(Pe(S),r,Pe(O,RL),Pe(_,ol),Pe(I,ol),Pe(A),Pe(C),Pe(F),Pe(D),Pe(z)),Ce(([,,,,,,,j])=>!j),he(([j,[W,G],ae,B,xe,Ee,Oe,,$e,se])=>{const{column:ye,row:K}=ae,{height:ce,width:Q}=B,{width:ie}=xe;if(Oe===0&&(j===0||ie===0))return Q0;if(Q===0){const Sn=mf(se,j),zn=Sn+Math.max(Oe-1,0);return $L(tw(Sn,zn,Ee))}const we=nw(ie,Q,ye);let X,ue;$e?W===0&&G===0&&Oe>0?(X=0,ue=Oe-1):(X=we*rl((W+K)/(ce+K)),ue=we*J0((G+K)/(ce+K))-1,ue=Af(j-1,va(ue,we-1)),X=Af(ue,va(0,X))):(X=0,ue=-1);const _e=tw(X,ue,Ee),{bottom:We,top:Ct}=rw(xe,ae,B,_e),mt=J0(j/we),Lt=mt*ce+(mt-1)*K-We;return{bottom:We,itemHeight:ce,items:_e,itemWidth:Q,offsetBottom:Lt,offsetTop:Ct,top:Ct}})),P),be(re(A,Ce(j=>j!==null),he(j=>j.length)),S),be(re(At(I,_,P,O),Ce(([j,W,{items:G}])=>G.length>0&&W.height!==0&&j.height!==0),he(([j,W,{items:G},ae])=>{const{bottom:B,top:xe}=rw(j,ae,W,G);return[xe,B]}),st(ua)),t);const te=le(!1);be(re(c,Ne(te),he(([j,W])=>W||j!==0)),te);const ee=en(re(At(P,S),Ce(([{items:j}])=>j.length>0),Ne(te),Ce(([[j,W],G])=>{const ae=j.items[j.items.length-1].index===W-1;return(G||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===W)&&ae}),he(([[,j]])=>j-1),st())),Z=en(re(Pe(P),Ce(({items:j})=>j.length>0&&j[0].index===0),Nn(0),st())),U=en(re(Pe(P),Ne(F),Ce(([{items:j},W])=>j.length>0&&!W),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),st(C0),hr(0)));be(U,f.scrollSeekRangeChanged),be(re(M,Ne(I,_,S,O),he(([j,W,G,ae,B])=>{const xe=O0(j),{align:Ee,behavior:Oe,offset:$e}=xe;let se=xe.index;se==="LAST"&&(se=ae-1),se=va(0,se,Af(ae-1,se));let ye=_f(W,B,G,se);return Ee==="end"?ye=ew(ye-W.height+G.height):Ee==="center"&&(ye=ew(ye-W.height/2+G.height/2)),$e&&(ye+=$e),{behavior:Oe,top:ye}})),l);const Y=zt(re(P,he(j=>j.offsetBottom+j.bottom)),0);return be(re(T,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),I),{customScrollParent:h,data:A,deviation:$,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:M,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:P,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:N,stateRestoreInProgress:F,...w}},at(gf,Wt,ga,R0,gr,yf,mr));function nw(e,t,n){return va(1,rl((e+n)/(rl(t)+n)))}function rw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=_f(e,t,n,r[0].index);return{bottom:_f(e,t,n,r[r.length-1].index)+o,top:i}}function _f(e,t,n,r){const o=nw(e.width,n.width,t.column),i=rl(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const BL=Ue(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(Sf),a=le("div"),s=le(ri),l=(d,p=null)=>zt(re(t,he(f=>f[d]),st()),p),c=le(!1),u=le(!1);return be(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")}}),HL=Ue(([e,t])=>({...e,...t}),at(zL,BL)),WL=E.memo(function(){const e=ut("gridState"),t=ut("listClassName"),n=ut("itemClassName"),r=ut("itemContent"),o=ut("computeItemKey"),i=ut("isSeeking"),a=dn("scrollHeight"),s=ut("ItemComponent"),l=ut("ListComponent"),c=ut("ScrollSeekPlaceholder"),u=ut("context"),d=dn("itemDimensions"),p=dn("gap"),f=ut("log"),m=ut("stateRestoreInProgress"),g=dn("reportReadyState"),h=Ln(E.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:iw("column-gap",getComputedStyle(v).columnGap,f),row:iw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return W0(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:b.jsx(l,{className:t,ref:h,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?b.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),qL=E.memo(function(){const e=ut("HeaderComponent"),t=dn("headerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),UL=E.memo(function(){const e=ut("FooterComponent"),t=dn("footerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),YL=({children:e})=>{const t=E.useContext(H0),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Ln(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]),b.jsx("div",{ref:o,style:ai(!1),children:e})},GL=({children:e})=>{const t=E.useContext(H0),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ut("customScrollParent"),i=af(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]),b.jsx("div",{ref:i,style:ai(!1),children:e})},KL=E.memo(function({...e}){const t=ut("useWindowScroll"),n=ut("customScrollParent"),r=n||t?XL:ZL,o=n||t?GL:YL,i=ut("context");return b.jsx(r,{...e,...lt(r,i),children:b.jsxs(o,{children:[b.jsx(qL,{}),b.jsx(WL,{}),b.jsx(UL,{})]})})}),{useEmitter:ow,useEmitterValue:ut,usePublisher:dn}=bf(HL,{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"}},KL),ZL=Tf({useEmitter:ow,useEmitterValue:ut,usePublisher:dn}),XL=Ef({useEmitter:ow,useEmitterValue:ut,usePublisher:dn});function iw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const If=()=>{const e=E.useContext(jo);return e?e.tweaks:bs},aw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>b.jsxs("span",{className:Le("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:b.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?b.jsx(tf,{as:"button",type:"button","aria-description":r,title:b.jsxs("span",{className:"cursor-help",children:[b.jsx("span",{className:"sr-only",children:r}),b.jsx(yy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:b.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?b.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[b.jsx(gy,{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}),b.jsx(e_,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ya=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const S=If(),C=T!==void 0?T:S.input.iconFeedback,P=d??f,I=Ot(),_=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Le("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[b.jsxs("label",{form:u,htmlFor:P,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:[b.jsx(aw,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:_||n?b.jsxs(E.Fragment,{children:[y?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:_}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.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?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.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}),b.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})]})}),QL=e=>b.jsx(E.Fragment,{children:e.children}),JL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},e2={caseSensitive:!1,sort:!1},t2=[],n2=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),r2=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),o2={List:n2,Item:r2},si=320,Of=40,i2=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=E.useRef(null),y=E.useRef(null),x=g.value??g.defaultValue??"",T=Ot(),[w,S]=E.useState(()=>Math.min(si,Of*o.length)),[C,P]=E.useState(!1),[I,_]=E.useState(""),[M,L]=E.useState(x),[$,A]=E.useState(()=>{var K;return((K=o.find(ce=>ce.value===x))==null?void 0:K.label)??x}),[O,N]=E.useState(null),V=E.useRef(t2),F=m&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Xr(F,["value","label"],e2).search(I),D=()=>{P(!1),S(0)},R=z.filter(K=>K.hidden!==!0),J=m?void 0:`^(${o.map(K=>`${sd(K.value)}${K.label?"|"+sd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(ce=>ce.value===g.value);L((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||S(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let ce=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min(R.length,10)).forEach(we=>{const X=we.getBoundingClientRect();ce+=X.height});const ie=Math.min(ce,si);S(ie)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:Y}=Gr({open:C,transform:!0,strategy:"absolute",onOpenChange:P,whileElementsMounted:ea,middleware:[ta(4),Sx({padding:10,elementContext:"reference",apply(K){const ce=v.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),ie=(Q==null?void 0:Q.getBoundingClientRect().height)||0,we=Math.min(ie<Of?si:ie,si);wi.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<Of?void S(we):void S(Math.min(X,si))},50)),Object.assign(K.elements.floating.style,{width:`${ce}px`,maxWidth:`${ce}px`,maxHeight:`${si}`})}})]}),j=r0(Y,JL),{getReferenceProps:W,getFloatingProps:G,getItemProps:ae}=Kr([Zr(Y,{role:"listbox"}),Yr(Y),Qd(Y,{cols:0,listRef:V,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return Si(K)},[]);const B=(K,ce)=>{L(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const ie=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ie),g.onChange&&g.onChange(ie),A(K.label??""),D(),_(""),N(ce)},xe=K=>{var Q;const ce=K.target.value;return _(ce),!C&&ce===""?P(!0):(K.target.name=g.name||"",ce?P(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Ee=()=>{var K;P(!0),_(""),(K=U.reference.current)==null||K.focus()},Oe=()=>{N(K=>K===null?0:K),P(!0),_("")},$e=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),_(""),L(""),A(""),Zh(U.reference.current),D()},se=g.id||g.name,ye=R.length===0;return b.jsxs(ya,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Ee,children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),M?b.jsx("button",{type:"button",onClick:$e,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("input",{"data-shadow":"true",...W({...g,onChange:xe,onFocus:Oe,pattern:J,ref:U.setReference,name:`${se}-shadow`,id:`${se}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var ce,Q;if(K.key==="Escape")return K.currentTarget.blur(),D();if(C){if(K.key==="ArrowDown"){let ie=rt.number(O)?O+1:0;return ie>R.length-1&&(ie=0),(ce=y.current)==null||ce.scrollIntoView({index:ie}),N(ie)}if(K.key==="ArrowUp"){let ie=rt.number(O)?O-1:R.length-1;return ie<0&&(ie=R.length-1),(Q=y.current)==null||Q.scrollIntoView({index:ie}),N(ie)}if(K.key==="Enter"){if(O!==null&&R[O])return K.preventDefault(),B(R[O],O);if(R.length===1)return K.preventDefault(),B(R[0],0)}}}}),"data-value":M,"data-error":!!t,"data-name":se,"data-target":se,required:f,value:C?I:$||M,"aria-autocomplete":"list",autoComplete:"off",className:Le("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",g.className)}),b.jsx("input",{id:se,name:se,type:"hidden","data-origin":se,ref:h,required:f,defaultValue:g.value||M||void 0}),b.jsx(qr,{preserveTabOrder:!0,children:C?b.jsx(Jo,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs(ft.ul,{...G({ref:U.setFloating,style:{...j.styles,top:ee??0,position:Z,left:(te??0)+(M?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ye?"auto":w},className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[ye?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,b.jsx(kf,{ref:y,hidden:ye,data:R,style:{height:w},components:o2,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,ce)=>{const Q=ce.Render??QL,ie=M===ce.value||M===ce.label,we=O===K,X=ce.label??ce.value;return b.jsx("button",{"data-value":ce.value,...ae({ref:ue=>void(V.current[K]=ue),role:"option",type:"button","aria-checked":ie,"aria-current":ie,"aria-selected":ie,"aria-busy":ce.disabled,onClick:()=>B(ce,K),className:`cursor-pointer w-full p-2 text-left ${ie?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(Q,{...g,label:ce.label,value:ce.value,children:X})})}})]})}):null})]})}),Mf=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 b.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Le("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[b.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Le("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,b.jsx("span",{"data-name":"checkbox-label",className:Le("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),sw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,S=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const P=C.current,I=Si(C.current),_=r==null?void 0:r(P),M=L=>{const $=L;if($.key==="Enter"&&P.enterKeyHint==="next"){const A=P.getAttribute("data-next");if(A){const O=document.getElementById(A);if(O)return O.focus(),void $.preventDefault()}}};return P.addEventListener("keydown",M),()=>{_==null||_(),I(),P.removeEventListener("keydown",M)}},[]),b.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Le(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:b.jsx(w,{...n,...x,id:S,name:S,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Fa(T,C),className:Le("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=sw(Jy,"input",{type:"text"}),lw=new Date(1970,11,31),Df={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},cw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},a2={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")},Nf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},s2=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=id(t),l=E.useId(),c=Ot(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=Nf(u,lw).flatMap(C=>rt.keyof(Df,C.type)?Df[C.type](C.value):[]),h=Nf(u,lw).reduce((C,P)=>C+(rt.keyof(cw,P.type)?cw[P.type](P.value):""),""),[v,y]=E.useState(d?Nf(u,d).reduce((C,P)=>C+(rt.keyof(Df,P.type)?a2[P.type](d,P.value):""),""):""),x=C=>{const P=C.target.value;if(y(P),g.length===P.length&&g.every((_,M)=>{const L=P.charAt(M);return typeof _=="string"?L===_:_.test(L)})){const _=No(fO(P,h,new Date));return p(_),r==null?void 0:r(_)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),y(C?fI(C,h):"")),w=Cy(d),S=w?d.toISOString():void 0;return b.jsx(ba,{...i,mask:g,value:v,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(ti,{open:f,onChange:m,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(QA,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(wb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),l2=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],c2=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],u2=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],d2=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],uw=(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 dw(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?d2:u2:t.binary?c2:l2,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=uw(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=uw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var il={exports:{}},al={exports:{}},Ye={};/** @license React v16.13.1
173
173
  * react-is.production.min.js
174
174
  *
175
175
  * Copyright (c) Facebook, Inc. and its affiliates.
176
176
  *
177
177
  * This source code is licensed under the MIT license found in the
178
178
  * LICENSE file in the root directory of this source tree.
179
- */var nw;function jL(){if(nw)return Ge;nw=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,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(T){if(typeof T=="object"&&T!==null){var w=T.$$typeof;switch(w){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case s:case u:case h:case f:case a:return T;default:return w}}case n:return w}}}function S(T){return b(T)===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=h,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(T){return S(T)||b(T)===l},Ge.isConcurrentMode=S,Ge.isContextConsumer=function(T){return b(T)===s},Ge.isContextProvider=function(T){return b(T)===a},Ge.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Ge.isForwardRef=function(T){return b(T)===u},Ge.isFragment=function(T){return b(T)===r},Ge.isLazy=function(T){return b(T)===h},Ge.isMemo=function(T){return b(T)===f},Ge.isPortal=function(T){return b(T)===n},Ge.isProfiler=function(T){return b(T)===i},Ge.isStrictMode=function(T){return b(T)===o},Ge.isSuspense=function(T){return b(T)===d},Ge.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===h||T.$$typeof===f||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===m||T.$$typeof===y||T.$$typeof===v||T.$$typeof===g)},Ge.typeOf=b,Ge}var Ye={};/** @license React v16.13.1
179
+ */var fw;function f2(){if(fw)return Ye;fw=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,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){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 S}}case n:return S}}}function T(w){return x(w)===c}return Ye.AsyncMode=l,Ye.ConcurrentMode=c,Ye.ContextConsumer=s,Ye.ContextProvider=a,Ye.Element=t,Ye.ForwardRef=u,Ye.Fragment=r,Ye.Lazy=m,Ye.Memo=f,Ye.Portal=n,Ye.Profiler=i,Ye.StrictMode=o,Ye.Suspense=d,Ye.isAsyncMode=function(w){return T(w)||x(w)===l},Ye.isConcurrentMode=T,Ye.isContextConsumer=function(w){return x(w)===s},Ye.isContextProvider=function(w){return x(w)===a},Ye.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ye.isForwardRef=function(w){return x(w)===u},Ye.isFragment=function(w){return x(w)===r},Ye.isLazy=function(w){return x(w)===m},Ye.isMemo=function(w){return x(w)===f},Ye.isPortal=function(w){return x(w)===n},Ye.isProfiler=function(w){return x(w)===i},Ye.isStrictMode=function(w){return x(w)===o},Ye.isSuspense=function(w){return x(w)===d},Ye.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===v||w.$$typeof===y||w.$$typeof===g)},Ye.typeOf=x,Ye}var Ge={};/** @license React v16.13.1
180
180
  * react-is.development.js
181
181
  *
182
182
  * Copyright (c) Facebook, Inc. and its affiliates.
183
183
  *
184
184
  * This source code is licensed under the MIT license found in the
185
185
  * LICENSE file in the root directory of this source tree.
186
- */var rw;function RL(){return rw||(rw=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,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===m||B.$$typeof===y||B.$$typeof===v||B.$$typeof===g)}function S(B){if(typeof B=="object"&&B!==null){var xe=B.$$typeof;switch(xe){case t:var Ee=B.type;switch(Ee){case l:case c:case r:case i:case o:case d:return Ee;default:var Oe=Ee&&Ee.$$typeof;switch(Oe){case s:case u:case h:case f:case a:return Oe;default:return xe}}case n:return xe}}}var T=l,w=c,C=s,k=a,I=t,A=u,N=r,L=h,R=f,P=n,O=i,D=o,j=d,F=!1;function z(B){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.")),M(B)||S(B)===l}function M(B){return S(B)===c}function $(B){return S(B)===s}function J(B){return S(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return S(B)===u}function Z(B){return S(B)===r}function U(B){return S(B)===h}function G(B){return S(B)===f}function V(B){return S(B)===n}function W(B){return S(B)===i}function Y(B){return S(B)===o}function ae(B){return S(B)===d}Ye.AsyncMode=T,Ye.ConcurrentMode=w,Ye.ContextConsumer=C,Ye.ContextProvider=k,Ye.Element=I,Ye.ForwardRef=A,Ye.Fragment=N,Ye.Lazy=L,Ye.Memo=R,Ye.Portal=P,Ye.Profiler=O,Ye.StrictMode=D,Ye.Suspense=j,Ye.isAsyncMode=z,Ye.isConcurrentMode=M,Ye.isContextConsumer=$,Ye.isContextProvider=J,Ye.isElement=te,Ye.isForwardRef=ee,Ye.isFragment=Z,Ye.isLazy=U,Ye.isMemo=G,Ye.isPortal=V,Ye.isProfiler=W,Ye.isStrictMode=Y,Ye.isSuspense=ae,Ye.isValidElementType=b,Ye.typeOf=S}()),Ye}var ow;function iw(){return ow||(ow=1,process.env.NODE_ENV==="production"?nl.exports=jL():nl.exports=RL()),nl.exports}/*
186
+ */var pw;function p2(){return pw||(pw=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===h||B.$$typeof===v||B.$$typeof===y||B.$$typeof===g)}function T(B){if(typeof B=="object"&&B!==null){var xe=B.$$typeof;switch(xe){case t:var Ee=B.type;switch(Ee){case l:case c:case r:case i:case o:case d:return Ee;default:var Oe=Ee&&Ee.$$typeof;switch(Oe){case s:case u:case m:case f:case a:return Oe;default:return xe}}case n:return xe}}}var w=l,S=c,C=s,P=a,I=t,_=u,M=r,L=m,$=f,A=n,O=i,N=o,V=d,F=!1;function z(B){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.")),D(B)||T(B)===l}function D(B){return T(B)===c}function R(B){return T(B)===s}function J(B){return T(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function Z(B){return T(B)===r}function U(B){return T(B)===m}function Y(B){return T(B)===f}function j(B){return T(B)===n}function W(B){return T(B)===i}function G(B){return T(B)===o}function ae(B){return T(B)===d}Ge.AsyncMode=w,Ge.ConcurrentMode=S,Ge.ContextConsumer=C,Ge.ContextProvider=P,Ge.Element=I,Ge.ForwardRef=_,Ge.Fragment=M,Ge.Lazy=L,Ge.Memo=$,Ge.Portal=A,Ge.Profiler=O,Ge.StrictMode=N,Ge.Suspense=V,Ge.isAsyncMode=z,Ge.isConcurrentMode=D,Ge.isContextConsumer=R,Ge.isContextProvider=J,Ge.isElement=te,Ge.isForwardRef=ee,Ge.isFragment=Z,Ge.isLazy=U,Ge.isMemo=Y,Ge.isPortal=j,Ge.isProfiler=W,Ge.isStrictMode=G,Ge.isSuspense=ae,Ge.isValidElementType=x,Ge.typeOf=T}()),Ge}var hw;function mw(){return hw||(hw=1,process.env.NODE_ENV==="production"?al.exports=f2():al.exports=p2()),al.exports}/*
187
187
  object-assign
188
188
  (c) Sindre Sorhus
189
189
  @license MIT
190
- */var Af,aw;function $L(){if(aw)return Af;aw=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 Af=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},Af}var _f,sw;function If(){if(sw)return _f;sw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return _f=e,_f}var Of,lw;function cw(){return lw||(lw=1,Of=Function.call.bind(Object.prototype.hasOwnProperty)),Of}var Mf,uw;function zL(){if(uw)return Mf;uw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=If(),n={},r=cw();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(h){d=h}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={})},Mf=o,Mf}var Df,dw;function BL(){if(dw)return Df;dw=1;var e=iw(),t=$L(),n=If(),r=cw(),o=zL(),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 Df=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var $=M&&(c&&M[c]||M[u]);if(typeof $=="function")return $}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:b,element:S(),elementType:T(),instanceOf:w,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:L,exact:R};function h(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function g(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}g.prototype=Error.prototype;function m(M){if(process.env.NODE_ENV!=="production")var $={},J=0;function te(Z,U,G,V,W,Y,ae){if(V=V||p,Y=Y||G,ae!==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 xe=V+":"+G;!$[xe]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+V+"`. 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."),$[xe]=!0,J++)}}return U[G]==null?Z?U[G]===null?new g("The "+W+" `"+Y+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new g("The "+W+" `"+Y+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:M(U,G,V,W,Y)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function y(M){function $(J,te,ee,Z,U,G){var V=J[te],W=D(V);if(W!==M){var Y=j(V);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+Y+"` supplied to `"+ee+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return m($)}function v(){return m(a)}function b(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var G=J[te];if(!Array.isArray(G)){var V=D(G);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+V+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<G.length;W++){var Y=M(G,W,ee,Z,U+"["+W+"]",n);if(Y instanceof Error)return Y}return null}return m($)}function S(){function M($,J,te,ee,Z){var U=$[J];if(!s(U)){var G=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+G+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return m(M)}function T(){function M($,J,te,ee,Z){var U=$[J];if(!e.isValidElementType(U)){var G=D(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+G+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return m(M)}function w(M){function $(J,te,ee,Z,U){if(!(J[te]instanceof M)){var G=M.name||p,V=z(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+V+"` supplied to `"+ee+"`, expected ")+("instance of `"+G+"`."))}return null}return m($)}function C(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function $(J,te,ee,Z,U){for(var G=J[te],V=0;V<M.length;V++)if(h(G,M[V]))return null;var W=JSON.stringify(M,function(ae,B){var xe=j(B);return xe==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(G)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return m($)}function k(M){function $(J,te,ee,Z,U){if(typeof M!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var G=J[te],V=D(G);if(V!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+V+"` supplied to `"+ee+"`, expected an object."));for(var W in G)if(r(G,W)){var Y=M(G,W,ee,Z,U+"."+W,n);if(Y instanceof Error)return Y}return null}return m($)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<M.length;$++){var J=M[$];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(J)+" at index "+$+"."),a}function te(ee,Z,U,G,V){for(var W=[],Y=0;Y<M.length;Y++){var ae=M[Y],B=ae(ee,Z,U,G,V,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var xe=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+G+" `"+V+"` supplied to "+("`"+U+"`"+xe+"."))}return m(te)}function A(){function M($,J,te,ee,Z){return P($[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return m(M)}function N(M,$,J,te,ee){return new g((M||"React class")+": "+$+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function L(M){function $(J,te,ee,Z,U){var G=J[te],V=D(G);if(V!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+V+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in M){var Y=M[W];if(typeof Y!="function")return N(ee,Z,U,W,j(Y));var ae=Y(G,W,ee,Z,U+"."+W,n);if(ae)return ae}return null}return m($)}function R(M){function $(J,te,ee,Z,U){var G=J[te],V=D(G);if(V!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+V+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],M);for(var Y in W){var ae=M[Y];if(r(M,Y)&&typeof ae!="function")return N(ee,Z,U,Y,j(ae));if(!ae)return new g("Invalid "+Z+" `"+U+"` key `"+Y+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
191
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var B=ae(G,Y,ee,Z,U+"."+Y,n);if(B)return B}return null}return m($)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var $=d(M);if($){var J=$.call(M),te;if($!==M.entries){for(;!(te=J.next()).done;)if(!P(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function D(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":O($,M)?"symbol":$}function j(M){if(typeof M>"u"||M===null)return""+M;var $=D(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function F(M){var $=j(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function z(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Df}var Nf,fw;function HL(){if(fw)return Nf;fw=1;var e=If();function t(){}function n(){}return n.resetWarningCache=t,Nf=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},Nf}var pw;function WL(){if(pw)return tl.exports;if(pw=1,process.env.NODE_ENV!=="production"){var e=iw(),t=!0;tl.exports=BL()(e.isElement,t)}else tl.exports=HL()();return tl.exports}var qL=WL();const nt=Ip(qL);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 UL=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 ai(e,t,n){const r=GL(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 GL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=UL.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 YL=[".DS_Store","Thumbs.db"];function KL(e){return eo(this,void 0,void 0,function*(){return rl(e)&&ZL(e.dataTransfer)?e2(e.dataTransfer,e.type):XL(e)?QL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?JL(e):[]})}function ZL(e){return rl(e)}function XL(e){return rl(e)&&rl(e.target)}function rl(e){return typeof e=="object"&&e!==null}function QL(e){return Ff(e.target.files).map(t=>ai(t))}function JL(e){return eo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ai(n))})}function e2(e,t){return eo(this,void 0,void 0,function*(){if(e.items){const n=Ff(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(t2));return mw(gw(r))}return mw(Ff(e.files).map(n=>ai(n)))})}function mw(e){return e.filter(t=>YL.indexOf(t.name)===-1)}function Ff(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 t2(e){if(typeof e.webkitGetAsEntry!="function")return vw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?yw(t):vw(e,t)}function gw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?gw(n):[n]],[])}function vw(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,ai(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ai(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function n2(e){return eo(this,void 0,void 0,function*(){return e.isDirectory?yw(e):r2(e)})}function yw(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(n2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function r2(e){return eo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ai(r,e.fullPath);t(o)},r=>{n(r)})})})}var ol={},bw;function o2(){return bw||(bw=1,ol.__esModule=!0,ol.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}),ol}var i2=o2();const Lf=Ip(i2);function xw(e){return l2(e)||s2(e)||Ew(e)||a2()}function a2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l2(e){if(Array.isArray(e))return Vf(e)}function ww(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 Tw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ww(Object(n),!0).forEach(function(r){Sw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ww(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t){return d2(e)||u2(e,t)||Ew(e,t)||c2()}function c2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ew(e,t){if(e){if(typeof e=="string")return Vf(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 Vf(e,t)}}function Vf(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 u2(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 d2(e){if(Array.isArray(e))return e}var f2=typeof Lf=="function"?Lf:Lf.default,p2="file-invalid-type",h2="file-too-large",m2="file-too-small",g2="too-many-files",v2=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:p2,message:"File type must be ".concat(r)}},Cw=function(t){return{code:h2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},kw=function(t){return{code:m2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},y2={code:g2,message:"Too many files"};function Pw(e,t){var n=e.type==="application/x-moz-file"||f2(e,t);return[n,n?null:v2(t)]}function Aw(e,t,n){if(to(e.size))if(to(t)&&to(n)){if(e.size>n)return[!1,Cw(n)];if(e.size<t)return[!1,kw(t)]}else{if(to(t)&&e.size<t)return[!1,kw(t)];if(to(n)&&e.size>n)return[!1,Cw(n)]}return[!0,null]}function to(e){return e!=null}function b2(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=Pw(l,n),u=va(c,1),d=u[0],p=Aw(l,r,o),f=va(p,1),h=f[0],g=s?s(l):null;return d&&h&&!g})}function il(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function al(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 _w(e){e.preventDefault()}function x2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function w2(e){return e.indexOf("Edge/")!==-1}function T2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return x2(e)||w2(e)}function jn(){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!il(r)&&s&&s.apply(void 0,[r].concat(i)),il(r)})}}function S2(){return"showOpenFilePicker"in window}function E2(e){if(to(e)){var t=Object.entries(e).filter(function(n){var r=va(n,2),o=r[0],i=r[1],a=!0;return Iw(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(Ow))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=va(r,2),i=o[0],a=o[1];return Tw(Tw({},n),{},Sw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function C2(e){if(to(e))return Object.entries(e).reduce(function(t,n){var r=va(n,2),o=r[0],i=r[1];return[].concat(xw(t),[o],xw(i))},[]).filter(function(t){return Iw(t)||Ow(t)}).join(",")}function k2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function P2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Iw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Ow(e){return/^.*\.[\w]+$/.test(e)}var A2=["children"],_2=["open"],I2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],O2=["refKey","onChange","onClick"];function M2(e){return F2(e)||N2(e)||Mw(e)||D2()}function D2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F2(e){if(Array.isArray(e))return Rf(e)}function jf(e,t){return j2(e)||V2(e,t)||Mw(e,t)||L2()}function L2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mw(e,t){if(e){if(typeof e=="string")return Rf(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 Rf(e,t)}}function Rf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function j2(e){if(Array.isArray(e))return e}function Dw(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 ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dw(Object(n),!0).forEach(function(r){$f(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sl(e,t){if(e==null)return{};var n=R2(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 R2(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 zf=E.forwardRef(function(e,t){var n=e.children,r=sl(e,A2),o=Fw(r),i=o.open,a=sl(o,_2);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ht(ht({},a),{},{open:i})))});zf.displayName="Dropzone";var Nw={disabled:!1,getFilesFromEvent:KL,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};zf.defaultProps=Nw,zf.propTypes={children:nt.func,accept:nt.objectOf(nt.arrayOf(nt.string)),multiple:nt.bool,preventDropOnDocument:nt.bool,noClick:nt.bool,noKeyboard:nt.bool,noDrag:nt.bool,noDragEventsBubbling:nt.bool,minSize:nt.number,maxSize:nt.number,maxFiles:nt.number,disabled:nt.bool,getFilesFromEvent:nt.func,onFileDialogCancel:nt.func,onFileDialogOpen:nt.func,useFsAccessApi:nt.bool,autoFocus:nt.bool,onDragEnter:nt.func,onDragLeave:nt.func,onDragOver:nt.func,onDrop:nt.func,onDropAccepted:nt.func,onDropRejected:nt.func,onError:nt.func,validator:nt.func};var Bf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Fw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ht(ht({},Nw),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,h=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,w=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=E.useMemo(function(){return C2(n)},[n]),N=E.useMemo(function(){return E2(n)},[n]),L=E.useMemo(function(){return typeof m=="function"?m:Lw},[m]),R=E.useMemo(function(){return typeof g=="function"?g:Lw},[g]),P=E.useRef(null),O=E.useRef(null),D=E.useReducer($2,Bf),j=jf(D,2),F=j[0],z=j[1],M=F.isFocused,$=F.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&S2()),te=function(){!J.current&&$&&setTimeout(function(){if(O.current){var ue=O.current.files;ue.length||(z({type:"closeDialog"}),R())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[O,$,R,J]);var ee=E.useRef([]),Z=function(ue){P.current&&P.current.contains(ue.target)||(ue.preventDefault(),ee.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",_w,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",_w),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&v&&P.current&&P.current.focus(),function(){}},[P,v,r]);var U=E.useCallback(function(X){k?k(X):console.error(X)},[k]),G=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[].concat(M2(ee.current),[X.target]),al(X)&&Promise.resolve(o(X)).then(function(ue){if(!(il(X)&&!C)){var _e=ue.length,We=_e>0&&b2({files:ue,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ct=_e>0&&!We;z({isDragAccept:We,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ue){return U(ue)})},[o,c,U,C,A,a,i,s,l,I]),V=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=al(X);if(ue&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ue&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ee.current.filter(function(We){return P.current&&P.current.contains(We)}),_e=ue.indexOf(X.target);_e!==-1&&ue.splice(_e,1),ee.current=ue,!(ue.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),al(X)&&u&&u(X))},[P,u,C]),Y=E.useCallback(function(X,ue){var _e=[],We=[];X.forEach(function(Ct){var mt=Pw(Ct,A),Lt=jf(mt,2),Tn=Lt[0],zn=Lt[1],wr=Aw(Ct,a,i),Tr=jf(wr,2),Sr=Tr[0],H=Tr[1],q=I?I(Ct):null;if(Tn&&Sr&&!q)_e.push(Ct);else{var $e=[zn,H];q&&($e=$e.concat(q)),We.push({file:Ct,errors:$e.filter(function(et){return et})})}}),(!s&&_e.length>1||s&&l>=1&&_e.length>l)&&(_e.forEach(function(Ct){We.push({file:Ct,errors:[y2]})}),_e.splice(0)),z({acceptedFiles:_e,fileRejections:We,isDragReject:We.length>0,type:"setFiles"}),p&&p(_e,We,ue),We.length>0&&h&&h(We,ue),_e.length>0&&f&&f(_e,ue)},[z,s,A,a,i,l,p,f,h,I]),ae=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[],al(X)&&Promise.resolve(o(X)).then(function(ue){il(X)&&!C||Y(ue,X)}).catch(function(ue){return U(ue)}),z({type:"reset"})},[o,Y,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),L();var X={multiple:s,types:N};window.showOpenFilePicker(X).then(function(ue){return o(ue)}).then(function(ue){Y(ue,null),z({type:"closeDialog"})}).catch(function(ue){k2(ue)?(R(ue),z({type:"closeDialog"})):P2(ue)?(J.current=!1,O.current?(O.current.value=null,O.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(ue)});return}O.current&&(z({type:"openDialog"}),L(),O.current.value=null,O.current.click())},[z,L,R,y,Y,U,N,s]),xe=E.useCallback(function(X){!P.current||!P.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[P,B]),Ee=E.useCallback(function(){z({type:"focus"})},[]),Oe=E.useCallback(function(){z({type:"blur"})},[]),Re=E.useCallback(function(){S||(T2()?setTimeout(B,0):B())},[S,B]),se=function(ue){return r?null:ue},ye=function(ue){return T?null:se(ue)},K=function(ue){return w?null:se(ue)},ce=function(ue){C&&ue.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.role,Ct=X.onKeyDown,mt=X.onFocus,Lt=X.onBlur,Tn=X.onClick,zn=X.onDragEnter,wr=X.onDragOver,Tr=X.onDragLeave,Sr=X.onDrop,H=sl(X,I2);return ht(ht($f({onKeyDown:ye(jn(Ct,xe)),onFocus:ye(jn(mt,Ee)),onBlur:ye(jn(Lt,Oe)),onClick:se(jn(Tn,Re)),onDragEnter:K(jn(zn,G)),onDragOver:K(jn(wr,V)),onDragLeave:K(jn(Tr,W)),onDrop:K(jn(Sr,ae)),role:typeof We=="string"&&We!==""?We:"presentation"},_e,P),!r&&!T?{tabIndex:0}:{}),H)}},[P,xe,Ee,Oe,Re,G,V,W,ae,T,w,r]),ie=E.useCallback(function(X){X.stopPropagation()},[]),we=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.onChange,Ct=X.onClick,mt=sl(X,O2),Lt=$f({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:se(jn(We,ae)),onClick:se(jn(Ct,ie)),tabIndex:-1},_e,O);return ht(ht({},Lt),mt)}},[O,n,s,ae,r]);return ht(ht({},F),{},{isFocused:M&&!r,getRootProps:Q,getInputProps:we,rootRef:P,inputRef:O,open:se(B)})}function $2(e,t){switch(t.type){case"focus":return ht(ht({},e),{},{isFocused:!0});case"blur":return ht(ht({},e),{},{isFocused:!1});case"openDialog":return ht(ht({},Bf),{},{isFileDialogActive:!0});case"closeDialog":return ht(ht({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ht(ht({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ht(ht({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ht({},Bf);default:return e}}function Lw(){}const z2={isImage:e=>e.type.includes("image")},B2=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(z2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:tw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:tw(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Io,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(iy,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Io,{className:"text-danger"})})]})},H2=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(B2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),W2=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(H2,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),q2=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(DA,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),U2=({idle:e=q2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=Fw({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(W2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},G2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})};class no extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof no&&(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 no(this);return t?t(n):n}}const Y2=e=>x.jsx(E.Fragment,{children:e.children}),K2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Z2={caseSensitive:!1,sort:!1},Vw=[],X2=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(Jn,{children:t.children})})}),Q2=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),J2={List:X2,Item:Q2},eV=e=>{const t=Ot(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(Ec,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},tV=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:h=!1,onChangeOptions:g,...m},y)=>{const v=E.useMemo(()=>new no(r.map(Q=>[Q.value,Q])),[r]),b=E.useRef(null),S=E.useRef(null),T=m.value??m.defaultValue??Vw,w=Ot(),[C,k]=E.useState(0),[I,A]=E.useState(!1),[N,L]=E.useState(""),[R,P]=E.useState(()=>{const Q=new no;return T.forEach(ie=>{const we=v.get(ie);return we?Q.set(ie,we):void 0}),Q}),O=E.useMemo(()=>Array.from(R.keys()),[R]),[D,j]=E.useState(()=>{const Q=new Set(T);return r.reduce((ie,we)=>Q.has(we.value)?[...ie,we.label??we.value]:ie,[])??T}),[F,z]=E.useState(null),M=E.useRef(Vw),$=h&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,J=new Xr($,["value","label"],Z2).search(N);E.useEffect(()=>{I||k(0)},[I]),E.useEffect(()=>{m.value&&P(new no(m.value.map(Q=>[Q,v.get(Q)])))},[m.value,v]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:G,refs:V,context:W}=Yr({open:I,transform:!0,strategy:"absolute",onOpenChange:A,whileElementsMounted:Xi,middleware:[Qi(4),dx({padding:10,elementContext:"reference",apply(Q){if(b.current===null)return;const ie=b.current.getBoundingClientRect().width,we=360;vi.flushSync(()=>setTimeout(()=>k(we),200)),Object.assign(Q.elements.floating.style,{width:`${ie}px`,maxWidth:`${ie}px`,maxHeight:ee?"auto":`${we}px`,height:ee?"auto":`${we}px`})}})]}),Y=Ux(W,K2),{getReferenceProps:ae,getFloatingProps:B,getItemProps:xe}=Kr([Zr(W,{role:"listbox"}),Gr(W),Ud(W,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(ie=>Q??ie)})]);E.useEffect(()=>{const Q=V.reference.current;if(Q)return yi(Q)},[]);const Ee=(Q,ie)=>{const we=R.clone(_e=>_e.has(Q.value)?_e.remove(Q.value):_e.set(Q.value,Q));P(we);const X=V.reference.current;if(!X)return;const ue=we.map(_e=>_e.value);X==null||X.setAttribute("data-value",JSON.stringify(ue)),g&&g(ue),j(_e=>_e.concat(Q.label??"")),L(""),z(ie)},Oe=Q=>{const ie=Q.target.value;return L(ie),!I&&ie===""?A(!0):(Q.target.name=m.name||"",ie?A(!0):void 0)},Re=()=>{var Q;A(!0),L(""),(Q=V.reference.current)==null||Q.focus()},se=()=>{A(!0),L("")},ye=()=>{var Q;(Q=V.reference.current)==null||Q.setAttribute("data-value","[]"),L(""),A(!1),P(new no),g==null||g([])},K=m.id||m.name,ce=R.map((Q,ie)=>x.jsx(Ec,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:we=>{we.stopPropagation(),Ee(Q,ie)},children:x.jsx(es,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return x.jsxs(ma,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Re,children:[x.jsx(Fu,{size:20}),x.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),R?x.jsx("button",{type:"button",onClick:ye,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("button",{...ae({...m,onFocus:se,id:`${K}-shadow`,name:`${K}-shadow`,ref:V.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),value:I?N:D||R,className:je("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:x.jsx(eV,{label:c,children:ce})}),x.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:y,required:f,defaultValue:m.value||O||void 0}),x.jsx(qr,{preserveTabOrder:!0,children:I?x.jsx(Xo,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...B({ref:V.setFloating,style:{...Y.styles,top:U??0,position:G,left:(Z??0)+(R?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:N,onChange:Oe,title:m.title,placeholder:w.multiSelectInnerPlaceholder,onKeyDown:Q=>{var ie,we;if(Q.key==="ArrowDown"){let X=F+1;return X>te.length-1&&(X=0),(ie=S.current)==null||ie.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=F-1;return X<0&&(X=te.length-1),(we=S.current)==null||we.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),A(!1);if(Q.key==="Enter"){if(F!==null&&te[F])return Q.preventDefault(),Ee(te[F],F);if(te.length===1)return Q.preventDefault(),Ee(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),ee?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||w.autocompleteEmpty})}):null,ee?null:x.jsx(bf,{ref:S,hidden:ee,data:te,components:J2,style:{height:ee?"0":R.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,ie)=>{const we=ie.Render??Y2,X=R.has(ie.value)||R.has(ie.label??""),ue=F===Q,_e=ie.label??ie.value;return x.jsxs("button",{"data-value":ie.value,...xe({ref:We=>void(M.current[Q]=We),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":ie.disabled,onClick:()=>Ee(ie,Q)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||ue?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Cf,{onChange:rd,checked:X,"aria-checked":X,onClick:We=>{We.stopPropagation(),Ee(ie,Q)}}),x.jsx(we,{...m,label:ie.label,value:ie.value,children:_e})]})}}),R.size===0?null:x.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:ce})]})}):null})]})}),nV=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:je("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),ro=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:h,...g},m)=>{const y=Ot(),v=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(m,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const T=new AbortController,w=v.current,C=yi(v.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{C(),T.abort()}},[]);const S=()=>{var T;return(T=v.current)==null?void 0:T.focus()};return x.jsx(ma,{info:n,left:f,error:h,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:x.jsxs("label",{htmlFor:b,children:[p,x.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Fu,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:x.jsxs("select",{...g,id:b,name:b,value:g.value,required:e,ref:Sc(m,v),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:je("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(T=>E.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${b}-select-option-${T.value}`}))]})})}),rV=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=go(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},h=u.current;return h.addEventListener("change",f),()=>h==null?void 0:h.removeEventListener("change",f)}},[]);const p=()=>{var h,g;const f=!((h=u.current)!=null&&h.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:je("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),oV=e=>{const[t,n]=sA();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:fA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},iV=X0("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
196
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),aV=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},sV={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},lV=e=>{const t=E.useRef(null),n=aV(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(ga,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(bf,{height:n,useWindowScroll:!0,data:e.source,components:sV,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Cf,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(mo,{children:x.jsx(Lu,{})})}),x.jsx("div",{})]})};var cV=Object.defineProperty,jw=Object.getOwnPropertySymbols,uV=Object.prototype.hasOwnProperty,dV=Object.prototype.propertyIsEnumerable,Rw=(e,t,n)=>t in e?cV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fV=(e,t)=>{for(var n in t||(t={}))uV.call(t,n)&&Rw(e,n,t[n]);if(jw)for(var n of jw(t))dV.call(t,n)&&Rw(e,n,t[n]);return e},Hf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},pV=(e,t,n,r)=>cl(Hf,e,t,n,r),si=e=>typeof e=="object",vr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!si(e)&&!si(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=>vr(e[r],t[r]))},hV=(e,t)=>(si(e)||Array.isArray(e))&&t?e[t]:e,mV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ll=e=>/[0-9.]+/.test(e),$w=e=>["string","number"].includes(typeof e),zw=e=>e==null||(e==null?void 0:e.length)===0||e==="",Bw={eq:vr,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:zw,notEmpty:e=>!zw(e),in:(e,t)=>Hf(t,n=>vr(e,n)),notIn:(e,t)=>Hw(t,n=>!vr(e,n))},gV=e=>{if(e in Bw)return Bw[e];throw new Error("Linq - Symbol not found")},li=(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},cl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=gV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},vV=(e,t,n,r)=>cl(li,e,t,n,r),Hw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},yV=(e,t,n,r)=>cl(Hw,e,t,n,r),Ww=e=>{if(e===null)return null;const t=fV({},e);return Object.keys(t).forEach(n=>t[n]=si(e[n])?Ww(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},qw=(e,t)=>{if(si(t)){for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1},bV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},xV=e=>li(e,(t,n,r)=>si(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),wV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Uw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},TV=(e,t)=>Uw(e,n=>n[t]),Gw=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},SV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},EV=(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 ll(e)&&ll(t)?r.map(a=>Number.parseInt(a)):r},Wf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ll(e)&&ll(t)){const o=[],[i,a]=SV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return EV(e,t,r)},CV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Wf(r,o,1):Wf(r,i,Number.parseInt(o,10))}return $w(e)&&$w(t)?Wf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},qf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Yw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},kV=(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)},PV=(e,t,n,r)=>cl(kV,e,t,n,r),Kw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(mV(t))},Zw=(e=>(e.Asc="asc",e.Desc="desc",e))(Zw||{}),AV=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),_V=(e,t)=>e.sort(AV(t)),IV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:li(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},OV=class Sp{constructor(t=[]){this.array=t}static Range(...t){return CV(...t)}static New(t){return new Sp(t)}Where(t,n,r){return this.array=vV(this.array,t,n,r),this}Some(t,n,r){return pV(this.array,t,n,r)}All(t,n,r){return yV(this.array,t,n,r)}Reverse(){return this.array=Yw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=PV(this.array,t,n,r),this}Distinct(){return this.array=xV(this.array),this}First(t){return t===void 0?this.array[0]:wV(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?qf((n,r)=>n+r,0,this.array):qf((n,r)=>n+hV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return TV(this.array,t)}GroupWith(t){return Uw(this.array,t)}Except(t){return li(this.array,n=>!qw(t,n))}Intersect(t){return li(this.array,n=>qw(t,n))}OrderBy(t,n){let r;return r=t?Kw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Yw(r):r,this}Includes(t){return Hf(this.array,n=>vr(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 qf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Gw(this.array,n=>[t,n]))}Zip(t,n){return Gw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:li(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Sp(Ww(this.array))}ToObject(t){return bV(this.array,t)}Sort(t){return Array.isArray(t)?_V(this.array,t):Kw(this.array,t)}Unique(t){return IV(this.array,t)}},Xw=OV,Uf={},Qw;function MV(){return Qw||(Qw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(v){window.console.log(v)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const v=y.getItem(m);try{return JSON.parse(v)}catch{return v??null}},i=m=>Object.keys(m).reduce((y,v)=>({...y,[v]:o(v,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(y=>y(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=p.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,v={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((T,w)=>{const C=w.parse(v);return C===""?T:T.concat(C)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=S,u()}},f=m=>{const y=new Set,v=b=>{m().removeItem(b);const S=i(m());y.forEach(T=>T(S))};return{delete:v,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const S=m().getItem(b);return!n(S)},deleteAll:()=>{t(m(),v),y.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,S)=>{m().setItem(b,JSON.stringify(S)),y.forEach(T=>T(m()))}}},h=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=h,e.createStorage=f}(Uf)),Uf}var ya=MV();const Gf=e=>e.headerLabel??e.thead??e.id,Yf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ci=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ci||{});const Kf=e=>e.type==="number"?e.valueAsNumber:e.value,DV=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},NV={},FV=(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})},LV=(e,t,n=NV)=>{const r=Rr()?null:ya.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:FV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Rr()||ya.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},VV=e=>{const t=go(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]},Zf=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??ci.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:Yi(),operation:l,label:Gf(e),name:o,type:i,value:"",...r}},Xf=()=>{const e=Ot(),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(()=>({[ci.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ci.Boolean]:[t.is,t.isNot],[ci.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},jV=e=>{const t=Ot(),n=Xf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Zf(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(h=>u===h.id);return Zf(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=Kf(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(Jo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(AA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(ro,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(ro,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(ga,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:x.jsx(Io,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(Vu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},RV=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=Xf(),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=Kf(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(ro,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(ga,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Io,{className:"text-danger",size:14})})]})},$V=({item:e,onPointerDown:t})=>{const n=_o(0);return x.jsxs(ey,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(PA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},zV=e=>{var l;const t=Ot(),n=Yf(e.cols),r=uA(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var m;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new Xw(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(mT(h).map((y,v)=>{const b=h[y];return{...g,groupId:Yi(),groupKey:d,index:v,rows:b,groupName:y}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(Jo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(MA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(ro,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(mo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Io,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(TS,{children:x.jsx(Qv,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx($V,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},BV=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),HV=(e,t)=>e.toSorted(BV(t)),Jw=(e,t,n)=>({label:t,id:Yi(),type:n,value:e.id}),WV=e=>{const t=Ot(),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,Jw(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(E.Fragment,{children:x.jsx(Jo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(ry,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(ro,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(ro,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:x.jsx(Io,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Vu,{size:14})," ",t.tableSortAddButton]})})]})})})},qV=e=>{const t=Ot(),[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=Jw(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 x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(SA,{size:14}):null,n==="desc"?x.jsx(TA,{size:14}):null,n==="undefined"?x.jsx(ry,{size:14}):null]})},UV=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(jV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(WV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(zV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Kf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function GV(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 YV=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>GV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(on,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(on,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?x.jsx("li",{children:x.jsx(on,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},KV={top:0,left:0,right:0,bottom:-1},ZV=e=>{var g;const t=Sf(),n=Ot(),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=Xf(),l=o?_A:IA,c=E.useRef(null),u=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==y))},d=E.useCallback(m=>{if(m===null)return;c.current=m;const y=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(m=>e.header.id===m.value),f=p!=null&&p.type?p.type===Zw.Asc?"ascending":"descending":"none",h=Gf(e.header);return e.index===0||e.isLast,x.jsxs(ey,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[x.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?x.jsx(Jo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),x.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"font-medium",children:h})]}),children:x.jsxs("ul",{className:"font-medium",children:[r.length===0?null:x.jsx(E.Fragment,{children:r.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(RV,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Zf(e.header,s.options,s.operations))),children:[x.jsx(Vu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?x.jsx(qV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(ft.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:KV,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 y=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=y.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},XV=e=>{const[t,n]=VV(e.setCols);return x.jsx(Qv,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:x.jsx(Jn,{children:e.headers.map((r,o)=>x.jsx(ZV,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},e1=E.createContext({}),QV=()=>E.useContext(e1),JV=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(Jn,{children:n.children})})),ej=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse border-0 divide-y divide-table-border text-left ${t??""}`})),tj=E.forwardRef(({context:e,...t},n)=>{const r=QV(),o={...t==null?void 0:t.style,top:ct.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),nj=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row group ${(n==null?void 0:n.className)??""}`})),rj=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),oj={TableHead:tj,Table:ej,TableBody:JV,TableRow:nj,TableFoot:rj},ij=[0,0,0,0,0,0,0,0,0,0],t1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),aj=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?t1:x.jsx(db,{})}),sj=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=td(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?t1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:ct.nil(l)?"":l}))})})},lj=()=>x.jsx(E.Fragment,{}),cj=[{}],n1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=go(a),g=go(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return ij;if(c)return u.rows;const y=new Xw(u.rows);return t.length>0&&t.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:y.Where(v.name,v.operation.symbol,v.value)),r.length===0?y.Select():HV(y.Select(),r)},[u.loading,u.rows,c,t,r]);return E.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,v=new IntersectionObserver(b=>{var w;return b[b.length-1].isIntersecting&&g.current?((w=h.current)==null||w.call(h),void f(!0)):f(!1)});return v.observe(y),()=>v.disconnect()},[g,h]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(cL,{useWindowScroll:!0,followOutput:"smooth",components:oj,totalCount:m.length,data:m.length===0?cj:m,fixedFooterContent:p?lj:null,itemContent:m.length===0?aj:sj,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(XV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(YV,{...l}):null]})},uj=(e,t)=>typeof t=="function"?t(e):t,ul=(e,t,n)=>e===t||n==null?void 0:n(t),dj=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Sf(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Yf(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]:uj(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),ul((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),ul((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),ul((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),ul((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(e1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(UV,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?x.jsx(n1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>x.jsx("div",{className:"min-w-full",children:x.jsx(n1,{...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}`))})]})})},fj=["INPUT","SELECT"],r1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{fj.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Qf,o1;function Jf(){if(o1)return Qf;o1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Qf={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Qf}var ep,i1;function a1(){if(i1)return ep;i1=1;var e=Jf(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],y=0;y<256;++y)m.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return m}(),o=function(y){for(;y.length>1;){var v=y.pop(),b=v.obj[v.prop];if(n(b)){for(var S=[],T=0;T<b.length;++T)typeof b[T]<"u"&&S.push(b[T]);v.obj[v.prop]=S}}},i=function(y,v){for(var b=v&&v.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(b[S]=y[S]);return b},a=function m(y,v,b){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(n(y))y.push(v);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var S=y;return n(y)&&!n(v)&&(S=i(y,b)),n(y)&&n(v)?(v.forEach(function(T,w){if(t.call(y,w)){var C=y[w];C&&typeof C=="object"&&T&&typeof T=="object"?y[w]=m(C,T,b):y.push(T)}else y[w]=T}),y):Object.keys(v).reduce(function(T,w){var C=v[w];return t.call(T,w)?T[w]=m(T[w],C,b):T[w]=C,T},S)},s=function(y,v){return Object.keys(v).reduce(function(b,S){return b[S]=v[S],b},y)},l=function(m,y,v){var b=m.replace(/\+/g," ");if(v==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(y,v,b,S,T){if(y.length===0)return y;var w=y;if(typeof y=="symbol"?w=Symbol.prototype.toString.call(y):typeof y!="string"&&(w=String(y)),b==="iso-8859-1")return escape(w).replace(/%u[0-9a-f]{4}/gi,function(R){return"%26%23"+parseInt(R.slice(2),16)+"%3B"});for(var C="",k=0;k<w.length;k+=c){for(var I=w.length>=c?w.slice(k,k+c):w,A=[],N=0;N<I.length;++N){var L=I.charCodeAt(N);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||T===e.RFC1738&&(L===40||L===41)){A[A.length]=I.charAt(N);continue}if(L<128){A[A.length]=r[L];continue}if(L<2048){A[A.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){A[A.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}N+=1,L=65536+((L&1023)<<10|I.charCodeAt(N)&1023),A[A.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}C+=A.join("")}return C},d=function(y){for(var v=[{obj:{o:y},prop:"o"}],b=[],S=0;S<v.length;++S)for(var T=v[S],w=T.obj[T.prop],C=Object.keys(w),k=0;k<C.length;++k){var I=C[k],A=w[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:w,prop:I}),b.push(A))}return o(v),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))},h=function(y,v){return[].concat(y,v)},g=function(y,v){if(n(y)){for(var b=[],S=0;S<y.length;S+=1)b.push(v(y[S]));return b}return v(y)};return ep={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},ep}var tp,s1;function pj(){if(s1)return tp;s1=1;var e=uT(),t=a1(),n=Jf(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(g,m){a.apply(g,i(m)?m:[m])},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(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},p={},f=function g(m,y,v,b,S,T,w,C,k,I,A,N,L,R,P,O,D,j){for(var F=m,z=j,M=0,$=!1;(z=z.get(p))!==void 0&&!$;){var J=z.get(m);if(M+=1,typeof J<"u"){if(J===M)throw new RangeError("Cyclic object value");$=!0}typeof z.get(p)>"u"&&(M=0)}if(typeof I=="function"?F=I(y,F):F instanceof Date?F=L(F):v==="comma"&&i(F)&&(F=t.maybeMap(F,function(Oe){return Oe instanceof Date?L(Oe):Oe})),F===null){if(T)return k&&!O?k(y,u.encoder,D,"key",R):y;F=""}if(d(F)||t.isBuffer(F)){if(k){var te=O?y:k(y,u.encoder,D,"key",R);return[P(te)+"="+P(k(F,u.encoder,D,"value",R))]}return[P(y)+"="+P(String(F))]}var ee=[];if(typeof F>"u")return ee;var Z;if(v==="comma"&&i(F))O&&k&&(F=t.maybeMap(F,k)),Z=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(F);Z=A?U.sort(A):U}var G=C?String(y).replace(/\./g,"%2E"):String(y),V=b&&i(F)&&F.length===1?G+"[]":G;if(S&&i(F)&&F.length===0)return V+"[]";for(var W=0;W<Z.length;++W){var Y=Z[W],ae=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:F[Y];if(!(w&&ae===null)){var B=N&&C?String(Y).replace(/\./g,"%2E"):String(Y),xe=i(F)?typeof v=="function"?v(V,B):V:V+(N?"."+B:"["+B+"]");j.set(m,M);var Ee=e();Ee.set(p,j),s(ee,g(ae,xe,v,b,S,T,w,C,v==="comma"&&O&&i(F)?null:k,I,A,N,L,R,P,O,D,Ee))}}return ee},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");v=m.format}var b=n.formatters[v],S=u.filter;(typeof m.filter=="function"||i(m.filter))&&(S=m.filter);var T;if(m.arrayFormat in o?T=m.arrayFormat:"indices"in m?T=m.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:v,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return tp=function(g,m){var y=g,v=h(m),b,S;typeof v.filter=="function"?(S=v.filter,y=S("",y)):i(v.filter)&&(S=v.filter,b=S);var T=[];if(typeof y!="object"||y===null)return"";var w=o[v.arrayFormat],C=w==="comma"&&v.commaRoundTrip;b||(b=Object.keys(y)),v.sort&&b.sort(v.sort);for(var k=e(),I=0;I<b.length;++I){var A=b[I],N=y[A];v.skipNulls&&N===null||s(T,f(N,A,w,C,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,k))}var L=T.join(v.delimiter),R=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?R+="utf8=%26%2310003%3B&":R+="utf8=%E2%9C%93&"),L.length>0?R+L:""},tp}var np,l1;function hj(){if(l1)return np;l1=1;var e=a1(),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,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=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,h){var g={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=h.parameterLimit===1/0?void 0:h.parameterLimit,v=m.split(h.delimiter,h.throwOnLimitExceeded?y+1:y);if(h.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var b=-1,S,T=h.charset;if(h.charsetSentinel)for(S=0;S<v.length;++S)v[S].indexOf("utf8=")===0&&(v[S]===s?T="utf-8":v[S]===a&&(T="iso-8859-1"),b=S,S=v.length);for(S=0;S<v.length;++S)if(S!==b){var w=v[S],C=w.indexOf("]="),k=C===-1?w.indexOf("="):C+1,I,A;k===-1?(I=h.decoder(w,r.decoder,T,"key"),A=h.strictNullHandling?null:""):(I=h.decoder(w.slice(0,k),r.decoder,T,"key"),A=e.maybeMap(i(w.slice(k+1),h,n(g[I])?g[I].length:0),function(L){return h.decoder(L,r.decoder,T,"value")})),A&&h.interpretNumericEntities&&T==="iso-8859-1"&&(A=o(String(A))),w.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var N=t.call(g,I);N&&h.duplicates==="combine"?g[I]=e.combine(g[I],A):(!N||h.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,h,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");m=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=g?f:i(f,h,m),b=p.length-1;b>=0;--b){var S,T=p[b];if(T==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(v===""||h.strictNullHandling&&v===null)?[]:e.combine([],v);else{S=h.plainObjects?{__proto__:null}:{};var w=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,C=h.decodeDotInKeys?w.replace(/%2E/g,"."):w,k=parseInt(C,10);!h.parseArrays&&C===""?S={0:v}:!isNaN(k)&&T!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(S=[],S[k]=v):C!=="__proto__"&&(S[C]=v)}v=S}return v},u=function(f,h,g,m){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&v.exec(y),T=S?y.slice(0,S.index):y,w=[];if(T){if(!g.plainObjects&&t.call(Object.prototype,T)&&!g.allowPrototypes)return;w.push(T)}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;w.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");w.push("["+y.slice(S.index)+"]")}return c(w,h,g,m)}},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 h=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 m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,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:h,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 np=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v<y.length;++v){var b=y[v],S=u(b,g[b],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},np}var rp,c1;function mj(){if(c1)return rp;c1=1;var e=pj(),t=hj(),n=Jf();return rp={formats:n,parse:t,stringify:e},rp}var gj=mj(),He;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(He||(He={}));var u1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(u1||(u1={}));const fe=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),yr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},oe=He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class fn 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 fn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}fn.create=e=>new fn(e);const ba=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case oe.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 oe.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 oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let vj=ba;function op(){return vj}const ip=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=op(),r=ip({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ba?void 0:ba].filter(o=>!!o)});e.common.issues.push(r)}class qt{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 ke;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 qt.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 ke;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 ke=Object.freeze({status:"aborted"}),xa=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),d1=e=>e.status==="aborted",f1=e=>e.status==="dirty",ui=e=>e.status==="valid",dl=e=>typeof Promise<"u"&&e instanceof Promise;function fl(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function p1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var wa,Ta;class Rn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const h1=(e,t)=>{if(ui(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 fn(e.common.issues);return this._error=n,this._error}}};function Ie(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Le{get description(){return this._def.description}_getType(t){return yr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return h1(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return ui(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>ui(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(dl(o)?o:Promise.resolve(o));return h1(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:oe.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 Zn({schema:this,typeName:Se.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 Xn.create(this,this._def)}nullable(){return ao.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $n.create(this)}promise(){return Ca.create(this,this._def)}or(t){return ml.create([this,t],this._def)}and(t){return gl.create(this,t,this._def)}transform(t){return new Zn({...Ie(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new wl({...Ie(this._def),innerType:this,defaultValue:n,typeName:Se.ZodDefault})}brand(){return new y1({typeName:Se.ZodBranded,type:this,...Ie(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Tl({...Ie(this._def),innerType:this,catchValue:n,typeName:Se.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Sl.create(this,t)}readonly(){return El.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yj=/^c[^\s-]{8,}$/i,bj=/^[0-9a-z]+$/,xj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wj=/^[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,Tj=/^[a-z0-9_-]{21}$/i,Sj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ej=/^[-+]?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)?)??$/,Cj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ap;const Pj=/^(?:(?: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])$/,Aj=/^(?:(?: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])$/,_j=/^(([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]))$/,Ij=/^(([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])$/,Oj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mj=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,m1="((\\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])))",Dj=new RegExp(`^${m1}$`);function g1(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Nj(e){return new RegExp(`^${g1(e)}$`)}function Fj(e){let t=`${m1}T${g1(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 Lj(e,t){return!!((t==="v4"||!t)&&Pj.test(e)||(t==="v6"||!t)&&_j.test(e))}function Vj(e,t){if(!Sj.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function jj(e,t){return!!((t==="v4"||!t)&&Aj.test(e)||(t==="v6"||!t)&&Ij.test(e))}class Gn extends Le{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new qt;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:oe.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:oe.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:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&de(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Cj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")ap||(ap=new RegExp(kj,"u")),ap.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Tj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")yj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")bj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")xj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ulid",code:oe.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:oe.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:oe.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:oe.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:oe.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:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Fj(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Dj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Nj(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Ej.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Lj(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Vj(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?jj(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Oj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Mj.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:oe.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.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,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gn({...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}}Gn.create=e=>{var t;return new Gn({checks:[],typeName:Se.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};function Rj(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class oo extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:oe.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:oe.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:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Rj(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.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:oe.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new oo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new oo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}oo.create=e=>new oo({checks:[],typeName:Se.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class di extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new qt;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:oe.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:oe.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:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new di({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new di({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.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}}di.create=e=>{var t;return new di({checks:[],typeName:Se.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};class sp extends Le{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Zt(t.data)}}sp.create=e=>new sp({typeName:Se.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class Sa extends Le{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_date}),ke}const r=new qt;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:oe.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:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Sa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}Sa.create=e=>new Sa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Se.ZodDate,...Ie(e)});class lp extends Le{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Zt(t.data)}}lp.create=e=>new lp({typeName:Se.ZodSymbol,...Ie(e)});class pl extends Le{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Zt(t.data)}}pl.create=e=>new pl({typeName:Se.ZodUndefined,...Ie(e)});class hl extends Le{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Zt(t.data)}}hl.create=e=>new hl({typeName:Se.ZodNull,...Ie(e)});class cp extends Le{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}cp.create=e=>new cp({typeName:Se.ZodAny,...Ie(e)});class fi extends Le{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}fi.create=e=>new fi({typeName:Se.ZodUnknown,...Ie(e)});class br extends Le{_parse(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),ke}}br.create=e=>new br({typeName:Se.ZodNever,...Ie(e)});class up extends Le{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Zt(t.data)}}up.create=e=>new up({typeName:Se.ZodVoid,...Ie(e)});class $n extends Le{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return de(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),ke;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?oe.too_big:oe.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:oe.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:oe.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 Rn(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rn(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new $n({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new $n({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new $n({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}$n.create=(e,t)=>new $n({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Ie(t)});function pi(e){if(e instanceof bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xn.create(pi(r))}return new bt({...e._def,shape:()=>t})}else return e instanceof $n?new $n({...e._def,type:pi(e.element)}):e instanceof Xn?Xn.create(pi(e.unwrap())):e instanceof ao?ao.create(pi(e.unwrap())):e instanceof Kn?Kn.create(e.items.map(t=>pi(t))):e}class bt extends Le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return de(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),ke}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Rn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(de(o,{code:oe.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 Rn(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=>qt.mergeObjectSync(r,c)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Se.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new bt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}deepPartial(){return pi(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new bt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xn;)i=i._def.innerType;n[r]=i}}),new bt({...this._def,shape:()=>n})}keyof(){return v1(He.objectKeys(this.shape))}}bt.create=(e,t)=>new bt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Se.ZodObject,...Ie(t)}),bt.strictCreate=(e,t)=>new bt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Se.ZodObject,...Ie(t)}),bt.lazycreate=(e,t)=>new bt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Se.ZodObject,...Ie(t)});class ml extends Le{_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 fn(s.ctx.common.issues));return de(n,{code:oe.invalid_union,unionErrors:a}),ke}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 fn(l));return de(n,{code:oe.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}ml.create=(e,t)=>new ml({options:e,typeName:Se.ZodUnion,...Ie(t)});const Yn=e=>e instanceof yl?Yn(e.schema):e instanceof Zn?Yn(e.innerType()):e instanceof bl?[e.value]:e instanceof io?e.options:e instanceof xl?He.objectValues(e.enum):e instanceof wl?Yn(e._def.innerType):e instanceof pl?[void 0]:e instanceof hl?[null]:e instanceof Xn?[void 0,...Yn(e.unwrap())]:e instanceof ao?[null,...Yn(e.unwrap())]:e instanceof y1||e instanceof El?Yn(e.unwrap()):e instanceof Tl?Yn(e._def.innerType):[];class dp extends Le{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return de(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(de(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Yn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new dp({typeName:Se.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ie(r)})}}function fp(e,t){const n=yr(e),r=yr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=fp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=fp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class gl extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(d1(i)||d1(a))return ke;const s=fp(i.value,a.value);return s.valid?((f1(i)||f1(a))&&n.dirty(),{status:n.value,value:s.data}):(de(r,{code:oe.invalid_intersection_types}),ke)};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}))}}gl.create=(e,t,n)=>new gl({left:e,right:t,typeName:Se.ZodIntersection,...Ie(n)});class Kn extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return de(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return de(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(de(r,{code:oe.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 Rn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Kn({...this._def,rest:t})}}Kn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kn({items:e,typeName:Se.ZodTuple,rest:null,...Ie(t)})};class vl extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return de(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Rn(r,s,r.path,s)),value:a._parse(new Rn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Le?new vl({keyType:t,valueType:n,typeName:Se.ZodRecord,...Ie(r)}):new vl({keyType:Gn.create(),valueType:t,typeName:Se.ZodRecord,...Ie(n)})}}class pp extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return de(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rn(r,s,r.path,[c,"key"])),value:i._parse(new Rn(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 ke;(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 ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}pp.create=(e,t,n)=>new pp({valueType:t,keyType:e,typeName:Se.ZodMap,...Ie(n)});class hi extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return de(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(de(r,{code:oe.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:oe.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 ke;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 Rn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new hi({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new hi({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}hi.create=(e,t)=>new hi({valueType:e,minSize:null,maxSize:null,typeName:Se.ZodSet,...Ie(t)});class Ea extends Le{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return de(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return ip({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,op(),ba].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return ip({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,op(),ba].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ca){const s=this;return Zt(async function(...l){const c=new fn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Zt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new fn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new fn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ea({...this._def,args:Kn.create(t).rest(fi.create())})}returns(t){return new Ea({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ea({args:t||Kn.create([]).rest(fi.create()),returns:n||fi.create(),typeName:Se.ZodFunction,...Ie(r)})}}class yl extends Le{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})}}yl.create=(e,t)=>new yl({getter:e,typeName:Se.ZodLazy,...Ie(t)});class bl extends Le{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return de(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}bl.create=(e,t)=>new bl({value:e,typeName:Se.ZodLiteral,...Ie(t)});function v1(e,t){return new io({values:e,typeName:Se.ZodEnum,...Ie(t)})}class io extends Le{constructor(){super(...arguments),wa.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{expected:He.joinValues(r),received:n.parsedType,code:oe.invalid_type}),ke}if(fl(this,wa)||p1(this,wa,new Set(this._def.values)),!fl(this,wa).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{received:n.data,code:oe.invalid_enum_value,options:r}),ke}return Zt(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 io.create(t,{...this._def,...n})}exclude(t,n=this._def){return io.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}wa=new WeakMap,io.create=v1;class xl extends Le{constructor(){super(...arguments),Ta.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return de(r,{expected:He.joinValues(o),received:r.parsedType,code:oe.invalid_type}),ke}if(fl(this,Ta)||p1(this,Ta,new Set(He.getValidEnumValues(this._def.values))),!fl(this,Ta).has(t.data)){const o=He.objectValues(n);return de(r,{received:r.data,code:oe.invalid_enum_value,options:o}),ke}return Zt(t.data)}get enum(){return this._def.values}}Ta=new WeakMap,xl.create=(e,t)=>new xl({values:e,typeName:Se.ZodNativeEnum,...Ie(t)});class Ca extends Le{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return de(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ca.create=(e,t)=>new Ca({type:e,typeName:Se.ZodPromise,...Ie(t)});class Zn extends Le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.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 ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?xa(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?xa(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"?ke:(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"?ke:(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(!ui(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ui(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Zn.create=(e,t,n)=>new Zn({schema:e,typeName:Se.ZodEffects,effect:t,...Ie(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:Se.ZodEffects,...Ie(n)});class Xn extends Le{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xn.create=(e,t)=>new Xn({innerType:e,typeName:Se.ZodOptional,...Ie(t)});class ao extends Le{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ao.create=(e,t)=>new ao({innerType:e,typeName:Se.ZodNullable,...Ie(t)});class wl extends Le{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}wl.create=(e,t)=>new wl({innerType:e,typeName:Se.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Tl extends Le{_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 dl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Tl.create=(e,t)=>new Tl({innerType:e,typeName:Se.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class hp extends Le{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}hp.create=e=>new hp({typeName:Se.ZodNaN,...Ie(e)});class y1 extends Le{_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 Sl extends Le{_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"?ke:i.status==="dirty"?(n.dirty(),xa(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"?ke: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 Sl({in:t,out:n,typeName:Se.ZodPipeline})}}class El extends Le{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ui(o)&&(o.value=Object.freeze(o.value)),o);return dl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}El.create=(e,t)=>new El({innerType:e,typeName:Se.ZodReadonly,...Ie(t)}),bt.lazycreate;var Se;(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"})(Se||(Se={})),Gn.create,oo.create,hp.create,di.create,sp.create,Sa.create,lp.create,pl.create,hl.create,cp.create,fi.create,br.create,up.create,$n.create,bt.create,bt.strictCreate,ml.create,dp.create,gl.create,Kn.create,vl.create,pp.create,hi.create,Ea.create,yl.create,bl.create,io.create,xl.create,Ca.create,Zn.create,Xn.create,ao.create,Zn.createWithPreprocess,Sl.create;const $j=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},zj=(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]}}},b1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),wn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):b1(t),o=structuredClone(e);return zj(o,r,n),o},Bj=(e,t)=>e.localeCompare(t),ka={},x1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return w1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=x1(e._def.innerType);return t==="ZodArray"?n??[]:n}},w1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,x1(n)])),T1=(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]=T1(i,o):n[r]=o||i)}return n},Hj={sort:Bj,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},S1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return gj.parse(n.toString(),Hj)},so=(e,t)=>b1(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),xr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),mp=e=>{const t=e.dataset.target;if(!t)return xr(e);const n=document.querySelector(`[data-origin="${t}"]`);return xr(n||e)},Wj={state:{},loading:!1,useOnChange:!1},E1=e=>e.dataset.target||e.name,qj=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ya.LocalStorage.get(t);return $j(n)?n:{}},clear:()=>void ya.LocalStorage.delete(t),set:n=>ya.LocalStorage.set(t,n)}},Uj=(e,t,n=Wj)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>ct.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??w1(e)??{}),l=E.useCallback(v=>{var I;const b=v.target,S=v.currentTarget;if(b.dataset.optional==="true")return;const w=E1(b),C=mp(b)||(S?xr(S):""),k=so(w,e);if(b.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),N=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(L=>wn(L??{},w,N))}},[]),c=E.useCallback(v=>b=>{const S=b.currentTarget,T=Object.values(i.current).reduce((C,k)=>{var R;const I=k.element,A=k.schema.safeParse(xr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const N=(R=A.error.issues[0])==null?void 0:R.message;I.setAttribute("data-initialized","true");const L=I.dataset.name||I.name||"";return wn(C,L,N)},{}),w=ct.empty(T)?null:T;o(w),console.error(w),v==null||v({form:S,errors:w||{}})},[]),u=(v,b=ka)=>{const S=so(v,e),T=w=>{var k;if(!w)return;const C=w instanceof Date?w.toISOString():w.target.value;s(I=>wn(I,v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,w)};return{...b,loading:n.loading,name:v,id:v,onChange:T,form:t,date:ct.string(a[v])?new Date(a[v]):a[v],required:b.required??!S.isOptional(),error:r==null?void 0:r[v],ref:w=>{w!==null&&(i.current[v]={element:w,schema:S})}}},d=(v,b=ka)=>{const S=so(v,e);return{...b,name:v,id:v,onChange:w=>{var k;const C=w.target.value;s(I=>wn(I,v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,v,void 0),value:kr(a,v,void 0)||"",required:b.required??!S.isOptional(),ref:w=>w!==null?i.current[v]={element:w,schema:S}:void 0}},p=(v,b=ka)=>{const S=so(v,e);return{...b,name:v,id:v,onChange:w=>{var k;const C=w.target.checked;s(I=>wn(I??{},v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,v,void 0),required:b.required??!S.isOptional(),ref:w=>w!==null?void(i.current[v]={element:w,schema:S}):void 0}},f=(v,b=ka)=>{const S=so(v,e),T=w=>{var k,I;(k=w.persist)==null||k.call(w);const C=w.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,w),s(A=>wn(A,v,C))};return{...b,loading:n.loading,name:v,id:v,onChange:T,form:t,onInvalid:l,error:kr(r,v,void 0),required:b.required??!S.isOptional(),value:kr(a,v,void 0)||(b==null?void 0:b.value)||"",type:ct.instance(S,oo)?"number":(b==null?void 0:b.type)??"text",ref:w=>w===null?void 0:i.current[v]={element:w,schema:S}}},h=(v,b=ka)=>{const S=so(v,e),T=S._def.typeName==="ZodNumber";return{...b,name:v,id:v,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=T?C.target.valueAsNumber:C.target.value;(A=b==null?void 0:b.onChange)==null||A.call(b,C),s(N=>wn(N,v,k))},form:t,loading:n.loading,onInvalid:l,error:kr(r,v,void 0),required:b.required??!S.isOptional(),type:T?"number":(b==null?void 0:b.type)??"text",value:kr(a,v,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[v]={element:C,schema:S})}};E.useEffect(()=>{const v=Object.values(i.current).map(S=>{const T=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,w=S.schema.safeParse(xr(T)),C=N=>{var D;const L=E1(N.target);if(!L)return!1;const R=N.target,P=mp(N.target)||(N.relatedTarget?xr(N.relatedTarget):""),O=S.schema.safeParse(P);if(R.setAttribute("value",P),O.success)return T.setCustomValidity(""),o(j=>{if(ct.null(j))return null;const F=wn(j,L,void 0);return ct.empty(j)||ct.nil(j)||ct.empty(F)?null:F}),!1;if(T.required){const j=((D=O.error.issues[0])==null?void 0:D.message)||"";T.setCustomValidity(j),o(F=>{if(ct.null(F))return null;const z=wn(F,L,j||void 0);return ct.empty(z)?null:z})}return!1},k=new AbortController,I=T.getAttribute("data-trigger")||"blur";T.addEventListener(I,C,{signal:k.signal});const A=T.dataset.shadow?!1:T.required?!w.success:!1;return{input:S,hasInitialError:A,unsubscribe:()=>k.abort()}});return v.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>v.forEach(S=>S.unsubscribe())});const g=v=>b=>{var A;b.preventDefault();const S=b.currentTarget;let T=S1(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(N=>{if(N.tagName==="SELECT"){const L=N;T=wn(T,L.name,L.value)}if(N.tagName==="INPUT"){const L=N,R=mp(L)||(L?xr(L):"");T=wn(T,L.dataset.target||L.name,R)}});const C=T1(T,a),k=e.safeParse(C),I=()=>{var N;r1(S),(N=n.interceptor)==null||N.clear()};if(k.success){const N=JSON.stringify(k.data);return S.setAttribute("data-json",N),(A=n.interceptor)==null||A.clear(),v==null?void 0:v(b,{form:S,event:b,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),S.reportValidity(),v==null?void 0:v(b,{form:S,json:T,event:b,reset:I,data:T,success:!1,errors:k.error.issues.map(N=>({message:N.message,path:N.path.map(L=>String(L))}))})},m=v=>td(a,v)||"",y=v=>({...v,id:t,name:t});return E.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(a))},[a]),{get:m,input:h,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,disabled:r!==null}},Gj=e=>e?JSON.parse(e.getAttribute("data-json")):{},Yj=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},C1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},k1={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},P1={normal:"1",navbar:"19",calendar:"2",overlay:"20",tooltip:"13",floating:"21"},Kj={name:"dark",zIndex:P1,rounded:C1,spacing:k1,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},Zj={rounded:C1,spacing:k1,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:P1,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},Xj=Kj,Qj=Zj,Jj=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...ms,...e.tweaks},parser:e.parser||fs.hsla,map:{...hs,...e.map}}),[e]);return x.jsx(Vo.Provider,{value:t,children:e.children})},eR=()=>{const e=E.useContext(Vo);return e?e.parser:fs.hsla};ne.Alert=LA,ne.Autocomplete=OL,ne.Button=mo,ne.Calendar=cb,ne.Card=ub,ne.Checkbox=Cf,ne.ColType=ci,ne.Collapse=ly,ne.ComponentsProvider=Jj,ne.Context=Vo,ne.DatePicker=DL,ne.Dropdown=Jo,ne.Empty=db,ne.Expand=PN,ne.FileUpload=U2,ne.Form=G2,ne.Input=ga,ne.InputFeedback=Z0,ne.InputField=ma,ne.Menu=IN,ne.MenuItem=_N,ne.Modal=BN,ne.MultiSelect=tV,ne.Notifications=_M,ne.Polymorph=on,ne.Radiobox=nV,ne.RenderOnView=sS,ne.Select=ro,ne.Stats=IM,ne.Switch=rV,ne.Tab=DM,ne.Table=dj,ne.Tabs=OM,ne.Tag=Ec,ne.TaskList=oV,ne.Textarea=iV,ne.Timeline=NM,ne.TimelineItem=ws,ne.Toolbar=HN,ne.Tooltip=Jx,ne.TransferList=lV,ne.createColumns=DV,ne.createCssProperties=TO,ne.createDesignTokens=Qy,ne.createFormStorage=qj,ne.createOptionCols=Yf,ne.createStyles=bO,ne.createTheme=wO,ne.createTokenStyles=SO,ne.css=je,ne.defaultDarkTheme=Xj,ne.defaultLightTheme=Qj,ne.defaultTranslations=hs,ne.defaultTweaks=ms,ne.dispatchInput=jh,ne.formReset=r1,ne.formToJson=S1,ne.getJsonForm=Gj,ne.getSchemaShape=so,ne.hasVerticalScroll=Rh,ne.initializeInputDataset=yi,ne.isMobile=rb,ne.isReactComponent=nS,ne.isReactFC=rS,ne.isSsr=Rr,ne.mergeRefs=Sc,ne.negate=CO,ne.noop=rd,ne.parsers=fs,ne.path=td,ne.reduceTokens=jr,ne.safeRegex=nd,ne.splitInto=nb,ne.useColorParser=eR,ne.useForm=Uj,ne.useLocale=ed,ne.useNotification=PM,ne.usePrevious=Yj,ne.useReactive=Rb,ne.useTablePreferences=LV,ne.useTranslations=Ot,ne.uuid=Yi,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
190
+ */var Ff,gw;function h2(){if(gw)return Ff;gw=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 Ff=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},Ff}var Lf,vw;function Vf(){if(vw)return Lf;vw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Lf=e,Lf}var jf,yw;function bw(){return yw||(yw=1,jf=Function.call.bind(Object.prototype.hasOwnProperty)),jf}var $f,xw;function m2(){if(xw)return $f;xw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vf(),n={},r=bw();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={})},$f=o,$f}var Rf,ww;function g2(){if(ww)return Rf;ww=1;var e=mw(),t=h2(),n=Vf(),r=bw(),o=m2(),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 Rf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var R=D&&(c&&D[c]||D[u]);if(typeof R=="function")return R}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(),arrayOf:x,element:T(),elementType:w(),instanceOf:S,node:_(),objectOf:P,oneOf:C,oneOfType:I,shape:L,exact:$};function m(D,R){return D===R?D!==0||1/D===1/R:D!==D&&R!==R}function g(D,R){this.message=D,this.data=R&&typeof R=="object"?R:{},this.stack=""}g.prototype=Error.prototype;function h(D){if(process.env.NODE_ENV!=="production")var R={},J=0;function te(Z,U,Y,j,W,G,ae){if(j=j||p,G=G||Y,ae!==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 xe=j+":"+Y;!R[xe]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` 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."),R[xe]=!0,J++)}}return U[Y]==null?Z?U[Y]===null?new g("The "+W+" `"+G+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+W+" `"+G+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:D(U,Y,j,W,G)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function v(D){function R(J,te,ee,Z,U,Y){var j=J[te],W=N(j);if(W!==D){var G=V(j);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+G+"` supplied to `"+ee+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return h(R)}function y(){return h(a)}function x(D){function R(J,te,ee,Z,U){if(typeof D!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var Y=J[te];if(!Array.isArray(Y)){var j=N(Y);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<Y.length;W++){var G=D(Y,W,ee,Z,U+"["+W+"]",n);if(G instanceof Error)return G}return null}return h(R)}function T(){function D(R,J,te,ee,Z){var U=R[J];if(!s(U)){var Y=N(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return h(D)}function w(){function D(R,J,te,ee,Z){var U=R[J];if(!e.isValidElementType(U)){var Y=N(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return h(D)}function S(D){function R(J,te,ee,Z,U){if(!(J[te]instanceof D)){var Y=D.name||p,j=z(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected ")+("instance of `"+Y+"`."))}return null}return h(R)}function C(D){if(!Array.isArray(D))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 R(J,te,ee,Z,U){for(var Y=J[te],j=0;j<D.length;j++)if(m(Y,D[j]))return null;var W=JSON.stringify(D,function(ae,B){var xe=V(B);return xe==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(Y)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return h(R)}function P(D){function R(J,te,ee,Z,U){if(typeof D!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var Y=J[te],j=N(Y);if(j!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected an object."));for(var W in Y)if(r(Y,W)){var G=D(Y,W,ee,Z,U+"."+W,n);if(G instanceof Error)return G}return null}return h(R)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<D.length;R++){var J=D[R];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(J)+" at index "+R+"."),a}function te(ee,Z,U,Y,j){for(var W=[],G=0;G<D.length;G++){var ae=D[G],B=ae(ee,Z,U,Y,j,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var xe=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+Y+" `"+j+"` supplied to "+("`"+U+"`"+xe+"."))}return h(te)}function _(){function D(R,J,te,ee,Z){return A(R[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return h(D)}function M(D,R,J,te,ee){return new g((D||"React class")+": "+R+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function L(D){function R(J,te,ee,Z,U){var Y=J[te],j=N(Y);if(j!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+j+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in D){var G=D[W];if(typeof G!="function")return M(ee,Z,U,W,V(G));var ae=G(Y,W,ee,Z,U+"."+W,n);if(ae)return ae}return null}return h(R)}function $(D){function R(J,te,ee,Z,U){var Y=J[te],j=N(Y);if(j!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+j+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],D);for(var G in W){var ae=D[G];if(r(D,G)&&typeof ae!="function")return M(ee,Z,U,G,V(ae));if(!ae)return new g("Invalid "+Z+" `"+U+"` key `"+G+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
191
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var B=ae(Y,G,ee,Z,U+"."+G,n);if(B)return B}return null}return h(R)}function A(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(A);if(D===null||s(D))return!0;var R=d(D);if(R){var J=R.call(D),te;if(R!==D.entries){for(;!(te=J.next()).done;)if(!A(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!A(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(D,R){return D==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(D){var R=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":O(R,D)?"symbol":R}function V(D){if(typeof D>"u"||D===null)return""+D;var R=N(D);if(R==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return R}function F(D){var R=V(D);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function z(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Rf}var zf,Sw;function v2(){if(Sw)return zf;Sw=1;var e=Vf();function t(){}function n(){}return n.resetWarningCache=t,zf=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},zf}var Tw;function y2(){if(Tw)return il.exports;if(Tw=1,process.env.NODE_ENV!=="production"){var e=mw(),t=!0;il.exports=g2()(e.isElement,t)}else il.exports=v2()();return il.exports}var b2=y2();const nt=Bp(b2);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 x2=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 li(e,t,n){const r=w2(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Ew(r,"path",i),Ew(r,"relativePath",i),r}function w2(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=x2.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Ew(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const S2=[".DS_Store","Thumbs.db"];function T2(e){return eo(this,void 0,void 0,function*(){return sl(e)&&E2(e.dataTransfer)?A2(e.dataTransfer,e.type):C2(e)?k2(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?P2(e):[]})}function E2(e){return sl(e)}function C2(e){return sl(e)&&sl(e.target)}function sl(e){return typeof e=="object"&&e!==null}function k2(e){return Bf(e.target.files).map(t=>li(t))}function P2(e){return eo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>li(n))})}function A2(e,t){return eo(this,void 0,void 0,function*(){if(e.items){const n=Bf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(_2));return Cw(kw(r))}return Cw(Bf(e.files).map(n=>li(n)))})}function Cw(e){return e.filter(t=>S2.indexOf(t.name)===-1)}function Bf(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 _2(e){if(typeof e.webkitGetAsEntry!="function")return Pw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Aw(t):Pw(e,t)}function kw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?kw(n):[n]],[])}function Pw(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,li(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return li(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function I2(e){return eo(this,void 0,void 0,function*(){return e.isDirectory?Aw(e):O2(e)})}function Aw(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(I2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function O2(e){return eo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=li(r,e.fullPath);t(o)},r=>{n(r)})})})}var ll={},_w;function M2(){return _w||(_w=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 D2=M2();const Hf=Bp(D2);function Iw(e){return L2(e)||F2(e)||Nw(e)||N2()}function N2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L2(e){if(Array.isArray(e))return Wf(e)}function Ow(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 Mw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(n),!0).forEach(function(r){Dw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e,t){return $2(e)||j2(e,t)||Nw(e,t)||V2()}function V2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nw(e,t){if(e){if(typeof e=="string")return Wf(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 Wf(e,t)}}function Wf(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 j2(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 $2(e){if(Array.isArray(e))return e}var R2=typeof Hf=="function"?Hf:Hf.default,z2="file-invalid-type",B2="file-too-large",H2="file-too-small",W2="too-many-files",q2=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:z2,message:"File type must be ".concat(r)}},Fw=function(t){return{code:B2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Lw=function(t){return{code:H2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},U2={code:W2,message:"Too many files"};function Vw(e,t){var n=e.type==="application/x-moz-file"||R2(e,t);return[n,n?null:q2(t)]}function jw(e,t,n){if(to(e.size))if(to(t)&&to(n)){if(e.size>n)return[!1,Fw(n)];if(e.size<t)return[!1,Lw(t)]}else{if(to(t)&&e.size<t)return[!1,Lw(t)];if(to(n)&&e.size>n)return[!1,Fw(n)]}return[!0,null]}function to(e){return e!=null}function Y2(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=Vw(l,n),u=xa(c,1),d=u[0],p=jw(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}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 $w(e){e.preventDefault()}function G2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function K2(e){return e.indexOf("Edge/")!==-1}function Z2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return G2(e)||K2(e)}function jn(){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 X2(){return"showOpenFilePicker"in window}function Q2(e){if(to(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return Rw(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(zw))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xa(r,2),i=o[0],a=o[1];return Mw(Mw({},n),{},Dw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function J2(e){if(to(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(Iw(t),[o],Iw(i))},[]).filter(function(t){return Rw(t)||zw(t)}).join(",")}function eV(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function tV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Rw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function zw(e){return/^.*\.[\w]+$/.test(e)}var nV=["children"],rV=["open"],oV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],iV=["refKey","onChange","onClick"];function aV(e){return cV(e)||lV(e)||Bw(e)||sV()}function sV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cV(e){if(Array.isArray(e))return Uf(e)}function qf(e,t){return fV(e)||dV(e,t)||Bw(e,t)||uV()}function uV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bw(e,t){if(e){if(typeof e=="string")return Uf(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 Uf(e,t)}}function Uf(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 dV(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 fV(e){if(Array.isArray(e))return e}function Hw(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 ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){Yf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yf(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=pV(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 pV(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 Gf=E.forwardRef(function(e,t){var n=e.children,r=dl(e,nV),o=qw(r),i=o.open,a=dl(o,rV);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ht(ht({},a),{},{open:i})))});Gf.displayName="Dropzone";var Ww={disabled:!1,getFilesFromEvent:T2,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};Gf.defaultProps=Ww,Gf.propTypes={children:nt.func,accept:nt.objectOf(nt.arrayOf(nt.string)),multiple:nt.bool,preventDropOnDocument:nt.bool,noClick:nt.bool,noKeyboard:nt.bool,noDrag:nt.bool,noDragEventsBubbling:nt.bool,minSize:nt.number,maxSize:nt.number,maxFiles:nt.number,disabled:nt.bool,getFilesFromEvent:nt.func,onFileDialogCancel:nt.func,onFileDialogOpen:nt.func,useFsAccessApi:nt.bool,autoFocus:nt.bool,onDragEnter:nt.func,onDragLeave:nt.func,onDragOver:nt.func,onDrop:nt.func,onDropAccepted:nt.func,onDropRejected:nt.func,onError:nt.func,validator:nt.func};var Kf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function qw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ht(ht({},Ww),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,P=t.onError,I=t.validator,_=E.useMemo(function(){return J2(n)},[n]),M=E.useMemo(function(){return Q2(n)},[n]),L=E.useMemo(function(){return typeof h=="function"?h:Uw},[h]),$=E.useMemo(function(){return typeof g=="function"?g:Uw},[g]),A=E.useRef(null),O=E.useRef(null),N=E.useReducer(hV,Kf),V=qf(N,2),F=V[0],z=V[1],D=F.isFocused,R=F.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&X2()),te=function(){!J.current&&R&&setTimeout(function(){if(O.current){var ue=O.current.files;ue.length||(z({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[O,R,$,J]);var ee=E.useRef([]),Z=function(ue){A.current&&A.current.contains(ue.target)||(ue.preventDefault(),ee.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",$w,!1),document.addEventListener("drop",Z,!1)),function(){x&&(document.removeEventListener("dragover",$w),document.removeEventListener("drop",Z))}},[A,x]),E.useEffect(function(){return!r&&y&&A.current&&A.current.focus(),function(){}},[A,y,r]);var U=E.useCallback(function(X){P?P(X):console.error(X)},[P]),Y=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[].concat(aV(ee.current),[X.target]),ul(X)&&Promise.resolve(o(X)).then(function(ue){if(!(cl(X)&&!C)){var _e=ue.length,We=_e>0&&Y2({files:ue,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ct=_e>0&&!We;z({isDragAccept:We,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ue){return U(ue)})},[o,c,U,C,_,a,i,s,l,I]),j=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ul(X);if(ue&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ue&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ee.current.filter(function(We){return A.current&&A.current.contains(We)}),_e=ue.indexOf(X.target);_e!==-1&&ue.splice(_e,1),ee.current=ue,!(ue.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ul(X)&&u&&u(X))},[A,u,C]),G=E.useCallback(function(X,ue){var _e=[],We=[];X.forEach(function(Ct){var mt=Vw(Ct,_),Lt=qf(mt,2),Sn=Lt[0],zn=Lt[1],wr=jw(Ct,a,i),Sr=qf(wr,2),Tr=Sr[0],H=Sr[1],q=I?I(Ct):null;if(Sn&&Tr&&!q)_e.push(Ct);else{var Re=[zn,H];q&&(Re=Re.concat(q)),We.push({file:Ct,errors:Re.filter(function(et){return et})})}}),(!s&&_e.length>1||s&&l>=1&&_e.length>l)&&(_e.forEach(function(Ct){We.push({file:Ct,errors:[U2]})}),_e.splice(0)),z({acceptedFiles:_e,fileRejections:We,isDragReject:We.length>0,type:"setFiles"}),p&&p(_e,We,ue),We.length>0&&m&&m(We,ue),_e.length>0&&f&&f(_e,ue)},[z,s,_,a,i,l,p,f,m,I]),ae=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[],ul(X)&&Promise.resolve(o(X)).then(function(ue){cl(X)&&!C||G(ue,X)}).catch(function(ue){return U(ue)}),z({type:"reset"})},[o,G,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),L();var X={multiple:s,types:M};window.showOpenFilePicker(X).then(function(ue){return o(ue)}).then(function(ue){G(ue,null),z({type:"closeDialog"})}).catch(function(ue){eV(ue)?($(ue),z({type:"closeDialog"})):tV(ue)?(J.current=!1,O.current?(O.current.value=null,O.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(ue)});return}O.current&&(z({type:"openDialog"}),L(),O.current.value=null,O.current.click())},[z,L,$,v,G,U,M,s]),xe=E.useCallback(function(X){!A.current||!A.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[A,B]),Ee=E.useCallback(function(){z({type:"focus"})},[]),Oe=E.useCallback(function(){z({type:"blur"})},[]),$e=E.useCallback(function(){T||(Z2()?setTimeout(B,0):B())},[T,B]),se=function(ue){return r?null:ue},ye=function(ue){return w?null:se(ue)},K=function(ue){return S?null:se(ue)},ce=function(ue){C&&ue.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.role,Ct=X.onKeyDown,mt=X.onFocus,Lt=X.onBlur,Sn=X.onClick,zn=X.onDragEnter,wr=X.onDragOver,Sr=X.onDragLeave,Tr=X.onDrop,H=dl(X,oV);return ht(ht(Yf({onKeyDown:ye(jn(Ct,xe)),onFocus:ye(jn(mt,Ee)),onBlur:ye(jn(Lt,Oe)),onClick:se(jn(Sn,$e)),onDragEnter:K(jn(zn,Y)),onDragOver:K(jn(wr,j)),onDragLeave:K(jn(Sr,W)),onDrop:K(jn(Tr,ae)),role:typeof We=="string"&&We!==""?We:"presentation"},_e,A),!r&&!w?{tabIndex:0}:{}),H)}},[A,xe,Ee,Oe,$e,Y,j,W,ae,w,S,r]),ie=E.useCallback(function(X){X.stopPropagation()},[]),we=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.onChange,Ct=X.onClick,mt=dl(X,iV),Lt=Yf({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:se(jn(We,ae)),onClick:se(jn(Ct,ie)),tabIndex:-1},_e,O);return ht(ht({},Lt),mt)}},[O,n,s,ae,r]);return ht(ht({},F),{},{isFocused:D&&!r,getRootProps:Q,getInputProps:we,rootRef:A,inputRef:O,open:se(B)})}function hV(e,t){switch(t.type){case"focus":return ht(ht({},e),{},{isFocused:!0});case"blur":return ht(ht({},e),{},{isFocused:!1});case"openDialog":return ht(ht({},Kf),{},{isFileDialogActive:!0});case"closeDialog":return ht(ht({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ht(ht({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ht(ht({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ht({},Kf);default:return e}}function Uw(){}const mV={isImage:e=>e.type.includes("image")},gV=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(mV.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:dw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:dw(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Oo,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(vy,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Oo,{className:"text-danger"})})]})},vV=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(gV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),yV=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(vV,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),bV=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(s_,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),xV=({idle:e=bV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=qw({onDrop:a});return b.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[b.jsx("input",{...l(r),name:r.name,id:r.name}),b.jsx(yV,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},wV=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})};class no extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof no&&(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 no(this);return t?t(n):n}}const SV=e=>b.jsx(E.Fragment,{children:e.children}),TV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},EV={caseSensitive:!1,sort:!1},Yw=[],CV=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),kV=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),PV={List:CV,Item:kV},AV=e=>{const t=Ot(),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]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(_c,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},_V=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const y=E.useMemo(()=>new no(r.map(Q=>[Q.value,Q])),[r]),x=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??Yw,S=Ot(),[C,P]=E.useState(0),[I,_]=E.useState(!1),[M,L]=E.useState(""),[$,A]=E.useState(()=>{const Q=new no;return w.forEach(ie=>{const we=y.get(ie);return we?Q.set(ie,we):void 0}),Q}),O=E.useMemo(()=>Array.from($.keys()),[$]),[N,V]=E.useState(()=>{const Q=new Set(w);return r.reduce((ie,we)=>Q.has(we.value)?[...ie,we.label??we.value]:ie,[])??w}),[F,z]=E.useState(null),D=E.useRef(Yw),R=m&&M!==""?[{value:M,label:M,"data-dynamic":"true"},...r]:r,J=new Xr(R,["value","label"],EV).search(M);E.useEffect(()=>{I||P(0)},[I]),E.useEffect(()=>{h.value&&A(new no(h.value.map(Q=>[Q,y.get(Q)])))},[h.value,y]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:Y,refs:j,context:W}=Gr({open:I,transform:!0,strategy:"absolute",onOpenChange:_,whileElementsMounted:ea,middleware:[ta(4),Sx({padding:10,elementContext:"reference",apply(Q){if(x.current===null)return;const ie=x.current.getBoundingClientRect().width,we=360;wi.flushSync(()=>setTimeout(()=>P(we),200)),Object.assign(Q.elements.floating.style,{width:`${ie}px`,maxWidth:`${ie}px`,maxHeight:ee?"auto":`${we}px`,height:ee?"auto":`${we}px`})}})]}),G=r0(W,TV),{getReferenceProps:ae,getFloatingProps:B,getItemProps:xe}=Kr([Zr(W,{role:"listbox"}),Yr(W),Qd(W,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(ie=>Q??ie)})]);E.useEffect(()=>{const Q=j.reference.current;if(Q)return Si(Q)},[]);const Ee=(Q,ie)=>{const we=$.clone(_e=>_e.has(Q.value)?_e.remove(Q.value):_e.set(Q.value,Q));A(we);const X=j.reference.current;if(!X)return;const ue=we.map(_e=>_e.value);X==null||X.setAttribute("data-value",JSON.stringify(ue)),g&&g(ue),V(_e=>_e.concat(Q.label??"")),L(""),z(ie)},Oe=Q=>{const ie=Q.target.value;return L(ie),!I&&ie===""?_(!0):(Q.target.name=h.name||"",ie?_(!0):void 0)},$e=()=>{var Q;_(!0),L(""),(Q=j.reference.current)==null||Q.focus()},se=()=>{_(!0),L("")},ye=()=>{var Q;(Q=j.reference.current)==null||Q.setAttribute("data-value","[]"),L(""),_(!1),A(new no),g==null||g([])},K=h.id||h.name,ce=$.map((Q,ie)=>b.jsx(_c,{size:"small",icon:b.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:we=>{we.stopPropagation(),Ee(Q,ie)},children:b.jsx(os,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return b.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:$e,children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),$?b.jsx("button",{type:"button",onClick:ye,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("button",{...ae({...h,onFocus:se,id:`${K}-shadow`,name:`${K}-shadow`,ref:j.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),value:I?M:N||$,className:Le("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:b.jsx(AV,{label:c,children:ce})}),b.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:v,required:f,defaultValue:h.value||O||void 0}),b.jsx(qr,{preserveTabOrder:!0,children:I?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...B({ref:j.setFloating,style:{...G.styles,top:U??0,position:Y,left:(Z??0)+($?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[b.jsx("input",{autoFocus:!0,value:M,onChange:Oe,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:Q=>{var ie,we;if(Q.key==="ArrowDown"){let X=F+1;return X>te.length-1&&(X=0),(ie=T.current)==null||ie.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=F-1;return X<0&&(X=te.length-1),(we=T.current)==null||we.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),_(!1);if(Q.key==="Enter"){if(F!==null&&te[F])return Q.preventDefault(),Ee(te[F],F);if(te.length===1)return Q.preventDefault(),Ee(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),ee?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,ee?null:b.jsx(kf,{ref:T,hidden:ee,data:te,components:PV,style:{height:ee?"0":$.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,ie)=>{const we=ie.Render??SV,X=$.has(ie.value)||$.has(ie.label??""),ue=F===Q,_e=ie.label??ie.value;return b.jsxs("button",{"data-value":ie.value,...xe({ref:We=>void(D.current[Q]=We),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":ie.disabled,onClick:()=>Ee(ie,Q)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||ue?"bg-floating-hover text-floating-foreground":""}`,children:[b.jsx(Mf,{onChange:ld,checked:X,"aria-checked":X,onClick:We=>{We.stopPropagation(),Ee(ie,Q)}}),b.jsx(we,{...h,label:ie.label,value:ie.value,children:_e})]})}}),$.size===0?null:b.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:ce})]})}):null})]})}),IV=({children:e,className:t="",size:n,...r})=>b.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:[b.jsx("input",{...r,type:"radio",className:Le("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]}),ro=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=Ot(),y=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>y.current),E.useEffect(()=>{if(y.current===null)return;const w=new AbortController,S=y.current,C=Si(y.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=y.current)==null?void 0:w.focus()};return b.jsx(ya,{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:b.jsxs("label",{htmlFor:x,children:[p,b.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:b.jsxs("select",{...g,id:x,name:x,value:g.value,required:e,ref:Fa(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Le("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:[b.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:`${x}-select-option-${w.value}`}))]})})});function Gw(e,[t,n]){return Math.min(n,Math.max(t,e))}function ci(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Kw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kw(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():Kw(e[o],null)}}}}function oo(...e){return k.useCallback(Zw(...e),e)}function Xw(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,OV(o,...t)]}function OV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Qw(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function MV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=DV({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Qw(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function DV({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Qw(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var NV=k.createContext(void 0);function FV(e){const t=k.useContext(NV);return e||t||"ltr"}function LV(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VV=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function jV(e){const[t,n]=k.useState(void 0);return VV(()=>{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 Zf(e){const t=$V(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(zV);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function $V(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=HV(o),s=BV(i,o.props);return o.type!==k.Fragment&&(s.ref=r?Zw(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RV=Symbol("radix.slottable");function zV(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RV}function BV(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function HV(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 WV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],fl=WV.reduce((e,t)=>{const n=Zf(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qV(e){const t=e+"CollectionProvider",[n,r]=Xw(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=E.useRef(null),x=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Zf(s),c=E.forwardRef((g,h)=>{const{scope:v,children:y}=g,x=i(s,v),T=oo(h,x.collectionRef);return b.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Zf(u),f=E.forwardRef((g,h)=>{const{scope:v,children:y,...x}=g,T=E.useRef(null),w=oo(h,T),S=i(u,v);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...x}),()=>void S.itemMap.delete(T))),b.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>x.indexOf(S.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var Jw=["PageUp","PageDown"],e1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],t1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ui="Slider",[Xf,UV,YV]=qV(ui),[n1,YR]=Xw(ui,[YV]),[GV,pl]=n1(ui),r1=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),x=a==="horizontal"?KV:ZV,[T=[],w]=MV({prop:u,defaultProp:c,onChange:M=>{var $;($=[...h.current][v.current])==null||$.focus(),d(M)}}),S=k.useRef(T);function C(M){const L=tj(T,M);_(M,L)}function P(M){_(M,v.current)}function I(){const M=S.current[v.current];T[v.current]!==M&&p(T)}function _(M,L,{commit:$}={commit:!1}){const A=ij(i),O=aj(Math.round((M-r)/i)*i+r,A),N=Gw(O,[r,o]);w((V=[])=>{const F=JV(V,N,L);if(oj(F,l*i)){v.current=F.indexOf(N);const z=String(F)!==String(V);return z&&$&&p(F),z?F:V}else return V})}return b.jsx(GV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:m,children:b.jsx(Xf.Provider,{scope:e.__scopeSlider,children:b.jsx(Xf.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ci(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:L})=>{if(!s){const O=Jw.includes(M.key)||M.shiftKey&&e1.includes(M.key)?10:1,N=v.current,V=T[N],F=i*O*L;_(V+F,N,{commit:!0})}}})})})})});r1.displayName=ui;var[o1,i1]=n1(ui,{startEdge:"left",endEdge:"right",size:"width",direction:1}),KV=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=oo(t,x=>p(x)),m=k.useRef(void 0),g=FV(o),h=g==="ltr",v=h&&!i||!h&&i;function y(x){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=ep(w,v?[n,r]:[r,n]);return m.current=T,C(x-T.left)}return b.jsx(o1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:b.jsx(a1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a==null||a(T)},onSlideMove:x=>{const T=y(x.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=t1[v?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),ZV=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=oo(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=ep(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return b.jsx(o1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:b.jsx(a1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=t1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),a1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=pl(ui,n);return b.jsx(fl.span,{...c,ref:t,onKeyDown:ci(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Jw.concat(e1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ci(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ci(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ci(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),s1="SliderTrack",l1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=pl(s1,n);return b.jsx(fl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});l1.displayName=s1;var Qf="SliderRange",c1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=pl(Qf,n),i=i1(Qf,n),a=k.useRef(null),s=oo(t,a),l=o.values.length,c=o.values.map(p=>d1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(fl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});c1.displayName=Qf;var Jf="SliderThumb",u1=k.forwardRef((e,t)=>{const n=UV(e.__scopeSlider),[r,o]=k.useState(null),i=oo(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(XV,{...e,ref:i,index:a})}),XV=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=pl(Jf,n),s=i1(Jf,n),[l,c]=k.useState(null),u=oo(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=jV(l),f=a.values[r],m=f===void 0?0:d1(f,a.min,a.max),g=ej(r,a.values.length),h=p==null?void 0:p[s.size],v=h?nj(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[b.jsx(Xf.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(fl.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:ci(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(QV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});u1.displayName=Jf;var QV=e=>{const{value:t,...n}=e,r=k.useRef(null),o=LV(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),b.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function JV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function d1(e,t,n){const i=100/(n-t)*(e-t);return Gw(i,[0,100])}function ej(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function tj(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 nj(e,t,n){const r=e/2,i=ep([0,50],[0,r]);return(r-i(t)*n)*n}function rj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function oj(e,t){if(t>0){const n=rj(e);return Math.min(...n)>=t}return!0}function ep(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 ij(e){return(String(e).split(".")[1]||"").length}function aj(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var sj=r1,lj=l1,cj=c1,uj=u1;const dj=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"));rt.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(rt.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),b.jsx(tf,{title:"",ref:r,as:uj,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},fj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef($o()),s=r||o||[];return b.jsxs(sj,{...i,defaultValue:r,value:o,className:Le("relative flex h-5 w-full touch-none select-none items-center",n),children:[b.jsx(lj,{className:"relative h-2 grow rounded-full bg-background",children:b.jsx(cj,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>b.jsx(dj,{tooltip:t??!1},`${a.current}-${c}`))]})},pj=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=vo(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 b.jsxs("fieldset",{className:Le("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.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)}),b.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:b.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"})}),b.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),hj=e=>{const[t,n]=FA();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:RA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},mj=sw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
196
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),gj=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},vj={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},yj=e=>{const t=E.useRef(null),n=gj(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.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:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(kf,{height:n,useWindowScroll:!0,data:e.source,components:vj,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Mf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(go,{children:b.jsx(zu,{})})}),b.jsx("div",{})]})};var bj=Object.defineProperty,f1=Object.getOwnPropertySymbols,xj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,p1=(e,t,n)=>t in e?bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sj=(e,t)=>{for(var n in t||(t={}))xj.call(t,n)&&p1(e,n,t[n]);if(f1)for(var n of f1(t))wj.call(t,n)&&p1(e,n,t[n]);return e},tp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Tj=(e,t,n,r)=>ml(tp,e,t,n,r),di=e=>typeof e=="object",vr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!di(e)&&!di(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=>vr(e[r],t[r]))},Ej=(e,t)=>(di(e)||Array.isArray(e))&&t?e[t]:e,Cj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,hl=e=>/[0-9.]+/.test(e),h1=e=>["string","number"].includes(typeof e),m1=e=>e==null||(e==null?void 0:e.length)===0||e==="",g1={eq:vr,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:m1,notEmpty:e=>!m1(e),in:(e,t)=>tp(t,n=>vr(e,n)),notIn:(e,t)=>v1(t,n=>!vr(e,n))},kj=e=>{if(e in g1)return g1[e];throw new Error("Linq - Symbol not found")},fi=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},ml=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=kj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},Pj=(e,t,n,r)=>ml(fi,e,t,n,r),v1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Aj=(e,t,n,r)=>ml(v1,e,t,n,r),y1=e=>{if(e===null)return null;const t=Sj({},e);return Object.keys(t).forEach(n=>t[n]=di(e[n])?y1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},b1=(e,t)=>{if(di(t)){for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1},_j=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Ij=e=>fi(e,(t,n,r)=>di(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),Oj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},x1=(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())},Mj=(e,t)=>x1(e,n=>n[t]),w1=(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},Dj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Nj=(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 hl(e)&&hl(t)?r.map(a=>Number.parseInt(a)):r},np=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&hl(e)&&hl(t)){const o=[],[i,a]=Dj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Nj(e,t,r)},Fj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?np(r,o,1):np(r,i,Number.parseInt(o,10))}return h1(e)&&h1(t)?np(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},rp=(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},S1=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},Lj=(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)},Vj=(e,t,n,r)=>ml(Lj,e,t,n,r),T1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Cj(t))},E1=(e=>(e.Asc="asc",e.Desc="desc",e))(E1||{}),jj=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),$j=(e,t)=>e.sort(jj(t)),Rj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:fi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},zj=class Fp{constructor(t=[]){this.array=t}static Range(...t){return Fj(...t)}static New(t){return new Fp(t)}Where(t,n,r){return this.array=Pj(this.array,t,n,r),this}Some(t,n,r){return Tj(this.array,t,n,r)}All(t,n,r){return Aj(this.array,t,n,r)}Reverse(){return this.array=S1(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=Vj(this.array,t,n,r),this}Distinct(){return this.array=Ij(this.array),this}First(t){return t===void 0?this.array[0]:Oj(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?rp((n,r)=>n+r,0,this.array):rp((n,r)=>n+Ej(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Mj(this.array,t)}GroupWith(t){return x1(this.array,t)}Except(t){return fi(this.array,n=>!b1(t,n))}Intersect(t){return fi(this.array,n=>b1(t,n))}OrderBy(t,n){let r;return r=t?T1(this.array,t):this.array.toSorted(),this.array=n==="desc"?S1(r):r,this}Includes(t){return tp(this.array,n=>vr(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 rp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(w1(this.array,n=>[t,n]))}Zip(t,n){return w1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:fi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Fp(y1(this.array))}ToObject(t){return _j(this.array,t)}Sort(t){return Array.isArray(t)?$j(this.array,t):T1(this.array,t)}Unique(t){return Rj(this.array,t)}},C1=zj,op={},k1;function Bj(){return k1||(k1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,S)=>{const C=S.parse(y);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=x=>{h().removeItem(x);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(op)),op}var wa=Bj();const ip=e=>e.headerLabel??e.thead??e.id,ap=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var pi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(pi||{});const sp=e=>e.type==="number"?e.valueAsNumber:e.value,Hj=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},Wj={},qj=(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})},Uj=(e,t,n=Wj)=>{const r=$r()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=rd({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:qj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return $r()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Yj=e=>{const t=vo(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]},lp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??pi.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:$o(),operation:l,label:ip(e),name:o,type:i,value:"",...r}},cp=()=>{const e=Ot(),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(()=>({[pi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[pi.Boolean]:[t.is,t.isNot],[pi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},Gj=e=>{const t=Ot(),n=cp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,lp(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 lp(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=sp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(ti,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(n_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(ro,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(ro,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ba,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:b.jsx(Oo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(Bu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Kj=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=cp(),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=sp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(ro,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(Oo,{className:"text-danger",size:14})})]})},Zj=({item:e,onPointerDown:t})=>{const n=Io(0);return b.jsxs(fy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(t_,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},Xj=e=>{var l;const t=Ot(),n=ap(e.cols),r=jA(),[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 C1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(HS(m).map((v,y)=>{const x=m[v];return{...g,groupId:$o(),groupKey:d,index:y,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(ti,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(a_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(ro,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(go,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Oo,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(ZT,{children:b.jsx(uy,{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=>b.jsx(Zj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Qj=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),Jj=(e,t)=>e.toSorted(Qj(t)),P1=(e,t,n)=>({label:t,id:$o(),type:n,value:e.id}),e$=e=>{const t=Ot(),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,P1(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 b.jsx(E.Fragment,{children:b.jsx(ti,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(my,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(ro,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(ro,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:b.jsx(Oo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(Bu,{size:14})," ",t.tableSortAddButton]})})]})})})},t$=e=>{const t=Ot(),[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=P1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=ip(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(XA,{size:14}):null,n==="desc"?b.jsx(ZA,{size:14}):null,n==="undefined"?b.jsx(my,{size:14}):null]})},n$=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(Gj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(e$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(Xj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.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=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.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=sp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function r$(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 o$=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>r$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return b.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.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=>b.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:b.jsx(E.Fragment,{children:typeof i=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.jsx(on,{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?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},i$={top:0,left:0,right:0,bottom:-1},a$=e=>{var g;const t=If(),n=Ot(),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=cp(),l=o?r_:o_,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===E1.Asc?"ascending":"descending":"none",m=ip(e.header);return b.jsxs(fy,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[b.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:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?b.jsx(ti,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),b.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"font-medium",children:m})]}),children:b.jsxs("ul",{className:"font-medium",children:[r.length===0?null:b.jsx(E.Fragment,{children:r.map(h=>b.jsx("li",{className:"my-1",children:b.jsx(Kj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(lp(e.header,s.options,s.operations))),children:[b.jsx(Bu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?b.jsx(t$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:i$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(y+x)}px`}})]})},s$=e=>{const[t,n]=Yj(e.setCols);return b.jsx(uy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:b.jsx(Jn,{children:e.headers.map((r,o)=>b.jsx(a$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},A1=E.createContext({}),l$=()=>E.useContext(A1),c$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(Jn,{children:n.children})})),u$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse divide-y divide-table-border border-0 text-left ${t??""}`})),d$=E.forwardRef(({context:e,...t},n)=>{const r=l$(),o={...t==null?void 0:t.style,top:rt.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),f$=E.forwardRef(({context:e,item:t,...n},r)=>b.jsx("tr",{...n,role:"row",ref:r,className:`group table-row ${(n==null?void 0:n.className)??""}`})),p$=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),h$={TableHead:d$,Table:u$,TableBody:c$,TableRow:f$,TableFoot:p$},m$=[0,0,0,0,0,0,0,0,0,0],_1=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),g$=e=>b.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?_1:b.jsx(Sb,{})}),v$=()=>b.jsx(E.Fragment,{}),y$=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=ad(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?_1:c?b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):b.jsx(E.Fragment,{children:rt.nil(l)?"":l}))})})},b$=()=>b.jsx(E.Fragment,{}),x$=[],I1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=vo(a),g=vo(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return m$;if(c)return u.rows;const y=new C1(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:y.Where(x.name,x.operation.symbol,x.value)),r.length===0?y.Select():Jj(y.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,x=new IntersectionObserver(T=>{var C;return T[T.length-1].isIntersecting&&g.current?((C=m.current)==null||C.call(m),void f(!0)):f(!1)});return x.observe(y),()=>x.disconnect()},[g,m]);const v=h.length===0;return b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(VL,{useWindowScroll:!0,followOutput:"smooth",components:h$,totalCount:h.length,data:v?x$:h,itemContent:v?v$:y$,fixedFooterContent:p?b$:null,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>b.jsx(s$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?b.jsx(g$,{loading:u.loading}):null,b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(o$,{...l}):null]})},w$=(e,t)=>typeof t=="function"?t(e):t,gl=(e,t,n)=>e===t||n==null?void 0:n(t),S$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=If(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>ap(e.cols),[e.cols]),[i,a]=rd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:w$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),gl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),gl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),gl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),gl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return b.jsx(A1.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?b.jsx(n$,{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?b.jsx(I1,{...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}):b.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>b.jsx("div",{className:"min-w-full",children:b.jsx(I1,{...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}`))})]})})},T$=["INPUT","SELECT"],O1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{T$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var up,M1;function dp(){if(M1)return up;M1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return up={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},up}var fp,D1;function N1(){if(D1)return fp;D1=1;var e=dp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function h(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,S){if(t.call(v,S)){var C=v[S];C&&typeof C=="object"&&w&&typeof w=="object"?v[S]=h(C,w,x):v.push(w)}else v[S]=w}),v):Object.keys(y).reduce(function(w,S){var C=y[S];return t.call(w,S)?w[S]=h(w[S],C,x):w[S]=C,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(h,v,y){var x=h.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var S=v;if(typeof v=="symbol"?S=Symbol.prototype.toString.call(v):typeof v!="string"&&(S=String(v)),x==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",P=0;P<S.length;P+=c){for(var I=S.length>=c?S.slice(P,P+c):S,_=[],M=0;M<I.length;++M){var L=I.charCodeAt(M);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]=I.charAt(M);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}M+=1,L=65536+((L&1023)<<10|I.charCodeAt(M)&1023),_[_.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}C+=_.join("")}return C},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],S=w.obj[w.prop],C=Object.keys(S),P=0;P<C.length;++P){var I=C[P],_=S[I];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(y.push({obj:S,prop:I}),x.push(_))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return fp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},fp}var pp,F1;function E$(){if(F1)return pp;F1=1;var e=jS(),t=N1(),n=dp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,x,T,w,S,C,P,I,_,M,L,$,A,O,N,V){for(var F=h,z=V,D=0,R=!1;(z=z.get(p))!==void 0&&!R;){var J=z.get(h);if(D+=1,typeof J<"u"){if(J===D)throw new RangeError("Cyclic object value");R=!0}typeof z.get(p)>"u"&&(D=0)}if(typeof I=="function"?F=I(v,F):F instanceof Date?F=L(F):y==="comma"&&i(F)&&(F=t.maybeMap(F,function(Oe){return Oe instanceof Date?L(Oe):Oe})),F===null){if(w)return P&&!O?P(v,u.encoder,N,"key",$):v;F=""}if(d(F)||t.isBuffer(F)){if(P){var te=O?v:P(v,u.encoder,N,"key",$);return[A(te)+"="+A(P(F,u.encoder,N,"value",$))]}return[A(v)+"="+A(String(F))]}var ee=[];if(typeof F>"u")return ee;var Z;if(y==="comma"&&i(F))O&&P&&(F=t.maybeMap(F,P)),Z=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(F);Z=_?U.sort(_):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),j=x&&i(F)&&F.length===1?Y+"[]":Y;if(T&&i(F)&&F.length===0)return j+"[]";for(var W=0;W<Z.length;++W){var G=Z[W],ae=typeof G=="object"&&G&&typeof G.value<"u"?G.value:F[G];if(!(S&&ae===null)){var B=M&&C?String(G).replace(/\./g,"%2E"):String(G),xe=i(F)?typeof y=="function"?y(j,B):j:j+(M?"."+B:"["+B+"]");V.set(h,D);var Ee=e();Ee.set(p,V),s(ee,g(ae,xe,y,x,T,w,S,C,y==="comma"&&O&&i(F)?null:P,I,_,M,L,$,A,O,N,Ee))}}return ee},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var x=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return pp=function(g,h){var v=g,y=m(h),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var S=o[y.arrayFormat],C=S==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var P=e(),I=0;I<x.length;++I){var _=x[I],M=v[_];y.skipNulls&&M===null||s(w,f(M,_,S,C,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,P))}var L=w.join(y.delimiter),$=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),L.length>0?$+L:""},pp}var hp,L1;function C$(){if(L1)return hp;L1=1;var e=N1(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,y=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=m.charset;if(m.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var S=y[T],C=S.indexOf("]="),P=C===-1?S.indexOf("="):C+1,I,_;P===-1?(I=m.decoder(S,r.decoder,w,"key"),_=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,P),r.decoder,w,"key"),_=e.maybeMap(i(S.slice(P+1),m,n(g[I])?g[I].length:0),function(L){return m.decoder(L,r.decoder,w,"value")})),_&&m.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),S.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var M=t.call(g,I);M&&m.duplicates==="combine"?g[I]=e.combine(g[I],_):(!M||m.duplicates==="last")&&(g[I]=_)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,P=parseInt(C,10);!m.parseArrays&&C===""?T={0:y}:!isNaN(P)&&w!==C&&String(P)===C&&P>=0&&m.parseArrays&&P<=m.arrayLimit?(T=[],T[P]=y):C!=="__proto__"&&(T[C]=y)}y=T}return y},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+v.slice(T.index)+"]")}return c(S,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return hp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},hp}var mp,V1;function k$(){if(V1)return mp;V1=1;var e=E$(),t=C$(),n=dp();return mp={formats:n,parse:t,stringify:e},mp}var P$=k$(),He;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(He||(He={}));var j1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(j1||(j1={}));const fe=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),yr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},oe=He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class fn 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 fn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}fn.create=e=>new fn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case oe.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 oe.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 oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let A$=Sa;function gp(){return A$}const vp=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=gp(),r=vp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{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 ke;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 qt.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 ke;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 ke=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),$1=e=>e.status==="aborted",R1=e=>e.status==="dirty",hi=e=>e.status==="valid",vl=e=>typeof Promise<"u"&&e instanceof Promise;function yl(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function z1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Ea,Ca;class $n{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const B1=(e,t)=>{if(hi(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 fn(e.common.issues);return this._error=n,this._error}}};function Ie(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ve{get description(){return this._def.description}_getType(t){return yr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return B1(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return hi(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>hi(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(vl(o)?o:Promise.resolve(o));return B1(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:oe.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 Zn({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Xn.create(this,this._def)}nullable(){return so.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return wl.create([this,t],this._def)}and(t){return Sl.create(this,t,this._def)}transform(t){return new Zn({...Ie(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Pl({...Ie(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new U1({typeName:Te.ZodBranded,type:this,...Ie(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({...Ie(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _l.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _$=/^c[^\s-]{8,}$/i,I$=/^[0-9a-z]+$/,O$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,M$=/^[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,D$=/^[a-z0-9_-]{21}$/i,N$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,F$=/^[-+]?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)?)??$/,L$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yp;const j$=/^(?:(?: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])$/,$$=/^(?:(?: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])$/,R$=/^(([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]))$/,z$=/^(([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])$/,B$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H1="((\\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])))",W$=new RegExp(`^${H1}$`);function W1(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function q$(e){return new RegExp(`^${W1(e)}$`)}function U$(e){let t=`${H1}T${W1(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 Y$(e,t){return!!((t==="v4"||!t)&&j$.test(e)||(t==="v6"||!t)&&R$.test(e))}function G$(e,t){if(!N$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function K$(e,t){return!!((t==="v4"||!t)&&$$.test(e)||(t==="v6"||!t)&&z$.test(e))}class Yn extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new qt;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:oe.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:oe.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:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&de(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")L$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")yp||(yp=new RegExp(V$,"u")),yp.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")M$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")D$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")I$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")O$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ulid",code:oe.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:oe.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:oe.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:oe.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:oe.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:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?U$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?W$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?q$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?F$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Y$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?G$(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?K$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?B$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?H$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:oe.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Yn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.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,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Yn({...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}}Yn.create=e=>{var t;return new Yn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};function Z$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class io extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:oe.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:oe.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:oe.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:oe.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:oe.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}io.create=e=>new io({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class mi extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new qt;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:oe.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:oe.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:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.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}}mi.create=e=>{var t;return new mi({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};class bp extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Zt(t.data)}}bp.create=e=>new bp({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class ka extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_date}),ke}const r=new qt;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:oe.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:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ie(e)});class xp extends Ve{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Zt(t.data)}}xp.create=e=>new xp({typeName:Te.ZodSymbol,...Ie(e)});class bl extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Zt(t.data)}}bl.create=e=>new bl({typeName:Te.ZodUndefined,...Ie(e)});class xl extends Ve{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Zt(t.data)}}xl.create=e=>new xl({typeName:Te.ZodNull,...Ie(e)});class wp extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}wp.create=e=>new wp({typeName:Te.ZodAny,...Ie(e)});class gi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}gi.create=e=>new gi({typeName:Te.ZodUnknown,...Ie(e)});class br extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),ke}}br.create=e=>new br({typeName:Te.ZodNever,...Ie(e)});class Sp extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Zt(t.data)}}Sp.create=e=>new Sp({typeName:Te.ZodVoid,...Ie(e)});class Rn extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return de(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),ke;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?oe.too_big:oe.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:oe.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:oe.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 $n(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new $n(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Rn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Rn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Rn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Rn.create=(e,t)=>new Rn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ie(t)});function vi(e){if(e instanceof bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xn.create(vi(r))}return new bt({...e._def,shape:()=>t})}else return e instanceof Rn?new Rn({...e._def,type:vi(e.element)}):e instanceof Xn?Xn.create(vi(e.unwrap())):e instanceof so?so.create(vi(e.unwrap())):e instanceof Kn?Kn.create(e.items.map(t=>vi(t))):e}class bt extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return de(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),ke}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new $n(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(de(o,{code:oe.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 $n(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=>qt.mergeObjectSync(r,c)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new bt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}deepPartial(){return vi(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new bt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xn;)i=i._def.innerType;n[r]=i}}),new bt({...this._def,shape:()=>n})}keyof(){return q1(He.objectKeys(this.shape))}}bt.create=(e,t)=>new bt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)}),bt.strictCreate=(e,t)=>new bt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)}),bt.lazycreate=(e,t)=>new bt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)});class wl extends Ve{_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 fn(s.ctx.common.issues));return de(n,{code:oe.invalid_union,unionErrors:a}),ke}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 fn(l));return de(n,{code:oe.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}wl.create=(e,t)=>new wl({options:e,typeName:Te.ZodUnion,...Ie(t)});const Gn=e=>e instanceof El?Gn(e.schema):e instanceof Zn?Gn(e.innerType()):e instanceof Cl?[e.value]:e instanceof ao?e.options:e instanceof kl?He.objectValues(e.enum):e instanceof Pl?Gn(e._def.innerType):e instanceof bl?[void 0]:e instanceof xl?[null]:e instanceof Xn?[void 0,...Gn(e.unwrap())]:e instanceof so?[null,...Gn(e.unwrap())]:e instanceof U1||e instanceof Il?Gn(e.unwrap()):e instanceof Al?Gn(e._def.innerType):[];class Tp extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return de(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(de(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Gn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Tp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ie(r)})}}function Ep(e,t){const n=yr(e),r=yr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ep(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ep(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if($1(i)||$1(a))return ke;const s=Ep(i.value,a.value);return s.valid?((R1(i)||R1(a))&&n.dirty(),{status:n.value,value:s.data}):(de(r,{code:oe.invalid_intersection_types}),ke)};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}))}}Sl.create=(e,t,n)=>new Sl({left:e,right:t,typeName:Te.ZodIntersection,...Ie(n)});class Kn extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return de(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return de(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(de(r,{code:oe.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 $n(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Kn({...this._def,rest:t})}}Kn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kn({items:e,typeName:Te.ZodTuple,rest:null,...Ie(t)})};class Tl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return de(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new $n(r,s,r.path,s)),value:a._parse(new $n(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new Tl({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ie(r)}):new Tl({keyType:Yn.create(),valueType:t,typeName:Te.ZodRecord,...Ie(n)})}}class Cp extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return de(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new $n(r,s,r.path,[c,"key"])),value:i._parse(new $n(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 ke;(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 ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Cp.create=(e,t,n)=>new Cp({valueType:t,keyType:e,typeName:Te.ZodMap,...Ie(n)});class yi extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return de(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(de(r,{code:oe.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:oe.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 ke;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 $n(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new yi({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new yi({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}yi.create=(e,t)=>new yi({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ie(t)});class Pa extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return de(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return vp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return vp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...l){const c=new fn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Zt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new fn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new fn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Kn.create(t).rest(gi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Kn.create([]).rest(gi.create()),returns:n||gi.create(),typeName:Te.ZodFunction,...Ie(r)})}}class El extends Ve{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})}}El.create=(e,t)=>new El({getter:e,typeName:Te.ZodLazy,...Ie(t)});class Cl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return de(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cl.create=(e,t)=>new Cl({value:e,typeName:Te.ZodLiteral,...Ie(t)});function q1(e,t){return new ao({values:e,typeName:Te.ZodEnum,...Ie(t)})}class ao extends Ve{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{expected:He.joinValues(r),received:n.parsedType,code:oe.invalid_type}),ke}if(yl(this,Ea)||z1(this,Ea,new Set(this._def.values)),!yl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{received:n.data,code:oe.invalid_enum_value,options:r}),ke}return Zt(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 ao.create(t,{...this._def,...n})}exclude(t,n=this._def){return ao.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,ao.create=q1;class kl extends Ve{constructor(){super(...arguments),Ca.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return de(r,{expected:He.joinValues(o),received:r.parsedType,code:oe.invalid_type}),ke}if(yl(this,Ca)||z1(this,Ca,new Set(He.getValidEnumValues(this._def.values))),!yl(this,Ca).has(t.data)){const o=He.objectValues(n);return de(r,{received:r.data,code:oe.invalid_enum_value,options:o}),ke}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,kl.create=(e,t)=>new kl({values:e,typeName:Te.ZodNativeEnum,...Ie(t)});class Aa extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return de(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Te.ZodPromise,...Ie(t)});class Zn extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{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 ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?Ta(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Ta(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"?ke:(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"?ke:(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(!hi(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>hi(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Zn.create=(e,t,n)=>new Zn({schema:e,typeName:Te.ZodEffects,effect:t,...Ie(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ie(n)});class Xn extends Ve{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xn.create=(e,t)=>new Xn({innerType:e,typeName:Te.ZodOptional,...Ie(t)});class so extends Ve{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}so.create=(e,t)=>new so({innerType:e,typeName:Te.ZodNullable,...Ie(t)});class Pl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Al extends Ve{_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 vl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class kp extends Ve{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}kp.create=e=>new kp({typeName:Te.ZodNaN,...Ie(e)});class U1 extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class _l extends Ve{_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"?ke:i.status==="dirty"?(n.dirty(),Ta(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"?ke:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new _l({in:t,out:n,typeName:Te.ZodPipeline})}}class Il extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=o=>(hi(o)&&(o.value=Object.freeze(o.value)),o);return vl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Te.ZodReadonly,...Ie(t)}),bt.lazycreate;var Te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Te||(Te={})),Yn.create,io.create,kp.create,mi.create,bp.create,ka.create,xp.create,bl.create,xl.create,wp.create,gi.create,br.create,Sp.create,Rn.create,bt.create,bt.strictCreate,wl.create,Tp.create,Sl.create,Kn.create,Tl.create,Cp.create,yi.create,Pa.create,El.create,Cl.create,ao.create,kl.create,Aa.create,Zn.create,Xn.create,so.create,Zn.createWithPreprocess,_l.create;const X$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Q$=(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]}}},Y1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),wn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Y1(t),o=structuredClone(e);return Q$(o,r,n),o},J$=(e,t)=>e.localeCompare(t),_a={},G1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return K1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=G1(e._def.innerType);return t==="ZodArray"?n??[]:n}},K1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,G1(n)])),Z1=(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]=Z1(i,o):n[r]=o||i)}return n},eR={sort:J$,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},X1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return P$.parse(n.toString(),eR)},lo=(e,t)=>Y1(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),xr=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 xr(e);const n=document.querySelector(`[data-origin="${t}"]`);return xr(n||e)},tR={state:{},loading:!1,useOnChange:!1},Q1=e=>e.dataset.target||e.name,nR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return X$(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},rR=(e,t,n=tR)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>rt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??K1(e)??{}),l=E.useCallback(y=>{var I;const x=y.target,T=y.currentTarget;if(x.dataset.optional==="true")return;const S=Q1(x),C=Pp(x)||(T?xr(T):""),P=lo(S,e);if(x.setAttribute("data-initialized","true"),P){const _=P.safeParse(C),M=_.success?void 0:((I=_.error.issues[0])==null?void 0:I.message)??"";o(L=>wn(L??{},S,M))}},[]),c=E.useCallback(y=>x=>{const T=x.currentTarget,w=Object.values(i.current).reduce((C,P)=>{var $;const I=P.element,_=P.schema.safeParse(xr(I));if(I.dataset.ignore==="ignore"||_.success)return C;const M=($=_.error.issues[0])==null?void 0:$.message;I.setAttribute("data-initialized","true");const L=I.dataset.name||I.name||"";return wn(C,L,M)},{}),S=rt.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,x=_a)=>{const T=lo(y,e),w=S=>{var P;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>wn(I,y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)};return{...x,loading:n.loading,name:y,id:y,onChange:w,form:t,date:rt.string(a[y])?new Date(a[y]):a[y],required:x.required??!T.isOptional(),error:r==null?void 0:r[y],ref:S=>{S!==null&&(i.current[y]={element:S,schema:T})}}},d=(y,x=_a)=>{const T=lo(y,e);return{...x,name:y,id:y,onChange:S=>{var P;const C=S.target.value;s(I=>wn(I,y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),value:kr(a,y,void 0)||"",required:x.required??!T.isOptional(),ref:S=>S!==null?i.current[y]={element:S,schema:T}:void 0}},p=(y,x=_a)=>{const T=lo(y,e);return{...x,name:y,id:y,onChange:S=>{var P;const C=S.target.checked;s(I=>wn(I??{},y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),ref:S=>S!==null?void(i.current[y]={element:S,schema:T}):void 0}},f=(y,x=_a)=>{const T=lo(y,e),w=S=>{var P,I;(P=S.persist)==null||P.call(S);const C=S.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,S),s(_=>wn(_,y,C))};return{...x,loading:n.loading,name:y,id:y,onChange:w,form:t,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),value:kr(a,y,void 0)||(x==null?void 0:x.value)||"",type:rt.instance(T,io)?"number":(x==null?void 0:x.type)??"text",ref:S=>S===null?void 0:i.current[y]={element:S,schema:T}}},m=(y,x=_a)=>{const T=lo(y,e),w=T._def.typeName==="ZodNumber";return{...x,name:y,id:y,onChange:C=>{var I,_;(I=C.persist)==null||I.call(C);const P=w?C.target.valueAsNumber:C.target.value;(_=x==null?void 0:x.onChange)==null||_.call(x,C),s(M=>wn(M,y,P))},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),type:w?"number":(x==null?void 0:x.type)??"text",value:kr(a,y,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[y]={element:C,schema:T})}};E.useEffect(()=>{const y=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(xr(w)),C=M=>{var N;const L=Q1(M.target);if(!L)return!1;const $=M.target,A=Pp(M.target)||(M.relatedTarget?xr(M.relatedTarget):""),O=T.schema.safeParse(A);if($.setAttribute("value",A),O.success)return w.setCustomValidity(""),o(V=>{if(rt.null(V))return null;const F=wn(V,L,void 0);return rt.empty(V)||rt.nil(V)||rt.empty(F)?null:F}),!1;if(w.required){const V=((N=O.error.issues[0])==null?void 0:N.message)||"";w.setCustomValidity(V),o(F=>{if(rt.null(F))return null;const z=wn(F,L,V||void 0);return rt.empty(z)?null:z})}return!1},P=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:P.signal});const _=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:_,unsubscribe:()=>P.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const g=y=>x=>{var _;x.preventDefault();const T=x.currentTarget;let w=X1(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(M=>{if(M.tagName==="SELECT"){const L=M;w=wn(w,L.name,L.value)}if(M.tagName==="INPUT"){const L=M,$=Pp(L)||(L?xr(L):"");w=wn(w,L.dataset.target||L.name,$)}});const C=Z1(w,a),P=e.safeParse(C),I=()=>{var M;O1(T),(M=n.interceptor)==null||M.clear()};if(P.success){const M=JSON.stringify(P.data);return T.setAttribute("data-json",M),(_=n.interceptor)==null||_.clear(),y==null?void 0:y(x,{form:T,event:x,reset:I,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(x,{form:T,json:w,event:x,reset:I,data:w,success:!1,errors:P.error.issues.map(M=>({message:M.message,path:M.path.map(L=>String(L))}))})},h=y=>ad(a,y)||"",v=y=>({...y,id:t,name:t});return E.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},oR=e=>e?JSON.parse(e.getAttribute("data-json")):{},iR=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},J1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},eS={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},tS={normal:"1",navbar:"19",calendar:"2",overlay:"20",tooltip:"13",floating:"21"},aR={name:"dark",zIndex:tS,rounded:J1,spacing:eS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},sR={rounded:J1,spacing:eS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:tS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},lR=aR,cR=sR,uR=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return b.jsx(jo.Provider,{value:t,children:e.children})},dR=()=>{const e=E.useContext(jo);return e?e.parser:gs.hsla};ne.Alert=u_,ne.Autocomplete=i2,ne.Button=go,ne.Calendar=wb,ne.Card=ud,ne.Checkbox=Mf,ne.ColType=pi,ne.Collapse=xy,ne.ComponentsProvider=uR,ne.Context=jo,ne.DatePicker=s2,ne.Dropdown=ti,ne.Empty=Sb,ne.Expand=tF,ne.FileUpload=xV,ne.Form=wV,ne.Input=ba,ne.InputFeedback=aw,ne.InputField=ya,ne.Menu=oF,ne.MenuItem=rF,ne.Modal=gF,ne.MultiSelect=_V,ne.Notifications=rD,ne.Polymorph=on,ne.Radiobox=IV,ne.RenderOnView=FT,ne.Select=ro,ne.Slider=fj,ne.Stats=oD,ne.Switch=pj,ne.Tab=sD,ne.Table=S$,ne.Tabs=iD,ne.Tag=_c,ne.TaskList=hj,ne.Textarea=mj,ne.Timeline=lD,ne.TimelineItem=Cs,ne.Toolbar=vF,ne.Tooltip=tf,ne.TransferList=yj,ne.createColumns=Hj,ne.createCssProperties=ZO,ne.createDesignTokens=ub,ne.createFormStorage=nR,ne.createOptionCols=ap,ne.createStyles=YO,ne.createTheme=KO,ne.createTokenStyles=XO,ne.css=Le,ne.defaultDarkTheme=lR,ne.defaultLightTheme=cR,ne.defaultTranslations=ys,ne.defaultTweaks=bs,ne.dispatchInput=Zh,ne.formReset=O1,ne.formToJson=X1,ne.getJsonForm=oR,ne.getSchemaShape=lo,ne.hasVerticalScroll=Xh,ne.initializeInputDataset=Si,ne.isMobile=mb,ne.isReactComponent=IT,ne.isReactFC=OT,ne.isSsr=$r,ne.mergeRefs=Fa,ne.negate=JO,ne.noop=ld,ne.parsers=gs,ne.path=ad,ne.reduceTokens=jr,ne.safeRegex=sd,ne.splitInto=hb,ne.useColorParser=dR,ne.useForm=rR,ne.useLocale=id,ne.useNotification=tD,ne.usePrevious=iR,ne.useReactive=Zb,ne.useTablePreferences=Uj,ne.useTranslations=Ot,ne.uuid=$o,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
197
197
  //# sourceMappingURL=index.umd.js.map