@g4rcez/components 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8042 -7935
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +44 -44
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/preset.tailwind.js +14 -14
- package/dist/preset/src/styles/common.d.ts +4 -0
- package/dist/preset/src/styles/common.d.ts.map +1 -1
- package/dist/preset/src/styles/common.js +10 -0
- package/dist/preset/src/styles/dark.d.ts.map +1 -1
- package/dist/preset/src/styles/dark.js +2 -1
- package/dist/preset/src/styles/design-tokens.d.ts +8 -7
- package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/preset/src/styles/design-tokens.js +16 -12
- package/dist/preset/src/styles/light.d.ts.map +1 -1
- package/dist/preset/src/styles/light.js +6 -5
- package/dist/preset/src/styles/theme.types.d.ts +10 -1
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/preset.tailwind.js +14 -14
- package/dist/src/components/display/list.js +1 -1
- package/dist/src/components/floating/dropdown.js +2 -2
- package/dist/src/components/floating/expand.d.ts +2 -0
- package/dist/src/components/floating/expand.d.ts.map +1 -1
- package/dist/src/components/floating/expand.js +12 -5
- package/dist/src/components/floating/menu.js +2 -2
- package/dist/src/components/floating/modal.js +1 -1
- package/dist/src/components/form/autocomplete.d.ts.map +1 -1
- package/dist/src/components/form/autocomplete.js +26 -21
- package/dist/src/components/form/checkbox.d.ts +1 -0
- package/dist/src/components/form/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/checkbox.js +4 -1
- package/dist/src/components/form/free-text.d.ts.map +1 -1
- package/dist/src/components/form/free-text.js +2 -2
- package/dist/src/components/form/input-field.d.ts +1 -0
- package/dist/src/components/form/input-field.d.ts.map +1 -1
- package/dist/src/components/form/input-field.js +2 -2
- package/dist/src/components/form/input.d.ts.map +1 -1
- package/dist/src/components/form/input.js +3 -1
- package/dist/src/components/form/multi-select.d.ts.map +1 -1
- package/dist/src/components/form/multi-select.js +25 -21
- package/dist/src/components/form/select.d.ts.map +1 -1
- package/dist/src/components/form/select.js +2 -2
- package/dist/src/components/form/switch.d.ts +1 -0
- package/dist/src/components/form/switch.d.ts.map +1 -1
- package/dist/src/components/form/switch.js +7 -6
- package/dist/src/components/table/filter.d.ts.map +1 -1
- package/dist/src/components/table/filter.js +1 -1
- package/dist/src/components/table/index.d.ts.map +1 -1
- package/dist/src/components/table/index.js +11 -7
- package/dist/src/components/table/table-lib.d.ts +3 -2
- package/dist/src/components/table/table-lib.d.ts.map +1 -1
- package/dist/src/components/table/table-lib.js +16 -0
- package/dist/src/components/table/thead.d.ts.map +1 -1
- package/dist/src/components/table/thead.js +27 -6
- package/dist/src/config/default-tweaks.d.ts +5 -0
- package/dist/src/config/default-tweaks.d.ts.map +1 -1
- package/dist/src/config/default-tweaks.js +2 -3
- package/dist/src/hooks/use-is-coarse-device.d.ts +2 -0
- package/dist/src/hooks/use-is-coarse-device.d.ts.map +1 -0
- package/dist/src/hooks/use-is-coarse-device.js +12 -0
- package/dist/src/hooks/use-remove-scroll.d.ts.map +1 -1
- package/dist/src/hooks/use-remove-scroll.js +6 -2
- package/dist/src/hooks/use-swipe.d.ts +1 -1
- package/dist/src/hooks/use-swipe.d.ts.map +1 -1
- package/dist/src/lib/dict.d.ts +1 -1
- package/dist/src/lib/dict.d.ts.map +1 -1
- package/dist/src/lib/dict.js +1 -1
- package/dist/src/lib/fns.d.ts +1 -0
- package/dist/src/lib/fns.d.ts.map +1 -1
- package/dist/src/lib/fns.js +4 -0
- package/dist/src/styles/common.d.ts +4 -0
- package/dist/src/styles/common.d.ts.map +1 -1
- package/dist/src/styles/common.js +10 -0
- package/dist/src/styles/dark.d.ts.map +1 -1
- package/dist/src/styles/dark.js +2 -1
- package/dist/src/styles/design-tokens.d.ts +8 -7
- package/dist/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/src/styles/design-tokens.js +13 -10
- package/dist/src/styles/light.d.ts.map +1 -1
- package/dist/src/styles/light.js +6 -5
- package/dist/src/styles/theme.types.d.ts +10 -1
- package/dist/src/styles/theme.types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(ee,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ee=typeof globalThis<"u"?globalThis:ee||self,E(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,E,b,mi){"use strict";var Zj=Object.defineProperty;var Xj=(ee,E,b)=>E in ee?Zj(ee,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ee[E]=b;var pe=(ee,E,b)=>Xj(ee,typeof E!="symbol"?E+"":E,b);function Tp(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 _=Tp(E),Pa=Tp(mi);function Sp(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=Sp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ep(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sp(e))&&(r&&(r+=" "),r+=t);return r}const Cp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kp=Ep,so=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return kp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Cp(u)||Cp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[y,m]=h;return Array.isArray(m)?m.includes({...i,...s}[y]):{...i,...s}[y]===m})?[...c,d,p]:c},[]);return kp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Pp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O1(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 Cl,_p;function lo(){return _p||(_p=1,Cl=TypeError),Cl}const M1=O1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var kl,Ip;function Aa(){if(Ip)return kl;Ip=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,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,g=String.prototype.slice,x=String.prototype.replace,S=String.prototype.toUpperCase,T=String.prototype.toLowerCase,w=RegExp.prototype.test,C=Array.prototype.concat,P=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,k=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||!0)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,j=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function M(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||w.call(/e/,q))return q;var Re=/[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=g.call(q,lt.length+1);return x.call(lt,Re,"$&_")+"."+x.call(x.call(De,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(q,Re,"$&_")}var $=M1,O=$.custom,B=Ae(O)?O:null,Q={__proto__:null,double:'"',single:"'"},oe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};kl=function H(q,Re,et,lt){var De=Re||{};if(G(De,"quoteStyle")&&!G(Q,De.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(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=G(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(G(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(G(De,"numericSeparator")&&typeof De.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ao=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 Xe(q,De);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var rn=String(q);return ao?M(q,rn):rn}if(typeof q=="bigint"){var Cr=String(q)+"n";return ao?M(q,Cr):Cr}var hp=typeof De.depth>"u"?5:De.depth;if(typeof et>"u"&&(et=0),et>=hp&&hp>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var pi=wr(De,et);if(typeof lt>"u")lt=[];else if(X(lt,q)>=0)return"[Circular]";function Sn(hi,El,Kj){if(El&&(lt=I.call(lt),lt.push(El)),Kj){var I1={depth:De.depth};return G(De,"quoteStyle")&&(I1.quoteStyle=De.quoteStyle),H(hi,I1,et+1,lt)}return H(hi,De,et+1,lt)}if(typeof q=="function"&&!W(q)){var S1=ae(q),E1=Sr(q,Sn);return"[Function"+(S1?": "+S1:" (anonymous)")+"]"+(E1.length>0?" { "+P.call(E1,", ")+" }":"")}if(Ae(q)){var C1=k?x.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(q);return typeof q=="object"&&!k?pt(C1):C1}if(Le(q)){for(var ka="<"+T.call(String(q.nodeName)),mp=q.attributes||[],Sl=0;Sl<mp.length;Sl++)ka+=" "+mp[Sl].name+"="+J(K(mp[Sl].value),"double",De);return ka+=">",q.childNodes&&q.childNodes.length&&(ka+="..."),ka+="</"+T.call(String(q.nodeName))+">",ka}if(Y(q)){if(q.length===0)return"[]";var gp=Sr(q,Sn);return pi&&!zn(gp)?"["+Tr(gp,pi)+"]":"[ "+P.call(gp,", ")+" ]"}if(Z(q)){var vp=Sr(q,Sn);return!("cause"in Error.prototype)&&"cause"in q&&!N.call(q,"cause")?"{ ["+String(q)+"] "+P.call(C.call("[cause]: "+Sn(q.cause),vp),", ")+" }":vp.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+P.call(vp,", ")+" }"}if(typeof q=="object"&&Er){if(B&&typeof q[B]=="function"&&$)return $(q,{depth:hp-et});if(Er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(de(q)){var k1=[];return r&&r.call(q,function(hi,El){k1.push(Sn(El,q,!0)+" => "+Sn(hi,q))}),Tn("Map",n.call(q),k1,pi)}if(re(q)){var P1=[];return s&&s.call(q,function(hi){P1.push(Sn(hi,q))}),Tn("Set",a.call(q),P1,pi)}if(ve(q))return Lt("WeakMap");if(ce(q))return Lt("WeakSet");if(we(q))return Lt("WeakRef");if(z(q))return pt(Sn(Number(q)));if(Ie(q))return pt(Sn(F.call(q)));if(xe(q))return pt(h.call(q));if(ie(q))return pt(Sn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof Pp<"u"&&q===Pp)return"{ [object globalThis] }";if(!V(q)&&!W(q)){var yp=Sr(q,Sn),A1=j?j(q)===Object.prototype:q instanceof Object||q.constructor===Object,bp=q instanceof Object?"":"null prototype",_1=!A1&&D&&Object(q)===q&&D in q?g.call(se(q),8,-1):bp?"Object":"",Yj=A1||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",xp=Yj+(_1||bp?"["+P.call(C.call([],_1||[],bp||[]),": ")+"] ":"");return yp.length===0?xp+"{}":pi?xp+"{"+Tr(yp,pi)+"}":xp+"{ "+P.call(yp,", ")+" }"}return String(q)};function J(H,q,Re){var et=Re.quoteStyle||q,lt=Q[et];return lt+H+lt}function K(H){return x.call(String(H),/"/g,""")}function U(H){return!D||!(typeof H=="object"&&(D in H||typeof H[D]<"u"))}function Y(H){return se(H)==="[object Array]"&&U(H)}function V(H){return se(H)==="[object Date]"&&U(H)}function W(H){return se(H)==="[object RegExp]"&&U(H)}function Z(H){return se(H)==="[object Error]"&&U(H)}function ie(H){return se(H)==="[object String]"&&U(H)}function z(H){return se(H)==="[object Number]"&&U(H)}function xe(H){return se(H)==="[object Boolean]"&&U(H)}function Ae(H){if(k)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 Ie(H){if(!H||typeof H!="object"||!F)return!1;try{return F.call(H),!0}catch{}return!1}var Oe=Object.prototype.hasOwnProperty||function(H){return H in this};function G(H,q){return Oe.call(H,q)}function se(H){return y.call(H)}function ae(H){if(H.name)return H.name;var q=v.call(m.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function X(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 de(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 ve(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 re(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ce(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Le(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function Xe(H,q){if(H.length>q.maxStringLength){var Re=H.length-q.maxStringLength,et="... "+Re+" more character"+(Re>1?"s":"");return Xe(g.call(H,0,q.maxStringLength),q)+et}var lt=oe[q.quoteStyle||"single"];lt.lastIndex=0;var De=x.call(x.call(H,lt,"\\$1"),/[\x00-\x1f]/g,Ct);return J(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":"")+S.call(q.toString(16))}function pt(H){return"Object("+H+")"}function Lt(H){return H+" { ? }"}function Tn(H,q,Re,et){var lt=et?Tr(Re,et):P.call(Re,", ");return H+" ("+q+") {"+lt+"}"}function zn(H){for(var q=0;q<H.length;q++)if(X(H[q],`
|
|
2
|
-
`)>=0)return!1;return!0}function wr(H,q){var
|
|
3
|
-
`+q.prev+q.base;return
|
|
4
|
-
`+q.prev}function Sr(H,q){var Re=Y(H),et=[];if(Re){et.length=H.length;for(var lt=0;lt<H.length;lt++)et[lt]=G(H,lt)?q(H[lt],H):""}var De=typeof L=="function"?L(H):[],Er;if(k){Er={};for(var ao=0;ao<De.length;ao++)Er["$"+De[ao]]=De[ao]}for(var rn in H)G(H,rn)&&(Re&&String(Number(rn))===rn&&rn<H.length||k&&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++)N.call(H,De[Cr])&&et.push("["+q(De[Cr])+"]: "+q(H[De[Cr]],H));return et}return kl}var Pl,Op;function D1(){if(Op)return Pl;Op=1;var e=Aa(),t=lo(),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 Pl=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},Pl}var Al,Mp;function Dp(){return Mp||(Mp=1,Al=Object),Al}var _l,Np;function N1(){return Np||(Np=1,_l=Error),_l}var Il,Fp;function F1(){return Fp||(Fp=1,Il=EvalError),Il}var Ol,Lp;function L1(){return Lp||(Lp=1,Ol=RangeError),Ol}var Ml,Vp;function V1(){return Vp||(Vp=1,Ml=ReferenceError),Ml}var Dl,jp;function j1(){return jp||(jp=1,Dl=SyntaxError),Dl}var Nl,Rp;function R1(){return Rp||(Rp=1,Nl=URIError),Nl}var Fl,$p;function $1(){return $p||($p=1,Fl=Math.abs),Fl}var Ll,zp;function z1(){return zp||(zp=1,Ll=Math.floor),Ll}var Vl,Bp;function B1(){return Bp||(Bp=1,Vl=Math.max),Vl}var jl,Hp;function H1(){return Hp||(Hp=1,jl=Math.min),jl}var Rl,Wp;function W1(){return Wp||(Wp=1,Rl=Math.pow),Rl}var $l,qp;function q1(){return qp||(qp=1,$l=Math.round),$l}var zl,Up;function U1(){return Up||(Up=1,zl=Number.isNaN||function(t){return t!==t}),zl}var Bl,Gp;function G1(){if(Gp)return Bl;Gp=1;var e=U1();return Bl=function(n){return e(n)||n===0?n:n<0?-1:1},Bl}var Hl,Yp;function Y1(){return Yp||(Yp=1,Hl=Object.getOwnPropertyDescriptor),Hl}var Wl,Kp;function Zp(){if(Kp)return Wl;Kp=1;var e=Y1();if(e)try{e([],"length")}catch{e=null}return Wl=e,Wl}var ql,Xp;function K1(){if(Xp)return ql;Xp=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ql=e,ql}var Ul,Qp;function Z1(){return Qp||(Qp=1,Ul=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}),Ul}var Gl,Jp;function X1(){if(Jp)return Gl;Jp=1;var e=typeof Symbol<"u"&&Symbol,t=Z1();return Gl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Gl}var Yl,eh;function th(){return eh||(eh=1,Yl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Yl}var Kl,nh;function rh(){if(nh)return Kl;nh=1;var e=Dp();return Kl=e.getPrototypeOf||null,Kl}var Zl,oh;function Q1(){if(oh)return Zl;oh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Zl=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var 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),h=[],y=0;y<f;y++)h[y]="$"+y;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},Zl}var Xl,ih;function _a(){if(ih)return Xl;ih=1;var e=Q1();return Xl=Function.prototype.bind||e,Xl}var Ql,ah;function Jl(){return ah||(ah=1,Ql=Function.prototype.call),Ql}var ec,sh;function lh(){return sh||(sh=1,ec=Function.prototype.apply),ec}var tc,ch;function J1(){return ch||(ch=1,tc=typeof Reflect<"u"&&Reflect&&Reflect.apply),tc}var nc,uh;function eT(){if(uh)return nc;uh=1;var e=_a(),t=lh(),n=Jl(),r=J1();return nc=r||e.call(n,t),nc}var rc,dh;function fh(){if(dh)return rc;dh=1;var e=_a(),t=lo(),n=Jl(),r=eT();return rc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},rc}var oc,ph;function tT(){if(ph)return oc;ph=1;var e=fh(),t=Zp(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return oc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,oc}var ic,hh;function nT(){if(hh)return ic;hh=1;var e=th(),t=rh(),n=tT();return ic=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,ic}var ac,mh;function rT(){if(mh)return ac;mh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=_a();return ac=n.call(e,t),ac}var sc,gh;function lc(){if(gh)return sc;gh=1;var e,t=Dp(),n=N1(),r=F1(),o=L1(),i=V1(),a=j1(),s=lo(),l=R1(),c=$1(),u=z1(),d=B1(),p=H1(),f=W1(),h=q1(),y=G1(),m=Function,v=function(W){try{return m('"use strict"; return ('+W+").constructor;")()}catch{}},g=Zp(),x=K1(),S=function(){throw new s},T=g?function(){try{return arguments.callee,S}catch{try{return g(arguments,"callee").get}catch{return S}}}():S,w=X1()(),C=nT(),P=rh(),I=th(),A=lh(),F=Jl(),L={},R=typeof Uint8Array>"u"||!C?e:C(Uint8Array),k={__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%":g,"%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%":F,"%Function.prototype.apply%":A,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":y,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var D=C(C(W));k["%Error.prototype%"]=D}var N=function W(Z){var ie;if(Z==="%AsyncFunction%")ie=v("async function () {}");else if(Z==="%GeneratorFunction%")ie=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var z=W("%AsyncGeneratorFunction%");z&&(ie=z.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var xe=W("%AsyncGenerator%");xe&&C&&(ie=C(xe.prototype))}return k[Z]=ie,ie},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"]},M=_a(),$=rT(),O=M.call(F,Array.prototype.concat),B=M.call(A,Array.prototype.splice),Q=M.call(F,String.prototype.replace),oe=M.call(F,String.prototype.slice),J=M.call(F,RegExp.prototype.exec),K=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(Z){var ie=oe(Z,0,1),z=oe(Z,-1);if(ie==="%"&&z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var xe=[];return Q(Z,K,function(Ae,Ie,Oe,G){xe[xe.length]=Oe?Q(G,U,"$1"):Ie||Ae}),xe},V=function(Z,ie){var z=Z,xe;if($(j,z)&&(xe=j[z],z="%"+xe[0]+"%"),$(k,z)){var Ae=k[z];if(Ae===L&&(Ae=N(z)),typeof Ae>"u"&&!ie)throw new s("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:xe,name:z,value:Ae}}throw new a("intrinsic "+Z+" does not exist!")};return sc=function(Z,ie){if(typeof Z!="string"||Z.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,Z)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=Y(Z),xe=z.length>0?z[0]:"",Ae=V("%"+xe+"%",ie),Ie=Ae.name,Oe=Ae.value,G=!1,se=Ae.alias;se&&(xe=se[0],B(z,O([0,1],se)));for(var ae=1,X=!0;ae<z.length;ae+=1){var de=z[ae],ve=oe(de,0,1),we=oe(de,-1);if((ve==='"'||ve==="'"||ve==="`"||we==='"'||we==="'"||we==="`")&&ve!==we)throw new a("property names with quotes must have matching quotes");if((de==="constructor"||!X)&&(G=!0),xe+="."+de,Ie="%"+xe+"%",$(k,Ie))Oe=k[Ie];else if(Oe!=null){if(!(de in Oe)){if(!ie)throw new s("base intrinsic for "+Z+" exists, but the property is not available.");return}if(g&&ae+1>=z.length){var re=g(Oe,de);X=!!re,X&&"get"in re&&!("originalValue"in re.get)?Oe=re.get:Oe=Oe[de]}else X=$(Oe,de),Oe=Oe[de];X&&!G&&(k[Ie]=Oe)}}return Oe},sc}var cc,vh;function yh(){if(vh)return cc;vh=1;var e=lc(),t=fh(),n=t([e("%String.prototype.indexOf%")]);return cc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},cc}var uc,bh;function xh(){if(bh)return uc;bh=1;var e=lc(),t=yh(),n=Aa(),r=lo(),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 uc=!!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},uc}var dc,wh;function oT(){if(wh)return dc;wh=1;var e=lc(),t=yh(),n=Aa(),r=xh(),o=lo(),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 dc=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,y){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,y)):r&&(p||(p=r()),p.set(h,y))}};return f}:r,dc}var fc,Th;function iT(){if(Th)return fc;Th=1;var e=lo(),t=Aa(),n=D1(),r=xh(),o=oT(),i=o||r||n;return fc=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},fc}var Sh=e=>Array.isArray(e),pc=e=>e===void 0,hc=e=>e===null,aT=Function.bind.call(Function.call,Object.prototype.toString),sT=e=>!!e&&aT(e)==="[object Error]"||e instanceof Error,Eh=(e,t)=>e instanceof t,lT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},cT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Eh(e,Date),ht={array:Sh,date:cT,empty:e=>hc(e)||pc(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Eh,isError:sT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>hc(e)||pc(e),null:hc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Sh(e)&&typeof e=="object",primitive:lT,string:e=>typeof e=="string",undefined:pc},uT=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 mc="-",dT=e=>{const t=pT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(mc);return s[0]===""&&s.length!==1&&s.shift(),Ch(s,t)||fT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Ch=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ch(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(mc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},kh=/^\[(.+)\]$/,fT=e=>{if(kh.test(e)){const t=kh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)gc(n[o],r,o,t);return r},gc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ph(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(hT(o)){gc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{gc(a,Ph(t,i),n,r)})})},Ph=(e,t)=>{let n=e;return t.split(mc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hT=e=>e.isThemeGetter,mT=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)}}},vc="!",yc=":",gT=yc.length,vT=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 y=o[h];if(a===0&&s===0){if(y===yc){i.push(o.slice(l,h)),l=h+gT;continue}if(y==="/"){c=h;continue}}y==="["?a++:y==="]"?a--:y==="("?s++:y===")"&&s--}const u=i.length===0?o:o.substring(l),d=yT(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+yc,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},yT=e=>e.endsWith(vc)?e.substring(0,e.length-1):e.startsWith(vc)?e.substring(1):e,bT=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}},xT=e=>({cache:mT(e.cacheSize),parseClassName:vT(e),sortModifiers:bT(e),...dT(e)}),wT=/\s+/,TT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(wT);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:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?h.substring(0,y):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const g=i(p).join(":"),x=f?g+vc:g,S=x+v;if(a.includes(S))continue;a.push(S);const T=o(v,m);for(let w=0;w<T.length;++w){const C=T[w];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function ST(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ah(t))&&(r&&(r+=" "),r+=n);return r}const Ah=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ah(e[r]))&&(n&&(n+=" "),n+=t);return n};function ET(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=xT(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(ST.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_h=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ih=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CT=/^\d+\/\d+$/,kT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PT=/\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$/,AT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_T=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,co=e=>CT.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),Oh=e=>e.endsWith("%")&&je(e.slice(0,-1)),Qn=e=>kT.test(e),OT=()=>!0,MT=e=>PT.test(e)&&!AT.test(e),bc=()=>!1,DT=e=>_T.test(e),NT=e=>IT.test(e),FT=e=>!me(e)&&!ge(e),LT=e=>uo(e,Nh,bc),me=e=>_h.test(e),Ar=e=>uo(e,Fh,MT),xc=e=>uo(e,GT,je),VT=e=>uo(e,Mh,bc),jT=e=>uo(e,Dh,NT),RT=e=>uo(e,bc,DT),ge=e=>Ih.test(e),Ia=e=>fo(e,Fh),$T=e=>fo(e,YT),zT=e=>fo(e,Mh),BT=e=>fo(e,Nh),HT=e=>fo(e,Dh),WT=e=>fo(e,KT,!0),uo=(e,t,n)=>{const r=_h.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fo=(e,t,n=!1)=>{const r=Ih.exec(e);return r?r[1]?t(r[1]):n:!1},Mh=e=>e==="position",qT=new Set(["image","url"]),Dh=e=>qT.has(e),UT=new Set(["length","size","percentage"]),Nh=e=>UT.has(e),Fh=e=>e==="length",GT=e=>e==="number",YT=e=>e==="family-name",KT=e=>e==="shadow",ZT=ET(()=>{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"),y=It("aspect"),m=It("ease"),v=It("animate"),g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["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=()=>[co,"full","auto",...w()],P=()=>[Pr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",Pr,ge,me]},ge,me],A=()=>[Pr,"auto",ge,me],F=()=>["auto","min","max","fr",ge,me],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],R=()=>["start","end","center","stretch"],k=()=>["auto",...w()],D=()=>[co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],N=()=>[e,ge,me],j=()=>[Oh,Ar],M=()=>["","none","full",c,ge,me],$=()=>["",je,Ia,Ar],O=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,ge,me],oe=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],J=()=>["none",je,ge,me],K=()=>["none",je,ge,me],U=()=>[je,ge,me],Y=()=>[co,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qn],breakpoint:[Qn],color:[OT],container:[Qn],"drop-shadow":[Qn],ease:["in","out","in-out"],font:[FT],"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",co,me,ge,y]}],container:["container"],columns:[{columns:[je,me,ge,s]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"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: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:[co,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,co,"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":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":P()}],"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":F()}],"auto-rows":[{"auto-rows":F()}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen",...D()]}],"min-h":[{"min-h":["screen","none",...D()]}],"max-h":[{"max-h":["screen",...D()]}],"font-size":[{text:["base",n,Ia,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oh,me]}],"font-family":[{font:[$T,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,xc]}],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:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"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: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:[...x(),zT,VT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",BT,LT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,ge,me],radial:["",ge,me],conic:[Pr,ge,me]},HT,jT]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"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:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ge,me]}],"outline-w":[{outline:["",je,Ia,Ar]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,WT,RT]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:$()}],"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":$()}],"inset-ring-color":[{"inset-ring":N()}],opacity:[{opacity:[je,ge,me]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Q()}],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":Q()}],"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":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:[je,"initial",ge,me]}],ease:[{ease:["linear","initial",m,ge,me]}],delay:[{delay:[je,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,me]}],"perspective-origin":[{"perspective-origin":oe()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"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:oe()}],"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":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",...N()]}],"stroke-w":[{stroke:[je,Ia,Ar,xc]}],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","*","**"]}}),wc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},XT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),QT=e=>ht.function(e),$e=(...e)=>ZT(Ep(e)),Lh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},gi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Vh=e=>e.scrollHeight>e.clientHeight,JT="span",on=E.forwardRef(function(t,n){const r=t.as||JT;return b.jsx(r,{ref:n,...t,as:void 0})}),eS=so("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"}}),po=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:$e(eS({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),vi=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function tS(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 nS=({children:e,...t})=>{const n=vi(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:tS(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})},rS=so("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"}}}),oS=so("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"}}),Tc=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:$e(oS({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:rS({theme:n})}):null,r,s.children]})}),yi=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sc=typeof window<"u",Oa=Sc?E.useLayoutEffect:E.useEffect,Ma=E.createContext(null),ho=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class iS 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 aS({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(ho);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,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,""")}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(`
|
|
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]),b.jsx(iS,{isPresent:t,childRef:o,sizeRef:i,children:_.cloneElement(e,{ref:o})})}const sS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=pn(lS),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=b.jsx(aS,{isPresent:n,anchorX:s,children:e})),b.jsx(Ma.Provider,{value:d,children:e})};function lS(){return new Map}function jh(e=!0){const t=E.useContext(Ma);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 Da=e=>e.key||"";function Rh(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]=jh(a),u=E.useMemo(()=>Rh(e),[e]),d=a&&!l?[]:u.map(Da),p=E.useRef(!0),f=E.useRef(u),h=pn(()=>new Map),[y,m]=E.useState(u),[v,g]=E.useState(u);Oa(()=>{p.current=!1,f.current=u;for(let T=0;T<v.length;T++){const w=Da(v[T]);d.includes(w)?h.delete(w):h.get(w)!==!0&&h.set(w,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==y){let T=[...u];for(let w=0;w<v.length;w++){const C=v[w],P=Da(C);d.includes(P)||(T.splice(w,0,C),x.push(C))}return i==="wait"&&x.length&&(T=x),g(Rh(T)),m(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:S}=E.useContext(yi);return b.jsx(b.Fragment,{children:v.map(T=>{const w=Da(T),C=a&&!l?!1:u===v||d.includes(w),P=()=>{if(h.has(w))h.set(w,!0);else return;let I=!0;h.forEach(A=>{A||(I=!1)}),I&&(S==null||S(),g(f.current),a&&(c==null||c()),r&&r())};return b.jsx(sS,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:P,anchorX:s,children:T},w)})})},cS=E.createContext(null),Ut=e=>e;let mo=Ut,an=Ut;process.env.NODE_ENV!=="production"&&(mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});const uS={useManualTiming:!1},Na=["read","resolveKeyframes","update","preRender","render","postRender"];function dS(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 fS=40;function $h(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Na.reduce((v,g)=>(v[g]=dS(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,fS),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))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Na.reduce((v,g)=>{const x=a[g];return v[g]=(S,T=!1,w=!1)=>(n||h(),x.schedule(S,T,w)),v},{}),cancel:v=>{for(let g=0;g<Na.length;g++)a[Na[g]].cancel(v)},state:o,steps:a}}const{schedule:Qe,cancel:Bn,state:Dt,steps:Ec}=$h(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function pS(){const e=E.useRef(!1);return Oa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function hS(){const e=pS(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Qe.postRender(r),[r]),t]}const mS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function zh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(mS);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 Bh=e=>e===!0,gS=e=>Bh(e===!0)||e==="id",vS=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(yi),o=E.useContext(cS),[i,a]=hS(),s=E.useRef(null),l=r.id||o;s.current===null&&(gS(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Bh(n)&&r.group||zh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return b.jsx(yi.Provider,{value:c,children:e})},Hh=E.createContext({strict:!1}),Wh={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"]},go={};for(const e in Wh)go[e]={isEnabled:t=>Wh[e].some(n=>!!t[n])};function yS(e){for(const t in e)go[t]={...go[t],...e[t]}}const bS=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 Fa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bS.has(e)}let qh=e=>!Fa(e);function Uh(e){e&&(qh=t=>t.startsWith("on")?!Fa(t):e(t))}try{Uh(require("@emotion/is-prop-valid").default)}catch{}function xS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(qh(o)||n===!0&&Fa(o)||!t&&!Fa(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function wS({children:e,isValidProp:t,...n}){t&&Uh(t),n={...E.useContext(ho),...n},n.isStatic=pn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return b.jsx(ho.Provider,{value:r,children:e})}const Gh=new Set;function La(e,t,n){e||Gh.has(t)||(console.warn(t),Gh.add(t))}function TS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&La(!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 Va=E.createContext({});function ja(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bi(e){return typeof e=="string"||Array.isArray(e)}const Cc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kc=["initial",...Cc];function Ra(e){return ja(e.animate)||kc.some(t=>bi(e[t]))}function Yh(e){return!!(Ra(e)||e.variants)}function SS(e,t){if(Ra(e)){const{initial:n,animate:r}=e;return{initial:n===!1||bi(n)?n:void 0,animate:bi(r)?r:void 0}}return e.inherit!==!1?t:{}}function ES(e){const{initial:t,animate:n}=SS(e,E.useContext(Va));return E.useMemo(()=>({initial:t,animate:n}),[Kh(t),Kh(n)])}function Kh(e){return Array.isArray(e)?e.join(" "):e}const CS=Symbol.for("motionComponentSymbol");function vo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kS(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):vo(n)&&(n.current=r))},[t])}const{schedule:Pc}=$h(queueMicrotask,!1),Ac=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Zh="data-"+Ac("framerAppearId"),Xh=E.createContext({});function PS(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Va),l=E.useContext(Hh),c=E.useContext(Ma),u=E.useContext(ho).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(Xh);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&AS(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const y=n[Zh],m=E.useRef(!!y&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,y))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,y)));return Oa(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Pc.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),m.current=!1))}),p}function AS(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:Qh(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&vo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Qh(e){if(e)return e.options.allowProjection!==!1?e.projection:Qh(e.parent)}function _S({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&yS(e);function s(c,u){let d;const p={...E.useContext(ho),...c,layoutId:IS(c)},{isStatic:f}=p,h=ES(c),y=r(c,f);if(!f&&Sc){OS(p,e);const m=MS(p);d=m.MeasureLayout,h.visualElement=PS(o,y,p,t,m.ProjectionNode)}return b.jsxs(Va.Provider,{value:h,children:[d&&h.visualElement?b.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,kS(y,h.visualElement,u),y,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[CS]=o,l}function IS({layoutId:e}){const t=E.useContext(yi).id;return t&&e!==void 0?t+"-"+e:e}function OS(e,t){const n=E.useContext(Hh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?mo(!1,r):an(!1,r)}}function MS(e){const{drag:t,layout:n}=go;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 Jh=e=>t=>typeof t=="string"&&t.startsWith(e),_c=Jh("--"),DS=Jh("var(--"),Ic=e=>DS(e)?NS.test(e.split("/*")[0].trim()):!1,NS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xi={};function FS(e){for(const t in e)xi[t]=e[t],_c(t)&&(xi[t].isCSSVariable=!0)}const yo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_r=new Set(yo);function em(e,{layout:t,layoutId:n}){return _r.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!xi[e]||e==="opacity")}const kt=e=>!!(e&&e.getVelocity),tm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hn=(e,t,n)=>n>t?t:n<e?e:n,bo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wi={...bo,transform:e=>Hn(0,1,e)},$a={...bo,default:1},Ti=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),er=Ti("deg"),En=Ti("%"),Te=Ti("px"),LS=Ti("vh"),VS=Ti("vw"),nm={...En,parse:e=>En.parse(e)/100,transform:e=>En.transform(e*100)},jS={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},RS={rotate:er,rotateX:er,rotateY:er,rotateZ:er,scale:$a,scaleX:$a,scaleY:$a,scaleZ:$a,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:wi,originX:nm,originY:nm,originZ:Te},rm={...bo,transform:Math.round},Oc={...jS,...RS,zIndex:rm,size:Te,fillOpacity:wi,strokeOpacity:wi,numOctaves:rm},$S={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zS=yo.length;function BS(e,t,n){let r="",o=!0;for(let i=0;i<zS;i++){const a=yo[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=tm(s,Oc[a]);if(!l){o=!1;const u=$S[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Mc(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(_c(l)){o[l]=c;continue}else{const u=tm(c,Oc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=BS(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 Dc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function om(e,t,n){for(const r in t)!kt(t[r])&&!em(r,n)&&(e[r]=t[r])}function HS({transformTemplate:e},t){return E.useMemo(()=>{const n=Dc();return Mc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function WS(e,t){const n=e.style||{},r={};return om(r,n,e),Object.assign(r,HS(e,t)),r}function qS(e,t){const n={},r=WS(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 US=["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 Nc(e){return typeof e!="string"||e.includes("-")?!1:!!(US.indexOf(e)>-1||/[A-Z]/u.test(e))}const GS={offset:"stroke-dashoffset",array:"stroke-dasharray"},YS={offset:"strokeDashoffset",array:"strokeDasharray"};function KS(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?GS:YS;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function im(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function ZS(e,t,n){const r=im(t,e.x,e.width),o=im(n,e.y,e.height);return`${r} ${o}`}function Fc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Mc(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=ZS(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&&KS(p,a,s,l,!1)}const am=()=>({...Dc(),attrs:{}}),Lc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function XS(e,t,n,r){const o=E.useMemo(()=>{const i=am();return Fc(i,t,Lc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};om(i,e.style,e),o.style={...i,...o.style}}return o}function QS(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Nc(n)?XS:qS)(r,i,a,n),c=xS(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 sm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Vc(e,t,n,r){if(typeof t=="function"){const[o,i]=sm(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]=sm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const jc=e=>Array.isArray(e),JS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),eE=e=>jc(e)?e[e.length-1]||0:e;function za(e){const t=kt(e)?e.get():e;return JS(t)?t.toValue():t}function tE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:nE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const lm=e=>(t,n)=>{const r=E.useContext(Va),o=E.useContext(Ma),i=()=>tE(e,t,r,o);return n?i():pn(i)};function nE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=za(i[p]);let{initial:a,animate:s}=e;const l=Ra(e),c=Yh(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!ja(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=Vc(e,p[f]);if(h){const{transitionEnd:y,transition:m,...v}=h;for(const g in v){let x=v[g];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[g]=x)}for(const g in y)o[g]=y[g]}}}return o}function Rc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(kt(o[a])||t.style&&kt(t.style[a])||em(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 rE={useVisualState:lm({scrapeMotionValuesFromProps:Rc,createRenderState:Dc})};function cm(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 um(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 dm=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 fm(e,t,n,r){um(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(dm.has(o)?o:Ac(o),t.attrs[o])}function pm(e,t,n){const r=Rc(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const i=yo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const hm=["x","y","width","height","cx","cy","r"],oE={useVisualState:lm({scrapeMotionValuesFromProps:pm,createRenderState:am,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<hm.length;s++){const l=hm[s];e[l]!==t[l]&&(a=!0)}a&&Qe.read(()=>{cm(n,r),Qe.render(()=>{Fc(r,o,Lc(n.tagName),e.transformTemplate),fm(n,r)})})}})};function iE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Nc(r)?oE:rE,preloadedFeatures:e,useRender:QS(o),createVisualElement:t,Component:r};return _S(a)}}function Si(e,t,n){const r=e.getProps();return Vc(r,t,n!==void 0?n:r.custom,e)}function $c(e,t){return e?e[t]||e.default||e:void 0}const mm=new Set(["width","height","top","left","right","bottom",...yo]);function zc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ba(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function aE([...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 Bc{constructor(){this.subscriptions=[]}add(t){return zc(this.subscriptions,t),()=>Ba(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 gm(e,t){return t?e*(1e3/t):0}let Ha;function sE(){Ha=void 0}const Cn={now:()=>(Ha===void 0&&Cn.set(Dt.isProcessing||uS.useManualTiming?Dt.timestamp:performance.now()),Ha),set:e=>{Ha=e,queueMicrotask(sE)}},vm=30,lE=e=>!isNaN(parseFloat(e)),Ei={current:void 0};class cE{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=lE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&La(!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 Bc);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 Ei.current&&Ei.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Cn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vm);return gm(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 xo(e,t){return new cE(e,t)}function uE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xo(n))}function dE(e,t){const n=Si(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=eE(i[a]);uE(e,a,s)}}function fE(e){return!!(kt(e)&&e.add)}function Hc(e,t){const n=e.getValue("willChange");if(fE(n))return n.add(t)}function ym(e){return e.props[Zh]}function Wc(e){let t;return()=>(t===void 0&&(t=e()),t)}const pE=Wc(()=>window.ScrollTimeline!==void 0);class hE{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(pE()&&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 bm extends hE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const hn=e=>e*1e3,kn=e=>e/1e3;function Wa(e){return typeof e=="function"}function xm(e,t){e.timeline=t,e.onfinish=null}const qc=e=>Array.isArray(e)&&typeof e[0]=="number",mE={linearEasing:void 0};function gE(e,t){const n=Wc(e);return()=>{var r;return(r=mE[t])!==null&&r!==void 0?r:n()}}const qa=gE(()=>{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},wm=(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 Tm(e){return!!(typeof e=="function"&&qa()||!e||typeof e=="string"&&(e in Uc||qa())||qc(e)||Array.isArray(e)&&e.every(Tm))}const Ci=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Uc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ci([0,.65,.55,1]),circOut:Ci([.55,0,1,.45]),backIn:Ci([.31,.01,.66,-.59]),backOut:Ci([.33,1.53,.69,.99])};function Sm(e,t){if(e)return typeof e=="function"&&qa()?wm(e,t):qc(e)?Ci(e):Array.isArray(e)?e.map(n=>Sm(n,t)||Uc.easeOut):Uc[e]}const Em=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,vE=1e-7,yE=12;function bE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Em(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>vE&&++s<yE);return a}function ki(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>bE(i,0,1,e,n);return i=>i===0||i===1?i:Em(o(i),t,r)}const Cm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,km=e=>t=>1-e(1-t),Pm=ki(.33,1.53,.69,.99),Gc=km(Pm),Am=Cm(Gc),_m=e=>(e*=2)<1?.5*Gc(e):.5*(2-Math.pow(2,-10*(e-1))),Yc=e=>1-Math.sin(Math.acos(e)),Im=km(Yc),Om=Cm(Yc),Mm=e=>/^0[^.\s]+$/u.test(e);function xE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Mm(e):!0}const Pi=e=>Math.round(e*1e5)/1e5,Kc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wE(e){return e==null}const TE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zc=(e,t)=>n=>!!(typeof n=="string"&&TE.test(n)&&n.startsWith(e)||t&&!wE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Kc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},SE=e=>Hn(0,255,e),Xc={...bo,transform:e=>Math.round(SE(e))},Or={test:Zc("rgb","red"),parse:Dm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xc.transform(e)+", "+Xc.transform(t)+", "+Xc.transform(n)+", "+Pi(wi.transform(r))+")"};function EE(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 Qc={test:Zc("#"),parse:EE,transform:Or.transform},wo={test:Zc("hsl","hue"),parse:Dm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+En.transform(Pi(t))+", "+En.transform(Pi(n))+", "+Pi(wi.transform(r))+")"},Vt={test:e=>Or.test(e)||Qc.test(e)||wo.test(e),parse:e=>Or.test(e)?Or.parse(e):wo.test(e)?wo.parse(e):Qc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Or.transform(e):wo.transform(e)},CE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function kE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Kc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(CE))===null||n===void 0?void 0:n.length)||0)>0}const Nm="number",Fm="color",PE="var",AE="var(",Lm="${}",_E=/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 Ai(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(_E,l=>(Vt.test(l)?(r.color.push(i),o.push(Fm),n.push(Vt.parse(l))):l.startsWith(AE)?(r.var.push(i),o.push(PE),n.push(l)):(r.number.push(i),o.push(Nm),n.push(parseFloat(l))),++i,Lm)).split(Lm);return{values:n,split:s,indexes:r,types:o}}function Vm(e){return Ai(e).values}function jm(e){const{split:t,types:n}=Ai(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===Nm?i+=Pi(o[a]):s===Fm?i+=Vt.transform(o[a]):i+=o[a]}return i}}const IE=e=>typeof e=="number"?0:e;function OE(e){const t=Vm(e);return jm(e)(t.map(IE))}const tr={test:kE,parse:Vm,createTransformer:jm,getAnimatableNone:OE},ME=new Set(["brightness","contrast","saturate","opacity"]);function DE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Kc)||[];if(!r)return e;const o=n.replace(r,"");let i=ME.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const NE=/\b([a-z-]*)\(.*?\)/gu,Jc={...tr,getAnimatableNone:e=>{const t=e.match(NE);return t?t.map(DE).join(" "):e}},FE={...Oc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:Jc,WebkitFilter:Jc},Rm=e=>FE[e];function $m(e,t){let n=Rm(e);return n!==Jc&&(n=tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const LE=new Set(["auto","none","0"]);function VE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!LE.has(i)&&Ai(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=$m(n,o)}const Mr=e=>e*180/Math.PI,eu=e=>{const t=Mr(Math.atan2(e[1],e[0]));return tu(t)},jE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:eu,rotateZ:eu,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},tu=e=>(e=e%360,e<0&&(e+=360),e),zm=eu,Bm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Hm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),RE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bm,scaleY:Hm,scale:e=>(Bm(e)+Hm(e))/2,rotateX:e=>tu(Mr(Math.atan2(e[6],e[5]))),rotateY:e=>tu(Mr(Math.atan2(-e[2],e[0]))),rotateZ:zm,rotate:zm,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 Wm(e){return e.includes("scale")?1:0}function nu(e,t){if(!e||e==="none")return Wm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=RE,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jE,o=s}if(!o)return Wm(t);const i=r[t],a=o[1].split(",").map(zE);return typeof i=="function"?i(a):a[i]}const $E=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return nu(n,t)};function zE(e){return parseFloat(e.trim())}const qm=e=>e===bo||e===Te,BE=new Set(["x","y","z"]),HE=yo.filter(e=>!BE.has(e));function WE(e){const t=[];return HE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const To={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})=>nu(t,"x"),y:(e,{transform:t})=>nu(t,"y")};To.translateX=To.x,To.translateY=To.y;const Dr=new Set;let ru=!1,ou=!1;function Um(){if(ou){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=WE(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)})}ou=!1,ru=!1,Dr.forEach(e=>e.complete()),Dr.clear()}function Gm(){Dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ou=!0)})}function qE(){Gm(),Um()}class iu{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),ru||(ru=!0,Qe.read(Gm),Qe.resolveKeyframes(Um))):(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 Ym=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),UE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function GE(e){const t=UE.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const YE=4;function Km(e,t,n=1){an(n<=YE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=GE(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Ym(a)?parseFloat(a):a}return Ic(o)?Km(o,t,n+1):o}const Zm=e=>t=>t.test(e),Xm=[bo,Te,En,er,VS,LS,{test:e=>e==="auto",parse:e=>e}],Qm=e=>Xm.find(Zm(e));class Jm extends iu{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ic(c))){const u=Km(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!mm.has(r)||t.length!==2)return;const[o,i]=t,a=Qm(o),s=Qm(i);if(a!==s)if(qm(a)&&qm(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++)xE(t[o])&&r.push(o);r.length&&VE(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=To[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]=To[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 eg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tr.test(e)||e==="0")&&!e.startsWith("url("));function KE(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 ZE(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=eg(o,t),s=eg(i,t);return mo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:KE(e)||(n==="spring"||Wa(n))&&r}const XE=e=>e!==null;function Ua(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(XE),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const QE=40;class tg{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>QE?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&qE(),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&&!ZE(t,r,o,i))if(a)this.options.duration=0;else{l&&l(Ua(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 Ga=2e4;function au(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ga;)t+=n,r=e.next(t);return t>=Ga?1/0:t}const ot=(e,t,n)=>e+(t-e)*n;function su(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=su(l,s,e+1/3),i=su(l,s,e),a=su(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ya(e,t){return n=>n>0?t:e}const lu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},eC=[Qc,Or,wo],tC=e=>eC.find(t=>t.test(e));function ng(e){const t=tC(e);if(mo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===wo&&(n=JE(n)),n}const rg=(e,t)=>{const n=ng(e),r=ng(t);if(!n||!r)return Ya(e,t);const o={...n};return i=>(o.red=lu(n.red,r.red,i),o.green=lu(n.green,r.green,i),o.blue=lu(n.blue,r.blue,i),o.alpha=ot(n.alpha,r.alpha,i),Or.transform(o))},nC=(e,t)=>n=>t(e(n)),_i=(...e)=>e.reduce(nC),cu=new Set(["none","hidden"]);function rC(e,t){return cu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function oC(e,t){return n=>ot(e,t,n)}function uu(e){return typeof e=="number"?oC:typeof e=="string"?Ic(e)?Ya:Vt.test(e)?rg:sC:Array.isArray(e)?og:typeof e=="object"?Vt.test(e)?rg:iC:Ya}function og(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>uu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function iC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=uu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function aC(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 sC=(e,t)=>{const n=tr.createTransformer(t),r=Ai(e),o=Ai(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?cu.has(e)&&!o.values.length||cu.has(t)&&!r.values.length?rC(e,t):_i(og(aC(r,o),o.values),n):(mo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ya(e,t))};function ig(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ot(e,t,n):uu(e)(e,t)}const lC=5;function ag(e,t,n){const r=Math.max(t-lC,0);return gm(n-e(r),t-r)}const ut={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},sg=.001;function cC({duration:e=ut.duration,bounce:t=ut.bounce,velocity:n=ut.velocity,mass:r=ut.mass}){let o,i;mo(e<=hn(ut.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Hn(ut.minDamping,ut.maxDamping,a),e=Hn(ut.minDuration,ut.maxDuration,kn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=du(c,a),h=Math.exp(-d);return sg-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),y=du(Math.pow(c,2),a);return(-o(c)+sg>0?-1:1)*((p-f)*h)/y}):(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=dC(o,i,s);if(e=hn(e),isNaN(l))return{stiffness:ut.stiffness,damping:ut.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const uC=12;function dC(e,t,n){let r=n;for(let o=1;o<uC;o++)r=r-e(r)/t(r);return r}function du(e,t){return e*Math.sqrt(1-t*t)}const fC=["duration","bounce"],pC=["stiffness","damping","mass"];function lg(e,t){return t.some(n=>e[n]!==void 0)}function hC(e){let t={velocity:ut.velocity,stiffness:ut.stiffness,damping:ut.damping,mass:ut.mass,isResolvedFromDuration:!1,...e};if(!lg(e,pC)&&lg(e,fC))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:ut.mass,stiffness:o,damping:i}}else{const n=cC(e);t={...t,...n,mass:ut.mass},t.isResolvedFromDuration=!0}return t}function fu(e=ut.visualDuration,t=ut.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}=hC({...n,velocity:-kn(n.velocity||0)}),h=p||0,y=c/(2*Math.sqrt(l*u)),m=a-i,v=kn(Math.sqrt(l/u)),g=Math.abs(m)<5;r||(r=g?ut.restSpeed.granular:ut.restSpeed.default),o||(o=g?ut.restDelta.granular:ut.restDelta.default);let x;if(y<1){const T=du(v,y);x=w=>{const C=Math.exp(-y*v*w);return a-C*((h+y*v*m)/T*Math.sin(T*w)+m*Math.cos(T*w))}}else if(y===1)x=T=>a-Math.exp(-v*T)*(m+(h+v*m)*T);else{const T=v*Math.sqrt(y*y-1);x=w=>{const C=Math.exp(-y*v*w),P=Math.min(T*w,300);return a-C*((h+y*v*m)*Math.sinh(P)+T*m*Math.cosh(P))/T}}const S={calculatedDuration:f&&d||null,next:T=>{const w=x(T);if(f)s.done=T>=d;else{let C=0;y<1&&(C=T===0?hn(h):ag(x,T,w));const P=Math.abs(C)<=r,I=Math.abs(a-w)<=o;s.done=P&&I}return s.value=s.done?a:w,s},toString:()=>{const T=Math.min(au(S),Ga),w=wm(C=>S.next(T*C).value,T,30);return T+"ms "+w}};return S}function cg({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,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l;let y=n*t;const m=d+y,v=a===void 0?m:a(m);v!==m&&(y=v-d);const g=P=>-y*Math.exp(-P/r),x=P=>v+g(P),S=P=>{const I=g(P),A=x(P);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let T,w;const C=P=>{f(p.value)&&(T=P,w=fu({keyframes:[p.value,h(p.value)],velocity:ag(x,P,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:P=>{let I=!1;return!w&&T===void 0&&(I=!0,S(P),C(P)),T!==void 0&&P>=T?w.next(P-T):(!I&&S(P),p)}}}const mC=ki(.42,0,1,1),gC=ki(0,0,.58,1),ug=ki(.42,0,.58,1),dg=e=>Array.isArray(e)&&typeof e[0]!="number",fg={linear:Ut,easeIn:mC,easeInOut:ug,easeOut:gC,circIn:Yc,circInOut:Om,circOut:Im,backIn:Gc,backInOut:Am,backOut:Pm,anticipate:_m},pu=e=>{if(qc(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ki(t,n,r,o)}else if(typeof e=="string")return an(fg[e]!==void 0,`Invalid easing type '${e}'`),fg[e];return e};function vC(e,t,n){const r=[],o=n||ig,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=_i(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=vC(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 hg(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 mg(e){const t=[0];return hg(t,e.length-1),t}function yC(e,t){return e.map(n=>n*t)}function bC(e,t){return e.map(()=>t||ug).splice(0,e.length-1)}function Ii({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=dg(r)?r.map(pu):pu(r),i={done:!1,value:t[0]},a=yC(n&&n.length===t.length?n:mg(t),e),s=pg(a,t,{ease:Array.isArray(o)?o:bC(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const xC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>Bn(t),now:()=>Dt.isProcessing?Dt.timestamp:Cn.now()}},wC={decay:cg,inertia:cg,tween:Ii,keyframes:Ii,spring:fu},TC=e=>e/100;class hu extends tg{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)||iu,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=Wa(n)?n:wC[n]||Ii;let l,c;process.env.NODE_ENV!=="production"&&s!==Ii&&an(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Ii&&typeof t[0]!="number"&&(l=_i(TC,ig(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=au(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:h,repeatDelay:y,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 v=this.currentTime-p*(this.speed>=0?1:-1),g=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,S=i;if(f){const P=Math.min(this.currentTime,u)/d;let I=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(A=1-A,y&&(A-=y/d)):h==="mirror"&&(S=a)),x=Hn(0,1,A)*d}const T=g?{done:!1,value:l[0]}:S.next(x);s&&(T.value=s(T.value));let{done:w}=T;!g&&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=Ua(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=xC,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 SC=new Set(["opacity","clipPath","filter","transform"]);function EC(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=Sm(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 CC=Wc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ka=10,kC=2e4;function PC(e){return Wa(e.type)||e.type==="spring"||!Tm(e.ease)}function AC(e,t){const n=new hu({...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<kC;)r=n.sample(i),o.push(r.value),i+=Ka;return{times:void 0,keyframes:o,duration:i-Ka,ease:"linear"}}const gg={anticipate:_m,backInOut:Am,circInOut:Om};function _C(e){return e in gg}class vg extends tg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Jm(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"&&qa()&&_C(i)&&(i=gg[i]),PC(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...y}=this.options,m=AC(t,y);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=EC(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(xm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Ua(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;xm(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 hu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),y=hn(this.time);c.setWithVelocity(h.sample(y-Ka).value,h.sample(y).value,Ka)}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 CC()&&r&&SC.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const IC={type:"spring",stiffness:500,damping:25,restSpeed:10},OC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MC={type:"keyframes",duration:.8},DC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},NC=(e,{keyframes:t})=>t.length>2?MC:_r.has(e)?e.startsWith("scale")?OC(t[1]):IC:DC;function FC({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 mu=(e,t,n,r={},o,i)=>a=>{const s=$c(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};FC(s)||(u={...u,...NC(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=Ua(u.keyframes,s);if(p!==void 0)return Qe.update(()=>{u.onUpdate(p),u.onComplete()}),new bm([])}return!i&&vg.supports(u)?new vg(u):new hu(u)};function LC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function gu(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&&LC(u,d))continue;const h={delay:n,...$c(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=ym(e);if(v){const g=window.MotionHandoffAnimation(v,d,Qe);g!==null&&(h.startTime=g,y=!0)}}Hc(e,d),p.start(mu(d,p,f,e.shouldReduceMotion&&mm.has(d)?{type:!1}:h,e,y));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{Qe.update(()=>{s&&dE(e,s)})}),c}function vu(e,t,n={}){var r;const o=Si(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(gu(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return VC(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 VC(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(jC).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(vu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function jC(e,t){return e.sortNodePosition(t)}function RC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>vu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=vu(e,t,n);else{const o=typeof t=="function"?Si(e,t,n.custom):t;r=Promise.all(gu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function yg(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 $C=kc.length;function bg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?bg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$C;n++){const r=kc[n],o=e.props[r];(bi(o)||o===!1)&&(t[r]=o)}return t}const zC=[...Cc].reverse(),BC=Cc.length;function HC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>RC(e,n,r)))}function WC(e){let t=HC(e),n=xg(),r=!0;const o=l=>(c,u)=>{var d;const p=Si(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...y}=p;c={...c,...y,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=bg(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<BC;m++){const v=zC[m],g=n[v],x=c[v]!==void 0?c[v]:u[v],S=bi(x),T=v===l?g.isActive:null;T===!1&&(h=m);let w=x===u[v]&&x!==c[v]&&S;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...f},!g.isActive&&T===null||!x&&!g.prevProp||ja(x)||typeof x=="boolean")continue;const C=qC(g.prevProp,x);let P=C||v===l&&g.isActive&&!w&&S||m>h&&S,I=!1;const A=Array.isArray(x)?x:[x];let F=A.reduce(o(v),{});T===!1&&(F={});const{prevResolvedValues:L={}}=g,R={...L,...F},k=j=>{P=!0,p.has(j)&&(I=!0,p.delete(j)),g.needsAnimating[j]=!0;const M=e.getValue(j);M&&(M.liveStyle=!1)};for(const j in R){const M=F[j],$=L[j];if(f.hasOwnProperty(j))continue;let O=!1;jc(M)&&jc($)?O=!yg(M,$):O=M!==$,O?M!=null?k(j):p.add(j):M!==void 0&&p.has(j)?k(j):g.protectedKeys[j]=!0}g.prevProp=x,g.prevResolvedValues=F,g.isActive&&(f={...f,...F}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(w&&C)||I)&&d.push(...A.map(j=>({animation:j,options:{type:v}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const v=Si(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}p.forEach(v=>{const g=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),m[v]=g??null}),d.push({animation:m})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?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=xg(),r=!0}}}function qC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yg(t,e):!1}function Nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xg(){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 UC extends nr{constructor(t){super(t),t.animationState||(t.animationState=WC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ja(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let GC=0;class YC extends nr{constructor(){super(...arguments),this.id=GC++}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 KC={animation:{Feature:UC},exit:{Feature:YC}},mn={x:!1,y:!1};function wg(){return mn.x||mn.y}function ZC(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 Oi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const yu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Mi(e){return{point:{x:e.pageX,y:e.pageY}}}const XC=e=>t=>yu(t)&&e(t,Mi(t));function Di(e,t,n,r){return Oi(e,t,XC(n),r)}function Tg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function QC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function JC(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 Sg=1e-4,ek=1-Sg,tk=1+Sg,Eg=.01,nk=0-Eg,rk=0+Eg;function Bt(e){return e.max-e.min}function ok(e,t,n){return Math.abs(e-t)<=n}function Cg(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>=ek&&e.scale<=tk||isNaN(e.scale))&&(e.scale=1),(e.translate>=nk&&e.translate<=rk||isNaN(e.translate))&&(e.translate=0)}function Ni(e,t,n,r){Cg(e.x,t.x,n.x,r?r.originX:void 0),Cg(e.y,t.y,n.y,r?r.originY:void 0)}function kg(e,t,n){e.min=n.min+t.min,e.max=e.min+Bt(t)}function ik(e,t,n){kg(e.x,t.x,n.x),kg(e.y,t.y,n.y)}function Pg(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Fi(e,t,n){Pg(e.x,t.x,n.x),Pg(e.y,t.y,n.y)}const Ag=()=>({translate:0,scale:1,origin:0,originPoint:0}),So=()=>({x:Ag(),y:Ag()}),_g=()=>({min:0,max:0}),mt=()=>({x:_g(),y:_g()});function sn(e){return[e("x"),e("y")]}function bu(e){return e===void 0||e===1}function xu({scale:e,scaleX:t,scaleY:n}){return!bu(e)||!bu(t)||!bu(n)}function Fr(e){return xu(e)||Ig(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ig(e){return Og(e.x)||Og(e.y)}function Og(e){return e&&e!=="0%"}function Za(e,t,n){const r=e-n,o=t*r;return n+o}function Mg(e,t,n,r,o){return o!==void 0&&(e=Za(e,o,r)),Za(e,n,r)+t}function wu(e,t=0,n=1,r,o){e.min=Mg(e.min,t,n,r,o),e.max=Mg(e.max,t,n,r,o)}function Dg(e,{x:t,y:n}){wu(e.x,t.translate,t.scale,t.originPoint),wu(e.y,n.translate,n.scale,n.originPoint)}const Ng=.999999999999,Fg=1.0000000000001;function ak(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&&Co(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Dg(e,a)),r&&Fr(i.latestValues)&&Co(e,i.latestValues))}t.x<Fg&&t.x>Ng&&(t.x=1),t.y<Fg&&t.y>Ng&&(t.y=1)}function Eo(e,t){e.min=e.min+t,e.max=e.max+t}function Lg(e,t,n,r,o=.5){const i=ot(e.min,e.max,o);wu(e,t,n,i,r)}function Co(e,t){Lg(e.x,t.x,t.scaleX,t.scale,t.originX),Lg(e.y,t.y,t.scaleY,t.scale,t.originY)}function Vg(e,t){return Tg(JC(e.getBoundingClientRect(),t))}function sk(e,t,n){const r=Vg(e,n),{scroll:o}=t;return o&&(Eo(r.x,o.offset.x),Eo(r.y,o.offset.y)),r}const jg=({current:e})=>e?e.ownerDocument.defaultView:null,Rg=(e,t)=>Math.abs(e-t);function lk(e,t){const n=Rg(e.x,t.x),r=Rg(e.y,t.y);return Math.sqrt(n**2+r**2)}class $g{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=Su(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=lk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:y}=Dt;this.history.push({...h,timestamp:y});const{onStart:m,onMove:v}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Tu(p,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Su(d.type==="pointercancel"?this.lastMoveEventInfo:Tu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!yu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Mi(t),s=Tu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Su(s,this.history)),this.removeListeners=_i(Di(this.contextWindow,"pointermove",this.handlePointerMove),Di(this.contextWindow,"pointerup",this.handlePointerUp),Di(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function Tu(e,t){return t?{point:t(e.point)}:e}function zg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Su({point:e},t){return{point:e,delta:zg(e,Bg(t)),offset:zg(e,ck(t)),velocity:uk(t,.1)}}function ck(e){return e[0]}function Bg(e){return e[e.length-1]}function uk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Bg(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 dk(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 Hg(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 fk(e,{top:t,left:n,bottom:r,right:o}){return{x:Hg(e.x,n,o),y:Hg(e.y,t,r)}}function Wg(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 pk(e,t){return{x:Wg(e.x,t.x),y:Wg(e.y,t.y)}}function hk(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 mk(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 Eu=.35;function gk(e=Eu){return e===!1?e=0:e===!0&&(e=Eu),{x:qg(e,"left","right"),y:qg(e,"top","bottom")}}function qg(e,t,n){return{min:Ug(e,t),max:Ug(e,n)}}function Ug(e,t){return typeof e=="number"?e:e[t]||0}const vk=new WeakMap;class yk{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Mi(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZC(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 v=this.getAxisMotionValue(m).get()||0;if(En.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[m];x&&(v=Bt(x)*(parseFloat(v)/100))}}this.originPoint[m]=v}),h&&Qe.postRender(()=>h(u,d)),Hc(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=bk(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),y&&y(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 $g(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:jg(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||!Xa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=dk(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&&vo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=fk(o.layoutBox,n):this.constraints=!1,this.elastic=gk(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=mk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!vo(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=sk(r,o.root,this.visualElement.getTransformPagePoint());let a=pk(o.layout.layoutBox,i);if(n){const s=n(QC(a));this.hasMutatedConstraints=!!s,s&&(a=Tg(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(!Xa(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 Hc(this.visualElement,t),r.start(mu(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(!Xa(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(!vo(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]=hk({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(!Xa(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;vk.set(this.visualElement,this);const t=this.visualElement.current,n=Di(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();vo(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=Oi(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=Eu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Xa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xk extends nr{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new yk(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 Gg=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class wk extends nr{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new $g(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Gg(t),onStart:Gg(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Qe.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Di(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Qa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Li={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=Yg(e,t.target.x),r=Yg(e,t.target.y);return`${n}% ${r}%`}},Tk={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 Sk extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;FS(Ek),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Qa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,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(),Pc.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 Kg(e){const[t,n]=jh(),r=E.useContext(yi);return b.jsx(Sk,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(Xh),isPresent:t,safeToRemove:n})}const Ek={borderRadius:{...Li,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Li,borderTopRightRadius:Li,borderBottomLeftRadius:Li,borderBottomRightRadius:Li,boxShadow:Tk};function Zg(e,t,n){const r=kt(e)?e:xo(e);return r.start(mu("",r,t,n)),r.animation}function Xg(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Ck=(e,t)=>e.depth-t.depth;class kk{constructor(){this.children=[],this.isDirty=!1}add(t){zc(this.children,t),this.isDirty=!0}remove(t){Ba(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ck),this.isDirty=!1,this.children.forEach(t)}}function Pk(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 Qg=["TopLeft","TopRight","BottomLeft","BottomRight"],Ak=Qg.length,Jg=e=>typeof e=="string"?parseFloat(e):e,ev=e=>typeof e=="number"||Te.test(e);function _k(e,t,n,r,o,i){o?(e.opacity=ot(0,n.opacity!==void 0?n.opacity:1,Ik(r)),e.opacityExit=ot(t.opacity!==void 0?t.opacity:1,0,Ok(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<Ak;a++){const s=`border${Qg[a]}Radius`;let l=tv(t,s),c=tv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ev(l)===ev(c)?(e[s]=Math.max(ot(Jg(l),Jg(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 tv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ik=nv(0,.5,Im),Ok=nv(.5,.95,Ut);function nv(e,t,n){return r=>r<e?0:r>t?1:n(Ir(e,t,r))}function rv(e,t){e.min=t.min,e.max=t.max}function ln(e,t){rv(e.x,t.x),rv(e.y,t.y)}function ov(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iv(e,t,n,r,o){return e-=t,e=Za(e,1/n,r),o!==void 0&&(e=Za(e,1/o,r)),e}function Mk(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=iv(e.min,t,n,s,o),e.max=iv(e.max,t,n,s,o)}function av(e,t,[n,r,o],i,a){Mk(e,t[n],t[r],t[o],t.scale,i,a)}const Dk=["x","scaleX","originX"],Nk=["y","scaleY","originY"];function sv(e,t,n,r){av(e.x,t,Dk,n?n.x:void 0,r?r.x:void 0),av(e.y,t,Nk,n?n.y:void 0,r?r.y:void 0)}function lv(e){return e.translate===0&&e.scale===1}function cv(e){return lv(e.x)&&lv(e.y)}function uv(e,t){return e.min===t.min&&e.max===t.max}function Fk(e,t){return uv(e.x,t.x)&&uv(e.y,t.y)}function dv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fv(e,t){return dv(e.x,t.x)&&dv(e.y,t.y)}function pv(e){return Bt(e.x)/Bt(e.y)}function hv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Lk{constructor(){this.members=[]}add(t){zc(this.members,t),t.scheduleRender()}remove(t){if(Ba(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 Vk(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 Cu=["","X","Y","Z"],jk={visibility:"hidden"},mv=1e3;let Rk=0;function ku(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ym(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&&gv(r)}function vv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Rk++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Bk),this.nodes.forEach(Gk),this.nodes.forEach(Yk),this.nodes.forEach(Hk)},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 kk)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Bc),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=Xg(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=Pk(p,250),Qa.hasAnimatedSinceResize&&(Qa.hasAnimatedSinceResize=!1,this.nodes.forEach(bv))})}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 y=this.options.transition||u.getDefaultTransition()||Jk,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),g=!this.targetLayout||!fv(this.targetLayout,h),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...$c(y,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||bv(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(Kk),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&&gv(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(yv);return}this.isUpdating||this.nodes.forEach(qk),this.isUpdating=!1,this.nodes.forEach(Uk),this.nodes.forEach($k),this.nodes.forEach(zk),this.clearAllSnapshots();const s=Cn.now();Dt.delta=Hn(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Ec.update.process(Dt),Ec.preRender.process(Dt),Ec.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Wk),this.sharedNodes.forEach(Zk)}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=mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!cv(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)),eP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return mt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(tP))){const{scroll:u}=this.root;u&&(Eo(l.x,u.offset.x),Eo(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=mt();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),Eo(l.x,d.offset.x),Eo(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=mt();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&&Co(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Fr(u.latestValues)&&Co(l,u.latestValues)}return Fr(this.latestValues)&&Co(l,this.latestValues),l}removeTransform(a){const s=mt();ln(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Fr(c.latestValues))continue;xu(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();ln(u,d),sv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Fr(this.latestValues)&&sv(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=mt(),this.relativeTargetOrigin=mt(),Fi(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=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ik(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Dg(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=mt(),this.relativeTargetOrigin=mt(),Fi(this.relativeTargetOrigin,this.target,f.target),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||xu(this.parent.latestValues)||Ig(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;ak(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=mt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ov(this.prevProjectionDelta.x,this.projectionDelta.x),ov(this.prevProjectionDelta.y,this.projectionDelta.y)),Ni(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!hv(this.projectionDelta.x,this.prevProjectionDelta.x)||!hv(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=So(),this.projectionDelta=So(),this.projectionDeltaWithTransform=So()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=So();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=mt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,y=f!==h,m=this.getStack(),v=!m||m.members.length<=1,g=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(Qk));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const T=S/1e3;xv(d.x,a.x,T),xv(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xk(this.relativeTarget,this.relativeTargetOrigin,p,T),x&&Fk(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=mt()),ln(x,this.relativeTarget)),y&&(this.animationValues=u,_k(u,c,this.latestValues,T,g,v)),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(()=>{Qa.hasAnimatedSinceResize=!0,this.currentAnimation=Zg(0,mv,{...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(mv),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&&Cv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();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),Co(s,u),Ni(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Lk),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&&ku("z",a,c,this.animationValues);for(let u=0;u<Cu.length;u++)ku(`rotate${Cu[u]}`,a,c,this.animationValues),ku(`skew${Cu[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 jk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=za(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 y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=za(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fr(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Vk(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 y in xi){if(p[y]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:g}=xi[y],x=c.transform==="none"?p[y]:m(p[y],d);if(v){const S=v.length;for(let T=0;T<S;T++)c[v[T]]=x}else g?this.options.visualElement.renderState.vars[y]=x:c[y]=x}return this.options.layoutId&&(c.pointerEvents=d===this?za(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(yv),this.root.sharedNodes.clear()}}}function $k(e){e.updateLayout()}function zk(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}):Cv(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=So();Ni(s,r,n.layoutBox);const l=So();a?Ni(l,e.applyTransform(o,!0),n.measuredBox):Ni(l,r,n.layoutBox);const c=!cv(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=mt();Fi(h,n.layoutBox,p.layoutBox);const y=mt();Fi(y,r,f.layoutBox),fv(h,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,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 Bk(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 Hk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Wk(e){e.clearSnapshot()}function yv(e){e.clearMeasurements()}function qk(e){e.isLayoutDirty=!1}function Uk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gk(e){e.resolveTargetDelta()}function Yk(e){e.calcProjection()}function Kk(e){e.resetSkewAndRotation()}function Zk(e){e.removeLeadSnapshot()}function xv(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 wv(e,t,n,r){e.min=ot(t.min,n.min,r),e.max=ot(t.max,n.max,r)}function Xk(e,t,n,r){wv(e.x,t.x,n.x,r),wv(e.y,t.y,n.y,r)}function Qk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Jk={duration:.45,ease:[.4,0,.1,1]},Tv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Sv=Tv("applewebkit/")&&!Tv("chrome/")?Math.round:Ut;function Ev(e){e.min=Sv(e.min),e.max=Sv(e.max)}function eP(e){Ev(e.x),Ev(e.y)}function Cv(e,t,n){return e==="position"||e==="preserve-aspect"&&!ok(pv(t),pv(n),.2)}function tP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const nP=vv({attachResizeListener:(e,t)=>Oi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pu={current:void 0},kv=vv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pu.current){const e=new nP({});e.mount(window),e.setOptions({layoutScroll:!0}),Pu.current=e}return Pu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rP={pan:{Feature:wk},drag:{Feature:xk,ProjectionNode:kv,MeasureLayout:Kg}};function Pv(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 Av(e,t){const n=Pv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function _v(e){return!(e.pointerType==="touch"||wg())}function oP(e,t,n={}){const[r,o,i]=Av(e,n),a=s=>{if(!_v(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{_v(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Iv(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,Mi(t)))}class iP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=oP(t,(n,r)=>(Iv(this.node,r,"Start"),o=>Iv(this.node,o,"End"))))}unmount(){}}class aP 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=_i(Oi(this.node.current,"focus",()=>this.onFocus()),Oi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ov=(e,t)=>t?e===t?!0:Ov(e,t.parentElement):!1,sP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lP(e){return sP.has(e.tagName)||e.tabIndex!==-1}const Vi=new WeakSet;function Mv(e){return t=>{t.key==="Enter"&&e(t)}}function Au(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Mv(()=>{if(Vi.has(n))return;Au(n,"down");const o=Mv(()=>{Au(n,"up")}),i=()=>Au(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Dv(e){return yu(e)&&!wg()}function uP(e,t,n={}){const[r,o,i]=Av(e,n),a=s=>{const l=s.currentTarget;if(!Dv(s)||Vi.has(l))return;Vi.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Dv(f)||!Vi.has(l))&&(Vi.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Ov(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=>cP(c,o)),!lP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Nv(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,Mi(t)))}class dP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=uP(t,(n,r)=>(Nv(this.node,r,"Start"),(o,{success:i})=>Nv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _u=new WeakMap,Iu=new WeakMap,fP=e=>{const t=_u.get(e.target);t&&t(e)},pP=e=>{e.forEach(fP)};function hP({root:e,...t}){const n=e||document;Iu.has(n)||Iu.set(n,{});const r=Iu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(pP,{root:e,...t})),r[o]}function mP(e,t,n){const r=hP(t);return _u.set(e,n),r.observe(e),()=>{_u.delete(e),r.unobserve(e)}}const gP={some:0,all:1};class vP 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:gP[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 mP(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(yP(t,n))&&this.startObserver()}unmount(){}}function yP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bP={inView:{Feature:vP},tap:{Feature:dP},focus:{Feature:aP},hover:{Feature:iP}},xP={layout:{ProjectionNode:kv,MeasureLayout:Kg}},Ou={current:null},Fv={current:!1};function wP(){if(Fv.current=!0,!!Sc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ou.current=e.matches;e.addListener(t),t()}else Ou.current=!1}const TP=[...Xm,Vt,tr],SP=e=>TP.find(Zm(e)),ji=new WeakMap;function EP(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"&&La(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,xo(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,xo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Lv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Vv{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=iu,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=Ra(n),this.isVariantNode=Yh(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,ji.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Fv.current||wP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ou.current,process.env.NODE_ENV!=="production"&&La(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 go){const n=go[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Lv.length;r++){const o=Lv[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=EP(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=xo(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"&&(Ym(o)||Mm(o))?o=parseFloat(o):!SP(o)&&tr.test(n)&&(o=$m(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=Vc(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 Bc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class jv extends Vv{constructor(){super(...arguments),this.KeyframeResolver=Jm}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 CP(e){return window.getComputedStyle(e)}class Rv extends jv{constructor(){super(...arguments),this.type="html",this.renderInstance=um}readValueFromInstance(t,n){if(_r.has(n))return $E(t,n);{const r=CP(t),o=(_c(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Vg(t,n)}build(t,n,r){Mc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Rc(t,n,r)}}class $v extends jv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&cm(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_r.has(n)){const r=Rm(n);return r&&r.default||0}return n=dm.has(n)?n:Ac(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){Fc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){fm(t,n,r,o)}mount(t){this.isSVGTag=Lc(t.tagName),super.mount(t)}}const kP=(e,t)=>Nc(e)?new $v(t):new Rv(t,{allowProjection:e!==E.Fragment}),PP=iE({...KC,...bP,...rP,...xP},kP),gt=TS(PP);function AP(e){return E.useEffect(()=>()=>e(),[])}function ko(e){const t=pn(()=>xo(e)),{isStatic:n}=E.useContext(ho);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function zv(e,t){const n=ko(t()),r=()=>n.set(t());return r(),Oa(()=>{const o=()=>Qe.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Bn(r)}}),n}const _P=e=>e&&typeof e=="object"&&e.mix,IP=e=>_P(e)?e.mix:void 0;function OP(...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:IP(i[0]),...a});return t?s(r):s}function MP(e){Ei.current=[],e();const t=zv(Ei.current,e);return Ei.current=void 0,t}function DP(e,t,n,r){if(typeof e=="function")return MP(e);const o=typeof t=="function"?t:OP(t,n,r);return Array.isArray(e)?Bv(e,o):Bv([e],([i])=>o(i))}function Bv(e,t){const n=pn(()=>[]);return zv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function NP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(au(r),Ga);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:kn(o)}}const FP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Hv(e,t){return dg(e)?e[FP(0,e.length,t)]:e}function Mu(e){return typeof e=="object"&&!Array.isArray(e)}function Wv(e,t,n,r){return typeof e=="string"&&Mu(t)?Pv(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function LP(e,t,n){return e*(t+1)}function qv(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 VP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ba(e,o),r--)}}function jP(e,t,n,r,o,i){VP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ot(o,i,r[a]),easing:Hv(n,a)})}function RP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function $P(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const zP="easeInOut",BP=20;function HP(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,qv(d,h.at,u,c));continue}let[y,m,v={}]=h;v.at!==void 0&&(d=qv(d,v.at,u,c));let g=0;const x=(S,T,w,C=0,P=0)=>{const I=WP(S),{delay:A=0,times:F=mg(I),type:L="keyframes",repeat:R,repeatType:k,repeatDelay:D=0,...N}=T;let{ease:j=t.ease||"easeOut",duration:M}=T;const $=typeof A=="function"?A(C,P):A,O=I.length,B=Wa(L)?L:o==null?void 0:o[L];if(O<=2&&B){let K=100;if(O===2&&GP(I)){const V=I[1]-I[0];K=Math.abs(V)}const U={...N};M!==void 0&&(U.duration=hn(M));const Y=NP(U,K,B);j=Y.ease,M=Y.duration}M??(M=i);const Q=d+$;F.length===1&&F[0]===0&&(F[1]=1);const oe=F.length-I.length;if(oe>0&&hg(F,oe),I.length===1&&I.unshift(null),R){an(R<BP,"Repeat count too high, must be less than 20"),M=LP(M,R);const K=[...I],U=[...F];j=Array.isArray(j)?[...j]:[j];const Y=[...j];for(let V=0;V<R;V++){I.push(...K);for(let W=0;W<K.length;W++)F.push(U[W]+(V+1)),j.push(W===0?"linear":Hv(Y,W-1))}RP(F,R)}const J=Q+M;jP(w,I,j,F,Q,J),g=Math.max($+M,g),p=Math.max(J,p)};if(kt(y)){const S=Uv(y,s);x(m,v,Gv("default",S))}else{const S=Wv(y,m,r,l),T=S.length;for(let w=0;w<T;w++){m=m,v=v;const C=S[w],P=Uv(C,s);for(const I in m)x(m[I],qP(v,I),Gv(I,P),w,T)}}u=d,d+=g}return s.forEach((f,h)=>{for(const y in f){const m=f[y];m.sort($P);const v=[],g=[],x=[];for(let T=0;T<m.length;T++){const{at:w,value:C,easing:P}=m[T];v.push(C),g.push(Ir(0,p,w)),x.push(P||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),x.unshift(zP)),g[g.length-1]!==1&&(g.push(1),v.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[y]=v,S.transition[y]={...t,duration:p,ease:x,times:g,...n}}}),a}function Uv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Gv(e,t){return t[e]||(t[e]=[]),t[e]}function WP(e){return Array.isArray(e)?e:[e]}function qP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const UP=e=>typeof e=="number",GP=e=>e.every(UP);function YP(e,t){return e in t}class KP extends Vv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(YP(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function ZP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Xg(e)?new $v(t):new Rv(t);n.mount(e),ji.set(e,n)}function XP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new KP(t);n.mount(e),ji.set(e,n)}function QP(e,t){return kt(e)||typeof e=="number"||typeof e=="string"&&!Mu(t)}function Yv(e,t,n,r){const o=[];if(QP(e,t))o.push(Zg(e,Mu(t)&&t.default||t,n&&(n.default||n)));else{const i=Wv(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?ZP:XP;ji.has(l)||c(l);const u=ji.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...gu(u,{...t,transition:d},{}))}}return o}function JP(e,t,n){const r=[];return HP(e,t,n,{spring:fu}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Yv(s,i,a))}),r}function eA(e){return Array.isArray(e)&&e.some(Array.isArray)}function tA(e){function t(n,r,o){let i=[];eA(n)?i=JP(n,r,e):i=Yv(n,r,o,e);const a=new bm(i);return e&&e.animations.push(a),a}return t}function nA(){const e=pn(()=>({current:null,animations:[]})),t=pn(()=>tA(e));return AP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class rA{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 oA=()=>new rA;function iA(){return pn(oA)}function aA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function sA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:aA(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=pu(r)(l/c)*c}return t+l}}const Kv=E.createContext(null);function lA(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?aE(e,o,o+i):e}function cA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=pn(()=>gt[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(dA)},updateOrder:(d,p,f)=>{if(c.current)return;const h=lA(l,d,p,f);l!==h&&(c.current=!0,r(h.map(uA).filter(y=>o.indexOf(y)!==-1)))}};return E.useEffect(()=>{c.current=!1}),b.jsx(s,{...i,ref:a,ignoreStrict:!0,children:b.jsx(Kv.Provider,{value:u,children:e})})}const Zv=E.forwardRef(cA);function uA(e){return e.value}function dA(e,t){return e.layout.min-t.layout.min}function Xv(e,t=0){return kt(e)?e:ko(t)}function fA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=pn(()=>gt[r]),c=E.useContext(Kv),u={x:Xv(t.x),y:Xv(t.y)},d=DP([u.x,u.y],([y,m])=>y||m?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return b.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(y,m)=>{const{velocity:v}=m;v[p]&&h(n,u[p].get(),v[p]),o&&o(y,m)},onLayoutMeasure:y=>f(n,y),ref:s,ignoreStrict:!0,children:e})}const Qv=E.forwardRef(fA);/**
|
|
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);/**
|
|
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
|
|
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();/**
|
|
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
|
|
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"};/**
|
|
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
|
|
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]]));/**
|
|
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(
|
|
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};/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
57
|
+
*/const Fu=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
|
|
62
|
+
*/const CA=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
|
|
67
|
+
*/const Lu=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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
97
|
+
*/const AA=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
|
|
102
|
+
*/const Vu=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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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 Lu=xt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),iy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},_A={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},ay=e=>b.jsx(gt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:iy,exit:iy.false,transition:_A,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:$e("aria-hidden:pointer-events-none",e.className),children:e.children}),IA=so("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"}}),OA=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:$e("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:b.jsx(ay,{"data-open":!!i,open:!!i,children:b.jsxs(on,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:$e(IA({theme:n}),t),children:[b.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?b.jsx(ny,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?b.jsx(oy,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?b.jsx(kA,{"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(Lu,{size:20})}):null]})})})}),sy=6048e5,MA=864e5,DA=6e4,NA=36e5,FA=1e3,ly=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ly in e?e[ly](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ye(e,t){return rt(t||e,e)}function Ja(e,t,n){const r=Ye(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 cy(e,t,n){const r=Ye(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 Ao(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=Ye(e,n==null?void 0:n.in),d=o||r?cy(u,o+r*12):u,p=a||i?Ja(d,a+i*7):d,f=l+s*60,y=(c+f*60)*1e3;return rt(e,+p+y)}let LA={};function Lr(){return LA}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=Ye(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function _o(e,t){return Pn(e,{...t,weekStartsOn:1})}function uy(e,t){const n=Ye(e,t==null?void 0:t.in),r=n.getFullYear(),o=rt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=_o(o),a=rt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=_o(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function es(e){const t=Ye(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 ts(e,...t){const n=rt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Io(e,t){const n=Ye(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function VA(e,t,n){const[r,o]=ts(n==null?void 0:n.in,e,t),i=Io(r),a=Io(o),s=+i-es(i),l=+a-es(a);return Math.round((s-l)/MA)}function jA(e,t){const n=uy(e,t),r=rt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),_o(r)}function RA(e){return rt(e,Date.now())}function $A(e,t,n){const[r,o]=ts(n==null?void 0:n.in,e,t);return+Io(r)==+Io(o)}function zA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dy(e){return!(!zA(e)&&typeof e!="number"||isNaN(+Ye(e)))}function BA(e,t){const[n,r]=ts(e,t.start,t.end);return{start:n,end:r}}function fy(e,t){const{start:n,end:r}=BA(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 py(e,t){const n=Ye(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function HA(e,t){const n=Ye(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function WA(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=Ye(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 qA={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"}},UA=(e,t,n)=>{let r;const o=qA[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 Vu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const GA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},YA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ZA={date:Vu({formats:GA,defaultWidth:"full"}),time:Vu({formats:YA,defaultWidth:"full"}),dateTime:Vu({formats:KA,defaultWidth:"full"})},XA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QA=(e,t,n,r)=>XA[e];function Ri(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 JA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},e_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},t_={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"]},n_={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"]},r_={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"}},o_={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"}},i_={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:Ri({values:JA,defaultWidth:"wide"}),quarter:Ri({values:e_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ri({values:t_,defaultWidth:"wide"}),day:Ri({values:n_,defaultWidth:"wide"}),dayPeriod:Ri({values:r_,defaultWidth:"wide",formattingValues:o_,defaultFormattingWidth:"wide"})};function $i(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)?s_(s,d=>d.test(a)):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 a_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function s_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function l_(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 c_=/^(\d+)(th|st|nd|rd)?/i,u_=/\d+/i,d_={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},f_={any:[/^b/i,/^(a|c)/i]},p_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},h_={any:[/1/i,/2/i,/3/i,/4/i]},m_={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},g_={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]},v_={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},y_={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]},b_={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},x_={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}},w_={ordinalNumber:l_({matchPattern:c_,parsePattern:u_,valueCallback:e=>parseInt(e,10)}),era:$i({matchPatterns:d_,defaultMatchWidth:"wide",parsePatterns:f_,defaultParseWidth:"any"}),quarter:$i({matchPatterns:p_,defaultMatchWidth:"wide",parsePatterns:h_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:$i({matchPatterns:m_,defaultMatchWidth:"wide",parsePatterns:g_,defaultParseWidth:"any"}),day:$i({matchPatterns:v_,defaultMatchWidth:"wide",parsePatterns:y_,defaultParseWidth:"any"}),dayPeriod:$i({matchPatterns:b_,defaultMatchWidth:"any",parsePatterns:x_,defaultParseWidth:"any"})},hy={code:"en-US",formatDistance:UA,formatLong:ZA,formatRelative:QA,localize:i_,match:w_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function T_(e,t){const n=Ye(e,t==null?void 0:t.in);return VA(n,HA(n))+1}function my(e,t){const n=Ye(e,t==null?void 0:t.in),r=+_o(n)-+jA(n);return Math.round(r/sy)+1}function ju(e,t){var u,d,p,f;const n=Ye(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 S_(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=ju(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 gy(e,t){const n=Ye(e,t==null?void 0:t.in),r=+Pn(n,t)-+S_(n,t);return Math.round(r/sy)+1}function Ke(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 Ke(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ke(n+1,2)},d(e,t){return Ke(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 Ke(e.getHours()%12||12,t.length)},H(e,t){return Ke(e.getHours(),t.length)},m(e,t){return Ke(e.getMinutes(),t.length)},s(e,t){return Ke(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ke(o,t.length)}},Oo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vy={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=ju(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ke(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ke(i,t.length)},R:function(e,t){const n=uy(e);return Ke(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ke(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 Ke(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 Ke(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 Ke(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=gy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ke(o,t.length)},I:function(e,t,n){const r=my(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ke(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=T_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ke(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 Ke(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 Ke(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 Ke(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=Oo.noon:r===0?o=Oo.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=Oo.evening:r>=12?o=Oo.afternoon:r>=4?o=Oo.morning:o=Oo.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"}):Ke(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ke(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 by(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 by(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"+yy(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"+yy(r,":");case"zzzz":default:return"GMT"+Vr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ke(r,t.length)},T:function(e,t,n){return Ke(+e,t.length)}};function yy(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+Ke(i,2)}function by(e,t){return e%60===0?(e>0?"-":"+")+Ke(Math.abs(e)/60,2):Vr(e,t)}function Vr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ke(Math.trunc(r/60),2),i=Ke(r%60,2);return n+o+t+i}const xy=(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"})}},wy=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ru={p:wy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return xy(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}}",xy(r,t)).replace("{{time}}",wy(o,t))}},E_=/^D+$/,C_=/^Y+$/,k_=["D","DD","YY","YYYY"];function Ty(e){return E_.test(e)}function Sy(e){return C_.test(e)}function $u(e,t,n){const r=P_(e,t,n);if(console.warn(r),k_.includes(e))throw new RangeError(r)}function P_(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 A_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,__=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,I_=/^'([^]*?)'?$/,O_=/''/g,M_=/[a-zA-Z]/;function D_(e,t,n){var u,d,p,f;const r=Lr(),o=r.locale??hy,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=Ye(e,n==null?void 0:n.in);if(!dy(s))throw new RangeError("Invalid time value");let l=t.match(__).map(h=>{const y=h[0];if(y==="p"||y==="P"){const m=Ru[y];return m(h,o.formatLong)}return h}).join("").match(A_).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const y=h[0];if(y==="'")return{isToken:!1,value:N_(h)};if(vy[y])return{isToken:!0,value:h};if(y.match(M_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");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 y=h.value;(Sy(y)||Ty(y))&&$u(y,t,String(e));const m=vy[y[0]];return m(s,y,o.localize,c)}).join("")}function N_(e){const t=e.match(I_);return t?t[1].replace(O_,"'"):e}function F_(){return Object.assign({},Lr())}function L_(e,t){const n=Ye(e,t==null?void 0:t.in).getDay();return n===0?7:n}function V_(e,t){return+Ye(e)>+Ye(t)}function j_(e,t){return+Ye(e)<+Ye(t)}function R_(e,t){const n=$_(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 $_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const z_=10;class Ey{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class B_ extends Ey{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 H_ extends Ey{constructor(n,r){super();pe(this,"priority",z_);pe(this,"subPriority",-1);this.context=n||(o=>rt(r,o))}set(n,r){return r.timestampIsSet?n:rt(n,R_(n,this.context))}}class We{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new B_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class W_ extends We{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 dt(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*NA+i*DA+a*FA),rest:t.slice(n[0].length)}}function Cy(e){return dt(wt.anyDigitsSigned,e)}function vt(e,t){switch(e){case 1:return dt(wt.singleDigit,t);case 2:return dt(wt.twoDigits,t);case 3:return dt(wt.threeDigits,t);case 4:return dt(wt.fourDigits,t);default:return dt(new RegExp("^\\d{1,"+e+"}"),t)}}function ns(e,t){switch(e){case 1:return dt(wt.singleDigitSigned,t);case 2:return dt(wt.twoDigitsSigned,t);case 3:return dt(wt.threeDigitsSigned,t);case 4:return dt(wt.fourDigitsSigned,t);default:return dt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ky(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 Py(e){return e%400===0||e%4===0&&e%100!==0}class q_ extends We{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=ky(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 U_ extends We{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=ju(n,i);if(o.isTwoDigitYear){const l=ky(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 G_ extends We{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 ns(r==="R"?4:r.length,n)}set(n,r,o){const i=rt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),_o(i)}}class Y_ extends We{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 ns(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class K_ extends We{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 Z_ extends We{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 X_ extends We{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(dt(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 Q_ extends We{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(dt(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 J_(e,t,n){const r=Ye(e,n==null?void 0:n.in),o=gy(r,n)-t;return r.setDate(r.getDate()-o*7),Ye(r,n==null?void 0:n.in)}class eI extends We{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 dt(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(J_(n,o,i),i)}}function tI(e,t,n){const r=Ye(e,n==null?void 0:n.in),o=my(r,n)-t;return r.setDate(r.getDate()-o*7),r}class nI extends We{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 dt(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 _o(tI(n,o))}}const rI=[31,28,31,30,31,30,31,31,30,31,30,31],oI=[31,29,31,30,31,30,31,31,30,31,30,31];class iI extends We{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 dt(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=Py(o),a=n.getMonth();return i?r>=1&&r<=oI[a]:r>=1&&r<=rI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aI extends We{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 dt(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 Py(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 Bu(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=Ye(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 Ja(i,u,n)}class sI extends We{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=Bu(n,o,i),n.setHours(0,0,0,0),n}}class lI extends We{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=Bu(n,o,i),n.setHours(0,0,0,0),n}}class cI extends We{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=Bu(n,o,i),n.setHours(0,0,0,0),n}}function uI(e,t,n){const r=Ye(e,n==null?void 0:n.in),o=L_(r,n),i=t-o;return Ja(r,i,n)}class dI extends We{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=uI(n,o),n.setHours(0,0,0,0),n}}class fI extends We{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(zu(o),0,0,0),n}}class pI extends We{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(zu(o),0,0,0),n}}class hI extends We{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(zu(o),0,0,0),n}}class mI extends We{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return dt(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 gI extends We{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 dt(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 vI extends We{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return dt(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 yI extends We{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 dt(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 bI extends We{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return dt(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 xI extends We{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return dt(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 wI extends We{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 TI extends We{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()-es(n)-o)}}class SI extends We{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()-es(n)-o)}}class EI extends We{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Cy(n)}set(n,r,o){return[rt(n,o*1e3),{timestampIsSet:!0}]}}class CI extends We{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Cy(n)}set(n,r,o){return[rt(n,o),{timestampIsSet:!0}]}}const kI={G:new W_,y:new q_,Y:new U_,R:new G_,u:new Y_,Q:new K_,q:new Z_,M:new X_,L:new Q_,w:new eI,I:new nI,d:new iI,D:new aI,E:new sI,e:new lI,c:new cI,i:new dI,a:new fI,b:new pI,B:new hI,h:new mI,H:new gI,K:new vI,k:new yI,m:new bI,s:new xI,S:new wI,X:new TI,x:new SI,t:new EI,T:new CI},PI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_I=/^'([^]*?)'?$/,II=/''/g,OI=/\S/,MI=/[a-zA-Z]/;function DI(e,t,n,r){var m,v,g,x;const o=()=>rt(n,NaN),i=F_(),a=i.locale??hy,s=i.firstWeekContainsDate??((v=(m=i.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(g=i.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Ye(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new H_(r==null?void 0:r.in,n)],d=t.match(AI).map(S=>{const T=S[0];if(T in Ru){const w=Ru[T];return w(S,a.formatLong)}return S}).join("").match(PI),p=[];for(let S of d){Sy(S)&&$u(S,t,e),Ty(S)&&$u(S,t,e);const T=S[0],w=kI[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 P=w.run(e,S,a.match,c);if(!P)return o();u.push(P.setter),e=P.rest}else{if(T.match(MI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(S==="''"?S="'":T==="'"&&(S=NI(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&OI.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=Ye(n,r==null?void 0:r.in);if(isNaN(+h))return o();const y={};for(const S of f){if(!S.validate(h,c))return o();const T=S.set(h,y,c);Array.isArray(T)?(h=T[0],Object.assign(y,T[1])):h=T}return h}function NI(e){return e.match(_I)[1].replace(II,"'")}function FI(e,t,n){const[r,o]=ts(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function LI(e,t){return $A(rt(e,e),RA(e))}function VI(e,t,n){return Ja(e,-t,n)}function jI(e,t,n){const r=Ye(e,n==null?void 0:n.in);return isNaN(+r)?rt(e,NaN):(r.setFullYear(t),r)}function RI(e,t,n){return cy(e,-t,n)}function zi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=RI(e,o+r*12,n),d=VI(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 Hu(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 Wu(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 Bi=function(e){return e.replace(new RegExp(" ","g")," ")},Ay=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)},$I=function(e){return e.replace(/^0+([0-9]+)/,"$1")},_y=function(e,t,n){var r=e.length-2,o=$I(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Iy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},rs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},zI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},qu=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},BI=function(e){return e==="money"||e==="currency"},HI=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:""})},os=function(e,t){var n=Ay(Iy(e),t.fraction.length),r="".concat(t.currency).concat(_y(n,t.group,t.decimal));return Bi(r)},WI=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=Hu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=HI(r,i,s);return h.currency=Bi("".concat(h.currency.trim()," ")),h.literal=Bi(h.literal.trim()),h},[r,i]),p=function(h){var y=os(h.target.value,d),m=rs(y);h.target.value=y,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=y.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=os(h,d),m=rs(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l==null||l(St(St({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var f=c.defaultValue?os(c.defaultValue,d):void 0;return E.createElement("input",St({},c,{value:typeof c.value=="string"?os(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),qI=1,UI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},GI=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:""})},is=function(e,t){var n=Ay(Iy(e),t.fraction.length),r="".concat(_y(n,t.group,t.decimal)," ").concat(t.percentSign);return Bi(r)},YI=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=Hu(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Wu(E.useState(function(){var v,g;return(g=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&g!==void 0?g:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,g=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(is(g,d))},[a.value]);var d=E.useMemo(function(){var v=GI(r);return v.percentSign=Bi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-qI,f=function(v){var g,x=s.current;x&&(x.setSelectionRange(p,p),v&&((g=a.onFocus)===null||g===void 0||g.call(a,v)))},h=function(v){var g=v.currentTarget;if(g.selectionStart!==null){var x=g.selectionStart,S=g.selectionEnd,T=x!==S,w=p<x;!T&&w&&f()}i==null||i(v)},y=function(v){var g=is(v.target.value,d),x=rs(g);u(g),v.target.value=g,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 g=is(v,d),x=rs(g);u(g),s.current.value=g,s.current.setAttribute("data-number",x.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?is(a.defaultValue,d):void 0;return E.createElement("input",St({},a,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Hi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},KI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=as[i];a===void 0?r.push(i.replace(Hi.dots,"\\.").replace(Hi.openParenthesis,"\\(").replace(Hi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Hi.leadingBars,"\\")},Wi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Uu(o,n);var i=KI(o);return n?"^".concat(i,"$"):i},ZI=function(e){return e.replace(Hi.escape,"\\$&")},Uu=function(e,t){var n=e.map(function(r){return typeof r=="string"?ZI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},as={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},XI=/\d/,Oy="(dd) 9dddd-dddd",My="(dd) dddd-dddd",Dy="ddd.ddd.ddd-dd",Ny="dd.ddd.ddd/dddd-dd",ss=function(e){return e.replace(/\D/g,"")},QI=["2",/[0-3]/,":",/[0-5]/,/\d/],JI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Gt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Dy,isoDate:"dddd-dd-dd",cnpj:Ny,telephone:My,cellphone:Oy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ss(e).length<=11?Dy:Ny},int:function(e){return e===void 0&&(e=""),XI.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ss(e);return t.length<11?My:Oy},time:function(e){var t=ss(e),n=t[0];return n==="2"?QI:JI}},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:Wi(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:ss}),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 Fy(e,t,n,r){var o,i;r===void 0&&(r=as);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],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 Ly=function(e){return e},eO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Wi(e,n,t));return r.test(n)};function tO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var nO=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=Hu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var y=qu(s),m=qu(d),v=qu(u),g=E.useRef(eO(u,i,f.value||f.defaultValue)),x=p??"input",S=Wu(E.useState(""),2),T=S[0],w=S[1],C=tO(T),P=E.useCallback(function(D,N){var j,M,$=(j=D??N)!==null&&j!==void 0?j:"";if(u===void 0)return $;var O=(M=$==null?void 0:$.toString())!==null&&M!==void 0?M:"";return Fy(O,typeof u=="function"?u(O):u,a??Ly,c??as)},[a,u,c]),I=Wu(E.useState(function(){return P(f.value,f.defaultValue)}),2),A=I[0],F=I[1],L=P(f.defaultValue,f.defaultValue),R=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(A);return Array.isArray(D)?Uu(D,i):Wi(u,A,i)}return typeof u=="string"?Wi(u,A,i):Uu(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var D=P(f.value,f.defaultValue);F(D),h.current!==null&&(h.current.value=D)}},[f.value,u,a,f.defaultValue]);var k=function(D){var N,j,M,$,O,B=D.currentTarget,Q=D.target.value;if(v.current===void 0)return F(Q),(N=m.current)===null||N===void 0||N.call(m,Q),(j=y.current)===null||j===void 0||j.call(y,D),d==null?void 0:d(Q);var oe=new RegExp(Wi(v.current,Q,i)),J=(M=B.selectionEnd)!==null&&M!==void 0?M:0,K=function(Z,ie,z){if(Z.type!=="number")return Z.setSelectionRange(ie,z)};if(r&&g.current&&Q.length>=A.length)return B.value=A,K(B,J-1,J-1);var U=!1;Q.length<C.length&&(g.current=!1,U=!0),oe.test(Q)&&(g.current=!0);var Y=J,V=Q[Y-1],W=Fy(Q,typeof v.current=="function"?v.current(Q):v.current,a??Ly,c??as);for(B.value=W,F(W);Y<W.length&&W.charAt(Y-1)!==V;)Y+=1;U?K(B,J,J):K(B,Y,Y),D.target.value=W,w(W),($=m.current)===null||$===void 0||$.call(m,W),(O=y.current)===null||O===void 0||O.call(y,D)};return E.createElement(x,St({},f,{ref:h,pattern:R,onChange:k,defaultValue:Vy(f.defaultValue)?L:void 0,value:Vy(f.value)?P(f.value,f.value):f.value}))}),Vy=function(e){return typeof e=="string"},jy=E.forwardRef(function(e,t){return BI(e.mask)?E.createElement(WI,St({},e,{mask:void 0,ref:t})):UI(e.mask)?E.createElement(YI,St({},e,{mask:void 0,ref:t})):E.createElement(nO,St({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(jy,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 Ry=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&zI(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return E.createElement(jy,St({},o,{ref:n}))}),ls={exports:{}},Gu={},cs={exports:{}},Yu={};/**
|
|
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={};/**
|
|
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
|
|
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={};/**
|
|
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
|
|
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}/**
|
|
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
|
|
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={};/**
|
|
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 qy;function aO(){return qy||(qy=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=Hy(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Zu.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=s(function(){function v(w){if(!g){if(g=!0,x=w,w=p(w),f!==void 0&&y.hasValue){var C=y.value;if(f(C,w))return S=C}return S=w}if(C=S,r(x,w))return C;var P=p(w);return f!==void 0&&f(C,P)?(x=w,C):(x=w,S=P)}var g=!1,x,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){y.hasValue=!0,y.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())}()),Zu}var Uy;function sO(){return Uy||(Uy=1,process.env.NODE_ENV==="production"?ls.exports=iO():ls.exports=aO()),ls.exports}sO();var Mo=function(){return Mo=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},Mo.apply(this,arguments)};function qi(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 Gy(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 Do=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},lO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},cO=function(e){return Object.entries(e)},Yy=function(e){return e instanceof Promise},Ky=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Mo(Mo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},uO=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,Gy([],qi(a),!1)),u=function(d,p){return n(function(f){return Ky(d,f,i,p)})};return Yy(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))}},dO=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,Gy([],qi(a),!1)),c=function(u){return n(function(d){return Ky(u,d,i,o.current)})};return Yy(l)?l.then(function(u){return c(u)}):c(l)}},Xu=function(e,t,n){var r,o,i,a=qi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Do(s),u=Do((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Do(t),p=Do((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Do((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),y=lO(s),m=Do(y),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var S=v.current;p.current.forEach(function(T){T(s,y,S)})}},[s,p,y]);var g=qi(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 cO(T).reduce(function(w,C){var P,I=qi(C,2),A=I[0],F=I[1];return Mo(Mo({},w),(P={},P[A]=n!=null&&n.debug?uO(A,F,l,S,v,f.current):dO(A,F,l,S,v,f.current),P))},{})}),1),x=g[0];return[s,x,u.current]};const fO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function pO(e,t){return E.useRef(fO(e,t)).current}const us={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},No=(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(No(a,t,n,s))},[]),Zy=(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]:Zy(a,t,n,s)}},{}),Xy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ds=(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)},hO={default:e=>ds(e,{result:Xy.default}),dark:e=>ds(e,{result:Xy.dark})},Qu=(e,t)=>{const n=s=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return s?s(d):d},r=No(e.colors,n(t==null?void 0:t.colors)),o=No(e.spacing,n(t==null?void 0:t.spacing)),i=No(e.rounded,n(t==null?void 0:t.rounded)),a=e.custom?No(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,i,a)},mO=(e,t)=>ds(Qu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),gO=(e,t)=>Qu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),vO=(e,t)=>ds(Qu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),fs={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..."},ps={input:{iconFeedback:!0}},Fo=E.createContext({tweaks:ps,parser:us.hsla,map:fs,locale:void 0}),Ju=e=>{const t=E.useContext(Fo);if(e)return e;if(t)return t.locale||e};function yO(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(Fo);return e?e.map:fs},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),Ui=()=>{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])}`},Qy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Jy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ed=(e,t)=>{const n=Qy(t,Jy.basic,e)||Qy(t,Jy.extend,e);return n===void 0||n===e?void 0:n},Gi=()=>typeof window>"u",td=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),eb=(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},bO=e=>!e,nd=()=>{},xO={type:"spring",bounce:.3,duration:.6},tb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),nb={enter:tb(1),exit:tb(-1),middle:{x:"0%",opacity:1}},rb={exit:{visibility:"hidden"}},wO=e=>{const t=Pn(py(e));return fy({start:t,end:Ao(t,{days:41})})},ob=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=py(new Date(1970,o,1).setMonth(o)),a=ob(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),rd={ArrowLeft:(e,t)=>t==="days"?zi(e,{days:1}):zi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Ao(e,{days:1}):Ao(e,{months:1}),ArrowUp:(e,t)=>t==="days"?zi(e,{weeks:1}):zi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Ao(e,{weeks:1}):Ao(e,{years:1})},ib=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},jr=e=>e.getFullYear().toString().padStart(4,"0"),SO=(e,t,n)=>e===void 0||n===void 0?!1:V_(t,e)&&j_(t,n),EO=e=>{var n;const t=Ot();return b.jsx(gt.tbody,{layout:!0,variants:nb,custom:e.direction,onKeyDown:e.onKeyDown,className:$e((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=ht.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,g,x,S,T,w,C,P,I,A,F,L,R,k,D,N,j,M;const u=c.toISOString(),d=e.rangeMode?u===((g=(v=e.range)==null?void 0:v.to)==null?void 0:g.toISOString())||u===((S=(x=e.range)==null?void 0:x.from)==null?void 0:S.toISOString()):u===((T=e.date)==null?void 0:T.toISOString()),p=LI(c)&&e.markToday,f=((w=e.disabledDate)==null?void 0:w.call(e,c))||!1,h=FI(c,e.stateDate),y=!h||f,m=e.rangeMode?SO((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:$e("relative",ht.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(F=e.styles)==null?void 0:F.dayFrame),children:[b.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:$e(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${y?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",ht.function((L=e.styles)==null?void 0:L.day)?(R=e.styles)==null?void 0:R.day(c):(k=e.styles)==null?void 0:k.day),children:[c.getDate(),d&&((D=e.stateRange.from)==null?void 0:D.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&&((j=e.stateRange.to)==null?void 0:j.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:((M=e.labelRange)==null?void 0:M.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},CO=()=>Io(new Date),ab=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef(Ui()),h=Ot(),y=Ju(o),m=E.useRef(null),{date:v,range:g}=p,x=v||new Date,S=E.useRef(null),[T,w]=Xu({date:x,isAnimating:!1,year:jr(x),direction:void 0,range:{from:g==null?void 0:g.from,to:g==null?void 0:g.to},months:TO(f.current,x,y),selectMode:l?"from":void 0,week:fy({start:Pn(x),end:WA(x)})},k=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(ib(S.current||null,m,k.state().date,200),S.current=null,{isAnimating:!1}),date:D=>{const N=D(k.state().date);return{date:N,year:jr(N)}},nextMonth:D=>{D&&(S.current=D.currentTarget);const N=k.state();if(N.isAnimating)return N;const j=Ao(N.date,{months:1});return{date:j,isAnimating:!0,direction:1,year:jr(j)}},previousMonth:D=>{D&&(S.current=D.currentTarget);const N=k.state();if(N.isAnimating)return N;const j=zi(N.date,{months:1});return{date:j,isAnimating:!0,direction:-1,year:jr(j)}},onSelectDate:D=>{const N=k.state(),j=D.currentTarget.dataset.range==="true",M=D.currentTarget.dataset.date||"",$=new Date(M);return{date:$,year:jr($),selectMode:N.selectMode===void 0?void 0:N.selectMode==="from"?"to":"from",range:j?{from:N.selectMode==="from"?$:N.range.from,to:N.selectMode==="to"?$:N.range.to}:N.range}},onChangeMonth:D=>{const N=D.target.value,M=Array.from(D.target.options).find(O=>O.value===N),$=k.state();if(M){const O=M.dataset.index||"",B=new Date(k.state().date);return B.setMonth(+O),{...$,date:B,year:jr(B)}}return $},onKeyDown:D=>{const N=D.key,j=k.state();if(N in rd){(N==="ArrowUp"||N==="ArrowDown")&&D.preventDefault();const M=k.state().date,$=ht.keyof(rd,N)?rd[N](M,D.shiftKey?"month":"days"):null;if($!==null)return ib(D.target,m,$),{...j,date:$,year:jr($)}}return k.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(k,D,N)=>{var M,$;return(N.method==="onChangeMonth"||N.method==="previousMonth"||N.method==="nextMonth")&&(($=(M=N.props).onChangeMonth)==null||$.call(M,k.date)),k},(k,D,N)=>{var M,$;return N.method==="onChangeYear"&&(($=(M=N.props).onChangeYear)==null||$.call(M,k.date)),k},(k,D,N)=>{const j=N.method==="onSelectDate"||N.method==="setToday"||N.method==="onKeyDown";return l&&j&&t?(c==null||c(k.range),k):(j&&t&&(c==null||c(k.date)),k)}]}),C=wO(T.date),P=eb(C,7),I=T.date.toISOString(),A=ob(T.date,y);E.useEffect(()=>{t||c==null||c(T.date)},[I,t]);const F=pO(k=>w.date(D=>jI(new Date(D),+k)),1200),L=k=>{const D=k.currentTarget.value;w.onChangeYear(D),s==null||s(new Date(D)),F(D)},R=yO((k,D)=>(k.preventDefault(),D==="right"?w.previousMonth():w.nextMonth()),10);return b.jsx(wS,{transition:xO,children:b.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:R.onTouchEnd,onTouchStart:R.onTouchStart,className:$e("relative overflow-hidden",ht.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:T.direction,onExitComplete:w.onExitComplete,children:b.jsxs(gt.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(gt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:rb,onClick:w.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(xA,{className:"h-4 w-4"})}),b.jsx(gt.span,{layout:!0,variants:nb,custom:T.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: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}),b.jsx(Ry,{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"})]})}),b.jsx(gt.button,{layout:!0,type:"button","data-focustrap":"next",variants:rb,onClick:w.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(Nu,{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(gt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:T.week.map(k=>b.jsx("th",{role:"columnheader",className:$e("py-2 text-sm font-medium capitalize",ht.function(u==null?void 0:u.weekDay)?u.weekDay(k):u==null?void 0:u.weekDay),children:k.toLocaleDateString(y,{weekday:"short"})},k.toString()))})}),b.jsx(EO,{zip:P,range:g,styles:u,date:v||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)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>w.date(CO),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},sb=({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:$e("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:$e("mb-2 w-full border-b border-card-border lg:px-8 px-4 pb-4 text-xl font-medium",n),children:t}):i,b.jsx("div",{className:$e("min-w-full lg:px-8 px-4",a),children:e})]}),lb=e=>{const t=e.Icon??ry,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 cb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ub(...e){return t=>{let n=!1;const r=e.map(o=>{const i=cb(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():cb(e[o],null)}}}}function Rr(...e){return _.useCallback(ub(...e),e)}function db(e,t=[]){let n=[];function r(i,a){const s=_.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...h}=d,y=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,m=_.useMemo(()=>h,Object.values(h));return b.jsx(y.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var y;const f=((y=p==null?void 0:p[e])==null?void 0:y[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,kO(o,...t)]}function kO(...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 Lo=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(AO);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 b.jsx(od,{...r,ref:t,children:_.isValidElement(a)?_.cloneElement(a,void 0,s):null})}return b.jsx(od,{...r,ref:t,children:n})});Lo.displayName="Slot";var od=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const o=IO(n),i=_O(r,n.props);return n.type!==_.Fragment&&(i.ref=t?ub(t,o):o),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});od.displayName="SlotClone";var PO=({children:e})=>b.jsx(b.Fragment,{children:e});function AO(e){return _.isValidElement(e)&&e.type===PO}function _O(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function IO(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 OO(e){const t=e+"CollectionProvider",[n,r]=db(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:y}=f,m=E.useRef(null),v=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:v,collectionRef:m,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:y,children:m}=f,v=i(s,y),g=Rr(h,v.collectionRef);return b.jsx(Lo,{ref:g,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:y,children:m,...v}=f,g=E.useRef(null),x=Rr(h,g),S=i(c,y);return E.useEffect(()=>(S.itemMap.set(g,{ref:g,...v}),()=>void S.itemMap.delete(g))),b.jsx(Lo,{[u]:"",ref:x,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 v=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,T)=>v.indexOf(S.ref.current)-v.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var MO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=MO.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Lo: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 fb(e,t){e&&Pa.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 DO(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 NO="DismissableLayer",id="dismissableLayer.update",FO="dismissableLayer.pointerDownOutside",LO="dismissableLayer.focusOutside",pb,hb=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mb=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=_.useContext(hb),[u,d]=_.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=_.useState({}),h=Rr(t,C=>d(C)),y=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(m),g=u?y.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,T=jO(C=>{const P=C.target,I=[...c.branches].some(A=>A.contains(P));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),w=RO(C=>{const P=C.target;[...c.branches].some(A=>A.contains(P))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return DO(C=>{g===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),_.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),vb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=pb)}},[u,p,n,c]),_.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),vb())},[u,c]),_.useEffect(()=>{const C=()=>f({});return document.addEventListener(id,C),()=>document.removeEventListener(id,C)},[]),b.jsx(In.div,{...l,ref:h,style:{pointerEvents:x?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)})});mb.displayName=NO;var VO="DismissableLayerBranch",gb=_.forwardRef((e,t)=>{const n=_.useContext(hb),r=_.useRef(null),o=Rr(t,r);return _.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})});gb.displayName=VO;function jO(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(){yb(FO,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 RO(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!r.current&&yb(LO,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 vb(){const e=new CustomEvent(id);document.dispatchEvent(e)}function yb(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?fb(o,i):o.dispatchEvent(i)}var $O=mb,zO=gb,hs=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},BO="Portal",bb=_.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=_.useState(!1);hs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?mi.createPortal(b.jsx(In.div,{...r,ref:t}),a):null});bb.displayName=BO;function HO(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var xb=e=>{const{present:t,children:n}=e,r=WO(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=Rr(r.ref,qO(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};xb.displayName="Presence";function WO(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),a=e?"mounted":"unmounted",[s,l]=HO(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=ms(r.current);i.current=s==="mounted"?c:"none"},[s]),hs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ms(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]),hs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const y=ms(r.current).includes(f.animationName);if(f.target===t&&y&&(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=ms(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:_.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ms(e){return(e==null?void 0:e.animationName)||"none"}function qO(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 UO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=GO({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 GO({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 YO="VisuallyHidden",ad=_.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}}));ad.displayName=YO;var sd="ToastProvider",[ld,KO,ZO]=OO("Toast"),[wb,kR]=db("Toast",[ZO]),[XO,gs]=wb(sd),Tb=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 \`${sd}\`. Expected non-empty \`string\`.`),b.jsx(ld.Provider,{scope:t,children:b.jsx(XO,{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})})};Tb.displayName=sd;var Sb="ToastViewport",QO=["F8"],cd="toast.viewportPause",ud="toast.viewportResume",Eb=_.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=QO,label:o="Notifications ({hotkey})",...i}=e,a=gs(Sb,n),s=KO(n),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=Rr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;_.useEffect(()=>{const m=v=>{var x;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),_.useEffect(()=>{const m=l.current,v=d.current;if(h&&m&&v){const g=()=>{if(!a.isClosePausedRef.current){const w=new CustomEvent(cd);v.dispatchEvent(w),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const w=new CustomEvent(ud);v.dispatchEvent(w),a.isClosePausedRef.current=!1}},S=w=>{!m.contains(w.relatedTarget)&&x()},T=()=>{m.contains(document.activeElement)||x()};return m.addEventListener("focusin",g),m.addEventListener("focusout",S),m.addEventListener("pointermove",g),m.addEventListener("pointerleave",T),window.addEventListener("blur",g),window.addEventListener("focus",x),()=>{m.removeEventListener("focusin",g),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",g),m.removeEventListener("pointerleave",T),window.removeEventListener("blur",g),window.removeEventListener("focus",x)}}},[h,a.isClosePausedRef]);const y=_.useCallback(({tabbingDirection:m})=>{const g=s().map(x=>{const S=x.ref.current,T=[S,...fM(S)];return m==="forwards"?T:T.reverse()});return(m==="forwards"?g.reverse():g).flat()},[s]);return _.useEffect(()=>{const m=d.current;if(m){const v=g=>{var T,w,C;const x=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!x){const P=document.activeElement,I=g.shiftKey;if(g.target===m&&I){(T=c.current)==null||T.focus();return}const L=y({tabbingDirection:I?"backwards":"forwards"}),R=L.findIndex(k=>k===P);pd(L.slice(R+1))?g.preventDefault():I?(w=c.current)==null||w.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",v),()=>m.removeEventListener("keydown",v)}},[s,y]),b.jsxs(zO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&b.jsx(dd,{ref:c,onFocusFromOutsideViewport:()=>{const m=y({tabbingDirection:"forwards"});pd(m)}}),b.jsx(ld.Slot,{scope:n,children:b.jsx(In.ol,{tabIndex:-1,...i,ref:p})}),h&&b.jsx(dd,{ref:u,onFocusFromOutsideViewport:()=>{const m=y({tabbingDirection:"backwards"});pd(m)}})]})});Eb.displayName=Sb;var Cb="ToastFocusProxy",dd=_.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=gs(Cb,n);return b.jsx(ad,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});dd.displayName=Cb;var vs="Toast",JO="toast.swipeStart",eM="toast.swipeMove",tM="toast.swipeCancel",nM="toast.swipeEnd",kb=_.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=UO({prop:r,defaultProp:o,onChange:i});return b.jsx(xb,{present:n||s,children:b.jsx(iM,{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)})})})});kb.displayName=vs;var[rM,oM]=wb(vs,{onClose(){}}),iM=_.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,y=gs(vs,n),[m,v]=_.useState(null),g=Rr(t,k=>v(k)),x=_.useRef(null),S=_.useRef(null),T=o||y.duration,w=_.useRef(0),C=_.useRef(T),P=_.useRef(0),{onToastAdd:I,onToastRemove:A}=y,F=Wn(()=>{var D;(m==null?void 0:m.contains(document.activeElement))&&((D=y.viewport)==null||D.focus()),a()}),L=_.useCallback(k=>{!k||k===1/0||(window.clearTimeout(P.current),w.current=new Date().getTime(),P.current=window.setTimeout(F,k))},[F]);_.useEffect(()=>{const k=y.viewport;if(k){const D=()=>{L(C.current),c==null||c()},N=()=>{const j=new Date().getTime()-w.current;C.current=C.current-j,window.clearTimeout(P.current),l==null||l()};return k.addEventListener(cd,N),k.addEventListener(ud,D),()=>{k.removeEventListener(cd,N),k.removeEventListener(ud,D)}}},[y.viewport,T,l,c,L]),_.useEffect(()=>{i&&!y.isClosePausedRef.current&&L(T)},[i,T,y.isClosePausedRef,L]),_.useEffect(()=>(I(),()=>A()),[I,A]);const R=_.useMemo(()=>m?Mb(m):null,[m]);return y.viewport?b.jsxs(b.Fragment,{children:[R&&b.jsx(aM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:R}),b.jsx(rM,{scope:n,onClose:F,children:Pa.createPortal(b.jsx(ld.ItemSlot,{scope:n,children:b.jsx($O,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||F(),y.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":y.swipeDirection,...h,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,k=>{k.key==="Escape"&&(s==null||s(k.nativeEvent),k.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:Xt(e.onPointerDown,k=>{k.button===0&&(x.current={x:k.clientX,y:k.clientY})}),onPointerMove:Xt(e.onPointerMove,k=>{if(!x.current)return;const D=k.clientX-x.current.x,N=k.clientY-x.current.y,j=!!S.current,M=["left","right"].includes(y.swipeDirection),$=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,O=M?$(0,D):0,B=M?0:$(0,N),Q=k.pointerType==="touch"?10:2,oe={x:O,y:B},J={originalEvent:k,delta:oe};j?(S.current=oe,ys(eM,d,J,{discrete:!1})):Db(oe,y.swipeDirection,Q)?(S.current=oe,ys(JO,u,J,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(D)>Q||Math.abs(N)>Q)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,k=>{const D=S.current,N=k.target;if(N.hasPointerCapture(k.pointerId)&&N.releasePointerCapture(k.pointerId),S.current=null,x.current=null,D){const j=k.currentTarget,M={originalEvent:k,delta:D};Db(D,y.swipeDirection,y.swipeThreshold)?ys(nM,f,M,{discrete:!0}):ys(tM,p,M,{discrete:!0}),j.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),aM=e=>{const{__scopeToast:t,children:n,...r}=e,o=gs(vs,t),[i,a]=_.useState(!1),[s,l]=_.useState(!1);return uM(()=>a(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(bb,{asChild:!0,children:b.jsx(ad,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},sM="ToastTitle",Pb=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});Pb.displayName=sM;var lM="ToastDescription",Ab=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});Ab.displayName=lM;var _b="ToastAction",cM=_.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(Ob,{altText:n,asChild:!0,children:b.jsx(fd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${_b}\`. Expected non-empty \`string\`.`),null)});cM.displayName=_b;var Ib="ToastClose",fd=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=oM(Ib,n);return b.jsx(Ob,{asChild:!0,children:b.jsx(In.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});fd.displayName=Ib;var Ob=_.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 Mb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),dM(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(...Mb(r))}}),t}function ys(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?fb(o,i):o.dispatchEvent(i)}var Db=(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 uM(e=()=>{}){const t=Wn(e);hs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function dM(e){return e.nodeType===e.ELEMENT_NODE}function fM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var pM=Tb,hM=Eb,mM=kb,gM=Pb,vM=Ab,yM=fd;const bM=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},xM=so("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"}}),Nb=E.createContext(()=>{throw new Error("Not implemented")}),wM=()=>E.useContext(Nb),Fb={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]}},TM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=xM({theme:t.theme||"default"});return b.jsx(mM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(gt.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:Fb[t.reversedIndex]||Fb.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(gM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(vM,{className:"select-text truncate",children:t.text})]}),r?b.jsx(yM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(Lu,{className:"h-5 w-5"})}):null]})})})});function SM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=bM(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 b.jsxs(pM,{duration:n,swipeThreshold:150,children:[b.jsx(Nb.Provider,{value:l,children:e}),b.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(TM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(hM,{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 EM=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:$e("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]}),Lb=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Vb=E.createContext(""),CM=e=>{const[t,n]=Lb(e.active),r=ko(0),o=ko(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=h=>{if(!h)return;const y=h.getBoundingClientRect();o.set(y.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=vi(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(Vb.Provider,{value:t,children:b.jsx(sb,{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})})},kM=()=>E.useContext(Vb),PM=e=>{const t=kM();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},bs=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})]});bs.Icon=function(t){return b.jsx("header",{...t,className:$e("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},bs.Body=function(t){return b.jsx(on,{...t,className:$e("min-w-0 flex-1",t.className),children:t.children})},bs.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 AM=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function xs(){return typeof window<"u"}function or(e){return jb(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=(jb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jb(e){return xs()?e instanceof Node||e instanceof Ht(e).Node:!1}function Je(e){return xs()?e instanceof Element||e instanceof Ht(e).Element:!1}function Et(e){return xs()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function hd(e){return!xs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Yi(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 _M(e){return["table","td","th"].includes(or(e))}function ws(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function md(e){const t=gd(),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 IM(e){let t=Un(e);for(;Et(t)&&!ir(t);){if(md(t))return t;if(ws(t))return null;t=Un(t)}return null}function gd(){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 Ts(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||hd(e)&&e.host||qn(e);return hd(t)?t.host:t}function Rb(e){const t=Un(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Yi(t)?t:Rb(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=vd(a);return t.concat(a,a.visualViewport||[],Yi(o)?o:[],s&&n?ar(s):[])}return t.concat(o,ar(o,[],n))}function vd(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&&hd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function $b(){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 zb(e){return e.mozInputSource===0&&e.isTrusted?!0:wd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function bd(e){return OM()?!1:!wd()&&e.width===0&&e.height===0||wd()&&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 xd(){return/apple/i.test(navigator.vendor)}function wd(){const e=/android/i;return e.test(yd())||e.test($b())}function Bb(){return yd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function OM(){return $b().includes("jsdom/")}function Vo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function MM(e){return"nativeEvent"in e}function DM(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function Td(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function On(e){return"composedPath"in e?e.composedPath()[0]:e.target}const NM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Sd(e){return Et(e)&&e.matches(NM)}function Nt(e){e.preventDefault(),e.stopPropagation()}function Hb(e){return e?e.getAttribute("role")==="combobox"&&Sd(e):!1}const Mn=Math.min,Jt=Math.max,Ss=Math.round,jo=Math.floor,sr=e=>({x:e,y:e}),FM={left:"right",right:"left",bottom:"top",top:"bottom"},LM={start:"end",end:"start"};function Ed(e,t,n){return Jt(e,Mn(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function $o(e){return e.split("-")[1]}function Wb(e){return e==="x"?"y":"x"}function Cd(e){return e==="y"?"height":"width"}function $r(e){return["top","bottom"].includes(lr(e))?"y":"x"}function kd(e){return Wb($r(e))}function VM(e,t,n){n===void 0&&(n=!1);const r=$o(e),o=kd(e),i=Cd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Es(a)),[a,Es(a)]}function jM(e){const t=Es(e);return[Pd(e),t,Pd(t)]}function Pd(e){return e.replace(/start|end/g,t=>LM[t])}function RM(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 $M(e,t,n,r){const o=$o(e);let i=RM(lr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Pd)))),i}function Es(e){return e.replace(/left|right|bottom|top/g,t=>FM[t])}function zM(e){return{top:0,right:0,bottom:0,left:0,...e}}function qb(e){return typeof e!="number"?zM(e):{top:e,right:e,bottom:e,left:e}}function Cs(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 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}}/*!
|
|
170
170
|
* tabbable 6.2.0
|
|
171
171
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
172
|
-
*/var BM=["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])"],ks=BM.join(","),Ub=typeof Element>"u",zo=Ub?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ps=!Ub&&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},As=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},HM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},WM=function(t,n,r){if(As(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ks));return n&&zo.call(t,ks)&&o.unshift(t),o=o.filter(r),o},qM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!As(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=zo.call(a,ks);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!As(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},Gb=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||HM(t))&&!Gb(t)?0:t.tabIndex},UM=function(t,n){var r=Yb(t);return r<0&&n&&!Gb(t)?0:r},GM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kb=function(t){return t.tagName==="INPUT"},YM=function(t){return Kb(t)&&t.type==="hidden"},KM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},ZM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},XM=function(t){if(!t.name)return!0;var n=t.form||Ps(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=ZM(o,t.form);return!i||i===t},QM=function(t){return Kb(t)&&t.type==="radio"},JM=function(t){return QM(t)&&!XM(t)},eD=function(t){var n,r=t&&Ps(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=Ps(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},Zb=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},tD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=zo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(zo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ps(t);if(l&&!l.shadowRoot&&o(l)===!0)return Zb(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(eD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Zb(t);return!1},nD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},rD=function(t,n){return!(n.disabled||As(n)||YM(n)||tD(n,t)||KM(n)||nD(n))},Ad=function(t,n){return!(JM(n)||Yb(n)<0||!rD(t,n))},oD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},iD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=UM(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(GM).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ki=function(t,n){n=n||{};var r;return n.getShadowRoot?r=qM([t],n.includeContainer,{filter:Ad.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:oD}):r=WM(t,n.includeContainer,Ad.bind(null,n)),iD(r)},aD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,ks)===!1?!1:Ad(n,t)};function Xb(e,t,n){let{reference:r,floating:o}=e;const i=$r(t),a=kd(t),s=Cd(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($o(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const sD=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}=Xb(c,r,l),p=r,f={},h=0;for(let y=0;y<s.length;y++){const{name:m,fn:v}=s[y],{x:g,y:x,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=g??u,d=x??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}=Xb(c,p,l)),y=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function _d(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ro(t,e),h=qb(f),m=s[p?d==="floating"?"reference":"floating":d],v=Cs(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})),g=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},T=Cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:x,strategy:l}):g);return{top:(v.top-T.top+h.top)/S.y,bottom:(T.bottom-v.bottom+h.bottom)/S.y,left:(v.left-T.left+h.left)/S.x,right:(T.right-v.right+h.right)/S.x}}const lD=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}=Ro(e,t)||{};if(c==null)return{};const d=qb(u),p={x:n,y:r},f=kd(o),h=Cd(f),y=await a.getDimensions(c),m=f==="y",v=m?"top":"left",g=m?"bottom":"right",x=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[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(w)))&&(C=s.floating[x]||i.floating[h]);const P=S/2-T/2,I=C/2-y[h]/2-1,A=Mn(d[v],I),F=Mn(d[g],I),L=A,R=C-y[h]-F,k=C/2-y[h]/2+P,D=Ed(L,k,R),N=!l.arrow&&$o(o)!=null&&k!==D&&i.reference[h]/2-(k<L?A:F)-y[h]/2<0,j=N?k<L?k-L:k-R:0;return{[f]:p[f]+j,data:{[f]:D,centerOffset:k-D-j,...N&&{alignmentOffset:j}},reset:N}}}),cD=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:y=!0,...m}=Ro(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=lr(o),g=$r(s),x=lr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(x||!y?[Es(s)]:jM(s)),w=h!=="none";!p&&w&&T.push(...$M(s,y,h,S));const C=[s,...T],P=await _d(t,m),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[v]),d){const k=VM(o,a,S);I.push(P[k[0]],P[k[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(k=>k<=0)){var F,L;const k=(((F=i.flip)==null?void 0:F.index)||0)+1,D=C[k];if(D)return{data:{index:k,overflows:A},reset:{placement:D}};let N=(L=A.filter(j=>j.overflows[0]<=0).sort((j,M)=>j.overflows[1]-M.overflows[1])[0])==null?void 0:L.placement;if(!N)switch(f){case"bestFit":{var R;const j=(R=A.filter(M=>{if(w){const $=$r(M.placement);return $===g||$==="y"}return!0}).map(M=>[M.placement,M.overflows.filter($=>$>0).reduce(($,O)=>$+O,0)]).sort((M,$)=>M[1]-$[1])[0])==null?void 0:R[0];j&&(N=j);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function uD(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=$o(n),l=$r(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ro(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 dD=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 uD(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}}}}},fD=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:v,y:g}=m;return{x:v,y:g}}},...l}=Ro(e,t),c={x:n,y:r},u=await _d(t,l),d=$r(lr(o)),p=Wb(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=f+u[m],x=f-u[v];f=Ed(g,f,x)}if(a){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=h+u[m],x=h-u[v];h=Ed(g,h,x)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-n,y:y.y-r}}}}},pD=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}=Ro(e,t),l=await _d(t,s),c=lr(n),u=$o(n),d=$r(n)==="y",{width:p,height:f}=r.floating;let h,y;c==="top"||c==="bottom"?(h=c,y=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,v=p-l.left-l.right,g=Mn(f-l[h],m),x=Mn(p-l[y],v),S=!t.middlewareData.shift;let T=g,w=x;if(d?w=u||S?Mn(x,v):v:T=u||S?Mn(g,m):m,S&&!u){const P=Jt(l.left,0),I=Jt(l.right,0),A=Jt(l.top,0),F=Jt(l.bottom,0);d?w=p-2*(P!==0||I!==0?P+I:Jt(l.left,l.right)):T=f-2*(A!==0||F!==0?A+F: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 Qb(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=Ss(n)!==i||Ss(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Id(e){return Je(e)?e:e.contextElement}function Bo(e){const t=Id(e);if(!Et(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Qb(t);let a=(i?Ss(n.width):n.width)/r,s=(i?Ss(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const hD=sr(0);function Jb(e){const t=Ht(e);return!gd()||!t.visualViewport?hD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Id(e);let a=sr(1);t&&(r?Je(r)&&(a=Bo(r)):a=Bo(e));const s=mD(i,n,r)?Jb(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,y=vd(h);for(;y&&r&&f!==h;){const m=Bo(y),v=y.getBoundingClientRect(),g=Qt(y),x=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*m.x,S=v.top+(y.clientTop+parseFloat(g.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=S,h=Ht(y),y=vd(h)}}return Cs({width:u,height:d,x:l,y:c})}function gD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qn(r),s=t?ws(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"||Yi(a))&&(l=Ts(r)),Et(r))){const p=zr(r);c=Bo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function vD(e){return Array.from(e.getClientRects())}function ex(e){return zr(qn(e)).left+Ts(e).scrollLeft}function yD(e){const t=qn(e),n=Ts(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+ex(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 bD(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=gd();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function xD(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?Bo(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 tx(e,t,n){let r;if(t==="viewport")r=bD(e,n);else if(t==="document")r=yD(qn(e));else if(Je(t))r=xD(t,n);else{const o=Jb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Cs(r)}function nx(e,t){const n=Un(e);return n===t||!Je(n)||ir(n)?!1:Qt(n).position==="fixed"||nx(n,t)}function wD(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=md(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Yi(a)&&!l&&nx(e,a))?r=r.filter(u=>u!==a):o=s,a=Un(a)}return t.set(e,r),r}function TD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ws(t)?[]:wD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=tx(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},tx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SD(e){const{width:t,height:n}=Qb(e);return{width:t,height:n}}function ED(e,t,n){const r=Et(t),o=qn(t),i=n==="fixed",a=zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((or(t)!=="body"||Yi(o))&&(s=Ts(t)),r){const d=zr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=ex(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 Od(e){return Qt(e).position==="static"}function rx(e,t){return!Et(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ox(e,t){const n=Ht(e);if(ws(e))return n;if(!Et(e)){let o=Un(e);for(;o&&!ir(o);){if(Je(o)&&!Od(o))return o;o=Un(o)}return n}let r=rx(e,t);for(;r&&_M(r)&&Od(r);)r=rx(r,t);return r&&ir(r)&&Od(r)&&!md(r)?n:r||IM(e)||n}const CD=async function(e){const t=this.getOffsetParent||ox,n=this.getDimensions,r=await n(e.floating);return{reference:ED(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kD(e){return Qt(e).direction==="rtl"}const PD={convertOffsetParentRelativeRectToViewportRelativeRect:gD,getDocumentElement:qn,getClippingRect:TD,getOffsetParent:ox,getElementRects:CD,getClientRects:vD,getDimensions:SD,getScale:Bo,isElement:Je,isRTL:kD};function AD(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=jo(u),h=jo(o.clientWidth-(c+d)),y=jo(o.clientHeight-(u+p)),m=jo(c),g={rootMargin:-f+"px "+-h+"px "+-y+"px "+-m+"px",threshold:Jt(0,Mn(1,l))||1};let x=!0;function S(T){const w=T[0].intersectionRatio;if(w!==l){if(!x)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,g)}n.observe(e)}return a(!0),i}function Zi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Id(e),u=o||i?[...c?ar(c):[],...ar(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?AD(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.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 h,y=l?zr(e):null;l&&m();function m(){const v=zr(e);y&&(v.x!==y.x||v.y!==y.y||v.width!==y.width||v.height!==y.height)&&n(),y=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const _D=dD,ID=fD,OD=cD,MD=pD,ix=lD,DD=(e,t,n)=>{const r=new Map,o={platform:PD,...n},i={...o.platform,_c:r};return sD(e,t,{...o,platform:i})};var _s=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Is(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(!Is(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)&&!Is(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ax(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sx(e,t){const n=ax(e);return Math.round(t*n)/n}function Md(e){const t=_.useRef(e);return _s(()=>{t.current=e}),t}function ND(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);Is(p,r)||f(r);const[h,y]=_.useState(null),[m,v]=_.useState(null),g=_.useCallback(M=>{M!==w.current&&(w.current=M,y(M))},[]),x=_.useCallback(M=>{M!==C.current&&(C.current=M,v(M))},[]),S=i||h,T=a||m,w=_.useRef(null),C=_.useRef(null),P=_.useRef(u),I=l!=null,A=Md(l),F=Md(o),L=Md(c),R=_.useCallback(()=>{if(!w.current||!C.current)return;const M={placement:t,strategy:n,middleware:p};F.current&&(M.platform=F.current),DD(w.current,C.current,M).then($=>{const O={...$,isPositioned:L.current!==!1};k.current&&!Is(P.current,O)&&(P.current=O,Pa.flushSync(()=>{d(O)}))})},[p,t,n,F,L]);_s(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[c]);const k=_.useRef(!1);_s(()=>(k.current=!0,()=>{k.current=!1}),[]),_s(()=>{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 D=_.useMemo(()=>({reference:w,floating:C,setReference:g,setFloating:x}),[g,x]),N=_.useMemo(()=>({reference:S,floating:T}),[S,T]),j=_.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const $=sx(N.floating,u.x),O=sx(N.floating,u.y);return s?{...M,transform:"translate("+$+"px, "+O+"px)",...ax(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:O}},[n,s,N.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:R,refs:D,elements:N,floatingStyles:j}),[u,R,D,N,j])}const FD=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?ix({element:r.current,padding:o}).fn(n):{}:r?ix({element:r,padding:o}).fn(n):{}}}},Xi=(e,t)=>({..._D(e),options:[e,t]}),Dd=(e,t)=>({...ID(e),options:[e,t]}),Nd=(e,t)=>({...OD(e),options:[e,t]}),lx=(e,t)=>({...MD(e),options:[e,t]}),cx=(e,t)=>({...FD(e),options:[e,t]});function Fd(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 ux={..._},LD=ux.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 LD(()=>{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 Ld="ArrowUp",Qi="ArrowDown",Ho="ArrowLeft",Wo="ArrowRight";function Os(e,t,n){return Math.floor(e/t)!==n}function Ji(e,t){return t<0||t>=e.current.length}function Vd(e,t){return Rt(e,{disabledIndices:t})}function dx(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&&Ms(a,s,o));return s}function VD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Ld){if(u&&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}Ji(e,d)&&(d=c)}if(n.key===Qi&&(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}))),Ji(e,d)&&(d=c)),r==="both"){const p=jo(c/i);n.key===Wo&&(u&&Nt(n),c%i!==i-1?(d=Rt(e,{startingIndex:c,disabledIndices:a}),o&&Os(d,i,p)&&(d=Rt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Rt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Os(d,i,p)&&(d=c)),n.key===Ho&&(u&&Nt(n),c%i!==0?(d=Rt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Os(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})),Os(d,i,p)&&(d=c));const f=jo(l/i)===p;Ji(e,d)&&(o&&f?d=n.key===Ho?l:Rt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function jD(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 RD(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 $D(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ms(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 fx=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(fx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():fx=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function zD(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 BD(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=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function HD(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(zD).forEach((u,d)=>{l.set(u,d)}),BD(o,l)||i(l)},[o]),_.createElement(px.Provider,{value:_.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function hx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=_.useContext(px),[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 qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qo.apply(this,arguments)}let mx=!1,WD=0;const gx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+WD++;function qD(){const[e,t]=_.useState(()=>mx?gx():void 0);return Be(()=>{e==null&&t(gx())},[]),_.useEffect(()=>{mx=!0},[]),e}const Uo=ux.useId||qD;let ea;process.env.NODE_ENV!=="production"&&(ea=new Set);function Ds(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ea)!=null&&e.has(o))){var i;(i=ea)==null||i.add(o),console.warn(o)}}function UD(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ea)!=null&&e.has(o))){var i;(i=ea)==null||i.add(o),console.error(o)}}const vx=_.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}={},...y}=t;process.env.NODE_ENV!=="production"&&(n||Ds("The `ref` prop is required for `FloatingArrow`."));const m=Uo(),[v,g]=_.useState(!1);if(Be(()=>{if(!o)return;Qt(o).direction==="rtl"&&g(!0)},[o]),!o)return null;const x=c*2,S=x/2,T=a/2*(l/-8+1),w=s/2*l/4,[C,P]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",F=u&&P==="end"?"bottom":"top";let L=u&&P==="end"?"right":"left";u&&v&&(L=P==="end"?"left":"right");const R=(i==null?void 0:i.x)!=null?u||i.x:"",k=(i==null?void 0:i.y)!=null?u||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-T)+","+(s-w))+(" Q"+a/2+","+s+" "+T+","+(s-w))+" Z",N={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return _.createElement("svg",qo({},y,{"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]:R,[F]:k,[C]:A||I?"100%":"calc(100% - "+x/2+"px)",transform:""+N+(f??""),...h}}),x>0&&_.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:D}),_.createElement("path",{stroke:x&&!p?y.fill:"none",d:D}),_.createElement("clipPath",{id:m},_.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+x,height:a})))});function yx(){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 bx=_.createContext(null),xx=_.createContext(null),ur=()=>{var e;return((e=_.useContext(bx))==null?void 0:e.id)||null},dr=()=>_.useContext(xx);function GD(e){const t=Uo(),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 YD(e){const{children:t,id:n}=e,r=ur();return _.createElement(bx.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function KD(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(()=>yx())[0];return _.createElement(xx.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 wx=fr("safe-polygon");function jd(e,t,n){return n&&!Vo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Tx(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(),y=Ft(c),m=Ft(l),v=Ft(n),g=_.useRef(),x=_.useRef(-1),S=_.useRef(),T=_.useRef(-1),w=_.useRef(!0),C=_.useRef(!1),P=_.useRef(()=>{}),I=_.useCallback(()=>{var D;const N=(D=o.current.openEvent)==null?void 0:D.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);_.useEffect(()=>{if(!s)return;function D(N){let{open:j}=N;j||(clearTimeout(x.current),clearTimeout(T.current),w.current=!0)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),_.useEffect(()=>{if(!s||!y.current||!n)return;function D(j){I()&&r(!1,j,"hover")}const N=Mt(a.floating).documentElement;return N.addEventListener("mouseleave",D),()=>{N.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,y,I]);const A=_.useCallback(function(D,N,j){N===void 0&&(N=!0),j===void 0&&(j="hover");const M=jd(m.current,"close",g.current);M&&!S.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,D,j),M)):N&&(clearTimeout(x.current),r(!1,D,j))},[m,r]),F=Pt(()=>{P.current(),S.current=void 0}),L=Pt(()=>{if(C.current){const D=Mt(a.floating).body;D.style.pointerEvents="",D.removeAttribute(wx),C.current=!1}});_.useEffect(()=>{if(!s)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(O){if(clearTimeout(x.current),w.current=!1,u&&!Vo(g.current)||d>0&&!jd(m.current,"open"))return;const B=jd(m.current,"open",g.current);B?x.current=window.setTimeout(()=>{v.current||r(!0,O,"hover")},B):r(!0,O,"hover")}function j(O){if(D())return;P.current();const B=Mt(a.floating);if(clearTimeout(T.current),y.current&&o.current.floatingContext){n||clearTimeout(x.current),S.current=y.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){L(),F(),A(O,!0,"safe-polygon")}});const oe=S.current;B.addEventListener("mousemove",oe),P.current=()=>{B.removeEventListener("mousemove",oe)};return}(g.current==="touch"?!yt(a.floating,O.relatedTarget):!0)&&A(O)}function M(O){D()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){L(),F(),A(O)}})(O))}if(Je(a.domReference)){var $;const O=a.domReference;return n&&O.addEventListener("mouseleave",M),($=a.floating)==null||$.addEventListener("mouseleave",M),p&&O.addEventListener("mousemove",N,{once:!0}),O.addEventListener("mouseenter",N),O.addEventListener("mouseleave",j),()=>{var B;n&&O.removeEventListener("mouseleave",M),(B=a.floating)==null||B.removeEventListener("mouseleave",M),p&&O.removeEventListener("mousemove",N),O.removeEventListener("mouseenter",N),O.removeEventListener("mouseleave",j)}}},[a,s,e,u,d,p,A,F,L,r,n,v,f,m,y,o]),Be(()=>{var D;if(s&&n&&(D=y.current)!=null&&D.__options.blockPointerEvents&&I()){const j=Mt(a.floating).body;j.setAttribute(wx,""),j.style.pointerEvents="none",C.current=!0;const M=a.floating;if(Je(a.domReference)&&M){var N;const $=a.domReference,O=f==null||(N=f.nodesRef.current.find(B=>B.id===h))==null||(N=N.context)==null?void 0:N.elements.floating;return O&&(O.style.pointerEvents=""),$.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{$.style.pointerEvents="",M.style.pointerEvents=""}}}},[s,n,h,a,f,y,I]),Be(()=>{n||(g.current=void 0,F(),L())},[n,F,L]),_.useEffect(()=>()=>{F(),clearTimeout(x.current),clearTimeout(T.current),L()},[s,a.domReference,F,L]);const R=_.useMemo(()=>{function D(N){g.current=N.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(N){const{nativeEvent:j}=N;function M(){!w.current&&!v.current&&r(!0,j,"hover")}u&&!Vo(g.current)||n||d===0||(clearTimeout(T.current),g.current==="touch"?M():T.current=window.setTimeout(M,d))}}},[u,r,n,v,d]),k=_.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(D){A(D.nativeEvent,!1)}}),[A]);return _.useMemo(()=>s?{reference:R,floating:k}:{},[s,R,k])}function ZD(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 Br(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 XD(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Br(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Go=new WeakMap,Ns=new WeakSet,Fs={},Rd=0;const QD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Sx=e=>e&&(e.host||Sx(e.parentNode)),JD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Sx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function eN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=JD(t,e),s=new Set,l=new Set(a),c=[];Fs[o]||(Fs[o]=new WeakMap);const u=Fs[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 y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",v=(Go.get(h)||0)+1,g=(u.get(h)||0)+1;Go.set(h,v),u.set(h,g),c.push(h),v===1&&m&&Ns.add(h),g===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return Rd++,()=>{c.forEach(f=>{const h=(Go.get(f)||0)-1,y=(u.get(f)||0)-1;Go.set(f,h),u.set(f,y),h||(!Ns.has(f)&&i&&f.removeAttribute(i),Ns.delete(f)),y||f.removeAttribute(o)}),Rd--,Rd||(Go=new WeakMap,Go=new WeakMap,Ns=new WeakSet,Fs={})}}function Ex(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return eN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Yo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Cx(e,t){const n=Ki(e,Yo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function kx(){return Cx(document.body,"next")}function Px(){return Cx(document.body,"prev")}function ta(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function tN(e){Ki(e,Yo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nN(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 rN(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 $d={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 oN;function Ax(e){e.key==="Tab"&&(e.target,clearTimeout(oN))}const Ls=_.forwardRef(function(t,n){const[r,o]=_.useState();Be(()=>(xd()&&o("button"),document.addEventListener("keydown",Ax),()=>{document.removeEventListener("keydown",Ax)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:$d};return _.createElement("span",qo({},t,i))}),_x=_.createContext(null),Ix=fr("portal");function iN(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Uo(),o=Ox(),[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(Ix,""),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(Ix,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Hr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=iN({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&&ta(h)&&(h.type==="focusin"?nN:tN)(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(_x.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&_.createElement(Ls,{"data-type":"outside",ref:l,onFocus:f=>{if(ta(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=Px()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&_.createElement("span",{"aria-owns":i.id,style:$d}),i&&Pa.createPortal(t,i),p&&i&&_.createElement(Ls,{"data-type":"outside",ref:c,onFocus:f=>{if(ta(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=kx()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Ox=()=>_.useContext(_x),aN=20;let Wr=[];function zd(e){Wr=Wr.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!aD(t,Yo())){const n=Ki(t,Yo())[0];n&&(t=n)}Wr.push(t),Wr.length>aN&&(Wr=Wr.slice(-20))}}function Mx(){return Wr.slice().reverse().find(e=>e.isConnected)}const sN=_.forwardRef(function(t,n){return _.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:$d}))});function Ko(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:y,events:m,dataRef:v,floatingId:g,elements:{domReference:x,floating:S}}=t,T=typeof a=="number"&&a<0,w=Hb(x)&&T,C=QD()?i:!0,P=Ft(o),I=Ft(a),A=Ft(s),F=dr(),L=Ox(),R=_.useRef(null),k=_.useRef(null),D=_.useRef(!1),N=_.useRef(!1),j=_.useRef(-1),M=L!=null,$=S==null?void 0:S.firstElementChild,O=($==null?void 0:$.id)===g?$:S,B=Pt(function(K){return K===void 0&&(K=O),K?Ki(K,Yo()):[]}),Q=Pt(K=>{const U=B(K);return P.current.map(Y=>x&&Y==="reference"?x:O&&Y==="floating"?O:U).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function K(Y){if(Y.key==="Tab"){yt(O,gn(Mt(O)))&&B().length===0&&!w&&Nt(Y);const V=Q(),W=On(Y);P.current[0]==="reference"&&W===x&&(Nt(Y),Y.shiftKey?cr(V[V.length-1]):cr(V[1])),P.current[1]==="floating"&&W===O&&Y.shiftKey&&(Nt(Y),cr(V[0]))}}const U=Mt(O);return U.addEventListener("keydown",K),()=>{U.removeEventListener("keydown",K)}},[r,x,O,c,P,w,B,Q]),_.useEffect(()=>{if(r||!S)return;function K(U){const Y=On(U),W=B().indexOf(Y);W!==-1&&(j.current=W)}return S.addEventListener("focusin",K),()=>{S.removeEventListener("focusin",K)}},[r,S,B]),_.useEffect(()=>{if(r||!d)return;function K(){N.current=!0,setTimeout(()=>{N.current=!1})}function U(Y){const V=Y.relatedTarget;queueMicrotask(()=>{const W=!(yt(x,V)||yt(S,V)||yt(V,S)||yt(L==null?void 0:L.portalNode,V)||V!=null&&V.hasAttribute(fr("focus-guard"))||F&&(Br(F.nodesRef.current,h).find(Z=>{var ie,z;return yt((ie=Z.context)==null?void 0:ie.elements.floating,V)||yt((z=Z.context)==null?void 0:z.elements.domReference,V)})||ZD(F.nodesRef.current,h).find(Z=>{var ie,z;return((ie=Z.context)==null?void 0:ie.elements.floating)===V||((z=Z.context)==null?void 0:z.elements.domReference)===V})));if(l&&W&&gn(Mt(O))===Mt(O).body){Et(O)&&(O==null||O.focus());const Z=j.current,ie=B(),z=ie[Z]||ie[ie.length-1]||O;Et(z)&&z.focus()}(w||!c)&&V&&W&&!N.current&&V!==Mx()&&(D.current=!0,y(!1,Y))})}if(S&&Et(x))return x.addEventListener("focusout",U),x.addEventListener("pointerdown",K),S.addEventListener("focusout",U),()=>{x.removeEventListener("focusout",U),x.removeEventListener("pointerdown",K),S.removeEventListener("focusout",U)}},[r,x,S,O,c,h,F,L,y,d,l,B,w]),_.useEffect(()=>{var K;if(r)return;const U=Array.from((L==null||(K=L.portalNode)==null?void 0:K.querySelectorAll("["+fr("portal")+"]"))||[]);if(S){const Y=[S,...U,R.current,k.current,P.current.includes("reference")||w?x:null].filter(W=>W!=null),V=c||w?Ex(Y,C,!C):Ex(Y);return()=>{V()}}},[r,x,S,c,P,L,w,C]),Be(()=>{if(r||!Et(O))return;const K=Mt(O),U=gn(K);queueMicrotask(()=>{const Y=Q(O),V=I.current,W=(typeof V=="number"?Y[V]:V.current)||O,Z=yt(O,U);!T&&!Z&&p&&cr(W,{preventScroll:W===O})})},[r,p,O,T,Q,I]),Be(()=>{if(r||!O)return;let K=!1;const U=Mt(O),Y=gn(U);let W=v.current.openEvent;const Z=f.domReference.current;zd(Y);function ie(z){let{open:xe,reason:Ae,event:Ie,nested:Oe}=z;xe&&(W=Ie),Ae==="escape-key"&&f.domReference.current&&zd(f.domReference.current),Ae==="hover"&&Ie.type==="mouseleave"&&(D.current=!0),Ae==="outside-press"&&(Oe?(D.current=!1,K=!0):D.current=!(zb(Ie)||bd(Ie)))}return m.on("openchange",ie),()=>{m.off("openchange",ie);const z=gn(U),xe=yt(S,z)||F&&Br(F.nodesRef.current,h).some(G=>{var se;return yt((se=G.context)==null?void 0:se.elements.floating,z)});(xe||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&zd(f.domReference.current);const Ie=Z||Y,Oe=Ki(Mt(Ie).body,Yo());queueMicrotask(()=>{let G=Mx();!G&&Et(Ie)&&S&&(G=rN(Oe,Ie,S)),A.current&&!D.current&&Et(G)&&(!(G!==z&&z!==U.body)||xe)&&G.focus({preventScroll:K})})}},[r,S,O,A,v,f,m,F,h]),Be(()=>{if(!r&&L)return L.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:y,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,c,p,y,f,d]),Be(()=>{if(r||!O||typeof MutationObserver!="function"||T)return;const K=()=>{const Y=O.getAttribute("tabindex"),V=B(),W=gn(Mt(S)),Z=V.indexOf(W);Z!==-1&&(j.current=Z),P.current.includes("floating")||W!==f.domReference.current&&V.length===0?Y!=="0"&&O.setAttribute("tabindex","0"):Y!=="-1"&&O.setAttribute("tabindex","-1")};K();const U=new MutationObserver(K);return U.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,S,O,f,P,B,T]);function oe(K){return r||!u||!c?null:_.createElement(sN,{ref:K==="start"?R:k,onClick:U=>y(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!w:!0)&&(M||c);return _.createElement(_.Fragment,null,J&&_.createElement(Ls,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:K=>{if(c){const Y=Q();cr(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(D.current=!1,ta(K,L.portalNode)){const Y=kx()||x;Y==null||Y.focus()}else{var U;(U=L.beforeOutsideRef.current)==null||U.focus()}}}),!w&&oe("start"),n,oe("end"),J&&_.createElement(Ls,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:K=>{if(c)cr(Q()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(D.current=!0),ta(K,L.portalNode)){const Y=Px()||x;Y==null||Y.focus()}else{var U;(U=L.afterOutsideRef.current)==null||U.focus()}}}))}const Bd=new Set,lN=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Uo();return Be(()=>{if(!r)return;Bd.add(i);const a=/iP(hone|ad|od)|iOS/.test(yd()),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 y=((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(y))+"px",right:"0"})}return()=>{Bd.delete(i),Bd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),_.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Dx(e){return Et(e.target)&&e.target.tagName==="BUTTON"}function Nx(e){return Sd(e)}function na(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=_.useRef(),p=_.useRef(!1),f=_.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const y=d.current;h.button===0&&s!=="click"&&(Vo(y,!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 y=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Vo(y,!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||Dx(h))&&(h.key===" "&&!Nx(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Dx(h)||Nx(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 cN(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 Fx(e){return e!=null&&e.clientX!=null}function uN(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(),[y,m]=_.useState([]),v=Pt((w,C)=>{d.current||r.current.openEvent&&!Fx(r.current.openEvent)||a.setPositionReference(cN(i,{x:w,y:C,axis:l,dataRef:r,pointerType:f}))}),g=Pt(w=>{c!=null||u!=null||(n?p.current||m([]):v(w.clientX,w.clientY))}),x=Vo(f)?o:n,S=_.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const w=Ht(o);function C(P){const I=On(P);yt(o,I)?(w.removeEventListener("mousemove",C),p.current=null):v(P.clientX,P.clientY)}if(!r.current.openEvent||Fx(r.current.openEvent)){w.addEventListener("mousemove",C);const P=()=>{w.removeEventListener("mousemove",C),p.current=null};return p.current=P,P}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);_.useEffect(()=>S(),[S,y]),_.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,v(c,u))},[s,c,u,v]);const T=_.useMemo(()=>{function w(C){let{pointerType:P}=C;h(P)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:g,onMouseEnter:g}},[g]);return _.useMemo(()=>s?{reference:T}:{},[s,T])}const dN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},fN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Lx=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 qr(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,y=dr(),m=Pt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,g=_.useRef(!1),x=_.useRef(!1),{escapeKey:S,outsidePress:T}=Lx(f),{escapeKey:w,outsidePress:C}=Lx(h),P=Pt(k=>{var D;if(!n||!a||!s||k.key!=="Escape")return;const N=(D=i.current.floatingContext)==null?void 0:D.nodeId,j=y?Br(y.nodesRef.current,N):[];if(!S&&(k.stopPropagation(),j.length>0)){let M=!0;if(j.forEach($=>{var O;if((O=$.context)!=null&&O.open&&!$.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}r(!1,MM(k)?k.nativeEvent:k,"escape-key")}),I=Pt(k=>{var D;const N=()=>{var j;P(k),(j=On(k))==null||j.removeEventListener("keydown",N)};(D=On(k))==null||D.addEventListener("keydown",N)}),A=Pt(k=>{var D;const N=g.current;g.current=!1;const j=x.current;if(x.current=!1,c==="click"&&j||N||typeof v=="function"&&!v(k))return;const M=On(k),$="["+fr("inert")+"]",O=Mt(o.floating).querySelectorAll($);let B=Je(M)?M:null;for(;B&&!ir(B);){const K=Un(B);if(ir(K)||!Je(K))break;B=K}if(O.length&&Je(M)&&!DM(M)&&!yt(M,o.floating)&&Array.from(O).every(K=>!yt(B,K)))return;if(Et(M)&&R){const K=M.clientWidth>0&&M.scrollWidth>M.clientWidth,U=M.clientHeight>0&&M.scrollHeight>M.clientHeight;let Y=U&&k.offsetX>M.clientWidth;if(U&&Qt(M).direction==="rtl"&&(Y=k.offsetX<=M.offsetWidth-M.clientWidth),Y||K&&k.offsetY>M.clientHeight)return}const Q=(D=i.current.floatingContext)==null?void 0:D.nodeId,oe=y&&Br(y.nodesRef.current,Q).some(K=>{var U;return Td(k,(U=K.context)==null?void 0:U.elements.floating)});if(Td(k,o.floating)||Td(k,o.domReference)||oe)return;const J=y?Br(y.nodesRef.current,Q):[];if(J.length>0){let K=!0;if(J.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){K=!1;return}}),!K)return}r(!1,k,"outside-press")}),F=Pt(k=>{var D;const N=()=>{var j;A(k),(j=On(k))==null||j.removeEventListener(c,N)};(D=On(k))==null||D.addEventListener(c,N)});_.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function k(j){r(!1,j,"ancestor-scroll")}const D=Mt(o.floating);s&&D.addEventListener("keydown",w?I:P,w),v&&D.addEventListener(c,C?F:A,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(j=>{var M;return j!==((M=D.defaultView)==null?void 0:M.visualViewport)}),N.forEach(j=>{j.addEventListener("scroll",k,{passive:!0})}),()=>{s&&D.removeEventListener("keydown",w?I:P,w),v&&D.removeEventListener(c,C?F:A,C),N.forEach(j=>{j.removeEventListener("scroll",k)})}},[i,o,s,v,c,n,r,p,a,S,T,P,w,I,A,C,F]),_.useEffect(()=>{g.current=!1},[v,c]);const L=_.useMemo(()=>({onKeyDown:P,[dN[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[P,r,u,d]),R=_.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[fN[c]]:()=>{g.current=!0}}),[P,c]);return _.useMemo(()=>a?{reference:L,floating:R}:{},[a,L,R])}function pN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Uo(),i=_.useRef({}),[a]=_.useState(()=>yx()),s=ur()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Je(f)&&UD("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,y)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:y,nested:s}),n==null||n(f,h,y)}),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 Ur(e){e===void 0&&(e={});const{nodeId:t}=e,n=pN({...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=ND({...e,elements:{...o,...s&&{reference:s}}}),h=_.useCallback(x=>{const S=Je(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(S),f.refs.setReference(S)},[f.refs]),y=_.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]),m=_.useMemo(()=>({...f.refs,setReference:y,setPositionReference:h,domReference:d}),[f.refs,y,h]),v=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),g=_.useMemo(()=>({...f,...r,refs:m,elements:v,nodeId:t}),[f,m,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=g;const x=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);x&&(x.context=g)}),_.useMemo(()=>({...f,context:g,refs:m,elements:v}),[f,m,v,g])}function hN(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 y(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",y,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",y,!0)}},[a.domReference,n,s]),_.useEffect(()=>{if(!s)return;function f(h){let{reason:y}=h;(y==="reference-press"||y==="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){bd(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(xd()&&Bb())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Sd(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,y=f.nativeEvent,m=Je(h)&&h.hasAttribute(fr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const g=gn(a.domReference?a.domReference.ownerDocument:document);!h&&g===a.domReference||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,g)||yt(a.domReference,g)||m||r(!1,y,"focus")})}}),[i,a.domReference,r,l]);return _.useMemo(()=>s?{reference:p}:{},[s,p])}const Vx="active",jx="selected";function Hd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Vx]:a,[jx]: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&&[Vx,jx].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),y=0;y<f;y++)h[y]=arguments[y];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Gr(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=>Hd(s,e,"reference"),t),i=_.useCallback(s=>Hd(s,e,"floating"),n),a=_.useCallback(s=>Hd(s,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Rx=!1;function Vs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function $x(e,t){return Vs(t,e===Ld||e===Qi,e===Ho||e===Wo)}function Wd(e,t,n){return Vs(t,e===Qi,n?e===Ho:e===Wo)||e==="Enter"||e===" "||e===""}function mN(e,t,n){return Vs(t,n?e===Ho:e===Wo,e===Qi)}function zx(e,t,n){return Vs(t,n?e===Wo:e===Ho,e===Ld)}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:h=!1,focusItemOnOpen:y="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:v=!0,disabledIndices:g=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:w,itemSizes:C,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||Ds("`useListNavigation` looping must be enabled to allow escaping."),h||Ds("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&S>1&&Ds("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=ur(),A=dr(),F=Pt(s),L=_.useRef(y),R=_.useRef(c??-1),k=_.useRef(null),D=_.useRef(!0),N=_.useRef(F),j=_.useRef(!!o.floating),M=_.useRef(n),$=_.useRef(!1),O=_.useRef(!1),B=Ft(g),Q=Ft(n),oe=Ft(T),J=Ft(o.floating),K=Ft(c),[U,Y]=_.useState(),[V,W]=_.useState(),Z=Pt(function(G,se,ae){ae===void 0&&(ae=!1);function X(ve){h?(Y(ve.id),A==null||A.events.emit("virtualfocus",ve),w&&(w.current=ve)):cr(ve,{preventScroll:!0,sync:Bb()&&xd()?Rx||$.current:!1})}const de=G.current[se.current];de&&X(de),requestAnimationFrame(()=>{const ve=G.current[se.current]||de;if(!ve)return;de||X(ve);const we=oe.current;we&&z&&(ae||!D.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return Rx=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?L.current&&c!=null&&(O.current=!0,R.current=c,F(c)):j.current&&(R.current=-1,N.current(null)))},[l,n,o.floating,c,F]),Be(()=>{if(l&&n&&o.floating)if(a==null){if($.current=!1,K.current!=null)return;if(j.current&&(R.current=-1,Z(i,R)),(!M.current||!j.current)&&L.current&&(k.current!=null||L.current===!0&&k.current==null)){let G=0;const se=()=>{i.current[0]==null?(G<2&&(G?requestAnimationFrame:queueMicrotask)(se),G++):(R.current=k.current==null||Wd(k.current,x,f)||p?Vd(i,B.current):dx(i,B.current),k.current=null,F(R.current))};se()}}else Ji(i,a)||(R.current=a,Z(i,R,O.current),O.current=!1)},[l,n,o.floating,a,K,p,i,x,f,F,Z,B]),Be(()=>{var G;if(!l||o.floating||!A||h||!j.current)return;const se=A.nodesRef.current,ae=(G=se.find(ve=>ve.id===I))==null||(G=G.context)==null?void 0:G.elements.floating,X=gn(Mt(o.floating)),de=se.some(ve=>ve.context&&yt(ve.context.elements.floating,X));ae&&!de&&D.current&&ae.focus({preventScroll:!0})},[l,o.floating,A,I,h]),Be(()=>{if(!l||!A||!h||I)return;function G(se){W(se.id),w&&(w.current=se)}return A.events.on("virtualfocus",G),()=>{A.events.off("virtualfocus",G)}},[l,A,h,I,w]),Be(()=>{N.current=F,j.current=!!o.floating}),Be(()=>{n||(k.current=null)},[n]),Be(()=>{M.current=n},[n]);const ie=a!=null,z=_.useMemo(()=>{function G(ae){if(!n)return;const X=i.current.indexOf(ae);X!==-1&&F(X)}return{onFocus(ae){let{currentTarget:X}=ae;G(X)},onClick:ae=>{let{currentTarget:X}=ae;return X.focus({preventScroll:!0})},...m&&{onMouseMove(ae){let{currentTarget:X}=ae;G(X)},onPointerLeave(ae){let{pointerType:X}=ae;!D.current||X==="touch"||(R.current=-1,Z(i,R),F(null),h||cr(J.current,{preventScroll:!0}))}}}},[n,J,Z,m,i,F,h]),xe=Pt(G=>{if(D.current=!1,$.current=!0,!Q.current&&G.currentTarget===J.current)return;if(p&&zx(G.key,x,f)){Nt(G),r(!1,G.nativeEvent,"list-navigation"),Et(o.domReference)&&!h&&o.domReference.focus();return}const se=R.current,ae=Vd(i,g),X=dx(i,g);if(G.key==="Home"&&(Nt(G),R.current=ae,F(R.current)),G.key==="End"&&(Nt(G),R.current=X,F(R.current)),S>1){const de=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ve=jD(de,S,P),we=ve.findIndex(ce=>ce!=null&&!Ms(i.current,ce,g)),re=ve.reduce((ce,Le,Xe)=>Le!=null&&!Ms(i.current,Le,g)?Xe:ce,-1);if(R.current=ve[VD({current:ve.map(ce=>ce!=null?i.current[ce]:null)},{event:G,orientation:x,loop:d,cols:S,disabledIndices:$D([...g||i.current.map((ce,Le)=>Ms(i.current,Le)?Le:void 0),void 0],ve),minIndex:we,maxIndex:re,prevIndex:RD(R.current>X?ae:R.current,de,ve,S,G.key===Qi?"bl":G.key===Wo?"tr":"tl"),stopEvent:!0})],F(R.current),x==="both")return}if($x(G.key,x)){if(Nt(G),n&&!h&&gn(G.currentTarget.ownerDocument)===G.currentTarget){R.current=Wd(G.key,x,f)?ae:X,F(R.current);return}Wd(G.key,x,f)?d?R.current=se>=X?u&&se!==i.current.length?-1:ae:Rt(i,{startingIndex:se,disabledIndices:g}):R.current=Math.min(X,Rt(i,{startingIndex:se,disabledIndices:g})):d?R.current=se<=ae?u&&se!==-1?i.current.length:X:Rt(i,{startingIndex:se,decrement:!0,disabledIndices:g}):R.current=Math.max(ae,Rt(i,{startingIndex:se,decrement:!0,disabledIndices:g})),Ji(i,R.current)?F(null):F(R.current)}}),Ae=_.useMemo(()=>h&&n&&ie&&{"aria-activedescendant":V||U},[h,n,ie,V,U]),Ie=_.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!Hb(o.domReference)&&Ae,onKeyDown:xe,onPointerMove(){D.current=!0}}),[Ae,xe,o.domReference,x]),Oe=_.useMemo(()=>{function G(ae){y==="auto"&&zb(ae.nativeEvent)&&(L.current=!0)}function se(ae){L.current=y,y==="auto"&&bd(ae.nativeEvent)&&(L.current=!0)}return{...Ae,onKeyDown(ae){D.current=!1;const X=ae.key.indexOf("Arrow")===0,de=mN(ae.key,x,f),ve=zx(ae.key,x,f),we=$x(ae.key,x),re=(p?de:we)||ae.key==="Enter"||ae.key.trim()==="";if(h&&n){const Ct=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),pt=A&&Ct?XD(A.nodesRef.current,Ct.id):null;if(X&&pt&&w){const Lt=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(de||ve){var ce,Le;const Tn=((ce=pt.context)==null?void 0:ce.elements.domReference)===ae.currentTarget,zn=ve&&!Tn?(Le=pt.context)==null?void 0:Le.elements.domReference:de?i.current.find(wr=>(wr==null?void 0:wr.id)===U):null;zn&&(Nt(ae),zn.dispatchEvent(Lt),W(void 0))}if(we&&pt.context&&pt.context.open&&pt.parentId&&ae.currentTarget!==pt.context.elements.domReference){var Xe;Nt(ae),(Xe=pt.context.elements.domReference)==null||Xe.dispatchEvent(Lt);return}}return xe(ae)}if(!(!n&&!v&&X)){if(re&&(k.current=p&&we?null:ae.key),p){de&&(Nt(ae),n?(R.current=Vd(i,B.current),F(R.current)):r(!0,ae.nativeEvent,"list-navigation"));return}we&&(c!=null&&(R.current=c),Nt(ae),!n&&v?r(!0,ae.nativeEvent,"list-navigation"):xe(ae),n&&F(R.current))}},onFocus(){n&&!h&&F(null)},onPointerDown:se,onMouseDown:G,onClick:G}},[U,Ae,xe,B,y,i,p,F,r,n,v,x,f,c,A,h,w]);return _.useMemo(()=>l?{reference:Oe,floating:Ie,item:z}:{},[l,Oe,Ie,z])}const gN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Yr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=gN.get(a))!=null?n:a,l=Uo(),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:y,selected:m}=h;const v={role:"option",...y&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":y&&m};case"combobox":return{...v,...y&&{"aria-selected":!0}}}return{}},[o,a]);return _.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const Bx=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function vN(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 yN(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=vN(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 Hx(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(()=>({...Zo(i,c),...Zo(n,c)})),{isMounted:y,status:m}=yN(e,{duration:a}),v=Ft(n),g=Ft(r),x=Ft(o),S=Ft(i);return Be(()=>{const T=Zo(v.current,c),w=Zo(x.current,c),C=Zo(S.current,c),P=Zo(g.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(P).map(Bx).join(","),transitionDuration:d+"ms",...C,...P}),m==="close"){const I=w||T;h({transitionProperty:Object.keys(I).map(Bx).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,g,S,d,m,c]),{isMounted:y,styles:f}}function bN(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(),y=_.useRef(""),m=_.useRef((n=f??a)!=null?n:-1),v=_.useRef(null),g=Pt(s),x=Pt(l),S=Ft(u),T=Ft(p);Be(()=>{r&&(clearTimeout(h.current),v.current=null,y.current="")},[r]),Be(()=>{if(r&&y.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,x(A)):o.current.typing&&(o.current.typing=A,x(A))}),C=Pt(A=>{function F(N,j,M){const $=S.current?S.current(j,M):j.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return $?N.indexOf($):-1}const L=i.current;if(y.current.length>0&&y.current[0]!==" "&&(F(L,L,y.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(N=>{var j,M;return N?((j=N[0])==null?void 0:j.toLocaleLowerCase())!==((M=N[1])==null?void 0:M.toLocaleLowerCase()):!0})&&y.current===A.key&&(y.current="",m.current=v.current),y.current+=A.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",m.current=v.current,w(!1)},d);const k=m.current,D=F(L,[...L.slice((k||0)+1),...L.slice(0,(k||0)+1)],y.current);D!==-1?(g(D),v.current=D):A.key!==" "&&(y.current="",w(!1))}),P=_.useMemo(()=>({onKeyDown:C}),[C]),I=_.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&w(!1)}}),[C,w]);return _.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function Wx(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 xN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qx(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 y=d-a,m=p-s,g=Math.sqrt(y*y+m*m)/h;return a=d,s=p,l=f,g}const u=d=>{let{x:p,y:f,placement:h,elements:y,onClose:m,nodeId:v,tree:g}=d;return function(S){function T(){clearTimeout(o),m()}if(clearTimeout(o),!y.domReference||!y.floating||h==null||p==null||f==null)return;const{clientX:w,clientY:C}=S,P=[w,C],I=On(S),A=S.type==="mouseleave",F=yt(y.floating,I),L=yt(y.domReference,I),R=y.domReference.getBoundingClientRect(),k=y.floating.getBoundingClientRect(),D=h.split("-")[0],N=p>k.right-k.width/2,j=f>k.bottom-k.height/2,M=xN(P,R),$=k.width>R.width,O=k.height>R.height,B=($?R:k).left,Q=($?R:k).right,oe=(O?R:k).top,J=(O?R:k).bottom;if(F&&(i=!0,!A))return;if(L&&(i=!1),L&&!A){i=!0;return}if(A&&Je(S.relatedTarget)&&yt(y.floating,S.relatedTarget)||g&&Br(g.nodesRef.current,v).some(Y=>{let{context:V}=Y;return V==null?void 0:V.open}))return;if(D==="top"&&f>=R.bottom-1||D==="bottom"&&f<=R.top+1||D==="left"&&p>=R.right-1||D==="right"&&p<=R.left+1)return T();let K=[];switch(D){case"top":K=[[B,R.top+1],[B,k.bottom-1],[Q,k.bottom-1],[Q,R.top+1]];break;case"bottom":K=[[B,k.top+1],[B,R.bottom-1],[Q,R.bottom-1],[Q,k.top+1]];break;case"left":K=[[k.right-1,J],[k.right-1,oe],[R.left+1,oe],[R.left+1,J]];break;case"right":K=[[R.right-1,J],[R.right-1,oe],[k.left+1,oe],[k.left+1,J]];break}function U(Y){let[V,W]=Y;switch(D){case"top":{const Z=[$?V+t/2:N?V+t*4:V-t*4,W+t+1],ie=[$?V-t/2:N?V+t*4:V-t*4,W+t+1],z=[[k.left,N||$?k.bottom-t:k.top],[k.right,N?$?k.bottom-t:k.top:k.bottom-t]];return[Z,ie,...z]}case"bottom":{const Z=[$?V+t/2:N?V+t*4:V-t*4,W-t],ie=[$?V-t/2:N?V+t*4:V-t*4,W-t],z=[[k.left,N||$?k.top+t:k.bottom],[k.right,N?$?k.top+t:k.bottom:k.top+t]];return[Z,ie,...z]}case"left":{const Z=[V+t+1,O?W+t/2:j?W+t*4:W-t*4],ie=[V+t+1,O?W-t/2:j?W+t*4:W-t*4];return[...[[j||O?k.right-t:k.left,k.top],[j?O?k.right-t:k.left:k.right-t,k.bottom]],Z,ie]}case"right":{const Z=[V-t,O?W+t/2:j?W+t*4:W-t*4],ie=[V-t,O?W-t/2:j?W+t*4:W-t*4],z=[[j||O?k.left+t:k.right,k.top],[j?O?k.left+t:k.right:k.left+t,k.bottom]];return[Z,ie,...z]}}}if(!Wx([w,C],K)){if(i&&!M)return T();if(!A&&r){const Y=c(S.clientX,S.clientY);if(Y!==null&&Y<.1)return T()}Wx([w,C],U([p,f]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Xo=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Xi(10),Nd({fallbackAxisSideDirection:"end"}),Dd(),cx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Ur({open:n,middleware:i,transform:!0,whileElementsMounted:Zi,onOpenChange:(h,y)=>{var v;const m=y==null?void 0:y.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(v=e.onChange)==null||v.call(e,h))}}),c=na(l),u=qr(l),d=Yr(l),{getReferenceProps:p,getFloatingProps:f}=Gr([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(Hr,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Ko,{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-6 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[b.jsx(vx,{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]})})})]})},wN=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(!1),{context:s,refs:l}=Ur({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=na(s),u=Yr(s),d=qr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Gr([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(po,{...f(e),as:gt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(gt.span,{layoutId:o,children:e.trigger})}),b.jsx(Jn,{children:i?b.jsx(Hr,{root:t,children:b.jsx(Ko,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(gt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Ux=300,TN=500,Gx=(e="")=>$e("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),Ud=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Yx=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),y=E.useRef([]),m=E.useRef([]),v=E.useContext(Ud),g=ur(),x=dr(),S=GD(),T=hx(),w=g!==null,{floatingStyles:C,refs:P,context:I}=Ur({nodeId:S,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Zi,placement:w?"right":"bottom-start",middleware:[Xi({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Nd(),Dd()]}),A=Yr(I,{role:"menu",enabled:!0}),F=qr(I,{bubbles:!0}),L=Tx(I,{move:!1,enabled:n,delay:{open:Ux},handleClose:qx({blockPointerEvents:!0})}),R=na(I,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),k=qd(I,{loop:!0,listRef:y,activeIndex:f,nested:w,onNavigate:h}),D=bN(I,{activeIndex:f,listRef:m,resetMs:TN,onMatch:c?h:void 0}),{getReferenceProps:N,getFloatingProps:j,getItemProps:M}=Gr([L,R,A,F,k,D]);E.useEffect(()=>{if(!x)return;function O(){u(!1)}function B(Q){Q.nodeId!==S&&Q.parentId===g&&u(!1)}return x.events.on("click",O),x.events.on("menuopen",B),()=>{x.events.off("click",O),x.events.off("menuopen",B)}},[x,S,g]),E.useEffect(()=>{c&&x&&x.events.emit("menuopen",{parentId:g,nodeId:S})},[x,c,S,g]);const $=o?s.className:$e(Gx(s.className));return b.jsxs(YD,{id:S,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx(Lo,{...N(v.getItemProps({...s,onFocus(O){var B;(B=s.onFocus)==null||B.call(s,O),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:Fd([P.setReference,T.ref,l]),tabIndex:w?v.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:$}):b.jsxs("button",{type:"button",className:$,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Fd([P.setReference,T.ref,l]),tabIndex:w?v.activeIndex===T.index?0:-1:void 0,...N(v.getItemProps({...s,onFocus(O){var B;(B=s.onFocus)==null||B.call(s,O),p(!1),v.setHasFocusInside(!0)}})),children:[a,w&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(Nu,{size:14})]})]})}),b.jsx(Ud.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:M,setHasFocusInside:p,isOpen:c},children:b.jsx(HD,{elementsRef:y,labelsRef:m,children:c&&b.jsx(Hr,{preserveTabOrder:!0,children:b.jsx(Ko,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:b.jsx(t,{...j(),ref:P.setFloating,style:{...s.style,...C},className:$e("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),SN=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Ud),s=hx({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:Fd([s.ref,i]),className:Gx(`${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]})}),EN=E.forwardRef((e,t)=>ur()!==null?b.jsx(Yx,{...e,isParent:!1,ref:t}):b.jsx(KD,{children:b.jsx(Yx,{...e,isParent:!0,ref:t})})),CN=(e,t)=>Gi()?t:window.matchMedia(e).matches,kN=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(CN(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},PN=e=>{const t=E.useRef(Gi()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const n=document.documentElement;e?(t.current=document.documentElement.style.overflowY,n.style.overflowY="hidden",n.style.padding=Vh(n)?"0 15px 0 0":""):(n.style.padding="",document.documentElement.style.overflowY=t.current)},[e]),E.useEffect(()=>{if(!e)return;const n=new AbortController,r=document.documentElement,o=i=>i.target===r&&e?i.preventDefault():void 0;return r.addEventListener("wheel",o,{signal:n.signal,passive:!1}),r.addEventListener("scroll",o,{signal:n.signal,passive:!1}),()=>{n.abort()}},[e])},vn="600ms",AN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},_N={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},Gd={drawer:e=>e==="left"?AN:_N,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}}},IN=so("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"}}),ON={top:0,left:0,right:0,bottom:-1},MN=e=>e*.62,DN=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=MN(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return b.jsx(gt.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:ON,whileDrag:{cursor:"grabbing"},className:$e("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})},js={drawer:"right",sheet:"none",dialog:"none"},NN=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??js.drawer:js[o]:t?js[o]:js.sheet},FN=({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:y=!1,ariaTitle:m,...v})=>{PN(e);const g=E.useId(),x=E.useId(),S=kN("(min-width: 64rem)"),T=f!=="dialog",w=NN(S,d,f,h),C=S||d?Gd[f]:Gd.sheet,P=typeof C=="function"?C(w):C,I=S||d?f:"sheet",{refs:A,context:F}=Ur({open:e,onOpenChange:s}),L=na(F),R=Yr(F),k=qr(F,{escapeKey:!0,referencePress:!0,outsidePress:y}),{getReferenceProps:D,getFloatingProps:N}=Gr([L,R,k]),j=o,M=ko(void 0),$=()=>s(!1);return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx(Lo,{ref:A.setReference,...D({layoutId:a}),children:j}):b.jsx(gt.button,{ref:A.setReference,...D(),layoutId:a,type:"button",children:j})}):null,b.jsx(Hr,{children:b.jsx(Jn,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(lN,{lockScroll:!1,className:$e(`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(Ko,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:F,children:b.jsxs(gt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:P,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:a,className:$e(IN({position:w,type:I}),l),style:I==="drawer"?{width:M}:{height:M},...t?{"aria-labelledby":g,"aria-describedby":x}:{"aria-label":m},...N(),children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:g,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:$,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:b.jsx(Lu,{})})}):null,T&&c?b.jsx(DN,{onChange:s,parent:A.floating,position:w,sheet:I==="sheet",value:M}):null]})})}):null})})]})},LN=e=>b.jsx(gt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Kx=({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=nd,...d})=>{const[p,f]=E.useState(o??!1),h=E.useRef(null),y=e||"span",m=L=>{f(L),u==null||u(L)},{refs:v,floatingStyles:g,context:x}=Ur({open:p,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:Zi,onOpenChange:o?void 0:m,middleware:[Dd(),Xi(5),Nd({fallbackAxisSideDirection:"start"}),cx({padding:5,element:h})]}),S=Tx(x,{move:!0,delay:{open:Ux},enabled:s?a:!1,handleClose:l?qx():null}),T=hN(x,{enabled:s?i:!1}),w=na(x,{enabled:s?l:!1}),C=qr(x,{enabled:s}),P=Yr(x,{role:"tooltip",enabled:s}),I=uN(x,{enabled:!!s&&!!c}),{getReferenceProps:A,getFloatingProps:F}=Gr([P,C,I,i?T:void 0,a?S:void 0,l?w:void 0]);return E.useEffect(()=>f(o===void 0?!1:o),[o]),b.jsxs(E.Fragment,{children:[b.jsx(y,{ref:v.setReference,...A(d),children:t}),p&&b.jsx(Hr,{preserveTabOrder:!0,children:b.jsxs(on,{...F(),ref:v.setFloating,style:g,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx(vx,{ref:h,context:x,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Rs{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++)Rs.getDescendantProperty(s[l],i,r);else i&&Rs.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Kr{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=Kr.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=Rs.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Kr.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=Kr.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 Kr.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 $s=0,pr=1,Qo=2,Zx=4;function Xx(e){return()=>e}function VN(e){e()}function ra(e,t){return n=>e(t(n))}function Qx(e,t){return()=>e(t)}function Jx(e,t){return n=>e(t,n)}function Yd(e){return e!==void 0}function jN(...e){return()=>{e.map(VN)}}function Jo(){}function zs(e,t){return t(e),e}function RN(e,t){return t(e)}function it(...e){return e}function Ze(e,t){return e(pr,t)}function Me(e,t){e($s,t)}function Kd(e){e(Qo)}function $t(e){return e(Zx)}function be(e,t){return Ze(e,Jx(t,$s))}function Dn(e,t){const n=e(pr,r=>{n(),t(r)});return n}function e0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function t0(e,t){return e===t}function at(e=t0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>ra(t,e)}function Nn(e){return t=>()=>{t(e)}}function te(e,...t){const n=$N(...t);return(r,o)=>{switch(r){case Qo:Kd(e);return;case pr:return Ze(e,n(o))}}}function Fn(e,t){return n=>r=>{n(t=e(t,r))}}function ei(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);Ze(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 $N(...e){return t=>e.reduceRight(RN,t)}function zN(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=Ze(e,i),t):(r(),Jo);case Qo:r(),n=null;return}}}function le(e){let t=e;const n=ze();return(r,o)=>{switch(r){case $s:t=o;break;case pr:{o(t);break}case Zx:return t}return n(r,o)}}function zt(e,t){return zs(le(t),n=>be(e,n))}function ze(){const e=[];return(t,n)=>{switch(t){case $s:e.slice().forEach(r=>{r(n)});return;case Qo: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 zs(ze(),t=>be(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:BN(),singleton:n}}const BN=()=>Symbol();function HN(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);Ze(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case Qo:{Kd(t);return}case pr:return r===o&&a(n),Ze(t,a)}}}function ke(e,t=t0){return te(e,at(t))}function n0(...e){return function(t,n){switch(t){case Qo:return;case pr:return jN(...e.map(r=>Ze(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 WN={0:"debug",3:"error",1:"log",2:"warn"},qN=()=>typeof globalThis>"u"?window:globalThis,mr=qe(()=>{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[WN[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 Zd(e,t,n).callbackRef}function Zd(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 r0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=UN(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 y=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,v=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:v}),i==null||i(s?o0("column-gap",getComputedStyle(u).columnGap,o):o0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return Zd(c,n,l)}function UN(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 o0(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 Xd(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}=Zd(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=qe(()=>{const e=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),y=le(!1);return be(te(e,he(({scrollTop:m})=>m)),t),be(te(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:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),oa={lvl:0};function i0(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===oa}function ia(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?ia(e.l,t):ia(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)?l0(t,n,1):t===e.k?_t(e,{k:t,v:n}):t<e.k?c0(_t(e,{l:nn(e.l,t,n)})):c0(_t(e,{r:nn(e.r,t,n)}))}function ti(){return oa}function Bs(e,t,n){if(tt(e))return[];const r=yn(e,t)[0];return GN(Jd(e,r,n))}function Qd(e,t){if(tt(e))return oa;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=s0(r);return Hs(_t(e,{k:i,l:a0(r),v:a}))}}else return t<n?Hs(_t(e,{l:Qd(r,t)})):Hs(_t(e,{r:Qd(o,t)}))}function Zr(e){return tt(e)?[]:[...Zr(e.l),{k:e.k,v:e.v},...Zr(e.r)]}function Jd(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(Jd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(Jd(i,t,n))),s}function Hs(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(ef(t))return u0(_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(ef(e))return tf(_t(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=ef(o)?r.lvl-1:r.lvl;return _t(o,{l:_t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:tf(_t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function _t(e,t){return l0(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 a0(e){return tt(e.r)?e.l:Hs(_t(e,{r:a0(e.r)}))}function ef(e){return tt(e)||e.lvl>e.r.lvl}function s0(e){return tt(e.r)?[e.k,e.v]:s0(e.r)}function l0(e,t,n,r=oa,o=oa){return{k:e,l:r,lvl:n,r:o,v:t}}function c0(e){return tf(u0(e))}function u0(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?_t(t,{r:_t(e,{l:t.r})}):e}function tf(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 GN(e){return i0(e,({k:t,v:n})=>({index:t,value:n}))}function d0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const nf=qe(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function f0(e,t,n){return e[Ws(e,t,n)]}function Ws(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 YN(e,t,n,r){const o=Ws(e,t,r),i=Ws(e,n,r,o);return e.slice(o,i+1)}function bn(e,t){return Math.round(e.getBoundingClientRect()[t])}function qs(e){return!tt(e.groupOffsetTree)}function rf({index:e},t){return t===e?0:t<e?-1:1}function KN(){return{groupIndices:[],groupOffsetTree:ti(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ti()}}function ZN(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=Bs(e,a-1,o+1);if(s.some(rF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=Qd(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 XN(e){return typeof e.groupIndex<"u"}function QN({offset:e},t){return t===e?0:t<e?-1:1}function sa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=f0(t,e,rf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function p0(e,t){if(!qs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function h0(e,t,n){if(XN(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 JN(e,t,n,r=0){return r>0&&(t=Math.max(t,f0(e,r,rf).offset)),i0(YN(e,t,n,QN),nF)}function eF(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,y)=>nn(nn(h,y,p),y+1,f),a)}else[a,s]=ZN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=of(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,sa(f,d,o)),ti()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function tF(e){return Zr(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 m0(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 of(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Ws(o,t-1,rf),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 Bs(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function nF(e){return{index:e.index,value:e}}function rF(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 oF={offsetHeight:"height",offsetWidth:"width"},Vn=qe(([{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,oF[w])),p=le(void 0),f=le(0),h=KN(),y=zt(te(n,Ne(l,e,f),Fn(eF,h),at()),h),m=zt(te(l,at(),Fn((T,w)=>({current:w,prev:T.current}),{current:[],prev:[]}),he(({prev:T})=>T)),[]);be(te(l,Ee(T=>T.length>0),Ne(y,f),he(([T,w,C])=>{const P=T.reduce((I,A,F)=>nn(I,A,sa(A,w.offsetTree,C)||F),ti());return{...w,groupIndices:T,groupOffsetTree:P}})),y),be(te(r,Ne(y),Ee(([T,{lastIndex:w}])=>T<w),he(([T,{lastIndex:w,lastSize:C}])=>[{endIndex:w,size:C,startIndex:T}])),n),be(c,u);const v=zt(te(c,he(T=>T===void 0)),!0);be(te(u,Ee(T=>T!==void 0&&tt($t(y).sizeTree)),he(T=>[{endIndex:0,size:T,startIndex:0}])),n);const g=en(te(n,Ne(y),Fn(({sizes:T},[w,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:h}),he(T=>T.changed)));Ze(te(s,Fn((T,w)=>({diff:T.prev-w,prev:w}),{diff:0,prev:0}),he(T=>T.diff)),T=>{const{groupIndices:w}=$t(y);if(T>0)Me(t,!0),Me(i,T+m0(T,w));else if(T<0){const C=$t(m);C.length>0&&(T-=m0(-T,C)),Me(a,T)}}),Ze(te(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 x=en(i);be(te(i,Ne(y),he(([T,w])=>{const C=w.groupIndices.length>0,P=[],I=w.lastSize;if(C){const A=ia(w.sizeTree,0);let F=0,L=0;for(;F<T;){const k=w.groupIndices[L],D=w.groupIndices.length===L+1?1/0:w.groupIndices[L+1]-k-1;P.push({endIndex:k,size:A,startIndex:k}),P.push({endIndex:k+1+D-1,size:I,startIndex:k+1}),L++,F+=D+1}const R=Zr(w.sizeTree);return F!==T&&R.shift(),R.reduce((k,{k:D,v:N})=>{let j=k.ranges;return k.prevSize!==0&&(j=[...k.ranges,{endIndex:D+T-1,size:k.prevSize,startIndex:k.prevIndex}]),{prevIndex:D+T,prevSize:N,ranges:j}},{prevIndex:T,prevSize:0,ranges:P}).ranges}return Zr(w.sizeTree).reduce((A,{k:F,v:L})=>({prevIndex:F+T,prevSize:L,ranges:[...A.ranges,{endIndex:F+T-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(te(a,Ne(y,f),he(([T,{offsetTree:w},C])=>{const P=-T;return sa(P,w,C)})));return be(te(a,Ne(y,f),he(([T,w,C])=>{if(w.groupIndices.length>0){if(tt(w.sizeTree))return w;let P=ti();const I=$t(m);let A=0,F=0,L=0;for(;A<-T;){L=I[F];const R=I[F+1]-L-1;F++,A+=R+1}if(P=Zr(w.sizeTree).reduce((R,{k,v:D})=>nn(R,Math.max(0,k+T),D),P),A!==-T){const R=ia(w.sizeTree,L);P=nn(P,0,R);const k=yn(w.sizeTree,-T+1)[1];P=nn(P,1,k)}return{...w,sizeTree:P,...of(w.offsetTree,0,P,C)}}else{const P=Zr(w.sizeTree).reduce((I,{k:A,v:F})=>nn(I,Math.max(0,A+T),F),ti());return{...w,sizeTree:P,...of(w.offsetTree,0,P,C)}}})),y),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:g,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},it(mr,nf),{singleton:!0});function iF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const g0=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ze(),a=ze(),s=en(te(i,he(iF)));return be(te(s,he(l=>l.totalCount)),n),be(te(s,he(l=>l.groupIndices)),e),be(te(At(o,t,r),Ee(([l,c])=>qs(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=qe(([{log:e}])=>{const t=le(!1),n=en(te(t,Ee(r=>r),at()));return Ze(t,r=>{r&&$t(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},it(mr),{singleton:!0}),aF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function v0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!aF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const la=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=ze(),h=ze(),y=le(0);let m=null,v=null,g=null;function x(){m&&(m(),m=null),g&&(g(),g=null),v&&(clearTimeout(v),v=null),Me(l,!1)}return be(te(f,Ne(n,d,r,y,s,a,p),Ne(e,i,o),he(([[S,T,w,C,P,I,A,F],L,R,k])=>{const D=v0(S),{align:N,behavior:j,offset:M}=D,$=C-1,O=h0(D,T,$);let B=sa(O,T.offsetTree,L)+I;N==="end"?(B+=R+yn(T.sizeTree,O)[1]-w+k,O===$&&(B+=A)):N==="center"?B+=(R+yn(T.sizeTree,O)[1]-w+k)/2:B-=P,M&&(B+=M);const Q=oe=>{x(),oe?(F("retrying to scroll to",{location:S},tn.DEBUG),Me(f,S)):(Me(h,!0),F("list did not change, scroll successful",{},tn.DEBUG))};if(x(),j==="smooth"){let oe=!1;g=Ze(t,J=>{oe=oe||J}),m=Dn(u,()=>{Q(oe)})}else m=Dn(te(t,sF(150)),Q);return v=setTimeout(()=>{x()},1200),Me(l,!0),F("scrolling from index to",{behavior:j,index:O,top:B},tn.DEBUG),{behavior:j,top:B}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:y}},it(Vn,Wt,mr),{singleton:!0});function sF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function af(e,t){e==0?t():requestAnimationFrame(()=>{af(e-1,t)})}function sf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ca=qe(([{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(te(a,Ne(l),Ee(([u,d])=>!!d),Nn(!1)),s),be(te(a,Ne(l),Ee(([u,d])=>!!d),Nn(!1)),c),Ze(te(At(t,a),Ne(s,n,e,c),Ee(([[,u],d,{sizeTree:p},f,h])=>u&&(!tt(p)||Yd(f))&&!d&&!h),Ne(l)),([,u])=>{Dn(o,()=>{Me(c,!0)}),af(4,()=>{Dn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},it(Vn,Wt,la,gr),{singleton:!0});function y0(e,t){return Math.abs(e-t)<1.01}const ua="up",da="down",lF="none",cF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},uF=0,fa=qe(([{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(uF),p=zt(te(n0(te(ke(o),ei(1),Nn(!0)),te(ke(o),ei(1),Nn(!1),e0(100))),at()),!1),f=zt(te(n0(te(n,Nn(!0)),te(n,Nn(!1),e0(200))),at()),!1);be(te(At(ke(o),ke(d)),he(([g,x])=>g<=x),at()),s),be(te(s,hr(50)),c);const h=en(te(At(r,ke(i),ke(t),ke(e),ke(u)),Fn((g,[{scrollHeight:x,scrollTop:S},T,w,C,P])=>{const I=S+T-x>-P,A={scrollHeight:x,scrollTop:S,viewportHeight:T};if(I){let L,R;return S>g.state.scrollTop?(L="SCROLLED_DOWN",R=g.state.scrollTop-S):(L="SIZE_DECREASED",R=g.state.scrollTop-S||g.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:R,state:A}}let F;return A.scrollHeight>g.state.scrollHeight?F="SIZE_INCREASED":T<g.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":S<g.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:A}},cF),at((g,x)=>g&&g.atBottom===x.atBottom))),y=zt(te(r,Fn((g,{scrollHeight:x,scrollTop:S,viewportHeight:T})=>{if(y0(g.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const w=x-(S+T)<1;return g.scrollTop!==S&&w?{changed:!0,jump:g.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ee(g=>g.changed),he(g=>g.jump)),0);be(te(h,he(g=>g.atBottom)),a),be(te(a,hr(50)),l);const m=le(da);be(te(r,he(({scrollTop:g})=>g),at(),Fn((g,x)=>$t(f)?{direction:g.direction,prevScrollTop:x}:{direction:x<g.prevScrollTop?ua:da,prevScrollTop:x},{direction:da,prevScrollTop:0}),he(g=>g.direction)),m),be(te(r,hr(50),Nn(lF)),m);const v=le(0);return be(te(p,Ee(g=>!g),Nn(0)),v),be(te(o,hr(100),Ne(p),Ee(([g,x])=>!!x),Fn(([g,x],[S])=>[x,S],[0,0]),he(([g,x])=>x-g)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:y,scrollDirection:m,scrollVelocity:v}},it(Wt)),Us="top",Gs="bottom",b0="none";function x0(e,t,n){return typeof e=="number"?n===ua&&t===Us||n===da&&t===Gs?e:0:n===ua?t===Us?e.main:e.reverse:t===Gs?e.main:e.reverse}function w0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const lf=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ze(),a=le(0),s=le(0),l=le(0),c=zt(te(At(ke(r),ke(o),ke(n),ke(i,aa),ke(l),ke(a),ke(t),ke(e),ke(s)),he(([u,d,p,[f,h],y,m,v,g,x])=>{const S=u-g,T=m+v,w=Math.max(p-S,0);let C=b0;const P=w0(x,Us),I=w0(x,Gs);return f-=g,f+=p+v,h+=p+v,h-=g,f>u+T-P&&(C=ua),h<u-w+d+I&&(C=da),C!==b0?[Math.max(S-p-x0(y,Us,C)-P,0),S-w-v+d+x0(y,Gs,C)+I]:null}),Ee(u=>u!=null),at(aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},it(Wt),{singleton:!0});function dF(e,t,n){if(qs(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 cf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ys(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 y=e[e.length-1];u=y.offset+y.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,h=p-u;return{bottom:u,firstItemIndex:i,items:S0(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:S0(t,o,i),topListHeight:t.reduce((y,m)=>m.size+y,0),totalCount:n}}function T0(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=sf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Ys(c,[],s,o,n,r)}function S0(e,t,n){if(e.length===0)return[];if(!qs(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Bs(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const Xr=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const y=le([]),m=le(0),v=ze();be(i.topItemsIndexes,y);const g=zt(te(At(f,h,ke(l,aa),ke(o),ke(r),ke(c),u,ke(y),ke(t),ke(n),e),Ee(([w,C,,P,,,,,,,I])=>{const A=I&&I.length!==P;return w&&!C&&!A}),he(([,,[w,C],P,I,A,F,L,R,k,D])=>{const N=I,{offsetTree:j,sizeTree:M}=N,$=$t(m);if(P===0)return{...cf,totalCount:P};if(w===0&&C===0)return $===0?{...cf,totalCount:P}:T0($,A,I,R,k,D||[]);if(tt(M))return $>0?null:Ys(dF(sf(A,P),N,D),[],P,k,N,R);const O=[];if(L.length>0){const K=L[0],U=L[L.length-1];let Y=0;for(const V of Bs(M,K,U)){const W=V.value,Z=Math.max(V.start,K),ie=Math.min(V.end,U);for(let z=Z;z<=ie;z++)O.push({data:D==null?void 0:D[z],index:z,offset:Y,size:W}),Y+=W}}if(!F)return Ys([],O,P,k,N,R);const B=L.length>0?L[L.length-1]+1:0,Q=JN(j,w,C,B);if(Q.length===0)return null;const oe=P-1,J=zs([],K=>{for(const U of Q){const Y=U.value;let V=Y.offset,W=U.start;const Z=Y.size;if(Y.offset<w){W+=Math.floor((w-Y.offset+k)/(Z+k));const z=W-U.start;V+=z*Z+z*k}W<B&&(V+=(B-W)*Z,W=B);const ie=Math.min(U.end,oe);for(let z=W;z<=ie&&!(V>=C);z++)K.push({data:D==null?void 0:D[z],index:z,offset:V,size:Z}),V+=Z+k}});return Ys(J,O,P,k,N,R)}),Ee(w=>w!==null),at()),cf);be(te(e,Ee(Yd),he(w=>w==null?void 0:w.length)),o),be(te(g,he(w=>w.topListHeight)),d),be(d,s),be(te(g,he(w=>[w.top,w.bottom])),a),be(te(g,he(w=>w.items)),v);const x=en(te(g,Ee(({items:w})=>w.length>0),Ne(o,e),Ee(([{items:w},C])=>w[w.length-1].originalIndex===C-1),he(([,w,C])=>[w-1,C]),at(aa),he(([w])=>w))),S=en(te(g,hr(200),Ee(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),he(({items:w})=>w[0].index),at())),T=en(te(g,Ee(({items:w})=>w.length>0),he(({items:w})=>{let C=0,P=w.length-1;for(;w[C].type==="group"&&C<P;)C++;for(;w[P].type==="group"&&P>C;)P--;return{endIndex:w[P].index,startIndex:w[C].index}}),at(d0)));return{endReached:x,initialItemCount:m,itemsRendered:v,listState:g,rangeChanged:T,startReached:S,topItemsIndexes:y,...p}},it(Vn,g0,lf,ca,la,fa,gr,nf),{singleton:!0}),E0=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ze(),a=zt(te(At(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},it(Wt,Xr),{singleton:!0}),fF=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=zt(te(At(n,e,t),Ee(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),hr(0),at()),0);return{alignToBottom:n,paddingTopAddition:r}},it(Wt,E0),{singleton:!0});function C0(e){return e?e==="smooth"?"smooth":"auto":!1}const pF=(e,t)=>typeof e=="function"?C0(e(t)):t&&C0(e),hF=qe(([{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(y){Me(o,{align:"end",behavior:y,index:"LAST"})}Ze(te(At(te(ke(t),ei(1)),a),Ne(ke(u),r,i,c),he(([[y,m],v,g,x,S])=>{let T=m&&x,w="auto";return T&&(w=pF(v,g||S),T=T&&!!w),{followOutputBehavior:w,shouldFollow:T,totalCount:y}}),Ee(({shouldFollow:y})=>y)),({followOutputBehavior:y,totalCount:m})=>{p&&(p(),p=null),p=Dn(e,()=>{$t(l)("following output to ",{totalCount:m},tn.DEBUG),f(y),p=null})});function h(y){const m=Dn(n,v=>{y&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&($t(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(m,100)}return Ze(te(At(ke(u),t,s),Ee(([y,,m])=>y&&m),Fn(({value:y},[,m])=>({refreshed:y===m,value:m}),{refreshed:!1,value:0}),Ee(({refreshed:y})=>y),Ne(u,t)),([,y])=>{$t(i)&&h(y!==!1)}),Ze(d,()=>{h($t(u)!==!1)}),Ze(At(ke(u),n),([y,m])=>{y&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},it(Vn,fa,la,ca,gr,mr,Wt)),mF=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(te(s,Ne(i),Ee(([,l])=>l!==0),Ne(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>T0(l,c,u,d,p,f))),a),{}),it(Vn,ca,Xr,gr),{singleton:!0}),gF=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Ze(te(e,Ne(r),Ee(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Dn(te(n,ei(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},it(gr,Wt,Xr),{singleton:!0}),vF=({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,yF=qe(([{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(te(u,Ne(t,l,n,i,o,r,s),Ne(e),he(([[d,p,f,h,y,m,v,g],x])=>{const{align:S,behavior:T,calculateViewLocation:w=vF,done:C,...P}=d,I=h0(d,p,h-1),A=sa(I,p.offsetTree,x)+y+m,F=A+yn(p.sizeTree,I)[1],L=g+m,R=g+f-v,k=w({itemBottom:F,itemTop:A,locationParams:{align:S,behavior:T,...P},viewportBottom:R,viewportTop:L});return k?C&&Dn(te(a,Ee(D=>!D),ei($t(a)?1:2)),C):C&&C(),k}),Ee(d=>d!==null)),c),{scrollIntoView:u}},it(Vn,Wt,la,Xr,mr),{singleton:!0}),k0=qe(([{scrollVelocity:e}])=>{const t=le(!1),n=ze(),r=le(!1);return be(te(e,Ne(r,t,n),Ee(([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),Ze(te(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(fa),{singleton:!0}),uf=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=ze(),r=ze(),o=ze(),i=le(!1),a=le(void 0);return be(te(At(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(te(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)),bF=qe(([{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),Ze(te(c,Ne(t,r,a,d,p,n)),([f,h,y,m,v,g,x])=>{const S=tF(h.sizeTree);m&&v!==null&&g!==null&&(y=v.scrollTop-g.offsetTop),y-=x,f({ranges:S,scrollTop:y})}),be(te(u,Ee(Yd),he(xF)),o),be(te(i,Ne(u),Ee(([,f])=>f!==void 0),at(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},it(Vn,Wt,ca,gr,uf));function xF(e){return{align:"start",index:0,offset:e.scrollTop}}const wF=qe(([{topItemsIndexes:e}])=>{const t=le(0);return be(te(t,Ee(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},it(Xr));function P0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const TF=P0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),SF=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const y=en(te(l,Ne(a),Fn(([,v,g,x],[{bottom:S,items:T,offsetBottom:w,totalCount:C},P])=>{const I=S+w;let A=0;return g===C&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(A=I-x,A!==0&&(A+=P))),[A,T,C,I]},[0,[],0,0]),Ee(([v])=>v!==0),Ne(r,s,n,o,f,h),Ee(([,v,g,x,,,S])=>!S&&!x&&v!==0&&g===ua),he(([[v],,,,,g])=>(g("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function m(v){v>0?(Me(t,{behavior:"auto",top:-v}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-v}))}return Ze(te(y,Ne(e,i)),([v,g,x])=>{x&&TF()?Me(e,g-v):m(-v)}),Ze(te(At(zt(i,!1),e,h),Ee(([v,g,x])=>!v&&!x&&g!==0),he(([v,g])=>g),hr(1)),m),be(te(d,he(v=>({top:-v}))),t),Ze(te(c,Ne(p,u),he(([v,{groupIndices:g,lastSize:x,sizeTree:S},T])=>{function w(C){return C*(x+T)}if(g.length===0)return w(v);{let C=0;const P=ia(S,0);let I=0,A=0;for(;I<v;){I++,C+=P;let F=g.length===A+1?1/0:g[A+1]-g[A]-1;I+F>v&&(C-=P,F=v-I+1),I+=F,C+=w(F),A++}return C}})),v=>{Me(e,v),requestAnimationFrame(()=>{Me(t,{top:v}),requestAnimationFrame(()=>{Me(e,0),Me(h,!1)})})}),{deviation:e}},it(Wt,fa,Xr,Vn,mr,nf)),EF=qe(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),it(lf,mF,gr,k0,E0,gF,fF,uf,yF,mr)),A0=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},y,m,v,{listState:g,topItemsIndexes:x,...S},{scrollToIndex:T},w,{topItemCount:C},{groupCounts:P},I])=>(be(S.rangeChanged,I.scrollSeekRangeChanged),be(te(I.windowViewportRect,he(A=>A.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:P,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:g,scrollToIndex:T,statefulTotalCount:c,trackItemSizes:d,...S,...I,...y,sizes:l,...m}),it(Vn,ca,Wt,bF,hF,Xr,la,SF,wF,g0,EF));function CF(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 Ks=typeof document<"u"?E.useLayoutEffect:E.useEffect;function df(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,v){m.propsReady&&Me(m.propsReady,!1);for(const g of r){const x=m[t.required[g]];Me(x,v[g])}for(const g of o)if(g in v){const x=m[t.optional[g]];Me(x,v[g])}m.propsReady&&Me(m.propsReady,!0)}function c(m){return i.reduce((v,g)=>(v[g]=x=>{const S=m[t.methods[g]];Me(S,x)},v),{})}function u(m){return a.reduce((v,g)=>(v[g]=zN(m[t.events[g]]),v),{})}const d=E.forwardRef((m,v)=>{const{children:g,...x}=m,[S]=E.useState(()=>zs(HN(e),C=>{l(C,x)})),[T]=E.useState(Qx(u,S));Ks(()=>{for(const C of a)C in x&&Ze(T[C],x[C]);return()=>{Object.values(T).map(Kd)}},[x,T,S]),Ks(()=>{l(S,x)}),E.useImperativeHandle(v,Xx(c(S)));const w=n;return b.jsx(s.Provider,{value:S,children:n?b.jsx(w,{...CF([...r,...o,...a],x),children:g}):g})}),p=m=>E.useCallback(Jx(Me,E.useContext(s)[m]),[m]),f=m=>{const v=E.useContext(s)[m],g=E.useCallback(x=>Ze(v,x),[v]);return E.useSyncExternalStore(g,()=>$t(v),()=>$t(v))},h=m=>{const v=E.useContext(s)[m],[g,x]=E.useState(Qx($t,v));return Ks(()=>Ze(v,S=>{S!==g&&x(Xx(S))}),[v,g]),g},y=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,v)=>{const g=E.useContext(s)[m];Ks(()=>Ze(g,v),[v,g])},useEmitterValue:y,usePublisher:p}}const Zs=E.createContext(void 0),_0=E.createContext(void 0),I0=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ff(e){return"self"in e}function kF(e){return"body"in e}function O0(e,t,n,r=Jo,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,y;const m=p.target;if(kF(m)||ff(m)){const g=ff(m)?m:m.defaultView;y=i?g.scrollX:g.scrollY,f=i?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight,h=i?g.innerWidth:g.innerHeight}else y=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(y,0),viewportHeight:h})};p.suppressFlushSync?v():mi.flushSync(v),s.current!==null&&(y===s.current||y<=0||y===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 y,m,v;ff(f)?(m=Math.max(bn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),y=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],y=bn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const g=m-y;if(p.top=Math.ceil(Math.max(Math.min(g,p.top),0)),y0(y,m)||p.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:y}),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 pf="-webkit-sticky",M0="sticky",D0=P0(()=>{if(typeof document>"u")return M0;const e=document.createElement("div");return e.style.position=pf,e.style.position===pf?pf:M0});function hf(e){return e}const PF=qe(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(hf),i=le("div"),a=le(Jo),s=(l,c=null)=>zt(te(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")}}),AF=qe(([e,t])=>({...e,...t}),it(A0,PF)),_F=({height:e})=>b.jsx("div",{style:{height:e}}),IF={overflowAnchor:"none",position:D0(),zIndex:1},N0={overflowAnchor:"none"},OF={...N0,display:"inline-block",height:"100%"},F0=E.memo(function({showTopList:e=!1}){const t=Pe("listState"),n=un("sizeRanges"),r=Pe("useWindowScroll"),o=Pe("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,l=Pe("itemContent"),c=Pe("context"),u=Pe("groupContent"),d=Pe("trackItemSizes"),p=Pe("itemSize"),f=Pe("log"),h=un("gap"),y=Pe("horizontalDirection"),{callbackRef:m}=r0(n,p,d,e?Jo:s,f,h,o,y,Pe("skipAnimationFrameInResizeObserver")),[v,g]=E.useState(0);vf("deviation",k=>{v!==k&&g(k)});const x=Pe("EmptyPlaceholder"),S=Pe("ScrollSeekPlaceholder")||_F,T=Pe("ListComponent"),w=Pe("ItemComponent"),C=Pe("GroupComponent"),P=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,F=Pe("alignToBottom"),L=Pe("initialItemFinalLocationReached"),R=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...st(x,c)}):b.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(k=>{const D=k.originalIndex,N=P(D+t.firstItemIndex,k.data,c);return I?E.createElement(S,{...st(S,c),height:k.size,index:k.index,key:N,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?E.createElement(C,{...st(C,c),"data-index":D,"data-item-index":k.index,"data-known-size":k.size,key:N,style:IF},u(k.index,c)):E.createElement(w,{...st(w,c),...L0(w,k.data),"data-index":D,"data-item-group-index":k.groupIndex,"data-item-index":k.index,"data-known-size":k.size,key:N,style:y?OF:N0},A?l(k.index,k.groupIndex,k.data,c):l(k.index,k.data,c))})})}),MF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},DF={outline:"none",overflowX:"auto",position:"relative"},ni=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),NF={position:D0(),top:0,width:"100%",zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function L0(e,t){return{item:typeof e=="string"?void 0:t}}const FF=E.memo(function(){const e=Pe("HeaderComponent"),t=un("headerHeight"),n=Pe("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...st(e,o)})}):null}),LF=E.memo(function(){const e=Pe("FooterComponent"),t=un("footerHeight"),n=Pe("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...st(e,o)})}):null});function mf({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}=O0(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?DF:MF,...o},tabIndex:0,...i,...st(s,u),children:r})})}function gf({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:y,scrollerRef:m,scrollToCallback:v}=O0(a,l,s,h,d);return I0(()=>{var g;return m.current=d||((g=f.current)==null?void 0:g.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",v),e("scrollBy",y),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...st(s,p),children:r})})}const VF=({children:e})=>{const t=E.useContext(Zs),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Pe("alignToBottom"),i=Pe("horizontalDirection"),a=E.useMemo(()=>ra(n,l=>bn(l,i?"width":"height")),[n,i]),s=Ln(a,!0,Pe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ni(o),children:e})},jF=({children:e})=>{const t=E.useContext(Zs),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Pe("customScrollParent"),i=Xd(n,o,Pe("skipAnimationFrameInResizeObserver")),a=Pe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ni(a),children:e})},RF=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...NF,marginTop:`${n}px`},o=Pe("context");return b.jsx(t,{style:r,...st(t,o),children:e})},$F=E.memo(function(e){const t=Pe("useWindowScroll"),n=Pe("topItemsIndexes").length>0,r=Pe("customScrollParent"),o=Pe("context"),i=r||t?HF:BF,a=r||t?jF:VF;return b.jsxs(i,{...e,...st(i,o),children:[n&&b.jsx(RF,{children:b.jsx(F0,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(FF,{}),b.jsx(F0,{}),b.jsx(LF,{})]})]})}),{Component:zF,useEmitter:vf,useEmitterValue:Pe,usePublisher:un}=df(AF,{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:{}},$F),BF=mf({useEmitter:vf,useEmitterValue:Pe,usePublisher:un}),HF=gf({useEmitter:vf,useEmitterValue:Pe,usePublisher:un}),yf=zF,WF=qe(()=>{const e=le(l=>b.jsxs("td",{children:["Item $",l]})),t=le(null),n=le(null),r=le(null),o=le({}),i=le(hf),a=le(Jo),s=(l,c=null)=>zt(te(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=qe(([e,t])=>({...e,...t}),it(A0,WF)),UF=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),GF=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),YF={overflowAnchor:"none"},V0=E.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Fe("computeItemKey"),r=Fe("firstItemIndex"),o=Fe("isSeeking"),i=Fe("ScrollSeekPlaceholder")||UF,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),y=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),...L0(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+y,zIndex:2}:YF},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),KF=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}=r0(n,c,l,s,u,void 0,o,!1,Fe("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);bf("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,h(A))});const y=Fe("EmptyPlaceholder"),m=Fe("FillerRow")||GF,v=Fe("TableBodyComponent"),g=Fe("paddingTopAddition"),x=Fe("statefulTotalCount"),S=Fe("context");if(x===0&&y)return b.jsx(y,{...st(y,S)});const T=(t?e.topItems:[]).reduce((A,F)=>A+F.size,0),w=e.offsetTop+g+f-T,C=e.offsetBottom,P=w>0?b.jsx(m,{context:S,height:w},"padding-top"):null,I=C>0?b.jsx(m,{context:S,height:C},"padding-bottom"):null;return b.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...st(v,S),children:[P,t&&b.jsx(V0,{showTopList:!0}),b.jsx(V0,{}),I]})}),ZF=({children:e})=>{const t=E.useContext(Zs),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Ln(E.useMemo(()=>ra(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:ni(!1),children:e})},XF=({children:e})=>{const t=E.useContext(Zs),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=Xd(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:ni(!1),children:e})},QF=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(()=>ra(r,v=>bn(v,"height")),[r]),!0,Fe("skipAnimationFrameInResizeObserver")),c=Ln(E.useMemo(()=>ra(o,v=>bn(v,"height")),[o]),!0,Fe("skipAnimationFrameInResizeObserver")),u=n||t?tL:eL,d=n||t?XF:ZF,p=Fe("TableComponent"),f=Fe("TableHeadComponent"),h=Fe("TableFooterComponent"),y=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...st(f,s),children:i()},"TableHead"):null,m=a?b.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...st(h,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...st(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...st(p,s),children:[y,b.jsx(KF,{},"TableBody"),m]})})})}),{Component:JF,useEmitter:bf,useEmitterValue:Fe,usePublisher:xn}=df(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:{}},QF),eL=mf({useEmitter:bf,useEmitterValue:Fe,usePublisher:xn}),tL=gf({useEmitter:bf,useEmitterValue:Fe,usePublisher:xn}),nL=JF,j0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},rL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:R0,floor:Xs,max:pa,min:xf,round:$0}=Math;function z0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function oL(e){return{...rL,items:e}}function Qs(e,t){return e&&e.width===t.width&&e.height===t.height}function iL(e,t){return e&&e.column===t.column&&e.row===t.row}const aL=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:y},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:g,windowScrollTo:x,windowViewportRect:S},T])=>{const w=le(0),C=le(0),P=le(j0),I=le({height:0,width:0}),A=le({height:0,width:0}),F=ze(),L=ze(),R=le(0),k=le(null),D=le({column:0,row:0}),N=ze(),j=ze(),M=le(!1),$=le(0),O=le(!0),B=le(!1),Q=le(!1);Ze(te(h,Ne($),Ee(([V,W])=>!!W)),()=>{Me(O,!1)}),Ze(te(At(h,O,A,I,$,B),Ee(([V,W,Z,ie,,z])=>V&&!W&&Z.height!==0&&ie.height!==0&&!z)),([,,,,V])=>{Me(B,!0),af(1,()=>{Me(F,V)}),Dn(te(c),()=>{Me(t,[0,0]),Me(O,!0)})}),be(te(j,Ee(V=>V!=null&&V.scrollTop>0),Nn(0)),C),Ze(te(h,Ne(j),Ee(([,V])=>V!=null)),([,V])=>{V&&(Me(I,V.viewport),Me(A,V.item),Me(D,V.gap),V.scrollTop>0&&(Me(M,!0),Dn(te(c,ei(1)),W=>{Me(M,!1)}),Me(l,{top:V.scrollTop})))}),be(te(I,he(({height:V})=>V)),d),be(te(At(ke(I,Qs),ke(A,Qs),ke(D,(V,W)=>V&&V.column===W.column&&V.row===W.row),ke(c)),he(([V,W,Z,ie])=>({gap:Z,item:W,scrollTop:ie,viewport:V}))),N),be(te(At(ke(w),r,ke(D,iL),ke(A,Qs),ke(I,Qs),ke(k),ke(C),ke(M),ke(O),ke($)),Ee(([,,,,,,,V])=>!V),he(([V,[W,Z],ie,z,xe,Ae,Ie,,Oe,G])=>{const{column:se,row:ae}=ie,{height:X,width:de}=z,{width:ve}=xe;if(Ie===0&&(V===0||ve===0))return j0;if(de===0){const Tn=sf(G,V),zn=Tn+Math.max(Ie-1,0);return oL(z0(Tn,zn,Ae))}const we=B0(ve,de,se);let re,ce;Oe?W===0&&Z===0&&Ie>0?(re=0,ce=Ie-1):(re=we*Xs((W+ae)/(X+ae)),ce=we*R0((Z+ae)/(X+ae))-1,ce=xf(V-1,pa(ce,we-1)),re=xf(ce,pa(0,re))):(re=0,ce=-1);const Le=z0(re,ce,Ae),{bottom:Xe,top:Ct}=H0(xe,ie,z,Le),pt=R0(V/we),Lt=pt*X+(pt-1)*ae-Xe;return{bottom:Xe,itemHeight:X,items:Le,itemWidth:de,offsetBottom:Lt,offsetTop:Ct,top:Ct}})),P),be(te(k,Ee(V=>V!==null),he(V=>V.length)),w),be(te(At(I,A,P,D),Ee(([V,W,{items:Z}])=>Z.length>0&&W.height!==0&&V.height!==0),he(([V,W,{items:Z},ie])=>{const{bottom:z,top:xe}=H0(V,ie,W,Z);return[xe,z]}),at(aa)),t);const oe=le(!1);be(te(c,Ne(oe),he(([V,W])=>W||V!==0)),oe);const J=en(te(At(P,w),Ee(([{items:V}])=>V.length>0),Ne(oe),Ee(([[V,W],Z])=>{const ie=V.items[V.items.length-1].index===W-1;return(Z||V.bottom>0&&V.itemHeight>0&&V.offsetBottom===0&&V.items.length===W)&&ie}),he(([[,V]])=>V-1),at())),K=en(te(ke(P),Ee(({items:V})=>V.length>0&&V[0].index===0),Nn(0),at())),U=en(te(ke(P),Ne(M),Ee(([{items:V},W])=>V.length>0&&!W),he(([{items:V}])=>({endIndex:V[V.length-1].index,startIndex:V[0].index})),at(d0),hr(0)));be(U,f.scrollSeekRangeChanged),be(te(F,Ne(I,A,w,D),he(([V,W,Z,ie,z])=>{const xe=v0(V),{align:Ae,behavior:Ie,offset:Oe}=xe;let G=xe.index;G==="LAST"&&(G=ie-1),G=pa(0,G,xf(ie-1,G));let se=wf(W,z,Z,G);return Ae==="end"?se=$0(se-W.height+Z.height):Ae==="center"&&(se=$0(se-W.height/2+Z.height/2)),Oe&&(se+=Oe),{behavior:Ie,top:se}})),l);const Y=zt(te(P,he(V=>V.offsetBottom+V.bottom)),0);return be(te(S,he(V=>({height:V.visibleHeight,width:V.visibleWidth}))),I),{customScrollParent:m,data:k,deviation:R,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:j,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:w,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:g,windowScrollTo:x,windowViewportRect:S,...f,gridState:P,horizontalDirection:Q,initialTopMostItemIndex:$,totalListHeight:Y,...p,endReached:J,propsReady:y,rangeChanged:U,startReached:K,stateChanged:N,stateRestoreInProgress:M,...T}},it(lf,Wt,fa,k0,gr,uf,mr));function B0(e,t,n){return pa(1,Xs((e+n)/(Xs(t)+n)))}function H0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=wf(e,t,n,r[0].index);return{bottom:wf(e,t,n,r[r.length-1].index)+o,top:i}}function wf(e,t,n,r){const o=B0(e.width,n.width,t.column),i=Xs(r/o),a=i*n.height+pa(0,i-1)*t.row;return a>0?a+t.row:a}const sL=qe(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(hf),a=le("div"),s=le(Jo),l=(d,p=null)=>zt(te(t,he(f=>f[d]),at()),p),c=le(!1),u=le(!1);return be(ke(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),lL=qe(([e,t])=>({...e,...t}),it(aL,sL)),cL=E.memo(function(){const e=ct("gridState"),t=ct("listClassName"),n=ct("itemClassName"),r=ct("itemContent"),o=ct("computeItemKey"),i=ct("isSeeking"),a=dn("scrollHeight"),s=ct("ItemComponent"),l=ct("ListComponent"),c=ct("ScrollSeekPlaceholder"),u=ct("context"),d=dn("itemDimensions"),p=dn("gap"),f=ct("log"),h=ct("stateRestoreInProgress"),y=dn("reportReadyState"),m=Ln(E.useMemo(()=>v=>{const g=v.parentElement.parentElement.scrollHeight;a(g);const x=v.firstChild;if(x){const{height:S,width:T}=x.getBoundingClientRect();d({height:S,width:T})}p({column:q0("column-gap",getComputedStyle(v).columnGap,f),row:q0("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return I0(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),h?null:b.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(v=>{const g=o(v.index,v.data,u);return i?b.jsx(c,{...st(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},g):E.createElement(s,{...st(s,u),className:n,"data-index":v.index,key:g},r(v.index,v.data,u))})})}),uL=E.memo(function(){const e=ct("HeaderComponent"),t=dn("headerHeight"),n=ct("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ct("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...st(e,o)})}):null}),dL=E.memo(function(){const e=ct("FooterComponent"),t=dn("footerHeight"),n=ct("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ct("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...st(e,o)})}):null}),fL=({children:e})=>{const t=E.useContext(_0),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:ni(!1),children:e})},pL=({children:e})=>{const t=E.useContext(_0),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ct("customScrollParent"),i=Xd(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:ni(!1),children:e})},hL=E.memo(function({...e}){const t=ct("useWindowScroll"),n=ct("customScrollParent"),r=n||t?gL:mL,o=n||t?pL:fL,i=ct("context");return b.jsx(r,{...e,...st(r,i),children:b.jsxs(o,{children:[b.jsx(uL,{}),b.jsx(cL,{}),b.jsx(dL,{})]})})}),{useEmitter:W0,useEmitterValue:ct,usePublisher:dn}=df(lL,{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"}},hL),mL=mf({useEmitter:W0,useEmitterValue:ct,usePublisher:dn}),gL=gf({useEmitter:W0,useEmitterValue:ct,usePublisher:dn});function q0(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 vL=()=>{const e=E.useContext(Fo);return e?e.tweaks:ps},U0=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>b.jsxs("div",{className:$e("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(Kx,{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(oy,{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(E.Fragment,{children:[b.jsx(ny,{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(wA,{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]}),ha=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:h,componentName:y,placeholder:m,hideLeft:v=!1,required:g,disabled:x,reportStatus:S},T)=>{const w=vL(),C=S!==void 0?S:w.input.iconFeedback,P=d??f,I=Ot(),A=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:T,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:$e("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[b.jsxs("label",{form:u,htmlFor:P,className:"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(U0,{info:s,hideLeft:v,reportStatus:C,title:h,placeholder:m,children:A||n?b.jsxs(E.Fragment,{children:[g?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),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 flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block 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})]})}),yL=e=>b.jsx(E.Fragment,{children:e.children}),bL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},xL={caseSensitive:!1,sort:!1},wL=[],TL=E.forwardRef(function(t,n){return b.jsx(gt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),SL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(gt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),EL={List:TL,Item:SL},ri=320,Tf=40,CL=E.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:i,rightLabel:a,optionalText:s,container:l,hideLeft:c=!1,right:u,left:d,error:p,required:f=!1,...h},y)=>{const m=E.useRef(null),v=E.useRef(null),g=h.value??h.defaultValue??"",x=Ot(),[S,T]=E.useState(()=>Math.min(ri,Tf*e.length)),[w,C]=E.useState(!1),[P,I]=E.useState(""),[A,F]=E.useState(g),[L,R]=E.useState(()=>{var G;return((G=e.find(se=>se.value===g))==null?void 0:G.label)??g}),[k,D]=E.useState(null),N=E.useRef(wL),j=t&&P!==""?[{value:P,label:P,"data-dynamic":"true"},...e]:e,M=new Kr(j,["value","label"],xL).search(P),$=()=>{C(!1),T(0)},O=M.filter(G=>G.hidden!==!0),B=t?void 0:`^(${e.map(G=>`${td(G.value)}${G.label?"|"+td(G.label):""}`).join("|")})$`;E.useEffect(()=>{if(h.value){const G=e.find(se=>se.value===h.value);F((G==null?void 0:G.label)??h.value)}},[h.value]),E.useEffect(()=>{w||T(0)},[w]),E.useEffect(()=>{if(!w)return;const G=K.floating;if(G.current===null)return;let se=0;Array.from(G.current.querySelectorAll("li")).slice(0,Math.min(M.length,10)).forEach(de=>{const ve=de.getBoundingClientRect();se+=ve.height});const X=Math.min(se,ri);T(X)},[P,w]);const{x:Q,y:oe,strategy:J,refs:K,context:U}=Ur({open:w,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Zi,middleware:[Xi(4),lx({padding:10,elementContext:"reference",apply(G){var ve;const se=(ve=m.current)==null?void 0:ve.getBoundingClientRect().width,ae=G.elements.floating.querySelector("ul"),X=(ae==null?void 0:ae.getBoundingClientRect().height)||0,de=Math.min(X<Tf?ri:X,ri);mi.flushSync(()=>setTimeout(()=>{const we=(ae==null?void 0:ae.getBoundingClientRect().height)??0;return we<Tf?void T(de):void T(Math.min(we,ri))},50)),Object.assign(G.elements.floating.style,{width:`${se}px`,maxWidth:`${se}px`,maxHeight:`${ri}`})}})]}),Y=Hx(U,bL),{getReferenceProps:V,getFloatingProps:W,getItemProps:Z}=Gr([Yr(U,{role:"listbox"}),qr(U),qd(U,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:G=>D(se=>G??se)})]);E.useEffect(()=>{const G=K.reference.current;if(G)return gi(G)},[]);const ie=(G,se)=>{F(G.value);const ae=K.reference.current;if(!ae)return;ae==null||ae.setAttribute("data-value",G.value),ae.value=G.value;const X=new Event("change",{bubbles:!1,cancelable:!0});ae.dispatchEvent(X),h.onChange&&h.onChange(X),R(G.label??""),$(),I(""),D(se)},z=G=>{var ae;const se=G.target.value;return I(se),!w&&se===""?C(!0):(G.target.name=h.name||"",se?C(!0):(ae=h.onChange)==null?void 0:ae.call(h,G))},xe=()=>{var G;C(!0),I(""),(G=K.reference.current)==null||G.focus()},Ae=()=>{C(!0),I("")},Ie=()=>{var G;(G=K.reference.current)==null||G.setAttribute("data-value",""),I(""),F(""),R(""),Lh(K.reference.current),$()},Oe=h.id||h.name;return b.jsxs(ha,{...h,left:d,error:p,ref:m,form:h.form,name:h.name,feedback:n,hideLeft:c,required:f,title:h.title,container:l,rightLabel:a,interactive:i,id:h.name||h.id,optionalText:s,componentName:"autocomplete",labelClassName:r,placeholder:h.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[u,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:xe,children:[b.jsx(Du,{size:20}),b.jsx("span",{className:"sr-only",children:x.inputCaretDown})]}),A?b.jsx("button",{type:"button",onClick:Ie,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",...V({...h,onChange:z,onFocus:Ae,pattern:B,ref:K.setReference,name:`${Oe}-shadow`,id:`${Oe}-shadow`,onClick:G=>G.currentTarget.focus(),onKeyDown(G){var se,ae;if(G.key==="ArrowDown"){let X=k+1;return X>M.length-1&&(X=0),(se=v.current)==null||se.scrollIntoView({index:X}),D(X)}if(G.key==="ArrowUp"){let X=k-1;return X<0&&(X=M.length-1),(ae=v.current)==null||ae.scrollIntoView({index:X}),D(X)}if(G.key==="Escape")return G.currentTarget.blur(),$();if(G.key==="Enter"){if(k!==null&&M[k])return G.preventDefault(),ie(M[k],k);if(M.length===1)return G.preventDefault(),ie(M[0],0)}}}),"data-value":A,"data-error":!!p,"data-name":Oe,"data-target":Oe,required:f,value:w?P:L||A,"aria-autocomplete":"list",autoComplete:"off",className:$e("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",h.className)}),b.jsx("input",{id:Oe,name:Oe,type:"hidden","data-origin":Oe,ref:y,required:f,defaultValue:h.value||A||void 0}),b.jsx(Hr,{preserveTabOrder:!0,children:w?b.jsx(Ko,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("ul",{...W({ref:K.setFloating,style:{...Y.styles,position:J,left:(Q??0)+(A?36:25),top:oe??0}}),"data-floating":"true",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:[M.length===0?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:o||x.autocompleteEmpty})}):null,b.jsx(yf,{ref:v,data:O,components:EL,hidden:O.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:S},itemContent:(G,se)=>{const ae=se.Render??yL,X=A===se.value||A===se.label,de=k===G,ve=se.label??se.value;return b.jsx("button",{"data-value":se.value,...Z({ref:we=>void(N.current[G]=we),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":se.disabled,onClick:()=>ie(se,G),className:`cursor-pointer w-full p-2 text-left ${X?"bg-primary-hover text-primary-foreground":""} ${de?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(ae,{...h,label:se.label,value:se.value,children:ve})})}})]})}):null})]})}),Sf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:a,...s},l)=>b.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":s.disabled,"aria-disabled":s.disabled,className:$e("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[b.jsx("input",{...s,ref:l,type:"checkbox","data-task":t,className:$e("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",o)}),e,b.jsx("span",{"data-name":"checkbox-label",className:$e("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),G0=(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:y,feedback:m=null,hideLeft:v=!1,...g},x)=>{const S=e,T=g.id??g.name,w=E.useRef(null);return E.useEffect(()=>{if(w.current===null)return;const C=w.current,P=gi(w.current),I=r==null?void 0:r(C),A=F=>{const L=F;if(L.key==="Enter"&&C.enterKeyHint==="next"){const R=C.getAttribute("data-next");if(R){const k=document.getElementById(R);if(k)return k.focus(),void L.preventDefault()}}};return C.addEventListener("keydown",A),()=>{I==null||I(),P(),C.removeEventListener("keydown",A)}},[]),b.jsx(ha,{...n,info:i,left:a,error:l,right:c,form:g.form,name:g.name,feedback:m,hideLeft:v,title:g.title,container:u,rightLabel:d,disabled:g.disabled,interactive:p,required:g.required,componentName:t,id:g.name||g.id,optionalText:f,labelClassName:y,placeholder:g.placeholder,children:b.jsx(S,{...n,...g,id:T,name:T,type:h,"data-next":s,"aria-busy":g.disabled,"aria-disabled":g.disabled,"aria-readonly":g.readOnly,ref:wc(x,w),className:$e("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",g.className)})})}),ma=G0(Ry,"input",{type:"text"}),Y0=new Date(1970,11,31),Ef={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},K0={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},kL={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")},Cf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},PL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Ju(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),y=Cf(u,Y0).flatMap(C=>ht.keyof(Ef,C.type)?Ef[C.type](C.value):[]),m=Cf(u,Y0).reduce((C,P)=>C+(ht.keyof(K0,P.type)?K0[P.type](P.value):""),""),[v,g]=E.useState(d?Cf(u,d).reduce((C,P)=>C+(ht.keyof(Ef,P.type)?kL[P.type](d,P.value):""),""):""),x=C=>{const P=C.target.value;if(g(P),y.length===P.length&&y.every((A,F)=>{const L=P.charAt(F);return typeof A=="string"?L===A:A.test(L)})){const A=Io(DI(P,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),g(C?D_(C,m):"")),T=dy(d),w=T?d.toISOString():void 0;return b.jsx(ma,{...i,mask:y,value:v,id:void 0,name:void 0,className:"uppercase","data-value":w,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??m,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:w,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(Xo,{open:f,onChange:h,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(bA,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(ab,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),AL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],_L=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],IL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],OL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Z0=(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 X0(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?OL:IL:t.binary?_L:AL,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=Z0(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=Z0(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Js={exports:{}},el={exports:{}},Ue={};/** @license React v16.13.1
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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}/*
|
|
187
187
|
object-assign
|
|
188
188
|
(c) Sindre Sorhus
|
|
189
189
|
@license MIT
|
|
190
|
-
*/var
|
|
191
|
-
Valid keys: `+JSON.stringify(Object.keys(O),null," "));var z=ie(Y,Z,J,K,U+"."+Z,n);if(z)return z}return null}return m(B)}function k(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(k);if(O===null||s(O))return!0;var B=d(O);if(B){var Q=B.call(O),oe;if(B!==O.entries){for(;!(oe=Q.next()).done;)if(!k(oe.value))return!1}else for(;!(oe=Q.next()).done;){var J=oe.value;if(J&&!k(J[1]))return!1}}else return!1;return!0;default:return!1}}function D(O,B){return O==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function N(O){var B=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":D(B,O)?"symbol":B}function j(O){if(typeof O>"u"||O===null)return""+O;var B=N(O);if(B==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return B}function M(O){var B=j(O);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function $(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Of}var Mf,lw;function VL(){if(lw)return Mf;lw=1;var e=Af();function t(){}function n(){}return n.resetWarningCache=t,Mf=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},Mf}var cw;function jL(){if(cw)return Js.exports;if(cw=1,process.env.NODE_ENV!=="production"){var e=tw(),t=!0;Js.exports=LL()(e.isElement,t)}else Js.exports=VL()();return Js.exports}var RL=jL();const nt=Ap(RL);function Qr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const $L=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function oi(e,t,n){const r=zL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&uw(r,"path",i),uw(r,"relativePath",i),r}function zL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=$L.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function uw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const BL=[".DS_Store","Thumbs.db"];function HL(e){return Qr(this,void 0,void 0,function*(){return tl(e)&&WL(e.dataTransfer)?YL(e.dataTransfer,e.type):qL(e)?UL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?GL(e):[]})}function WL(e){return tl(e)}function qL(e){return tl(e)&&tl(e.target)}function tl(e){return typeof e=="object"&&e!==null}function UL(e){return Df(e.target.files).map(t=>oi(t))}function GL(e){return Qr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>oi(n))})}function YL(e,t){return Qr(this,void 0,void 0,function*(){if(e.items){const n=Df(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(KL));return dw(fw(r))}return dw(Df(e.files).map(n=>oi(n)))})}function dw(e){return e.filter(t=>BL.indexOf(t.name)===-1)}function Df(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 KL(e){if(typeof e.webkitGetAsEntry!="function")return pw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?hw(t):pw(e,t)}function fw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?fw(n):[n]],[])}function pw(e,t){return Qr(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,oi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return oi(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function ZL(e){return Qr(this,void 0,void 0,function*(){return e.isDirectory?hw(e):XL(e)})}function hw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>Qr(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(ZL));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function XL(e){return Qr(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=oi(r,e.fullPath);t(o)},r=>{n(r)})})})}var nl={},mw;function QL(){return mw||(mw=1,nl.__esModule=!0,nl.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}),nl}var JL=QL();const Nf=Ap(JL);function gw(e){return n2(e)||t2(e)||xw(e)||e2()}function e2(){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
|
|
193
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
194
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
195
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aw(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 O2(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 M2(e){if(Array.isArray(e))return e}function _w(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 ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_w(Object(n),!0).forEach(function(r){jf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_w(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function il(e,t){if(e==null)return{};var n=D2(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 D2(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 Rf=E.forwardRef(function(e,t){var n=e.children,r=il(e,T2),o=Ow(r),i=o.open,a=il(o,S2);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ft(ft({},a),{},{open:i})))});Rf.displayName="Dropzone";var Iw={disabled:!1,getFilesFromEvent:HL,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};Rf.defaultProps=Iw,Rf.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 $f={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Ow(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ft(ft({},Iw),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,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,g=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,w=t.noDrag,C=t.noDragEventsBubbling,P=t.onError,I=t.validator,A=E.useMemo(function(){return b2(n)},[n]),F=E.useMemo(function(){return y2(n)},[n]),L=E.useMemo(function(){return typeof m=="function"?m:Mw},[m]),R=E.useMemo(function(){return typeof y=="function"?y:Mw},[y]),k=E.useRef(null),D=E.useRef(null),N=E.useReducer(N2,$f),j=Lf(N,2),M=j[0],$=j[1],O=M.isFocused,B=M.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&v2()),oe=function(){!Q.current&&B&&setTimeout(function(){if(D.current){var ce=D.current.files;ce.length||($({type:"closeDialog"}),R())}},300)};E.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[D,B,R,Q]);var J=E.useRef([]),K=function(ce){k.current&&k.current.contains(ce.target)||(ce.preventDefault(),J.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",Cw,!1),document.addEventListener("drop",K,!1)),function(){x&&(document.removeEventListener("dragover",Cw),document.removeEventListener("drop",K))}},[k,x]),E.useEffect(function(){return!r&&g&&k.current&&k.current.focus(),function(){}},[k,g,r]);var U=E.useCallback(function(re){P?P(re):console.error(re)},[P]),Y=E.useCallback(function(re){re.preventDefault(),re.persist(),X(re),J.current=[].concat(k2(J.current),[re.target]),ol(re)&&Promise.resolve(o(re)).then(function(ce){if(!(rl(re)&&!C)){var Le=ce.length,Xe=Le>0&&p2({files:ce,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ct=Le>0&&!Xe;$({isDragAccept:Xe,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(re)}}).catch(function(ce){return U(ce)})},[o,c,U,C,A,a,i,s,l,I]),V=E.useCallback(function(re){re.preventDefault(),re.persist(),X(re);var ce=ol(re);if(ce&&re.dataTransfer)try{re.dataTransfer.dropEffect="copy"}catch{}return ce&&d&&d(re),!1},[d,C]),W=E.useCallback(function(re){re.preventDefault(),re.persist(),X(re);var ce=J.current.filter(function(Xe){return k.current&&k.current.contains(Xe)}),Le=ce.indexOf(re.target);Le!==-1&&ce.splice(Le,1),J.current=ce,!(ce.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ol(re)&&u&&u(re))},[k,u,C]),Z=E.useCallback(function(re,ce){var Le=[],Xe=[];re.forEach(function(Ct){var pt=Sw(Ct,A),Lt=Lf(pt,2),Tn=Lt[0],zn=Lt[1],wr=Ew(Ct,a,i),Tr=Lf(wr,2),Sr=Tr[0],H=Tr[1],q=I?I(Ct):null;if(Tn&&Sr&&!q)Le.push(Ct);else{var Re=[zn,H];q&&(Re=Re.concat(q)),Xe.push({file:Ct,errors:Re.filter(function(et){return et})})}}),(!s&&Le.length>1||s&&l>=1&&Le.length>l)&&(Le.forEach(function(Ct){Xe.push({file:Ct,errors:[f2]})}),Le.splice(0)),$({acceptedFiles:Le,fileRejections:Xe,isDragReject:Xe.length>0,type:"setFiles"}),p&&p(Le,Xe,ce),Xe.length>0&&h&&h(Xe,ce),Le.length>0&&f&&f(Le,ce)},[$,s,A,a,i,l,p,f,h,I]),ie=E.useCallback(function(re){re.preventDefault(),re.persist(),X(re),J.current=[],ol(re)&&Promise.resolve(o(re)).then(function(ce){rl(re)&&!C||Z(ce,re)}).catch(function(ce){return U(ce)}),$({type:"reset"})},[o,Z,U,C]),z=E.useCallback(function(){if(Q.current){$({type:"openDialog"}),L();var re={multiple:s,types:F};window.showOpenFilePicker(re).then(function(ce){return o(ce)}).then(function(ce){Z(ce,null),$({type:"closeDialog"})}).catch(function(ce){x2(ce)?(R(ce),$({type:"closeDialog"})):w2(ce)?(Q.current=!1,D.current?(D.current.value=null,D.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(ce)});return}D.current&&($({type:"openDialog"}),L(),D.current.value=null,D.current.click())},[$,L,R,v,Z,U,F,s]),xe=E.useCallback(function(re){!k.current||!k.current.isEqualNode(re.target)||(re.key===" "||re.key==="Enter"||re.keyCode===32||re.keyCode===13)&&(re.preventDefault(),z())},[k,z]),Ae=E.useCallback(function(){$({type:"focus"})},[]),Ie=E.useCallback(function(){$({type:"blur"})},[]),Oe=E.useCallback(function(){S||(g2()?setTimeout(z,0):z())},[S,z]),G=function(ce){return r?null:ce},se=function(ce){return T?null:G(ce)},ae=function(ce){return w?null:G(ce)},X=function(ce){C&&ce.stopPropagation()},de=E.useMemo(function(){return function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=re.refKey,Le=ce===void 0?"ref":ce,Xe=re.role,Ct=re.onKeyDown,pt=re.onFocus,Lt=re.onBlur,Tn=re.onClick,zn=re.onDragEnter,wr=re.onDragOver,Tr=re.onDragLeave,Sr=re.onDrop,H=il(re,E2);return ft(ft(jf({onKeyDown:se(jn(Ct,xe)),onFocus:se(jn(pt,Ae)),onBlur:se(jn(Lt,Ie)),onClick:G(jn(Tn,Oe)),onDragEnter:ae(jn(zn,Y)),onDragOver:ae(jn(wr,V)),onDragLeave:ae(jn(Tr,W)),onDrop:ae(jn(Sr,ie)),role:typeof Xe=="string"&&Xe!==""?Xe:"presentation"},Le,k),!r&&!T?{tabIndex:0}:{}),H)}},[k,xe,Ae,Ie,Oe,Y,V,W,ie,T,w,r]),ve=E.useCallback(function(re){re.stopPropagation()},[]),we=E.useMemo(function(){return function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=re.refKey,Le=ce===void 0?"ref":ce,Xe=re.onChange,Ct=re.onClick,pt=il(re,C2),Lt=jf({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:G(jn(Xe,ie)),onClick:G(jn(Ct,ve)),tabIndex:-1},Le,D);return ft(ft({},Lt),pt)}},[D,n,s,ie,r]);return ft(ft({},M),{},{isFocused:O&&!r,getRootProps:de,getInputProps:we,rootRef:k,inputRef:D,open:G(z)})}function N2(e,t){switch(t.type){case"focus":return ft(ft({},e),{},{isFocused:!0});case"blur":return ft(ft({},e),{},{isFocused:!1});case"openDialog":return ft(ft({},$f),{},{isFileDialogActive:!0});case"closeDialog":return ft(ft({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ft(ft({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ft(ft({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ft({},$f);default:return e}}function Mw(){}const F2={isImage:e=>e.type.includes("image")},L2=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(F2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:X0(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:X0(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(po,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Po,{})})]}):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(ry,{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(po,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Po,{className:"text-danger"})})]})},V2=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(L2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),j2=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(V2,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),R2=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(AA,{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"})]})]}),$2=({idle:e=R2,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}=Ow({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(j2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},z2=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 eo extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof eo&&(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=>t(n[1]))}clone(t){const n=new eo(this);return t?t(n):n}}const B2=e=>b.jsx(E.Fragment,{children:e.children}),H2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},W2={caseSensitive:!1,sort:!1},Dw=[],q2=E.forwardRef(function(t,n){return b.jsx(gt.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})})}),U2=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(gt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),G2={List:q2,Item:U2},Y2=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(Tc,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},K2=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:y,...m},v)=>{const g=E.useMemo(()=>new eo(r.map(X=>[X.value,X])),[r]),x=E.useRef(null),S=E.useRef(null),T=m.value??m.defaultValue??Dw,w=Ot(),[C,P]=E.useState(0),[I,A]=E.useState(!1),[F,L]=E.useState(""),[R,k]=E.useState(()=>{const X=new eo;return T.forEach(de=>{const ve=g.get(de);return ve?X.set(de,ve):void 0}),X}),D=E.useMemo(()=>Array.from(R.keys()),[R]),[N,j]=E.useState(()=>{const X=new Set(T);return r.reduce((de,ve)=>X.has(ve.value)?[...de,ve.label??ve.value]:de,[])??T}),[M,$]=E.useState(null),O=E.useRef(Dw),B=h&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,Q=new Kr(B,["value","label"],W2).search(F);E.useEffect(()=>{I||P(0)},[I]),E.useEffect(()=>{m.value&&k(new eo(m.value.map(X=>[X,g.get(X)])))},[m.value,g]);const{x:oe,y:J,strategy:K,refs:U,context:Y}=Ur({open:I,transform:!0,strategy:"absolute",onOpenChange:A,whileElementsMounted:Zi,middleware:[Xi(4),lx({padding:10,elementContext:"reference",apply(X){if(x.current===null)return;const de=x.current.getBoundingClientRect().width,ve=360;mi.flushSync(()=>setTimeout(()=>P(ve),200)),Object.assign(X.elements.floating.style,{width:`${de}px`,maxWidth:`${de}px`,maxHeight:`${ve}px`,height:`${ve}px`})}})]}),V=Hx(Y,H2),{getReferenceProps:W,getFloatingProps:Z,getItemProps:ie}=Gr([Yr(Y,{role:"listbox"}),qr(Y),qd(Y,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:X=>$(de=>X??de)})]);E.useEffect(()=>{const X=U.reference.current;if(X)return gi(X)},[]);const z=(X,de)=>{const ve=R.clone(ce=>ce.has(X.value)?ce.remove(X.value):ce.set(X.value,X));k(ve);const we=U.reference.current;if(!we)return;const re=ve.map(ce=>ce.value);we==null||we.setAttribute("data-value",JSON.stringify(re)),y&&y(re),j(ce=>ce.concat(X.label??"")),L(""),$(de)},xe=X=>{const de=X.target.value;return L(de),!I&&de===""?A(!0):(X.target.name=m.name||"",de?A(!0):void 0)},Ae=()=>{var X;A(!0),L(""),(X=U.reference.current)==null||X.focus()},Ie=()=>{A(!0),L("")},Oe=()=>{var X;(X=U.reference.current)==null||X.setAttribute("data-value","[]"),L(""),A(!1),k(new eo),y==null||y([])},G=m.id||m.name,se=R.map(X=>b.jsx(Tc,{size:"small",children:X.label??X.value},`MultiSelect-${X.value}-x`)),ae=Q.filter(X=>X.hidden!==!0);return b.jsxs(ha,{...m,left:e,error:t,ref:x,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:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Ae,children:[b.jsx(Du,{size:20}),b.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),R?b.jsx("button",{type:"button",onClick:Oe,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",{...W({...m,onFocus:Ie,id:`${G}-shadow`,name:`${G}-shadow`,ref:U.setReference}),type:"button","data-name":G,"data-target":G,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),value:I?F:N||R,className:$e("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","truncate overflow-ellipsis",m.className),children:b.jsx(Y2,{label:c,children:se})}),b.jsx("input",{id:G,name:G,type:"hidden","data-origin":G,ref:v,required:f,defaultValue:m.value||D||void 0}),b.jsx(Hr,{preserveTabOrder:!0,children:I?b.jsx(Ko,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...Z({ref:U.setFloating,style:{...V.styles,position:K,left:(oe??0)+(R?26:18),top:J??0}}),"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:F,onChange:xe,title:m.title,placeholder:w.multiSelectInnerPlaceholder,onKeyDown:X=>{var de,ve;if(X.key==="ArrowDown"){let we=M+1;return we>Q.length-1&&(we=0),(de=S.current)==null||de.scrollIntoView({index:we}),$(we)}if(X.key==="ArrowUp"){let we=M-1;return we<0&&(we=Q.length-1),(ve=S.current)==null||ve.scrollIntoView({index:we}),$(we)}if(X.key==="Escape")return X.currentTarget.blur(),A(!1);if(X.key==="Enter"){if(M!==null&&Q[M])return X.preventDefault(),z(Q[M],M);if(Q.length===1)return X.preventDefault(),z(Q[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"}),Q.length===0?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||w.autocompleteEmpty})}):null,b.jsx(yf,{ref:S,data:ae,components:G2,hidden:ae.length===0,style:{height:R.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(X,de)=>{const ve=de.Render??B2,we=R.has(de.value)||R.has(de.label??""),re=M===X,ce=de.label??de.value;return b.jsx("button",{"data-value":de.value,...ie({ref:Le=>void(O.current[X]=Le),role:"option",type:"button","aria-checked":we,"aria-current":we,"aria-selected":we,"aria-busy":de.disabled,onClick:()=>z(de,X)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${we||re?"bg-floating-hover text-floating-foreground":""}`,children:b.jsx(Sf,{onChange:nd,checked:we,"aria-checked":we,onClick:Le=>{Le.stopPropagation(),z(de,X)},children:b.jsx(ve,{...m,label:de.label,value:de.value,children:ce})})})}}),R.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:se})]})}):null})]})}),Z2=({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:$e("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),to=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,optionalText:l,container:c,hideLeft:u=!1,right:d,left:p,error:f,...h},y)=>{const m=Ot(),v=E.useRef(null),g=h.id??h.name;E.useImperativeHandle(y,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const S=new AbortController,T=v.current,w=gi(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{w(),S.abort()}},[]);const x=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return b.jsx(ha,{info:n,left:p,error:f,form:h.form,name:h.name,feedback:o,hideLeft:u,required:e,title:h.title,container:c,componentName:"select",rightLabel:s,interactive:a,id:h.name||h.id,optionalText:l,labelClassName:i,placeholder:h.placeholder,right:b.jsx("label",{htmlFor:g,children:b.jsxs("button",{onClick:x,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Du,{size:20}),b.jsx("span",{className:"sr-only",children:m.inputCaretDown})]})}),children:b.jsxs("select",{...h,id:g,name:g,value:h.value,required:e,ref:wc(y,v),"data-selected":!!h.value||!1,defaultValue:h.value?void 0:"",title:typeof h.title=="string"?h.title:void 0,className:$e("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",h.className),children:[b.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(S=>E.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${g}-select-option-${S.value}`}))]})})}),X2=E.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=E.useId(),[a,s]=E.useState(r.checked??!1),l=a,c=E.useRef(null),u=vi(r.onChange);E.useImperativeHandle(o,()=>c.current),E.useEffect(()=>{if(c.current!==null&&u.current){const p=f=>{f.target.checked=!f.target.checked,u.current&&u.current(f)};return c.current.addEventListener("change",p),()=>{var f;return(f=c.current)==null?void 0:f.removeEventListener("change",p)}}},[]);const d=()=>{var f,h;const p=!((f=c.current)!=null&&f.checked);s(p),(h=r==null?void 0:r.onCheck)==null||h.call(r,p),c.current!==null&&(c.current.checked=p,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return b.jsxs("fieldset",{className:$e("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:p=>s(p.target.checked),ref:c,type:"checkbox"}),b.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,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":l,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:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-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:n})]})}),Q2=e=>{const[t,n]=nA();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:sA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},J2=G0("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)}),eV=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},tV={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"})})},nV=e=>{const t=E.useRef(null),n=eV(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(ma,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(yf,{height:n,useWindowScroll:!0,data:e.source,components:tV,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Sf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(po,{children:b.jsx(Nu,{})})}),b.jsx("div",{})]})};var rV=Object.defineProperty,Nw=Object.getOwnPropertySymbols,oV=Object.prototype.hasOwnProperty,iV=Object.prototype.propertyIsEnumerable,Fw=(e,t,n)=>t in e?rV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aV=(e,t)=>{for(var n in t||(t={}))oV.call(t,n)&&Fw(e,n,t[n]);if(Nw)for(var n of Nw(t))iV.call(t,n)&&Fw(e,n,t[n]);return e},zf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},sV=(e,t,n,r)=>sl(zf,e,t,n,r),ii=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||!ii(e)&&!ii(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>vr(e[r],t[r]))},lV=(e,t)=>(ii(e)||Array.isArray(e))&&t?e[t]:e,cV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,al=e=>/[0-9.]+/.test(e),Lw=e=>["string","number"].includes(typeof e),Vw=e=>e==null||(e==null?void 0:e.length)===0||e==="",jw={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:Vw,notEmpty:e=>!Vw(e),in:(e,t)=>zf(t,n=>vr(e,n)),notIn:(e,t)=>Rw(t,n=>!vr(e,n))},uV=e=>{if(e in jw)return jw[e];throw new Error("Linq - Symbol not found")},ai=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},sl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=uV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},dV=(e,t,n,r)=>sl(ai,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},fV=(e,t,n,r)=>sl(Rw,e,t,n,r),$w=e=>{if(e===null)return null;const t=aV({},e);return Object.keys(t).forEach(n=>t[n]=ii(e[n])?$w(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},zw=(e,t)=>{if(ii(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},pV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},hV=e=>ai(e,(t,n,r)=>ii(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),mV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Bw=(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())},gV=(e,t)=>Bw(e,n=>n[t]),Hw=(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},vV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},yV=(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 al(e)&&al(t)?r.map(a=>Number.parseInt(a)):r},Bf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&al(e)&&al(t)){const o=[],[i,a]=vV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return yV(e,t,r)},bV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Bf(r,o,1):Bf(r,i,Number.parseInt(o,10))}return Lw(e)&&Lw(t)?Bf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Hf=(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},Ww=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},xV=(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)},wV=(e,t,n,r)=>sl(xV,e,t,n,r),qw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(cV(t))},Uw=(e=>(e.Asc="asc",e.Desc="desc",e))(Uw||{}),TV=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),SV=(e,t)=>e.sort(TV(t)),EV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ai(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},CV=class wp{constructor(t=[]){this.array=t}static Range(...t){return bV(...t)}static New(t){return new wp(t)}Where(t,n,r){return this.array=dV(this.array,t,n,r),this}Some(t,n,r){return sV(this.array,t,n,r)}All(t,n,r){return fV(this.array,t,n,r)}Reverse(){return this.array=Ww(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=wV(this.array,t,n,r),this}Distinct(){return this.array=hV(this.array),this}First(t){return t===void 0?this.array[0]:mV(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?Hf((n,r)=>n+r,0,this.array):Hf((n,r)=>n+lV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return gV(this.array,t)}GroupWith(t){return Bw(this.array,t)}Except(t){return ai(this.array,n=>!zw(t,n))}Intersect(t){return ai(this.array,n=>zw(t,n))}OrderBy(t,n){let r;return r=t?qw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Ww(r):r,this}Includes(t){return zf(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 Hf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Hw(this.array,n=>[t,n]))}Zip(t,n){return Hw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ai(this.array,t).length}Get(t){return this.array[t]}Clone(){return new wp($w(this.array))}ToObject(t){return pV(this.array,t)}Sort(t){return Array.isArray(t)?SV(this.array,t):qw(this.array,t)}Unique(t){return EV(this.array,t)}},Gw=CV,Wf={},Yw;function kV(){return Yw||(Yw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(g){window.console.log(g)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const g=v.getItem(m);try{return JSON.parse(g)}catch{return g??null}},i=m=>Object.keys(m).reduce((v,g)=>({...v,[g]:o(g,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,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(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 v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{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(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=p.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,g={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,w)=>{const C=w.parse(g);return C===""?T:T.concat(C)},[`${encodeURIComponent(m)}=${x}`]).join(";");document.cookie=S,u()}},f=m=>{const v=new Set,g=x=>{m().removeItem(x);const S=i(m());v.forEach(T=>T(S))};return{delete:g,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(m()):m(),has:x=>{const S=m().getItem(x);return!n(S)},deleteAll:()=>{t(m(),g),v.forEach(x=>x(m()))},get:x=>o(x,m()),set:(x,S)=>{m().setItem(x,JSON.stringify(S)),v.forEach(T=>T(m()))}}},h=f(()=>window.sessionStorage),y=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=y,e.SessionStorage=h,e.createStorage=f}(Wf)),Wf}var va=kV();const qf=e=>e.headerLabel??e.thead??e.id,Uf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var si=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(si||{});const Gf=e=>e.type==="number"?e.valueAsNumber:e.value,PV=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},AV={},_V=(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})},IV=(e,t,n=AV)=>{const r=Gi()?null:va.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Xu({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:_V(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Gi()||va.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Yf=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??si.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:Ui(),operation:l,label:qf(e),name:o,type:i,value:"",...r}},Kf=()=>{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(()=>({[si.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[si.Boolean]:[t.is,t.isNot],[si.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},OV=e=>{const t=Ot(),n=Kf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Yf(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 Yf(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=Gf(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(Xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(SA,{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(to,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(to,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ma,{"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(Po,{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(Fu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},MV=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=Kf(),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=Gf(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(to,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ma,{"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(Po,{className:"text-danger",size:14})})]})},DV=({item:e,onPointerDown:t})=>{const n=ko(0);return b.jsxs(Qv,{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(TA,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},NV=e=>{var l;const t=Ot(),n=Uf(e.cols),r=iA(),[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 Gw(e.rows).GroupBy(d),y=e.cols.find(v=>v.id===d);e.setGroups(uT(h).map((v,g)=>{const x=h[v];return{...y,groupId:Ui(),groupKey:d,index:g,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(Xo,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(PA,{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(to,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(po,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Po,{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(vS,{children:b.jsx(Zv,{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(DV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},FV=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),LV=(e,t)=>e.toSorted(FV(t)),Kw=(e,t,n)=>({label:t,id:Ui(),type:n,value:e.id}),VV=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,Kw(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(Xo,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(ty,{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(to,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(to,{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(Po,{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(Fu,{size:14})," ",t.tableSortAddButton]})})]})})})},jV=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=Kw(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=qf(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(yA,{size:14}):null,n==="desc"?b.jsx(vA,{size:14}):null,n==="undefined"?b.jsx(ty,{size:14}):null]})},RV=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(OV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(VV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(NV,{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=Gf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function $V(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 zV=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>$V(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]})})]})},BV={top:0,left:0,right:0,bottom:-1},HV=e=>{var h;const t=Ot(),n=e.filters.filter(y=>y.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,i=e.header.allowFilter??!0,a=Kf(),s=r?EA:CA,l=E.useRef(null),c=y=>{const m=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(g=>g.id!==m))},u=E.useCallback(y=>{if(y===null)return;l.current=y;const m=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),d=e.sorters.find(y=>e.header.id===y.value),p=d!=null&&d.type?d.type===Uw.Asc?"ascending":"descending":"none",f=qf(e.header);return b.jsxs(Qv,{...e.header.thProps,as:"th",ref:u,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((h=e.header.thProps)==null?void 0:h.className)??""}`,children:[b.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&i?b.jsx(Xo,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),b.jsx(s,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0?null:b.jsxs("ul",{className:"font-medium",children:[n.map(y=>b.jsx("li",{className:"my-1",children:b.jsx(MV,{onDelete:c,filter:y,set:e.setFilters})},`thead-filter-${y.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(Yf(e.header,a.options,a.operations))),children:[b.jsx(Fu,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?b.jsx(jV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(gt.button,{drag:"x",draggable:!0,type:"button",animate:!1,initial:!1,dragListener:!0,dragMomentum:!0,dragElastic:0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:BV,className:"absolute right-0 top-0 block h-full w-1.5 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(y,m)=>{if(l.current===null)return;const v=l.current.getBoundingClientRect().width,g=m.delta.x;l.current.style.width=`${Math.abs(v+g)}px`}})]})},WV=e=>b.jsx(Zv,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:b.jsx(Jn,{children:e.headers.map((t,n)=>b.jsx(HV,{header:t,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:n===e.headers.length-1},`header-child-item-${t.id}`))})}),Zw=E.createContext({}),qV=()=>E.useContext(Zw),UV=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})})),GV=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),YV=E.forwardRef(({context:e,...t},n)=>{const r=qV(),o={...t==null?void 0:t.style,top:ht.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-card-background",ref:n})}),KV=E.forwardRef(({context:e,item:t,...n},r)=>b.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),ZV=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),XV={TableHead:YV,Table:GV,TableBody:UV,TableRow:KV,TableFoot:ZV},QV=[0,0,0,0,0,0,0,0,0,0],Xw=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),JV=(e,t,n)=>b.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?Xw:b.jsx(lb,{})}),ej=(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=ed(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:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Xw:c?b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):b.jsx(E.Fragment,{children:ht.nil(l)?"":l}))})})},tj=()=>b.jsx(E.Fragment,{}),nj=[{}],Qw=({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=vi(a),y=vi(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return QV;if(c)return u.rows;const v=new Gw(u.rows);return t.length>0&&t.forEach(g=>g.value===""||Number.isNaN(g.value)?void 0:v.Where(g.name,g.operation.symbol,g.value)),r.length===0?v.Select():LV(v.Select(),r)},[u.rows,t,r,u.loading]);return E.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,g=new IntersectionObserver(x=>{var w;return x[x.length-1].isIntersecting&&y.current?((w=h.current)==null||w.call(h),void f(!0)):f(!1)});return g.observe(v),()=>g.disconnect()},[]),b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(nL,{useWindowScroll:!0,followOutput:"smooth",components:XV,totalCount:m.length,data:m.length===0?nj:m,fixedFooterContent:p?tj:null,itemContent:m.length===0?JV:ej,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>b.jsx(WV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(zV,{...l}):null]})},rj=(e,t)=>typeof t=="function"?t(e):t,ll=(e,t,n)=>e===t||n==null?void 0:n(t),oj=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=E.useMemo(()=>Uf(e.cols),[e.cols]),[o,i]=Xu({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const s=l=>c=>{const u=a.state();return{...u,[l]:rj(u[l],c)}};return{cols:s("cols"),sorters:s("sorters"),groups:s("groups"),filters:s("filters")}},{postMiddleware:[(a,s)=>{var l;return(l=e.set)==null||l.call(e,a),ll((s==null?void 0:s.filters)??[],a.filters??[],e.setFilters),ll((s==null?void 0:s.sorters)??[],a.sorters??[],e.setSorters),ll((s==null?void 0:s.groups)??[],a.groups??[],e.setGroups),ll((s==null?void 0:s.cols)??[],a.cols??[],e.setCols),a}]});return b.jsx(Zw.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?b.jsx(RV,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:i.cols,sorters:o.sorters,setGroups:i.groups,setFilters:i.filters,setSorters:i.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?b.jsx(Qw,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:i.cols,sorters:o.sorters,setGroups:i.groups,setFilters:i.filters,setSorters:i.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:o.groups.map((a,s)=>b.jsx("div",{className:"min-w-full",children:b.jsx(Qw,{...e,group:a,index:s,cols:o.cols,pagination:null,rows:a.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:i.cols,sorters:o.sorters,setGroups:i.groups,setFilters:i.filters,setSorters:i.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},ij=["INPUT","SELECT"],Jw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ij.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Zf,e1;function Xf(){if(e1)return Zf;e1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Zf={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Zf}var Qf,t1;function n1(){if(t1)return Qf;t1=1;var e=Xf(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],v=0;v<256;++v)m.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return m}(),o=function(v){for(;v.length>1;){var g=v.pop(),x=g.obj[g.prop];if(n(x)){for(var S=[],T=0;T<x.length;++T)typeof x[T]<"u"&&S.push(x[T]);g.obj[g.prop]=S}}},i=function(v,g){for(var x=g&&g.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(x[S]=v[S]);return x},a=function m(v,g,x){if(!g)return v;if(typeof g!="object"&&typeof g!="function"){if(n(v))v.push(g);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,g))&&(v[g]=!0);else return[v,g];return v}if(!v||typeof v!="object")return[v].concat(g);var S=v;return n(v)&&!n(g)&&(S=i(v,x)),n(v)&&n(g)?(g.forEach(function(T,w){if(t.call(v,w)){var C=v[w];C&&typeof C=="object"&&T&&typeof T=="object"?v[w]=m(C,T,x):v.push(T)}else v[w]=T}),v):Object.keys(g).reduce(function(T,w){var C=g[w];return t.call(T,w)?T[w]=m(T[w],C,x):T[w]=C,T},S)},s=function(v,g){return Object.keys(g).reduce(function(x,S){return x[S]=g[S],x},v)},l=function(m,v,g){var x=m.replace(/\+/g," ");if(g==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,g,x,S,T){if(v.length===0)return v;var w=v;if(typeof v=="symbol"?w=Symbol.prototype.toString.call(v):typeof v!="string"&&(w=String(v)),x==="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="",P=0;P<w.length;P+=c){for(var I=w.length>=c?w.slice(P,P+c):w,A=[],F=0;F<I.length;++F){var L=I.charCodeAt(F);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(F);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}F+=1,L=65536+((L&1023)<<10|I.charCodeAt(F)&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(v){for(var g=[{obj:{o:v},prop:"o"}],x=[],S=0;S<g.length;++S)for(var T=g[S],w=T.obj[T.prop],C=Object.keys(w),P=0;P<C.length;++P){var I=C[P],A=w[I];typeof A=="object"&&A!==null&&x.indexOf(A)===-1&&(g.push({obj:w,prop:I}),x.push(A))}return o(g),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))},h=function(v,g){return[].concat(v,g)},y=function(v,g){if(n(v)){for(var x=[],S=0;S<v.length;S+=1)x.push(g(v[S]));return x}return g(v)};return Qf={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:y,merge:a},Qf}var Jf,r1;function aj(){if(r1)return Jf;r1=1;var e=iT(),t=n1(),n=Xf(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(y,m){a.apply(y,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 y(m,v,g,x,S,T,w,C,P,I,A,F,L,R,k,D,N,j){for(var M=m,$=j,O=0,B=!1;($=$.get(p))!==void 0&&!B;){var Q=$.get(m);if(O+=1,typeof Q<"u"){if(Q===O)throw new RangeError("Cyclic object value");B=!0}typeof $.get(p)>"u"&&(O=0)}if(typeof I=="function"?M=I(v,M):M instanceof Date?M=L(M):g==="comma"&&i(M)&&(M=t.maybeMap(M,function(Ie){return Ie instanceof Date?L(Ie):Ie})),M===null){if(T)return P&&!D?P(v,u.encoder,N,"key",R):v;M=""}if(d(M)||t.isBuffer(M)){if(P){var oe=D?v:P(v,u.encoder,N,"key",R);return[k(oe)+"="+k(P(M,u.encoder,N,"value",R))]}return[k(v)+"="+k(String(M))]}var J=[];if(typeof M>"u")return J;var K;if(g==="comma"&&i(M))D&&P&&(M=t.maybeMap(M,P)),K=[{value:M.length>0?M.join(",")||null:void 0}];else if(i(I))K=I;else{var U=Object.keys(M);K=A?U.sort(A):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),V=x&&i(M)&&M.length===1?Y+"[]":Y;if(S&&i(M)&&M.length===0)return V+"[]";for(var W=0;W<K.length;++W){var Z=K[W],ie=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:M[Z];if(!(w&&ie===null)){var z=F&&C?String(Z).replace(/\./g,"%2E"):String(Z),xe=i(M)?typeof g=="function"?g(V,z):V:V+(F?"."+z:"["+z+"]");j.set(m,O);var Ae=e();Ae.set(p,j),s(J,y(ie,xe,g,x,S,T,w,C,g==="comma"&&D&&i(M)?null:P,I,A,F,L,R,k,D,N,Ae))}}return J},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 v=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 g=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");g=m.format}var x=n.formatters[g],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:v,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:g,formatter:x,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 Jf=function(y,m){var v=y,g=h(m),x,S;typeof g.filter=="function"?(S=g.filter,v=S("",v)):i(g.filter)&&(S=g.filter,x=S);var T=[];if(typeof v!="object"||v===null)return"";var w=o[g.arrayFormat],C=w==="comma"&&g.commaRoundTrip;x||(x=Object.keys(v)),g.sort&&x.sort(g.sort);for(var P=e(),I=0;I<x.length;++I){var A=x[I],F=v[A];g.skipNulls&&F===null||s(T,f(F,A,w,C,g.allowEmptyArrays,g.strictNullHandling,g.skipNulls,g.encodeDotInKeys,g.encode?g.encoder:null,g.filter,g.sort,g.allowDots,g.serializeDate,g.format,g.formatter,g.encodeValuesOnly,g.charset,P))}var L=T.join(g.delimiter),R=g.addQueryPrefix===!0?"?":"";return g.charsetSentinel&&(g.charset==="iso-8859-1"?R+="utf8=%26%2310003%3B&":R+="utf8=%E2%9C%93&"),L.length>0?R+L:""},Jf}var ep,o1;function sj(){if(o1)return ep;o1=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,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 y={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=h.parameterLimit===1/0?void 0:h.parameterLimit,g=m.split(h.delimiter,h.throwOnLimitExceeded?v+1:v);if(h.throwOnLimitExceeded&&g.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,S,T=h.charset;if(h.charsetSentinel)for(S=0;S<g.length;++S)g[S].indexOf("utf8=")===0&&(g[S]===s?T="utf-8":g[S]===a&&(T="iso-8859-1"),x=S,S=g.length);for(S=0;S<g.length;++S)if(S!==x){var w=g[S],C=w.indexOf("]="),P=C===-1?w.indexOf("="):C+1,I,A;P===-1?(I=h.decoder(w,r.decoder,T,"key"),A=h.strictNullHandling?null:""):(I=h.decoder(w.slice(0,P),r.decoder,T,"key"),A=e.maybeMap(i(w.slice(P+1),h,n(y[I])?y[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 F=t.call(y,I);F&&h.duplicates==="combine"?y[I]=e.combine(y[I],A):(!F||h.duplicates==="last")&&(y[I]=A)}return y},c=function(p,f,h,y){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");m=Array.isArray(f)&&f[v]?f[v].length:0}for(var g=y?f:i(f,h,m),x=p.length-1;x>=0;--x){var S,T=p[x];if(T==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(g===""||h.strictNullHandling&&g===null)?[]:e.combine([],g);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,P=parseInt(C,10);!h.parseArrays&&C===""?S={0:g}:!isNaN(P)&&T!==C&&String(P)===C&&P>=0&&h.parseArrays&&P<=h.arrayLimit?(S=[],S[P]=g):C!=="__proto__"&&(S[C]=g)}g=S}return g},u=function(f,h,y,m){if(f){var v=y.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,g=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=y.depth>0&&g.exec(v),T=S?v.slice(0,S.index):v,w=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;w.push(T)}for(var C=0;y.depth>0&&(S=x.exec(v))!==null&&C<y.depth;){if(C+=1,!y.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!y.allowPrototypes)return;w.push(S[1])}if(S){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");w.push("["+v.slice(S.index)+"]")}return c(w,h,y,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,y=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(y!=="combine"&&y!=="first"&&y!=="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:y,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 ep=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var y=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},v=Object.keys(y),g=0;g<v.length;++g){var x=v[g],S=u(x,y[x],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},ep}var tp,i1;function lj(){if(i1)return tp;i1=1;var e=aj(),t=sj(),n=Xf();return tp={formats:n,parse:t,stringify:e},tp}var cj=lj(),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 a1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(a1||(a1={}));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}},ne=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 ya=(e,t)=>{let n;switch(e.code){case ne.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case ne.invalid_union:n="Invalid input";break;case ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case ne.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case ne.invalid_arguments:n="Invalid function arguments";break;case ne.invalid_return_type:n="Invalid function return type";break;case ne.invalid_date:n="Invalid date";break;case ne.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 ne.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 ne.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 ne.custom:n="Invalid input";break;case ne.invalid_intersection_types:n="Intersection results could not be merged";break;case ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let uj=ya;function np(){return uj}const rp=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ue(e,t){const n=np(),r=rp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ya?void 0:ya].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 Ce;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return 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 Ce;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Ce=Object.freeze({status:"aborted"}),ba=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),s1=e=>e.status==="aborted",l1=e=>e.status==="dirty",li=e=>e.status==="valid",cl=e=>typeof Promise<"u"&&e instanceof Promise;function ul(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 c1(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 ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ye||(ye={}));var xa,wa;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 u1=(e,t)=>{if(li(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new fn(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{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(cl(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 u1(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 li(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=>li(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(cl(o)?o:Promise.resolve(o));return u1(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:ne.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 oo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $n.create(this)}promise(){return Ea.create(this,this._def)}or(t){return pl.create([this,t],this._def)}and(t){return hl.create(this,t,this._def)}transform(t){return new Zn({..._e(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new bl({..._e(this._def),innerType:this,defaultValue:n,typeName:Se.ZodDefault})}brand(){return new h1({typeName:Se.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new xl({..._e(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 wl.create(this,t)}readonly(){return Tl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dj=/^c[^\s-]{8,}$/i,fj=/^[0-9a-z]+$/,pj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hj=/^[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,mj=/^[a-z0-9_-]{21}$/i,gj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vj=/^[-+]?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)?)??$/,yj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let op;const xj=/^(?:(?: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])$/,wj=/^(?:(?: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])$/,Tj=/^(([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]))$/,Sj=/^(([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])$/,Ej=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cj=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d1="((\\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])))",kj=new RegExp(`^${d1}$`);function f1(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 Pj(e){return new RegExp(`^${f1(e)}$`)}function Aj(e){let t=`${d1}T${f1(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 _j(e,t){return!!((t==="v4"||!t)&&xj.test(e)||(t==="v6"||!t)&&Tj.test(e))}function Ij(e,t){if(!gj.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 Oj(e,t){return!!((t==="v4"||!t)&&wj.test(e)||(t==="v6"||!t)&&Sj.test(e))}class Gn extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:ne.invalid_type,expected:fe.string,received:i.parsedType}),Ce}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),ue(o,{code:ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ue(o,{code:ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")op||(op=new RegExp(bj,"u")),op.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")hj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")mj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")dj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")fj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")pj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:ne.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"regex",code:ne.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Aj(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?kj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Pj(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?vj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_j(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Ij(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Oj(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Ej.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Cj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:ne.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:ne.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new Gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){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,...ye.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ye.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ye.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new 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,..._e(e)})};function Mj(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 no 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 ue(i,{code:ne.invalid_type,expected:fe.number,received:i.parsedType}),Ce}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),ue(r,{code:ne.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Mj(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ne.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:ne.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,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new no({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new no({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&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)}}no.create=e=>new no({checks:[],typeName:Se.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class ci 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),ue(r,{code:ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ne.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ne.invalid_type,expected:fe.bigint,received:n.parsedType}),Ce}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ci.create=e=>{var t;return new ci({checks:[],typeName:Se.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class ip extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.boolean,received:r.parsedType}),Ce}return Zt(t.data)}}ip.create=e=>new ip({typeName:Se.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Ta 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 ue(i,{code:ne.invalid_type,expected:fe.date,received:i.parsedType}),Ce}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:ne.invalid_date}),Ce}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),ue(o,{code:ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.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 Ta({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ta.create=e=>new Ta({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Se.ZodDate,..._e(e)});class ap extends Ve{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.symbol,received:r.parsedType}),Ce}return Zt(t.data)}}ap.create=e=>new ap({typeName:Se.ZodSymbol,..._e(e)});class dl extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.undefined,received:r.parsedType}),Ce}return Zt(t.data)}}dl.create=e=>new dl({typeName:Se.ZodUndefined,..._e(e)});class fl extends Ve{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.null,received:r.parsedType}),Ce}return Zt(t.data)}}fl.create=e=>new fl({typeName:Se.ZodNull,..._e(e)});class sp extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}sp.create=e=>new sp({typeName:Se.ZodAny,..._e(e)});class ui extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}ui.create=e=>new ui({typeName:Se.ZodUnknown,..._e(e)});class br extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ne.invalid_type,expected:fe.never,received:n.parsedType}),Ce}}br.create=e=>new br({typeName:Se.ZodNever,..._e(e)});class lp extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.void,received:r.parsedType}),Ce}return Zt(t.data)}}lp.create=e=>new lp({typeName:Se.ZodVoid,..._e(e)});class $n extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:ne.invalid_type,expected:fe.array,received:n.parsedType}),Ce;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?ne.too_big:ne.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ue(n,{code:ne.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ue(n,{code:ne.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:ye.toString(n)}})}max(t,n){return new $n({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new $n({...this._def,exactLength:{value:t,message:ye.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,..._e(t)});function di(e){if(e instanceof bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xn.create(di(r))}return new bt({...e._def,shape:()=>t})}else return e instanceof $n?new $n({...e._def,type:di(e.element)}):e instanceof Xn?Xn.create(di(e.unwrap())):e instanceof oo?oo.create(di(e.unwrap())):e instanceof Kn?Kn.create(e.items.map(t=>di(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 ue(c,{code:ne.invalid_type,expected:fe.object,received:c.parsedType}),Ce}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof 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&&(ue(o,{code:ne.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 ye.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=ye.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 di(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 p1(He.objectKeys(this.shape))}}bt.create=(e,t)=>new bt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Se.ZodObject,..._e(t)}),bt.strictCreate=(e,t)=>new bt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Se.ZodObject,..._e(t)}),bt.lazycreate=(e,t)=>new bt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Se.ZodObject,..._e(t)});class pl 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 ue(n,{code:ne.invalid_union,unionErrors:a}),Ce}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new fn(l));return ue(n,{code:ne.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}}pl.create=(e,t)=>new pl({options:e,typeName:Se.ZodUnion,..._e(t)});const Yn=e=>e instanceof gl?Yn(e.schema):e instanceof Zn?Yn(e.innerType()):e instanceof vl?[e.value]:e instanceof ro?e.options:e instanceof yl?He.objectValues(e.enum):e instanceof bl?Yn(e._def.innerType):e instanceof dl?[void 0]:e instanceof fl?[null]:e instanceof Xn?[void 0,...Yn(e.unwrap())]:e instanceof oo?[null,...Yn(e.unwrap())]:e instanceof h1||e instanceof Tl?Yn(e.unwrap()):e instanceof xl?Yn(e._def.innerType):[];class cp extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:ne.invalid_type,expected:fe.object,received:n.parsedType}),Ce;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=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 cp({typeName:Se.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function up(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=up(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=up(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 hl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(s1(i)||s1(a))return Ce;const s=up(i.value,a.value);return s.valid?((l1(i)||l1(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:ne.invalid_intersection_types}),Ce)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}hl.create=(e,t,n)=>new hl({left:e,right:t,typeName:Se.ZodIntersection,..._e(n)});class Kn extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:ne.invalid_type,expected:fe.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ue(r,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:ne.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,..._e(t)})};class ml 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 ue(r,{code:ne.invalid_type,expected:fe.object,received:r.parsedType}),Ce;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new 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 Ve?new ml({keyType:t,valueType:n,typeName:Se.ZodRecord,..._e(r)}):new ml({keyType:Gn.create(),valueType:t,typeName:Se.ZodRecord,..._e(n)})}}class dp 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 ue(r,{code:ne.invalid_type,expected:fe.map,received:r.parsedType}),Ce;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new 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 Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}dp.create=(e,t,n)=>new dp({valueType:t,keyType:e,typeName:Se.ZodMap,..._e(n)});class fi extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:ne.invalid_type,expected:fe.set,received:r.parsedType}),Ce;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:ne.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ue(r,{code:ne.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ce;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Rn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new fi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new fi({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}fi.create=(e,t)=>new fi({valueType:e,minSize:null,maxSize:null,typeName:Se.ZodSet,..._e(t)});class Sa extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:ne.invalid_type,expected:fe.function,received:n.parsedType}),Ce;function r(s,l){return rp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,np(),ya].filter(c=>!!c),issueData:{code:ne.invalid_arguments,argumentsError:l}})}function o(s,l){return rp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,np(),ya].filter(c=>!!c),issueData:{code:ne.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ea){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 Sa({...this._def,args:Kn.create(t).rest(ui.create())})}returns(t){return new Sa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Sa({args:t||Kn.create([]).rest(ui.create()),returns:n||ui.create(),typeName:Se.ZodFunction,..._e(r)})}}class gl 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})}}gl.create=(e,t)=>new gl({getter:e,typeName:Se.ZodLazy,..._e(t)});class vl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:ne.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:t.data}}get value(){return this._def.value}}vl.create=(e,t)=>new vl({value:e,typeName:Se.ZodLiteral,..._e(t)});function p1(e,t){return new ro({values:e,typeName:Se.ZodEnum,..._e(t)})}class ro extends Ve{constructor(){super(...arguments),xa.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:He.joinValues(r),received:n.parsedType,code:ne.invalid_type}),Ce}if(ul(this,xa)||c1(this,xa,new Set(this._def.values)),!ul(this,xa).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:ne.invalid_enum_value,options:r}),Ce}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 ro.create(t,{...this._def,...n})}exclude(t,n=this._def){return ro.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}xa=new WeakMap,ro.create=p1;class yl extends Ve{constructor(){super(...arguments),wa.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return ue(r,{expected:He.joinValues(o),received:r.parsedType,code:ne.invalid_type}),Ce}if(ul(this,wa)||c1(this,wa,new Set(He.getValidEnumValues(this._def.values))),!ul(this,wa).has(t.data)){const o=He.objectValues(n);return ue(r,{received:r.data,code:ne.invalid_enum_value,options:o}),Ce}return Zt(t.data)}get enum(){return this._def.values}}wa=new WeakMap,yl.create=(e,t)=>new yl({values:e,typeName:Se.ZodNativeEnum,..._e(t)});class Ea 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 ue(n,{code:ne.invalid_type,expected:fe.promise,received:n.parsedType}),Ce;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})))}}Ea.create=(e,t)=>new Ea({type:e,typeName:Se.ZodPromise,..._e(t)});class Zn extends Ve{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=>{ue(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Ce;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ce:l.status==="dirty"||n.value==="dirty"?ba(l.value):l});{if(n.value==="aborted")return Ce;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"||n.value==="dirty"?ba(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ce:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ce:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!li(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=>li(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,..._e(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:Se.ZodEffects,..._e(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:Se.ZodOptional,..._e(t)});class oo extends Ve{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}oo.create=(e,t)=>new oo({innerType:e,typeName:Se.ZodNullable,..._e(t)});class bl 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}}bl.create=(e,t)=>new bl({innerType:e,typeName:Se.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class xl 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 cl(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}}xl.create=(e,t)=>new xl({innerType:e,typeName:Se.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class fp extends Ve{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.nan,received:r.parsedType}),Ce}return{status:"valid",value:t.data}}}fp.create=e=>new fp({typeName:Se.ZodNaN,..._e(e)});class h1 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 wl 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"?Ce:i.status==="dirty"?(n.dirty(),ba(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ce:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new wl({in:t,out:n,typeName:Se.ZodPipeline})}}class Tl extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=o=>(li(o)&&(o.value=Object.freeze(o.value)),o);return cl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Tl.create=(e,t)=>new Tl({innerType:e,typeName:Se.ZodReadonly,..._e(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,no.create,fp.create,ci.create,ip.create,Ta.create,ap.create,dl.create,fl.create,sp.create,ui.create,br.create,lp.create,$n.create,bt.create,bt.strictCreate,pl.create,cp.create,hl.create,Kn.create,ml.create,dp.create,fi.create,Sa.create,gl.create,vl.create,ro.create,yl.create,Ea.create,Zn.create,Xn.create,oo.create,Zn.createWithPreprocess,wl.create;const Dj=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Nj=(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]}}},m1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),wn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):m1(t),o=structuredClone(e);return Nj(o,r,n),o},Fj=(e,t)=>e.localeCompare(t),Ca={},g1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return v1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=g1(e._def.innerType);return t==="ZodArray"?n??[]:n}},v1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,g1(n)])),y1=(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]=y1(i,o):n[r]=o||i)}return n},Lj={sort:Fj,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},b1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return cj.parse(n.toString(),Lj)},io=(e,t)=>m1(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)},Vj={state:{},loading:!1,useOnChange:!1},x1=e=>e.dataset.target||e.name,jj=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=va.LocalStorage.get(t);return Dj(n)?n:{}},clear:()=>void va.LocalStorage.delete(t),set:n=>va.LocalStorage.set(t,n)}},Rj=(e,t,n=Vj)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>ht.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??v1(e)??{}),l=E.useCallback(g=>{var I;const x=g.target,S=g.currentTarget;if(x.dataset.optional==="true")return;const w=x1(x),C=pp(x)||(S?xr(S):""),P=io(w,e);if(x.setAttribute("data-initialized","true"),P){const A=P.safeParse(C),F=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(L=>wn(L??{},w,F))}},[]),c=E.useCallback(g=>x=>{const S=x.currentTarget,T=Object.values(i.current).reduce((C,P)=>{var R;const I=P.element,A=P.schema.safeParse(xr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const F=(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,F)},{}),w=ht.empty(T)?null:T;o(w),console.error(w),g==null||g({form:S,errors:w||{}})},[]),u=(g,x=Ca)=>{const S=io(g,e),T=w=>{var P;if(!w)return;const C=w instanceof Date?w.toISOString():w.target.value;s(I=>wn(I,g,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,w)};return{...x,loading:n.loading,name:g,id:g,onChange:T,form:t,date:ht.string(a[g])?new Date(a[g]):a[g],required:x.required??!S.isOptional(),error:r==null?void 0:r[g],ref:w=>{w!==null&&(i.current[g]={element:w,schema:S})}}},d=(g,x=Ca)=>{const S=io(g,e);return{...x,name:g,id:g,onChange:w=>{var P;const C=w.target.value;s(I=>wn(I,g,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,g,void 0),value:kr(a,g,void 0)||"",required:x.required??!S.isOptional(),ref:w=>w!==null?i.current[g]={element:w,schema:S}:void 0}},p=(g,x=Ca)=>{const S=io(g,e);return{...x,name:g,id:g,onChange:w=>{var P;const C=w.target.checked;s(I=>wn(I??{},g,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,g,void 0),required:x.required??!S.isOptional(),ref:w=>w!==null?void(i.current[g]={element:w,schema:S}):void 0}},f=(g,x=Ca)=>{const S=io(g,e),T=w=>{var P,I;(P=w.persist)==null||P.call(w);const C=w.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,w),s(A=>wn(A,g,C))};return{...x,loading:n.loading,name:g,id:g,onChange:T,form:t,onInvalid:l,error:kr(r,g,void 0),required:x.required??!S.isOptional(),value:kr(a,g,void 0)||(x==null?void 0:x.value)||"",type:ht.instance(S,no)?"number":(x==null?void 0:x.type)??"text",ref:w=>w===null?void 0:i.current[g]={element:w,schema:S}}},h=(g,x=Ca)=>{const S=io(g,e),T=S._def.typeName==="ZodNumber";return{...x,name:g,id:g,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const P=T?C.target.valueAsNumber:C.target.value;(A=x==null?void 0:x.onChange)==null||A.call(x,C),s(F=>wn(F,g,P))},form:t,loading:n.loading,onInvalid:l,error:kr(r,g,void 0),required:x.required??!S.isOptional(),type:T?"number":(x==null?void 0:x.type)??"text",value:kr(a,g,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[g]={element:C,schema:S})}};E.useEffect(()=>{const g=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=F=>{var N;const L=x1(F.target);if(!L)return!1;const R=F.target,k=pp(F.target)||(F.relatedTarget?xr(F.relatedTarget):""),D=S.schema.safeParse(k);if(R.setAttribute("value",k),D.success)return T.setCustomValidity(""),o(j=>{if(ht.null(j))return null;const M=wn(j,L,void 0);return ht.empty(j)||ht.nil(j)||ht.empty(M)?null:M}),!1;if(T.required){const j=((N=D.error.issues[0])==null?void 0:N.message)||"";T.setCustomValidity(j),o(M=>{if(ht.null(M))return null;const $=wn(M,L,j||void 0);return ht.empty($)?null:$})}return!1},P=new AbortController,I=T.getAttribute("data-trigger")||"blur";T.addEventListener(I,C,{signal:P.signal});const A=T.dataset.shadow?!1:T.required?!w.success:!1;return{input:S,hasInitialError:A,unsubscribe:()=>P.abort()}});return g.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>g.forEach(S=>S.unsubscribe())});const y=g=>x=>{var A;x.preventDefault();const S=x.currentTarget;let T=b1(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(F=>{if(F.tagName==="SELECT"){const L=F;T=wn(T,L.name,L.value)}if(F.tagName==="INPUT"){const L=F,R=pp(L)||(L?xr(L):"");T=wn(T,L.dataset.target||L.name,R)}});const C=y1(T,a),P=e.safeParse(C),I=()=>{var F;Jw(S),(F=n.interceptor)==null||F.clear()};if(P.success){const F=JSON.stringify(P.data);return S.setAttribute("data-json",F),(A=n.interceptor)==null||A.clear(),g==null?void 0:g(x,{form:S,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(),S.reportValidity(),g==null?void 0:g(x,{form:S,json:T,event:x,reset:I,data:T,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(L=>String(L))}))})},m=g=>ed(a,g)||"",v=g=>({...g,id:t,name:t});return E.useEffect(()=>{var g;n.interceptor&&((g=n.interceptor)==null||g.set(a))},[a]),{get:m,input:h,state:a,errors:r,select:d,checkbox:p,onSubmit:y,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},$j=e=>e?JSON.parse(e.getAttribute("data-json")):{},zj=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},w1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},T1={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},Bj={name:"dark",rounded:w1,spacing:T1,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%)"}}}},Hj={rounded:w1,spacing:T1,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"},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, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},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%, 86%)",text:"hsla(210, 30%, 86%)"},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%)"}}}},Wj=Bj,qj=Hj,Uj=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...ps,...e.tweaks},parser:e.parser||us.hsla,map:{...fs,...e.map}}),[e]);return b.jsx(Fo.Provider,{value:t,children:e.children})},Gj=()=>{const e=E.useContext(Fo);return e?e.parser:us.hsla};ee.Alert=OA,ee.Autocomplete=CL,ee.Button=po,ee.Calendar=ab,ee.Card=sb,ee.Checkbox=Sf,ee.ColType=si,ee.Collapse=ay,ee.ComponentsProvider=Uj,ee.Context=Fo,ee.DatePicker=PL,ee.Dropdown=Xo,ee.Empty=lb,ee.Expand=wN,ee.FileUpload=$2,ee.Form=z2,ee.Input=ma,ee.InputFeedback=U0,ee.InputField=ha,ee.Menu=EN,ee.MenuItem=SN,ee.Modal=FN,ee.MultiSelect=K2,ee.Notifications=SM,ee.Polymorph=on,ee.Radiobox=Z2,ee.RenderOnView=nS,ee.Select=to,ee.Stats=EM,ee.Switch=X2,ee.Tab=PM,ee.Table=oj,ee.Tabs=CM,ee.Tag=Tc,ee.TaskList=Q2,ee.Textarea=J2,ee.Timeline=AM,ee.TimelineItem=bs,ee.Toolbar=LN,ee.Tooltip=Kx,ee.TransferList=nV,ee.createColumns=PV,ee.createCssProperties=gO,ee.createDesignTokens=Zy,ee.createFormStorage=jj,ee.createOptionCols=Uf,ee.createStyles=hO,ee.createTheme=mO,ee.createTokenStyles=vO,ee.css=$e,ee.defaultDarkTheme=Wj,ee.defaultLightTheme=qj,ee.defaultTranslations=fs,ee.defaultTweaks=ps,ee.dispatchInput=Lh,ee.formReset=Jw,ee.formToJson=b1,ee.getJsonForm=$j,ee.getSchemaShape=io,ee.hasVerticalScroll=Vh,ee.initializeInputDataset=gi,ee.isReactComponent=XT,ee.isReactFC=QT,ee.isSsr=Gi,ee.mergeRefs=wc,ee.negate=bO,ee.noop=nd,ee.parsers=us,ee.path=ed,ee.reduceTokens=No,ee.safeRegex=td,ee.splitInto=eb,ee.useColorParser=Gj,ee.useForm=Rj,ee.useLocale=Ju,ee.useNotification=wM,ee.usePrevious=zj,ee.useReactive=Lb,ee.useTablePreferences=IV,ee.useTranslations=Ot,ee.uuid=Ui,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|
|
197
197
|
//# sourceMappingURL=index.umd.js.map
|